mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
nspawn: use STR_IN_SET() where we can
This commit is contained in:
parent
c5b82d86b5
commit
5018c0c9e8
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user