Re: should pw(8) accept spaces/tabs in passwords?

From: Alexey Neyman (alex.neyman_at_auriga.ru)
Date: 05/29/03

  • Next message: Joel V: "Problem adding new disk to existing installation (FreeBSD 4.8)"
    To: Alexey Neyman <alex.neyman@auriga.ru>
    Date: Thu, 29 May 2003 08:29:54 +0400
    
    

    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 )-'
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: Joel V: "Problem adding new disk to existing installation (FreeBSD 4.8)"