]> granicus.if.org Git - sudo/commitdiff
use SHADOW_TYPE instead of HAVE_C2_SECURITY
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 26 Jul 1996 03:46:42 +0000 (03:46 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 26 Jul 1996 03:46:42 +0000 (03:46 +0000)
getspwuid.c
sudo.c
tgetpass.c

index d84af1a656fd941bf2c6abc99c0f6e4187aa09fe..d8e51e6e0bd921608ce272537bcf8aec084f68d6 100644 (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 */
 
 
 /**********************************************************************
diff --git a/sudo.c b/sudo.c
index 22312700618a023fb902a7db1f866405135932ca..e99737574a17e60a0ce821028f5fa63b06e5fcdb 100644 (file)
--- a/sudo.c
+++ b/sudo.c
@@ -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;
index e906d1f070d37968dfecf522a7c98c5e0825e1f8..256b16003ec5c5db77b62ae4a7df2121d74bad2c 100644 (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"