]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn: use STR_IN_SET() where we can
authorLennart Poettering <lennart@poettering.net>
Mon, 26 Feb 2018 14:30:05 +0000 (15:30 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 28 Feb 2018 09:00:50 +0000 (10:00 +0100)
src/nspawn/nspawn-setuid.c

index 029c4e79543a987a59c4ba9a903f56d0f3c1e1f5..a98fcc6844d86d1247fb93daf62fbd996ad81a05 100644 (file)
@@ -32,6 +32,7 @@
 #include "process-util.h"
 #include "signal-util.h"
 #include "string-util.h"
+#include "strv.h"
 #include "user-util.h"
 #include "util.h"
 
@@ -104,7 +105,7 @@ int change_uid_gid(const char *user, char **_home) {
 
         assert(_home);
 
-        if (!user || streq(user, "root") || streq(user, "0")) {
+        if (!user || STR_IN_SET(user, "root", "0")) {
                 /* Reset everything fully to 0, just in case */
 
                 r = reset_uid_gid();