- (tim) [configure.ac defines.h openbsd-compat/port-uw.c
   openbsd-compat/xcrypt.c] Add SECUREWARE support to OpenServer 6 SVR5 ABI.
   OK djm@ dtucker@
diff --git a/ChangeLog b/ChangeLog
index 93e72b3..6d7c7c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+20090107
+ - (tim) [configure.ac defines.h openbsd-compat/port-uw.c
+   openbsd-compat/xcrypt.c] Add SECUREWARE support to OpenServer 6 SVR5 ABI.
+   OK djm@ dtucker@
+
 20081209
  - (djm) OpenBSD CVS Sync
    - djm@cvs.openbsd.org 2008/12/09 02:38:18
@@ -4989,5 +4994,5 @@
    OpenServer 6 and add osr5bigcrypt support so when someone migrates
    passwords between UnixWare and OpenServer they will still work. OK dtucker@
 
-$Id: ChangeLog,v 1.5155 2008/12/09 03:12:33 djm Exp $
+$Id: ChangeLog,v 1.5156 2009/01/07 18:04:12 tim Exp $
 
diff --git a/configure.ac b/configure.ac
index 43732ab..df834ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.411 2008/12/07 22:35:36 djm Exp $
+# $Id: configure.ac,v 1.412 2009/01/07 18:04:12 tim Exp $
 #
 # Copyright (c) 1999-2004 Damien Miller
 #
@@ -15,7 +15,7 @@
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
-AC_REVISION($Revision: 1.411 $)
+AC_REVISION($Revision: 1.412 $)
 AC_CONFIG_SRCDIR([ssh.c])
 
 AC_CONFIG_HEADER(config.h)
@@ -741,6 +741,11 @@
 		AC_DEFINE(BROKEN_LIBIAF, 1,
 			[ia_uinfo routines not supported by OS yet])
 		AC_DEFINE(BROKEN_UPDWTMPX)
+		AC_CHECK_LIB(prot, getluid,[ LIBS="$LIBS -lprot"
+			AC_CHECK_FUNCS(getluid setluid,,,-lprot)
+			AC_DEFINE(HAVE_SECUREWARE)
+			AC_DEFINE(DISABLE_SHADOW)
+			],,)
 		;;
 	*)	AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
 		;;
diff --git a/defines.h b/defines.h
index a8203eb..610e149 100644
--- a/defines.h
+++ b/defines.h
@@ -25,7 +25,7 @@
 #ifndef _DEFINES_H
 #define _DEFINES_H
 
-/* $Id: defines.h,v 1.151 2008/07/04 13:10:49 djm Exp $ */
+/* $Id: defines.h,v 1.152 2009/01/07 18:04:12 tim Exp $ */
 
 
 /* Constants */
@@ -698,7 +698,7 @@
 # define CUSTOM_SYS_AUTH_PASSWD 1
 #endif
 
-#if defined(HAVE_LIBIAF) && defined(HAVE_SET_ID)
+#if defined(HAVE_LIBIAF) && defined(HAVE_SET_ID) && !defined(HAVE_SECUREWARE)
 # define CUSTOM_SYS_AUTH_PASSWD 1
 #endif
 #if defined(HAVE_LIBIAF) && defined(HAVE_SET_ID) && !defined(BROKEN_LIBIAF)
diff --git a/openbsd-compat/port-uw.c b/openbsd-compat/port-uw.c
index ebc229a..be9905a 100644
--- a/openbsd-compat/port-uw.c
+++ b/openbsd-compat/port-uw.c
@@ -25,7 +25,7 @@
 
 #include "includes.h"
 
-#ifdef HAVE_LIBIAF
+#if defined(HAVE_LIBIAF)  &&  !defined(HAVE_SECUREWARE)
 #include <sys/types.h>
 #ifdef HAVE_CRYPT_H
 # include <crypt.h>
@@ -145,5 +145,5 @@
 		fatal("ia_openinfo: Unable to open the shadow passwd file");
 }
 #endif /* USE_LIBIAF */
-#endif /* HAVE_LIBIAF */
+#endif /* HAVE_LIBIAF and not HAVE_SECUREWARE */
 
diff --git a/openbsd-compat/xcrypt.c b/openbsd-compat/xcrypt.c
index d8636bb..6291e28 100644
--- a/openbsd-compat/xcrypt.c
+++ b/openbsd-compat/xcrypt.c
@@ -28,7 +28,7 @@
 #include <unistd.h>
 #include <pwd.h>
 
-# ifdef HAVE_CRYPT_H
+# if defined(HAVE_CRYPT_H) && !defined(HAVE_SECUREWARE)
 #  include <crypt.h>
 # endif