summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-02-26 18:39:20 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-03-04 21:45:45 -0500
commitc1ab81916286747a1b466716188f05ae373dff6e (patch)
tree731d36182d9037635816cacf0424989908d5260c /src/test
parent134953c99c7441c4fa2d8000face10608f8832ec (diff)
Enable test-ipcrm, test-hostname in unsafe tests
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-ipcrm.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/test/test-ipcrm.c b/src/test/test-ipcrm.c
index 2464d32458..47b1c4443d 100644
--- a/src/test/test-ipcrm.c
+++ b/src/test/test-ipcrm.c
@@ -23,9 +23,14 @@
int main(int argc, char *argv[]) {
uid_t uid;
-
- assert_se(argc == 2);
- assert_se(parse_uid(argv[1], &uid) >= 0);
+ int r;
+ const char* name = argv[1] ?: "nfsnobody";
+
+ r = get_user_creds(&name, &uid, NULL, NULL, NULL);
+ if (r < 0) {
+ log_error("Failed to resolve \"nobody\": %m");
+ return EXIT_FAILURE;
+ }
return clean_ipc(uid) < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}