test: use NOBODY_USER_NAME instead of hard-coded string "noody"
This commit is contained in:
parent
ea781d0dd8
commit
a3d37fe9a3
|
@ -49,7 +49,7 @@ static void test_add_acls_for_user(void) {
|
|||
assert_se(system(cmd) == 0);
|
||||
|
||||
if (getuid() == 0) {
|
||||
const char *nobody = "nobody";
|
||||
const char *nobody = NOBODY_USER_NAME;
|
||||
r = get_user_creds(&nobody, &uid, NULL, NULL, NULL);
|
||||
if (r < 0)
|
||||
uid = 0;
|
||||
|
|
|
@ -108,7 +108,7 @@ static int setup_tests(bool *run_ambient) {
|
|||
struct passwd *nobody;
|
||||
int r;
|
||||
|
||||
nobody = getpwnam("nobody");
|
||||
nobody = getpwnam(NOBODY_USER_NAME);
|
||||
if (!nobody) {
|
||||
log_error_errno(errno, "Could not find nobody user: %m");
|
||||
return -EXIT_TEST_SKIP;
|
||||
|
|
Loading…
Reference in New Issue