des_crypt broken?
Denys Vlasenko
vda.linux at googlemail.com
Fri May 1 01:43:46 UTC 2009
On Thursday 30 April 2009 11:44, Marc Leeman wrote:
> When looking into a problem with su on 1.14.0; I noticed that a call to
> des_crypt returns an extra '.' at the end of my password hash:
>
> $ /tmp/busybox.1.14.0 su -
> su: DES crypt.
> su: Got encrypted password "AD/RWViaSZiqY.".
>
> $ cat /etc/passwd
> root:AD/RWViaSZiqY:0:0:root:/root:/bin/sh
>
> Considering DES, the (13 chars); this '.' is probably wrong.
>
> I "fixed" this by adding:
> output[13] = NULL;
>
> just before return output in des_crypt; there is probably a better
> location to do this.
No, actually, your fix is correct. Thanks.
http://busybox.net/downloads/fixes-1.14.0/busybox-1.14.0-des.patch
--
vda
More information about the busybox
mailing list