Systemd/src/login
Lennart Poettering 0d53667334 tree-wide: use __fsetlocking() instead of fxyz_unlocked()
Let's replace usage of fputc_unlocked() and friends by __fsetlocking(f,
FSETLOCKING_BYCALLER). This turns off locking for the entire FILE*,
instead of doing individual per-call decision whether to use normal
calls or _unlocked() calls.

This has various benefits:

1. It's easier to read and easier not to forget

2. It's more comprehensive, as fprintf() and friends are covered too
   (as these functions have no _unlocked() counterpart)

3. Philosophically, it's a bit more correct, because it's more a
   property of the file handle really whether we ever pass it on to another
   thread, not of the operations we then apply to it.

This patch reworks all pieces of codes that so far used fxyz_unlocked()
calls to use __fsetlocking() instead. It also reworks all places that
use open_memstream(), i.e. use stdio FILE* for string manipulations.

Note that this in some way a revert of 4b61c87511.
2017-12-14 10:42:25 +01:00
..
70-power-switch.rules Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
70-uaccess.rules Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
71-seat.rules.in Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
73-seat-late.rules.in Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
inhibit.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
loginctl.c *: fix some inconsistent control statement style 2017-12-01 16:49:52 -08:00
logind-acl.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-acl.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-action.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-action.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-button.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-button.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-core.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-dbus.c logind: fix sysfs change trigger code 2017-11-29 12:32:57 +01:00
logind-device.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-device.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-gperf.gperf tree-wide: adjust fall through comments so that gcc is happy 2017-11-20 13:06:25 -08:00
logind-inhibit.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-inhibit.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-seat-dbus.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-seat.c tree-wide: use __fsetlocking() instead of fxyz_unlocked() 2017-12-14 10:42:25 +01:00
logind-seat.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-session-dbus.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-session-device.c logind: use the new FDSTOREREMOVE=1 sd_notify() message 2017-11-27 17:04:04 +01:00
logind-session-device.h logind: use the new FDSTOREREMOVE=1 sd_notify() message 2017-11-27 17:04:04 +01:00
logind-session.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-session.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-user-dbus.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-user.c tree-wide: use __fsetlocking() instead of fxyz_unlocked() 2017-12-14 10:42:25 +01:00
logind-user.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-utmp.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind.conf.in logind: change TasksMax= value for user logins to 33% 2016-07-22 15:33:13 +02:00
logind.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
meson.build Add license headers and SPDX identifiers to meson.build files 2017-11-19 19:08:15 +01:00
org.freedesktop.login1.conf Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
org.freedesktop.login1.policy.in Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
org.freedesktop.login1.service Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
pam_systemd.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
pam_systemd.sym Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
sysfs-show.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
sysfs-show.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
systemd-user.m4 pam: include pam_keyinit.so in our PAM fragments 2016-12-13 20:59:36 +01:00
test-inhibit.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-login-shared.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-login-tables.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00