]> andersk Git - openssh.git/commitdiff
20070326
authortim <tim>
Mon, 26 Mar 2007 16:35:28 +0000 (16:35 +0000)
committertim <tim>
Mon, 26 Mar 2007 16:35:28 +0000 (16:35 +0000)
 - (tim) [auth.c configure.ac defines.h session.c openbsd-compat/port-uw.c
   openbsd-compat/port-uw.h openbsd-compat/xcrypt.c] Rework libiaf test/defines
   to account for IRIX having libiaf but not set_id(). Patch with & ok dtucker@

ChangeLog
auth.c
configure.ac
defines.h
openbsd-compat/port-uw.c
openbsd-compat/port-uw.h
openbsd-compat/xcrypt.c
session.c

index 5ceac5d752976994475104c79bfee5ba8d9374c3..c1c1cbaa396419c0063d4c5974e2c6a32852095b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+20070326
+ - (tim) [auth.c configure.ac defines.h session.c openbsd-compat/port-uw.c
+   openbsd-compat/port-uw.h openbsd-compat/xcrypt.c] Rework libiaf test/defines
+   to account for IRIX having libiaf but not set_id(). Patch with & ok dtucker@
+
 20070325
  - (dtucker) [Makefile.in configure.ac] Replace single-purpose LIBSELINUX,
    LIBWRAP and LIBPAM variables in Makefile with the general-purpose
diff --git a/auth.c b/auth.c
index 505102f8ab57be897bf0f8f77657ffdc5680d437..c1e0f481221b1907c5295076f19a2b86ea02d8ad 100644 (file)
--- a/auth.c
+++ b/auth.c
@@ -115,11 +115,11 @@ allowed_user(struct passwd * pw)
        /* grab passwd field for locked account check */
 #ifdef USE_SHADOW
        if (spw != NULL)
-#if defined(HAVE_LIBIAF)  &&  !defined(BROKEN_LIBIAF)
+#ifdef USE_LIBIAF
                passwd = get_iaf_password(pw);
 #else
                passwd = spw->sp_pwdp;
-#endif /* HAVE_LIBIAF  && !BROKEN_LIBIAF */
+#endif /* USE_LIBIAF */
 #else
        passwd = pw->pw_passwd;
 #endif
@@ -141,9 +141,9 @@ allowed_user(struct passwd * pw)
                if (strstr(passwd, LOCKED_PASSWD_SUBSTR))
                        locked = 1;
 #endif
-#if defined(HAVE_LIBIAF)  &&  !defined(BROKEN_LIBIAF)
+#ifdef USE_LIBIAF
                free(passwd);
-#endif /* HAVE_LIBIAF  && !BROKEN_LIBIAF */
+#endif /* USE_LIBIAF */
                if (locked) {
                        logit("User %.100s not allowed because account is locked",
                            pw->pw_name);
index a43483ff0cadd377e9505c41cb6d40e4845ea00e..157cb6ff5c91eab8fc4eea9d908fb27d113d77ff 100644 (file)
@@ -1977,7 +1977,12 @@ fi
 # Search for SHA256 support in libc and/or OpenSSL
 AC_CHECK_FUNCS(SHA256_Update EVP_sha256)
 
-AC_CHECK_LIB(iaf, ia_openinfo)
+saved_LIBS="$LIBS"
+AC_CHECK_LIB(iaf, ia_openinfo, [
+       LIBS="$LIBS -liaf"
+       AC_CHECK_FUNCS(set_id, [SSHDLIBS="$SSHDLIBS -liaf"])
+])
+LIBS="$saved_LIBS"
 
 ### Configure cryptographic random number support
 
index 143ede9f36b9814aea3bc6896a48020a005752b1..8d97094c83d49bf6c38273e84cc8d2d404039d68 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -696,7 +696,8 @@ struct winsize {
 # define CUSTOM_SYS_AUTH_PASSWD 1
 #endif
 
-#ifdef HAVE_LIBIAF
+#if defined(HAVE_LIBIAF) && defined(HAVE_SET_ID) && !defined(BROKEN_LIBIAF)
+# define USE_LIBIAF
 # define CUSTOM_SYS_AUTH_PASSWD 1
 #endif
 
index 6f3523902590c90fe78e30cf46e1bda104b407d0..ebc229a6a06ef615b447231a271a9a21f8d3de39 100644 (file)
@@ -79,7 +79,7 @@ sys_auth_passwd(Authctxt *authctxt, const char *password)
 #endif /* UNIXWARE_LONG_PASSWORDS */
                result = (strcmp(xcrypt(password, salt), pw_password) == 0);
 
-#if !defined(BROKEN_LIBIAF)
+#ifdef USE_LIBIAF
        if (authctxt->valid)
                free(pw_password);
 #endif
@@ -127,7 +127,7 @@ nischeck(char *namep)
        functions that call shadow_pw() will need to free
  */
 
-#if !defined(BROKEN_LIBIAF)
+#ifdef USE_LIBIAF
 char *
 get_iaf_password(struct passwd *pw)
 {
@@ -144,6 +144,6 @@ get_iaf_password(struct passwd *pw)
        else
                fatal("ia_openinfo: Unable to open the shadow passwd file");
 }
-#endif /* !BROKEN_LIBIAF */
+#endif /* USE_LIBIAF */
 #endif /* HAVE_LIBIAF */
 
index 3589b2e446521989fa506f932e3383149f628679..263d8b5a754b329def0f03eceee88f1f7190f097 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "includes.h"
 
-#if defined(HAVE_LIBIAF)  &&  !defined(BROKEN_LIBIAF)
+#ifdef USE_LIBIAF
 char * get_iaf_password(struct passwd *pw);
 #endif
 
index 14899321fe4869f40444a42f8beaaac19b69751b..d8636bb398e107da73820616002f014d07d5445c 100644 (file)
@@ -98,7 +98,7 @@ shadow_pw(struct passwd *pw)
                pw_password = spw->sp_pwdp;
 # endif
 
-#if defined(HAVE_LIBIAF)  &&  !defined(BROKEN_LIBIAF)
+#ifdef USE_LIBIAF
        return(get_iaf_password(pw));
 #endif
 
index 4c97c4a7dddd39bb08a163c688857ae1eae3164e..32e592adb195e8fac09c5f482420b0e1f2caf5a1 100644 (file)
--- a/session.c
+++ b/session.c
@@ -1361,11 +1361,11 @@ do_setusercontext(struct passwd *pw)
 # ifdef _AIX
                aix_usrinfo(pw);
 # endif /* _AIX */
-#if defined(HAVE_LIBIAF)  &&  !defined(BROKEN_LIBIAF)
+#ifdef USE_LIBIAF
                if (set_id(pw->pw_name) != 0) {
                        exit(1);
                }
-#endif /* HAVE_LIBIAF  && !BROKEN_LIBIAF */
+#endif /* USE_LIBIAF */
                /* Permanently switch to the desired uid. */
                permanently_set_uid(pw);
 #endif
This page took 0.087938 seconds and 5 git commands to generate.