Date: Thu, 29 May 2003 08:29:54 +0400 From: Alexey Neyman <alex.neyman@auriga.ru> To: Alexey Neyman <alex.neyman@auriga.ru> Cc: freebsd-hackers@FreeBSD.org Subject: Re: should pw(8) accept spaces/tabs in passwords? Message-ID: <200305290829.54686.alex.neyman@auriga.ru> In-Reply-To: <200305290825.55132.alex.neyman@auriga.ru> References: <200305290825.55132.alex.neyman@auriga.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
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@auriga.ru `------------------( Les Rois du Monde )-'
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305290829.54686.alex.neyman>