Age | Commit message (Collapse) | Author |
|
Implements customization for the indicator as proposed in #2788 with comments from #3367 in mind.
The default behaviour does not change exept for the caps lock text color.
|
|
Rewrite strip_whitespace and remove readline.c
|
|
Partially fixes #2788. This change makes it so the lock screen is
redrawn whenever the caps lock modifier state changes, rather
on relying on the keypress event. This didn't work because
caps lock is disabled when the key is released, not pressed,
so the caps lock indicator does not go away until the next
keypress event.
|
|
All occurrences of read_line have been replaced by getline.
peek_line has been absorbed into detect_brace.
|
|
Ctrl-D functions as EOF in most cases on the terminal. login(1) & many other
programs check the password on EOF, same as Enter. To make behavior consistent,
have swaylock submit the password on Ctrl-D.
This commit moves the handling for Enter into its own static function, which is
now also called on Ctrl-D.
|
|
I've got in the habit of using Ctrl-C with login(1) to restart password entry.
If Sway does the same thing I don't have to retrain my login muscle memory ;)
|
|
bahavior -> behavior
|
|
Signed-off-by: Cameron Nemo <camerontnorman@gmail.com>
|
|
And make sure we don't define both in the same source file.
|
|
|
|
swaylock: exit early if unable to get input inhibitor
|
|
|
|
|
|
This stops the program from going into a spinlock without exiting
|
|
|
|
The referenced constants were not defined so it always printed "version
unknown".
Also it would exit with code 1. It now exits with code 0.
|
|
|
|
timerfd doesn't work on the BSDs, so this replaces it with a timespec
for the expiry and uses a poll timeout to check the timers when needed.
|
|
|
|
|
|
|
|
|
|
|
|
Today I learned that GNU flaunts the POSIX standard in yet another
creative way. Additionally, this adds some security improvements,
namely:
- Zeroing out password buffers in the privileged child process
- setuid/setgid after reading /etc/shadow
|
|
|
|
It's better to use DT_RPATH dynamic section of the elf binary to store
the paths of libraries to load instead of overwriting LD_LIBRARY_PATH
for the whole environment, causing surprises. This solution is much more
transparent and perfectly suitable for running contained installations
of wayland/wlroots/sway.
The code unsetting the LD_LIBRARY_PATH/LD_PRELOAD was also deleted as
it's a placebo security at best - we should trust the execution path
that leads us to running sway, and it's way too late to care about those
variables since we already started executing our compositor, thus we
would be compromised anyway.
|
|
If they really do not take undefined number of arguments.
|
|
This involves setuid'ing swaylock, which then forks and drops perms on
the parent process. The child process remains root and listens on a pipe
for requests to validate passwords against /etc/shadow.
|
|
and lines with subpixel hinting (if available).
|
|
The "login" PAM configuration means somathing entirely different on
FreeBSD than on Linux: if you try to authenticate as the calling user,
it OKs the request without prompting for password. The "passwd" config
implements the desired functionality, therefore it should be used by
swaylock.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Displaying verified after damaging state needs more than one roundtrip,
so keep looping until surfaces are not dirty anymore
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The whole state->xcb.modifiers thing didn't work at all (always 0)
The xkb doc says "[xkb_state_serialize_mods] should not be used in
regular clients; please use the xkb_state_mod_*_is_active API instead"
so here it is
|
|
|
|
|