From: Mark Wooding Date: Sun, 13 Apr 2008 20:53:16 +0000 (+0100) Subject: tmpdir: Use checkpath functions. X-Git-Tag: 1.2.1~5 X-Git-Url: https://git.distorted.org.uk/~mdw/checkpath/commitdiff_plain/cf4df2cf2dec298031c255ae45e7c2a758c9add7 tmpdir: Use checkpath functions. Use checkpath_addgid to implement the -g option. Don't call checkpath_setids at all; instead use the effective user-id. --- diff --git a/tmpdir.c b/tmpdir.c index f0fcb5f..466b29c 100644 --- 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)