use SHADOW_TYPE instead of HAVE_C2_SECURITY

This commit is contained in:
Todd C. Miller
1996-07-26 03:46:42 +00:00
parent b543114b06
commit e7999949e4
3 changed files with 18 additions and 14 deletions

View File

@@ -52,7 +52,7 @@ static char rcsid[] = "$Id$";
#include <pwd.h>
#include "sudo.h"
#include <options.h>
#ifdef SHADOW_TYPE
#if (SHADOW_TYPE != SPW_NONE) && (SHADOW_TYPE != SPW_BSD)
# if (SHADOW_TYPE == SPW_SVR4)
# include <shadow.h>
# endif /* SVR4 */
@@ -72,7 +72,7 @@ static char rcsid[] = "$Id$";
# include <sys/audit.h>
# include <pwdadj.h>
# endif /* SUNOS4 */
#endif /* SHADOW_TYPE */
#endif /* SHADOW_TYPE != SPW_NONE && SHADOW_TYPE != SPW_BSD */
#ifndef STDC_HEADERS
#ifndef __GNUC__ /* gcc has its own malloc */
@@ -137,7 +137,7 @@ static char *sudo_getshell(pw_ent)
static char *sudo_getspwd(pw_ent)
struct passwd *pw_ent;
#ifdef SHADOW_TYPE
#if (SHADOW_TYPE != SPW_NONE) && (SHADOW_TYPE != SPW_BSD)
# if (SHADOW_TYPE == SPW_SVR4)
{
struct spwd *spw_ent;
@@ -183,9 +183,9 @@ static char *sudo_getspwd(pw_ent)
struct pr_passwd *spw_ent;
if ((spw_ent = getprpwuid(pw_ent->pw_uid)) && spw_ent->ufld.fd_encrypt) {
#ifdef __alpha
# ifdef __alpha
crypt_type = spw_ent -> ufld.fd_oldcrypt;
#endif /* __alpha */
# endif /* __alpha */
return(spw_ent -> ufld.fd_encrypt);
} else
return(pw_ent -> pw_passwd);
@@ -195,7 +195,7 @@ static char *sudo_getspwd(pw_ent)
{
return(pw_ent->pw_passwd);
}
#endif /* SHADOW_TYPE */
#endif /* SHADOW_TYPE != SPW_NONE && SHADOW_TYPE != SPW_BSD */
/**********************************************************************

16
sudo.c
View File

@@ -83,10 +83,14 @@ static char rcsid[] = "$Id$";
#include <sys/param.h>
#include <netinet/in.h>
#include <netdb.h>
#if defined(__osf__) && defined(HAVE_C2_SECURITY)
#include <sys/security.h>
#include <prot.h>
#endif /* __osf__ && HAVE_C2_SECURITY */
#if (SHADOW_TYPE == SPW_SECUREWARE)
# ifdef __hpux
# include <hpsecurity.h>
# else
# include <sys/security.h>
# endif /* __hpux */
# include <prot.h>
#endif /* SPW_SECUREWARE */
#ifdef HAVE_DCE
#include <pthread.h>
#endif /* HAVE_DCE */
@@ -184,9 +188,9 @@ int main(argc, argv)
int sudo_mode = MODE_RUN;
extern char ** environ;
#if defined(SHADOW_TYPE) && (SHADOW_TYPE == SPW_SECUREWARE)
#if (SHADOW_TYPE == SPW_SECUREWARE)
(void) set_auth_parameters(argc, argv);
#endif /* SHADOW_TYPE && SPW_SECUREWARE */
#endif /* SPW_SECUREWARE */
Argv = argv;
Argc = argc;

View File

@@ -64,14 +64,14 @@ static char rcsid[] = "$Id$";
#include <sys/ioctl.h>
#endif /* HAVE_TERMIO_H */
#endif /* HAVE_TERMIOS_H */
#if defined(SHADOW_TYPE) && (SHADOW_TYPE == SPW_SECUREWARE)
#if (SHADOW_TYPE == SPW_SECUREWARE)
# ifdef __hpux
# include <hpsecurity.h>
# else
# include <sys/security.h>
# endif /* __hpux */
# include <prot.h>
#endif /* SHADOW_TYPE == SPW_SECUREWARE */
#endif /* SPW_SECUREWARE */
#include <pathnames.h>
#include "compat.h"