*** empty log message ***

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@560 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1996-06-05 08:20:52 +00:00
parent 4c62f30e41
commit 35f4cd6e66

22
lib/roken/verify.c Normal file
View File

@@ -0,0 +1,22 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
RCSID("$Id$");
#endif
#include "roken.h"
int
verify_unix_user(char *user, char *password)
{
struct passwd *pw;
pw = k_getpwnam(user);
if(pw == NULL)
return -1;
if(strlen(pw->pw_passwd) == 0 && strlen(password) == 0)
return 0;
if(strcmp(crypt(password, pw->pw_passwd), pw->pw_passwd) == 0)
return 0;
return -1;
}