mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
test-reread-partition-table: Only check for CAP_SYS_ADMIN
We might have CAP_SYS_ADMIN even without being root.
This commit is contained in:
@@ -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()");
|
||||
|
||||
Reference in New Issue
Block a user