]> git.ipfire.org Git - thirdparty/systemd.git/commit
basic/user-util: avoid filesystem access check
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 19 Aug 2022 14:45:08 +0000 (16:45 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 24 Aug 2022 08:02:46 +0000 (10:02 +0200)
commit36bac2dcba7ee77d80900af6ddba347242ffe7a5
tree90f387b975e1f6c2ba90241fdf43b3ef93abaf23
parent4c795066b63a15fc20913469df6a926c7aeff1f8
basic/user-util: avoid filesystem access check

The check of u==UID_NOBODY is just a register comparison, but
synthesize_nobody() requires a system call, so let's invert the order in the
condition. Since most calls into this module are not for nobody, we should
save one syscall in the common case.
src/basic/user-util.c