diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2022-01-11 11:08:44 +0100 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2022-01-11 11:08:44 +0100 |
| commit | 4de296c16c87abc05133c7b7b835b052febbd311 (patch) | |
| tree | 5a90ce9af35404d979167fcca542cb86a610df06 | |
| parent | ac0d0a0552abc263ec2a41b1dfdb68233f50e486 (diff) | |
Print deprecation notice when running SUID
SUID privilege drop is needed for the "builtin"-backend of libseat,
which copied our old "direct" backend behavior for the sake of
compatibility and ease of transition.
libseat now has a better alternative in the form of seatd-launch. It
uses the normal seatd daemon and libseat backend and takes care of SUID
for us.
Add a soft deprecation warning to highlight our future intent of
removing this code. The deprecation cycle is needed to avoid surprises
when sway no longer drops privileges.
| -rw-r--r-- | sway/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/main.c b/sway/main.c index 6c71048b..b6f8a8bf 100644 --- a/sway/main.c +++ b/sway/main.c @@ -153,6 +153,9 @@ static void log_kernel(void) { static bool drop_permissions(void) { if (getuid() != geteuid() || getgid() != getegid()) { + sway_log(SWAY_ERROR, "!!! DEPRECATION WARNING: " + "SUID privilege drop will be removed in a future release, please migrate to seatd-launch"); + // Set the gid and uid in the correct order. if (setgid(getgid()) != 0) { sway_log(SWAY_ERROR, "Unable to drop root group, refusing to start"); |
