summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-05-15 05:57:31 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-05-15 05:57:31 +0000
commit99ad01b0d52703c938e3af1d95e49d77f53ef85e (patch)
treed500dae466a76693a332c2bbeaf2e3ef3e8d4cab /lib
parent6517e41a01789d32a1cbd29533a7b3ac27065316 (diff)
downloadcoreutils-99ad01b0d52703c938e3af1d95e49d77f53ef85e.tar.xz
Use geteuid, not getuid. Set "initialized" only if it was clear.
Diffstat (limited to 'lib')
-rw-r--r--lib/unlinkdir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/unlinkdir.c b/lib/unlinkdir.c
index c30aa1020..b12d2a492 100644
--- a/lib/unlinkdir.c
+++ b/lib/unlinkdir.c
@@ -59,11 +59,11 @@ cannot_unlink_dir (void)
}
# else
/* In traditional Unix, only root can unlink directories. */
- cannot = (getuid () != 0);
+ cannot = (geteuid () != 0);
# endif
+ initialized = true;
}
- initialized = true;
return cannot;
}