/*----- Header files ------------------------------------------------------*/
+#include "config.h"
+
#include <errno.h>
+ #include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* --- Initialize variables --- */
ego(argv[0]);
- me = getuid();
+ me = geteuid();
- cp.cp_what = CP_WRWORLD | CP_WRGRP | CP_WROTHUSR | CP_STICKYOK;
+ cp.cp_what = (CP_WRWORLD | CP_WROTHGRP | CP_WROTHUSR |
+ CP_STICKYOK | CP_REPORT);
cp.cp_verbose = 0;
- cp.cp_report = 0;
+ cp.cp_report = report;
checkpath_setids(&cp);
+ cp.cp_gids = 0; /* ignore group membership */
pw = getpwuid(me);
if (!pw)
die(1, "you don't exist");
{ "usage", 0, 0, 'u' },
{ "bourne", 0, 0, 'b' },
{ "cshell", 0, 0, 'c' },
- { "verify", OPTF_ARGREQ, 0, 'v' },
+ { "check", OPTF_ARGREQ, 0, 'C' },
+ { "verify", OPTF_ARGREQ, 0, 'C' },
+ { "verbose", 0, 0, 'v' },
+ { "trust-groups", 0, 0, 't' },
+ { "group", OPTF_ARGREQ, 0, 'g' },
{ 0, 0, 0, 0 }
};
- int i = mdwopt(argc, argv, "hVu" "bcv:", opts, 0, 0, 0);
- int i = mdwopt(argc, argv, "hVu bcvtg:c:", opts, 0, 0, 0);
++ int i = mdwopt(argc, argv, "hVu" "bcvtg:c:", opts, 0, 0, 0);
if (i < 0)
break;