should pw(8) accept spaces/tabs in passwords?
Alexey Neyman
alex.neyman at auriga.ru
Wed May 28 21:29:43 PDT 2003
On Thursday 29 May 2003 08:25, Alexey Neyman wrote:
> attached patch makes it behave consistently with passwd(1).
Seems that attachments are stripped somewhere on the way; resend inline.
Index: pw_user.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/pw/pw_user.c,v
retrieving revision 1.54
diff -u -r1.54 pw_user.c
--- pw_user.c 2003/02/11 02:17:11 1.54
+++ pw_user.c 2003/05/29 04:14:36
@@ -639,7 +639,7 @@
return EX_IOERR;
}
line[b] = '\0';
- if ((p = strpbrk(line, " \t\r\n")) != NULL)
+ if ((p = strpbrk(line, "\r\n")) != NULL)
*p = '\0';
if (!*line)
errx(EX_DATAERR, "empty password read on file descriptor %d", fd);
Index: pw_group.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/pw/pw_group.c,v
retrieving revision 1.13
diff -u -r1.13 pw_group.c
--- pw_group.c 2000/06/22 16:48:41 1.13
+++ pw_group.c 2003/05/29 04:14:37
@@ -192,7 +192,7 @@
return EX_OSERR;
}
line[b] = '\0';
- if ((p = strpbrk(line, " \t\r\n")) != NULL)
+ if ((p = strpbrk(line, "\r\n")) != NULL)
*p = '\0';
if (!*line)
errx(EX_DATAERR, "empty password read on file descriptor %d", fd);
--
,----------------------------------------,
| A quoi ca sert d'etre sur la terre | Alexey V. Neyman
| Si c'est pour faire nos vies a genoux! | mailto:alex.neyman at auriga.ru
`------------------( Les Rois du Monde )-'
More information about the freebsd-hackers
mailing list