From: Daan De Meyer Date: Mon, 24 Nov 2025 11:51:14 +0000 (+0100) Subject: test-reread-partition-table: Only check for CAP_SYS_ADMIN X-Git-Tag: v259-rc2~35^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dee7dfea1db4291f2418a73487a90e7513c3cb8a;p=thirdparty%2Fsystemd.git test-reread-partition-table: Only check for CAP_SYS_ADMIN We might have CAP_SYS_ADMIN even without being root. --- diff --git a/src/test/test-reread-partition-table.c b/src/test/test-reread-partition-table.c index 33ab36c5f2c..f6234f0f8a4 100644 --- a/src/test/test-reread-partition-table.c +++ b/src/test/test-reread-partition-table.c @@ -47,7 +47,7 @@ TEST(rereadpt) { if (detect_container() > 0) return (void) log_tests_skipped("test not available in container"); - if (geteuid() != 0 || have_effective_cap(CAP_SYS_ADMIN) <= 0) + if (have_effective_cap(CAP_SYS_ADMIN) <= 0) return (void) log_tests_skipped("test requires privileges"); if (running_in_chroot() != 0) return (void) log_tests_skipped("test not available in chroot()");