File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -42,8 +42,24 @@ Run these commands:
4242 ninja -C build
4343 sudo ninja -C build install
4444
45- On systems without PAM, you need to suid the swaylock binary:
45+ ##### Without PAM
46+
47+ On systems without PAM, swaylock uses ` shadow.h ` .
48+
49+ Systems which rely on a tcb-like setup (either via musl's native support or via
50+ glibc+[ tcb] ), require no further action.
51+
52+ [ tcb ] : https://www.openwall.com/tcb/
53+
54+ For most other systems, where passwords for all users are stored in ` /etc/shadow ` ,
55+ swaylock needs to be installed suid:
4656
4757 sudo chmod a+s /usr/local/bin/swaylock
4858
59+ Optionally, on systems where the file ` /etc/shadow ` is owned by the ` shadow `
60+ group, the binary can be made sgid instead:
61+
62+ sudo chgrp shadow /usr/local/bin/swaylock
63+ sudo chmod g+s /usr/local/bin/swaylock
64+
4965Swaylock will drop root permissions shortly after startup.
Original file line number Diff line number Diff line change @@ -110,8 +110,9 @@ if libpam.found()
110110 sources += [' pam.c' ]
111111 dependencies += [libpam]
112112else
113- warning (' The swaylock binary must be setuid when compiled without libpam' )
113+ warning (' The swaylock binary often needs to be setuid when compiled without libpam' )
114114 warning (' You must do this manually post-install: chmod a+s /path/to/swaylock' )
115+ warning (' See the "Without PAM" section of the README for details.' )
115116 sources += [' shadow.c' ]
116117 dependencies += [crypt]
117118endif
You can’t perform that action at this time.
0 commit comments