diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-10-27 02:55:22 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-10-27 02:55:22 +0000 |
commit | 58363448b2cb724459f83723b02d99eb5bd8aed0 (patch) | |
tree | ffa85a16eca0d66e1efe55faf23fd3a331cbdfec /posix | |
parent | 44b60446803538e3d6f573f6a321b07e8c712212 (diff) | |
download | glibc-58363448b2cb724459f83723b02d99eb5bd8aed0.zip glibc-58363448b2cb724459f83723b02d99eb5bd8aed0.tar.gz glibc-58363448b2cb724459f83723b02d99eb5bd8aed0.tar.bz2 |
Update.
* posix/tst-chmod.c (do_test): Account for people running the
tests as root.
Diffstat (limited to 'posix')
-rw-r--r-- | posix/tst-chmod.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/posix/tst-chmod.c b/posix/tst-chmod.c index f7a37fa..b031fbe 100644 --- a/posix/tst-chmod.c +++ b/posix/tst-chmod.c @@ -146,8 +146,11 @@ do_test (int argc, char *argv[]) fd = creat (testfile, 0); if (fd != -1) { - puts ("managed to create test file in protected directory"); - result = 1; + if (getuid () != 0) + { + puts ("managed to create test file in protected directory"); + result = 1; + } close (fd); } if (errno != EACCES) @@ -167,8 +170,11 @@ do_test (int argc, char *argv[]) fd = creat (testfile, 0); if (fd != -1) { - puts ("managed to create test file in no-x protected directory"); - result = 1; + if (getuid () != 0) + { + puts ("managed to create test file in no-x protected directory"); + result = 1; + } close (fd); } if (errno != EACCES) @@ -311,8 +317,11 @@ do_test (int argc, char *argv[]) snprintf (buf, buflen, "./%s/file", basename (testdir)); if (chmod (buf, 0600) == 0) { - puts ("chmod(\".../file\") with no-exec directory succeeded"); - result = 1; + if (getuid () != 0) + { + puts ("chmod(\".../file\") with no-exec directory succeeded"); + result = 1; + } } else if (errno != EACCES) { |