Skip to content

security: restrict daemon access to root and 'droidspaces' group#98

Merged
ravindu644 merged 1 commit into
mainfrom
dev
May 11, 2026
Merged

security: restrict daemon access to root and 'droidspaces' group#98
ravindu644 merged 1 commit into
mainfrom
dev

Conversation

@ravindu644
Copy link
Copy Markdown
Owner

Abstract sockets do not respect standard filesystem permissions, which previously allowed any local user to connect to the daemon. This patch secures the daemon by enforcing identity verification via SO_PEERCRED.

Access is now restricted to:

  • The root user (UID 0)
  • Members of the 'droidspaces' group

Membership is verified using getgrouplist() to ensure all secondary groups are checked. This allows running droidspaces without sudo by setting up the group as follows:

groupadd droidspaces
sudo usermod -aG droidspaces $USER

Unauthorized users will now receive a "permission denied" message before the connection is terminated.

Abstract sockets do not respect standard filesystem permissions, which
previously allowed any local user to connect to the daemon. This patch
secures the daemon by enforcing identity verification via SO_PEERCRED.

Access is now restricted to:
- The root user (UID 0)
- Members of the 'droidspaces' group

Membership is verified using getgrouplist() to ensure all secondary
groups are checked. This allows running droidspaces without sudo by
setting up the group as follows:

    groupadd droidspaces
    sudo usermod -aG droidspaces $USER

Unauthorized users will now receive a "permission denied" message
before the connection is terminated.

Co-authored-by: Josh Law <joshlaw48@gmail.com>
Co-authored-by: Yoshinobu Date <yoshinobu.em@gmail.com>
Signed-off-by: ravindu644 <droidcasts@protonmail.com>
@ravindu644 ravindu644 merged commit b86691a into main May 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant