From 6e958ef1b49b6a86d2c9a1fd68f98f9e84842aaa Mon Sep 17 00:00:00 2001 From: Joel Dahl Date: Mon, 13 May 2013 18:13:50 +0000 Subject: mdoc sweep --- pw/pw.conf.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pw/pw.conf.5 b/pw/pw.conf.5 index 3f023aa..61c40e8 100644 --- a/pw/pw.conf.5 +++ b/pw/pw.conf.5 @@ -32,7 +32,7 @@ .Nd format of the pw.conf configuration file .Sh DESCRIPTION The file -.In /etc/pw.conf +.Pa /etc/pw.conf contains configuration data for the .Xr pw 8 utility. -- cgit v1.2.3-56-ge451 From 569f264f242252a2000658d3f839081ea278d3c5 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Sat, 29 Jun 2013 15:54:17 +0000 Subject: Fix -Wunsequenced warning Submitted by: dt71@gmx.com --- pw/pw_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pw/pw_user.c b/pw/pw_user.c index 5f4d7a9..b49cfce 100644 --- a/pw/pw_user.c +++ b/pw/pw_user.c @@ -200,7 +200,7 @@ pw_user(struct userconf * cnf, int mode, struct cargs * args) strlcpy(dbuf, cnf->home, sizeof(dbuf)); p = dbuf; if (stat(dbuf, &st) == -1) { - while ((p = strchr(++p, '/')) != NULL) { + while ((p = strchr(p + 1, '/')) != NULL) { *p = '\0'; if (stat(dbuf, &st) == -1) { if (mkdir(dbuf, _DEF_DIRMODE) == -1) -- cgit v1.2.3-56-ge451 From f8be2bfe916f22187a352e2c4fc9e68d69a9dd46 Mon Sep 17 00:00:00 2001 From: Dag-Erling Smørgrav Date: Wed, 3 Jul 2013 09:48:24 +0000 Subject: There is no reason to disallow setting the password or account expiry date to the current date. MFC after: 3 days --- pw/pw_user.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pw/pw_user.c b/pw/pw_user.c index b49cfce..4d7e7ce 100644 --- a/pw/pw_user.c +++ b/pw/pw_user.c @@ -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; -- cgit v1.2.3-56-ge451 From 3e261d9b7cd823f63f23c7de4aaa0860b969f999 Mon Sep 17 00:00:00 2001 From: Dag-Erling Smørgrav Date: Thu, 4 Jul 2013 07:59:11 +0000 Subject: Fall back to sha512 if passwd_format is not set. MFC after: 3 days --- pw/pw_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pw/pw_user.c b/pw/pw_user.c index 4d7e7ce..def238c 100644 --- a/pw/pw_user.c +++ b/pw/pw_user.c @@ -573,7 +573,7 @@ pw_user(struct userconf * cnf, int mode, struct cargs * args) lc = login_getpwclass(pwd); if (lc == NULL || - login_setcryptfmt(lc, "md5", NULL) == NULL) + login_setcryptfmt(lc, "sha512", NULL) == NULL) warn("setting crypt(3) format"); login_close(lc); pwd->pw_passwd = pw_password(cnf, args, pwd->pw_name); -- cgit v1.2.3-56-ge451