Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default socket is world-writteable #224

Open
WhyNotHugo opened this issue Aug 14, 2023 · 2 comments
Open

Default socket is world-writteable #224

WhyNotHugo opened this issue Aug 14, 2023 · 2 comments

Comments

@WhyNotHugo
Copy link

The default socket is created world-writable, which makes is accessible to all users (even nobody):

> ls -l /var/run/usbmuxd 
srw-rw-rw-    1 root     root             0 Aug 14 10:02 /var/run/usbmuxd
@WhyNotHugo
Copy link
Author

I see that main.c does an explicit chmod(socket_addr, 0666);.

I'd suggest changing this to 0660 and changing owner to user=usbmux, group=usb. Group can also be plugdev, maybe?

This might break some people's setup, so it would need to be well documented as a breaking change.

@WhyNotHugo
Copy link
Author

WhyNotHugo commented Aug 15, 2023

As an alternative approach, the socket could be moved into a subdirectory (e.g.: /run/usbmux/), so a local administrator can manage the permission of this directory.

This would also make it easier to make usbmuxd accessible from sandboxes.

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

No branches or pull requests

1 participant