1
1
mirror of https://github.com/swaywm/sway synced 2024-11-05 23:20:54 +01:00
sway/swaylock/meson.build
Drew DeVault c89e00a97e Fix swaylock w/shadow on glibc, improve security
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
2018-10-06 12:20:12 -04:00

56 lines
1.0 KiB
Meson

sysconfdir = get_option('sysconfdir')
dependencies = [
cairo,
client_protos,
gdk_pixbuf,
math,
pango,
pangocairo,
xkbcommon,
wayland_client,
wlroots,
]
sources = [
'main.c',
'password.c',
'render.c',
'seat.c'
]
if libpam.found()
sources += ['pam.c']
dependencies += [libpam]
else
warning('The swaylock binary must be setuid when compiled without libpam')
warning('You must do this manually post-install: chmod a+s /path/to/swaylock')
sources += ['shadow.c']
if crypt.found()
dependencies += [crypt]
endif
endif
executable('swaylock',
sources,
include_directories: [sway_inc],
dependencies: dependencies,
link_with: [lib_sway_common, lib_sway_client],
install_rpath : rpathdir,
install: true
)
if is_freebsd
install_data(
'pam/swaylock.freebsd',
install_dir: sysconfdir + '/pam.d/',
rename: 'swaylock'
)
else
install_data(
'pam/swaylock.linux',
install_dir: sysconfdir + '/pam.d/',
rename: 'swaylock'
)
endif