From a3d37fe9a359c81475a5d2db8c6574e05e88aa71 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 7 Dec 2017 15:48:44 +0900 Subject: [PATCH] test: use NOBODY_USER_NAME instead of hard-coded string "noody" --- src/test/test-acl-util.c | 2 +- src/test/test-capability.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/test-acl-util.c b/src/test/test-acl-util.c index 7b66e189ba..70ffdbc519 100644 --- a/src/test/test-acl-util.c +++ b/src/test/test-acl-util.c @@ -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; diff --git a/src/test/test-capability.c b/src/test/test-capability.c index 6c41e1ca15..e5db52d404 100644 --- a/src/test/test-capability.c +++ b/src/test/test-capability.c @@ -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;