From owner-freebsd-hackers Sat Aug 16 17:38:54 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id RAA21010 for hackers-outgoing; Sat, 16 Aug 1997 17:38:54 -0700 (PDT) Received: from counterintelligence.ml.org (mdean.vip.best.com [206.86.94.101]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id RAA21005 for ; Sat, 16 Aug 1997 17:38:50 -0700 (PDT) Received: from localhost (jamil@localhost) by counterintelligence.ml.org (8.8.6/8.8.5) with SMTP id RAA00522 for ; Sat, 16 Aug 1997 17:38:12 -0700 (PDT) Date: Sat, 16 Aug 1997 17:38:12 -0700 (PDT) From: "Jamil J. Weatherbee" To: freebsd-hackers@freebsd.org Subject: Password Handling Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I've been looking through the source code to login.c and various .h files, can someone tell me why login.c defines NBUFSIZE (size of the login name buffer i think) as UT_NAMESIZE+64, where UT_NAMESIZE is 8 (from utmp.h), even though MAXLOGNAME from sys/param.h is 12. The reason I am asking is that I am designing a server that requires user logins (I have looked at ftpd.c also) and am wondering if it is appropriate to use the figure in sys/param.h as the max user name length. Also another thing that confuses me a bit with freebsd is crypt is systems that use DES you can do a crypt on the plain text and a strcmp against the encrypted password returned from getpwnam(), in freebsd with shadowed passwords and either md5 or des are password checks handled the same assuming your daemon is running uid 0?