iflg = false, /* -i - set inactive days */
kflg = false, /* -k - change only if expired */
lflg = false, /* -l - lock the user's password */
- nflg = false, /* -n - set minimum days */
qflg = false, /* -q - quiet mode */
Sflg = false, /* -S - show password status */
uflg = false, /* -u - unlock the user's password */
*/
static bool anyflag = false;
-static long age_min = 0; /* Minimum days before change */
static long age_max = 0; /* Maximum days until change */
static long warn = 0; /* Warning days before change */
static long inact = 0; /* Days without change before locked */
(void) fputs (_(" -i, --inactive INACTIVE set password inactive after expiration\n"
" to INACTIVE\n"), usageout);
(void) fputs (_(" -l, --lock lock the password of the named account\n"), usageout);
- (void) fputs (_(" -n, --mindays MIN_DAYS set minimum number of days before password\n"
- " change to MIN_DAYS\n"), usageout);
(void) fputs (_(" -q, --quiet quiet mode\n"), usageout);
(void) fputs (_(" -r, --repository REPOSITORY change password in REPOSITORY repository\n"), usageout);
(void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
if (xflg) {
nsp->sp_max = age_max;
}
- if (nflg) {
- nsp->sp_min = age_min;
- }
if (wflg) {
nsp->sp_warn = warn;
}
ret ? SHADOW_AUDIT_SUCCESS : SHADOW_AUDIT_FAILURE);
}
/* Audit aging parameter changes if any were modified */
- if (xflg || nflg || wflg || iflg) {
+ if (xflg || wflg || iflg) {
char aging_msg[256];
stprintf_a(aging_msg,
"changed-password-aging min=%ld max=%ld warn=%ld inact=%ld",
* -i # set sp_inact to # days (*)
* -k change password only if expired
* -l lock the password of the named account (*)
- * -n # set sp_min to # days (*)
* -r # change password in # repository
* -S show password status of named account
* -u unlock the password of the named account (*)
{"inactive", required_argument, NULL, 'i'},
{"keep-tokens", no_argument, NULL, 'k'},
{"lock", no_argument, NULL, 'l'},
- {"mindays", required_argument, NULL, 'n'},
{"quiet", no_argument, NULL, 'q'},
{"repository", required_argument, NULL, 'r'},
{"root", required_argument, NULL, 'R'},
lflg = true;
anyflag = true;
break;
- case 'n':
- if (a2sl(&age_min, optarg, NULL, 0, -1, LONG_MAX)
- == -1)
- {
- fprintf (stderr,
- _("%s: invalid numeric argument '%s'\n"),
- Prog, optarg);
- usage (E_BAD_ARG);
- }
- nflg = true;
- anyflag = true;
- break;
case 'q':
qflg = true; /* ok for users */
break;