mirror of
https://github.com/systemd/systemd
synced 2024-10-14 20:17:52 +00: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 "process-util.h"
|
||||||
#include "signal-util.h"
|
#include "signal-util.h"
|
||||||
#include "string-util.h"
|
#include "string-util.h"
|
||||||
|
#include "strv.h"
|
||||||
#include "user-util.h"
|
#include "user-util.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
|
@ -104,7 +105,7 @@ int change_uid_gid(const char *user, char **_home) {
|
||||||
|
|
||||||
assert(_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 */
|
/* Reset everything fully to 0, just in case */
|
||||||
|
|
||||||
r = reset_uid_gid();
|
r = reset_uid_gid();
|
||||||
|
|
Loading…
Reference in a new issue