Date: Wed, 2 Nov 2005 01:57:17 -0800 (PST) From: Dan Toganel <dantoganelus@yahoo.com> To: freebsd-questions@freebsd.org Subject: FreeBSD auth Message-ID: <20051102095717.27512.qmail@web51310.mail.yahoo.com>
next in thread | raw e-mail | index | archive | help
Hello list, I'm a newbie in freebsd programming and i need some docs & hints in order to port a program from linux to FreeBSD. The piece of code is: .............................................. struct spwd* shadow=getspnam(name); if(!shadow) { ..... } char *key=crypt(passwd,shadow->sp_pwdp); if(!key) { .... } if(strncmp(shadow->sp_pwdp,key,strlen(shadow->sp_pwdp))==0) { /*login success*/ } else { /*login failed*/ } ........................................ I realize that in FreeBSD master.passwd is the replacement for linux shadow file. Is there a function to parse it? And how can i obtain the hash string? Thanks in advance for any help. __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051102095717.27512.qmail>