version 1.25, 2015/07/26 19:49:11 |
version 1.26, 2015/07/26 20:47:01 |
|
|
int ngroups; |
int ngroups; |
int i, ch; |
int i, ch; |
int sflag = 0; |
int sflag = 0; |
|
int nflag = 0; |
|
|
while ((ch = getopt(argc, argv, "C:su:")) != -1) { |
uid = getuid(); |
|
while ((ch = getopt(argc, argv, "C:nsu:")) != -1) { |
switch (ch) { |
switch (ch) { |
case 'C': |
case 'C': |
confpath = optarg; |
confpath = optarg; |
|
|
if (parseuid(optarg, &target) != 0) |
if (parseuid(optarg, &target) != 0) |
errx(1, "unknown user"); |
errx(1, "unknown user"); |
break; |
break; |
|
case 'n': |
|
nflag = 1; |
|
break; |
case 's': |
case 's': |
sflag = 1; |
sflag = 1; |
break; |
break; |
|
|
} |
} |
|
|
if (!(rule->options & NOPASS)) { |
if (!(rule->options & NOPASS)) { |
|
if (nflag) |
|
errx(1, "Authorization required"); |
if (!auth_userokay(myname, NULL, NULL, NULL)) { |
if (!auth_userokay(myname, NULL, NULL, NULL)) { |
syslog(LOG_AUTHPRIV | LOG_NOTICE, |
syslog(LOG_AUTHPRIV | LOG_NOTICE, |
"failed password for %s", myname); |
"failed password for %s", myname); |