* libmisc/strtoday.c: Add support for numerical dates, assuming
they are already specified in number of days since Epoch. Return -2 in case of errors to support the specification of -1. * src/usermod.c, src/useradd.c: Adapt to the new error value of strtoday(). * src/chage.c: Remove isnum(). Adapt to the new error value of strtoday(). Support for numerical dates is moved to strtoday().
This commit is contained in:
@ -940,7 +940,7 @@ static void process_flags (int argc, char **argv)
|
||||
case 'e':
|
||||
if ('\0' != *optarg) {
|
||||
user_newexpire = strtoday (optarg);
|
||||
if (user_newexpire == -1) {
|
||||
if (user_newexpire < -1) {
|
||||
fprintf (stderr,
|
||||
_("%s: invalid date '%s'\n"),
|
||||
Prog, optarg);
|
||||
|
Reference in New Issue
Block a user