Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Dec 1995 17:13:19 -0500 (EST)
From:      Lawrence Lopez <lopez@mv.MV.COM>
To:        bugs@freebsd.org
Subject:   Seconds Yellow Pages Bug
Message-ID:  <199512012213.RAA04139@mv.mv.com>

next in thread | raw e-mail | index | archive | help
Fri Dec  1 16:22:11 EST 1995
off of gatekeeper.dec.com:


yp_passwd	Garbage passed to yppasswdd

	As a result of not terminating a string
garbage is being passwd to yppasswdd.

FreeBSD 2.0.5 from walnut creek and
ftp://gatekeeper.dec.com
/pub/BSD/FreeBSD/FreeBSD-current
/src/usr.bin/passwd/local_passwd.c

I have shown the correction for the later version.
	
		In:
char *
getnewpasswd(pw, nis)
        struct passwd *pw;
        int nis;

		The code:

#ifdef NEWSALT
        salt[0] = _PASSWORD_EFMT1;
        to64(&salt[1], (long)(29 * 25), 4);
        to64(&salt[5], random(), 4);
#else
        /* Make a good size salt for algoritms that can use it. */
        to64(&salt[0], random(), 3);
        gettimeofday(&tv,0);
        to64(&salt[3], tv.tv_usec, 3);
        to64(&salt[6], tv.tv_sec, 2);
        salt[8] = '\0';
#endif

		Appears at the end. It needs the following:

	salt[9] = '\0';

		After:

	to64(&salt[5], random(), 4);


 
Thank you!

Larry Lopez.

If a better submission method exists or a straight update then
tell me.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512012213.RAA04139>