]> git.ipfire.org Git - thirdparty/systemd.git/commit
shared/condition: avoid nss lookup in PID1 24934/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 7 Oct 2022 15:34:53 +0000 (17:34 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 12 Oct 2022 06:01:01 +0000 (08:01 +0200)
commit734f96b8490a2c48712ff6754a84fcaeac3d53c1
treec00c8afe4427a9c82e525fd83058e3f6362f4870
parent9154bd57db6aed4823830638126b95bf7f63f25a
shared/condition: avoid nss lookup in PID1

PID 1 is not allowed to do nss lookups because this may take a long time or
even deadlock.

While at it, the comparisons are reordered to do the "easy" comparisons which
only require a string comparison first. Delay parsing of the UID until it is
really necessary. The result is the same, because we know that "root" and
"nobody" parse as valid.
src/shared/condition.c