From cf4df2cf2dec298031c255ae45e7c2a758c9add7 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sun, 13 Apr 2008 21:53:16 +0100 Subject: [PATCH] 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. --- tmpdir.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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) -- 2.11.0