chiark
/
gitweb
/
~mdw
/
checkpath
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a296501
)
tmpdir: Use checkpath functions.
author
Mark Wooding
<mdw@distorted.org.uk>
Sun, 13 Apr 2008 20:53:16 +0000
(21:53 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sun, 13 Apr 2008 20:53:16 +0000
(21:53 +0100)
Use checkpath_addgid to implement the -g option. Don't call
checkpath_setids at all; instead use the effective user-id.
tmpdir.c
patch
|
blob
|
blame
|
history
diff --git
a/tmpdir.c
b/tmpdir.c
index f0fcb5ff8ba948f302e17d1f2eb563ab5038db48..466b29c4ad436649178861545093097e5cf5a467 100644
(file)
--- a/
tmpdir.c
+++ b/
tmpdir.c
@@
-337,12
+337,11
@@
int main(int argc, char *argv[])
/* --- Initialize variables --- */
ego(argv[0]);
- me = geteuid();
+ me =
cp.cp_uid =
geteuid();
cp.cp_what = (CP_WRWORLD | CP_WROTHGRP | CP_WROTHUSR |
CP_STICKYOK | CP_REPORT);
cp.cp_verbose = 0;
cp.cp_report = report;
- checkpath_setids(&cp);
cp.cp_gids = 0; /* ignore group membership */
pw = getpwuid(me);
if (!pw)