s4:torture: Skip the deltest20 as user root
authorAndreas Schneider <asn@samba.org>
Thu, 30 Jan 2020 15:18:25 +0000 (16:18 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 30 Jan 2020 16:54:33 +0000 (16:54 +0000)
The test is meant to be run as a user and not root.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14257

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jan 30 16:54:33 UTC 2020 on sn-devel-184

source4/torture/basic/delete.c

index a8c4e3fa3f131db8f75f4d07226e3e37a68c6caa..d14d5a557467d86676dae37634968b862a25bc97 100644 (file)
@@ -1865,6 +1865,10 @@ static bool deltest20(struct torture_context *tctx, struct smbcli_state *cli1, s
        NTSTATUS status;
        int ret;
 
+       if (geteuid() == 0) {
+               torture_skip(tctx, "This test doesn't work as user root.");
+       }
+
        del_clean_area(cli1, cli2);
 
        /* Test 20 -- non-empty directory hardest to get right... */