]> git.cameronkatri.com Git - pw-darwin.git/commitdiff
There is no reason to disallow setting the password or account expiry
authorDag-Erling Smørgrav <des@FreeBSD.org>
Wed, 3 Jul 2013 09:48:24 +0000 (09:48 +0000)
committerDag-Erling Smørgrav <des@FreeBSD.org>
Wed, 3 Jul 2013 09:48:24 +0000 (09:48 +0000)
date to the current date.

MFC after: 3 days

pw/pw_user.c

index b49cfce958faaa423e586864384423a6f868487d..4d7e7ce4d3a49ba06dd76e898b39b6a48eb2662a 100644 (file)
@@ -513,8 +513,6 @@ pw_user(struct userconf * cnf, int mode, struct cargs * args)
                                time_t          now = time(NULL);
                                time_t          expire = parse_date(now, arg->val);
 
-                               if (now == expire)
-                                       errx(EX_DATAERR, "invalid password change date `%s'", arg->val);
                                if (pwd->pw_change != expire) {
                                        pwd->pw_change = expire;
                                        edited = 1;
@@ -533,8 +531,6 @@ pw_user(struct userconf * cnf, int mode, struct cargs * args)
                                time_t          now = time(NULL);
                                time_t          expire = parse_date(now, arg->val);
 
-                               if (now == expire)
-                                       errx(EX_DATAERR, "invalid account expiry date `%s'", arg->val);
                                if (pwd->pw_expire != expire) {
                                        pwd->pw_expire = expire;
                                        edited = 1;