moved SecureWare stuff into secureware.c
This commit is contained in:
43
check.c
43
check.c
@@ -66,14 +66,6 @@ static char rcsid[] = "$Id$";
|
|||||||
#include "sudo.h"
|
#include "sudo.h"
|
||||||
#include "insults.h"
|
#include "insults.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#ifdef HAVE_GETPRPWUID
|
|
||||||
# ifdef __hpux
|
|
||||||
# include <hpsecurity.h>
|
|
||||||
# else
|
|
||||||
# include <sys/security.h>
|
|
||||||
# endif /* __hpux */
|
|
||||||
# include <prot.h>
|
|
||||||
#endif /* HAVE_GETPRPWUID */
|
|
||||||
#ifdef HAVE_KERB4
|
#ifdef HAVE_KERB4
|
||||||
# include <krb.h>
|
# include <krb.h>
|
||||||
#endif /* HAVE_KERB4 */
|
#endif /* HAVE_KERB4 */
|
||||||
@@ -140,9 +132,6 @@ struct skey skey;
|
|||||||
#ifdef HAVE_OPIE
|
#ifdef HAVE_OPIE
|
||||||
struct opie opie;
|
struct opie opie;
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_GETPRPWUID) && defined(__alpha)
|
|
||||||
extern int crypt_type;
|
|
||||||
#endif /* HAVE_GETPRPWUID && __alpha */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -585,43 +574,15 @@ static void check_passwd()
|
|||||||
/*
|
/*
|
||||||
* If we use shadow passwords with a different crypt(3)
|
* If we use shadow passwords with a different crypt(3)
|
||||||
* check that here, else use standard crypt(3).
|
* check that here, else use standard crypt(3).
|
||||||
* XXX - break out into separate functions.
|
|
||||||
*/
|
*/
|
||||||
# ifdef HAVE_GETAUTHUID
|
# ifdef HAVE_GETAUTHUID
|
||||||
if (!strcmp(user_passwd, (char *) crypt16(pass, user_passwd)))
|
if (!strcmp(user_passwd, (char *) crypt16(pass, user_passwd)))
|
||||||
return; /* if the passwd is correct return() */
|
return; /* if the passwd is correct return() */
|
||||||
# endif /* HAVE_GETAUTHUID */
|
# endif /* HAVE_GETAUTHUID */
|
||||||
|
|
||||||
# ifdef HAVE_GETPRPWUID
|
# ifdef HAVE_GETPRPWUID
|
||||||
# ifndef __alpha
|
if (check_secureware(pass))
|
||||||
# ifdef HAVE_BIGCRYPT
|
|
||||||
if (strcmp(user_passwd, (char *) bigcrypt(pass, user_passwd)) == 0)
|
|
||||||
return; /* if the passwd is correct return() */
|
return; /* if the passwd is correct return() */
|
||||||
# endif /* HAVE_BIGCRYPT */
|
|
||||||
# else /* !__alpha */
|
|
||||||
switch (crypt_type) {
|
|
||||||
case AUTH_CRYPT_BIGCRYPT:
|
|
||||||
if (!strcmp(user_passwd, bigcrypt(pass, user_passwd)))
|
|
||||||
return; /* if the passwd is correct return() */
|
|
||||||
break;
|
|
||||||
case AUTH_CRYPT_CRYPT16:
|
|
||||||
if (!strcmp(user_passwd, crypt16(pass, user_passwd)))
|
|
||||||
return; /* if the passwd is correct return() */
|
|
||||||
break;
|
|
||||||
# ifdef AUTH_CRYPT_OLDCRYPT
|
|
||||||
case AUTH_CRYPT_OLDCRYPT:
|
|
||||||
case AUTH_CRYPT_C1CRYPT:
|
|
||||||
# endif
|
|
||||||
case -1:
|
|
||||||
if (!strcmp(user_passwd, crypt(pass, user_passwd)))
|
|
||||||
return; /* if the passwd is correct return() */
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
(void) fprintf(stderr,
|
|
||||||
"%s: Sorry, I don't know how to deal with crypt type %d.\n",
|
|
||||||
Argv[0], crypt_type);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
# endif /* __alpha */
|
|
||||||
# endif /* HAVE_GETPRPWUID */
|
# endif /* HAVE_GETPRPWUID */
|
||||||
|
|
||||||
/* Normal UN*X password check */
|
/* Normal UN*X password check */
|
||||||
|
Reference in New Issue
Block a user