diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2015-09-05 17:54:30 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2015-09-05 18:07:53 +0200 |
commit | 64ce4ad758f43029ea020afdacddad55fffa174d (patch) | |
tree | 385c30f66a5ce68aed6a1e0d6305713a687c6272 /hwdb/20-usb-vendor-model.hwdb | |
parent | 17258f5f27dd3dd57c36f2805e0a0c27a1aeabba (diff) |
sd-bus: derive uid from cgroup if possible
Whenever we run in a user context, sd_bus_{default_user,open_user}() and
friends should always connect to the user-bus of the current context,
instead of deriving the uid from getuid(). This allows us running
programs via sudo/su, without the nasty side-effect of accidentally
connecting to the root user-bus.
This patch enforces the idea of making su/sudo *not* opening sessions by
default. That is, all they do is raising privileges, but keeping
everything set as before. You can still use su/sudo to open real sessions
by requesting a login-session (or loading pam_systemd otherwise).
However, in this case XDG_RUNTIME_DIR= will not be set (as usual in these
cases), hence, you will not be able to connect to *any* user-bus.
Long story short: With this patch applied, both:
- ./busctl --user
- sudo ./busctl --user
..will successfully connect to the user-bus of the local user.
Fixes #390.
Diffstat (limited to 'hwdb/20-usb-vendor-model.hwdb')
0 files changed, 0 insertions, 0 deletions