[PATCH] nsswitch, pam on hp-ux 11.00

Jeremy Monin jdm314 at nand.net
Mon Feb 21 22:51:40 GMT 2005


Hi,

In order to build samba-3.0.11 on HP-UX 11.00, I needed to slightly patch
lib/replace[1].c, since HP-UX has no "vsyslog" but the PAM module needs
it.  It looked like this didn't have an adverse effect on anywhere
replace1.o or replace.o is used.

In order for the nsswitch module to compile, I had to change the configure
script to add winbind_nss_solaris.o ; I don't know autoconf, so my patch
just changes the configure script directly.

This patch is tested on HP-UX 11.00 and 11.11 and is successful on both.

Thanks!

Jeremy Monin
Sysadmin and open source developer
-------------- next part --------------
diff -ur samba-3.0.11-orig/source/configure samba-3.0.11/source/configure
--- samba-3.0.11-orig/source/configure	2005-02-04 09:55:31.000000000 -0500
+++ samba-3.0.11/source/configure	2005-02-18 15:26:41.000000000 -0500
@@ -37994,7 +37994,11 @@
 		WINBIND_NSS_EXTRA_LIBS="-lsocket"
 		;;
 	*hpux11*)
-		WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
+		# HPUX winbind client is same source file as Solaris client;
+		# Solaris winbind client is implemented as a wrapper around
+		# the Linux version.
+		WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o \
+		    nsswitch/winbind_nss_linux.o"
 		;;
 	*aix*)
 		# AIX has even differently named shared libraries.  No
diff -ur samba-3.0.11-orig/source/lib/replace.c samba-3.0.11/source/lib/replace.c
--- samba-3.0.11-orig/source/lib/replace.c	2005-01-04 15:30:22.000000000 -0500
+++ samba-3.0.11/source/lib/replace.c	2005-02-18 11:57:41.000000000 -0500
@@ -418,20 +418,6 @@
 }
 #endif /* HAVE_SETLINEBUF */
 
-#ifndef HAVE_VSYSLOG
-#ifdef HAVE_SYSLOG
- void vsyslog (int facility_priority, const char *format, va_list arglist)
-{
-	char *msg = NULL;
-	vasprintf(&msg, format, arglist);
-	if (!msg)
-		return;
-	syslog(facility_priority, "%s", msg);
-	SAFE_FREE(msg);
-}
-#endif /* HAVE_SYSLOG */
-#endif /* HAVE_VSYSLOG */
-
 
 #ifndef HAVE_TIMEGM
 /*
diff -ur samba-3.0.11-orig/source/lib/replace1.c samba-3.0.11/source/lib/replace1.c
--- samba-3.0.11-orig/source/lib/replace1.c	2004-10-25 17:04:59.000000000 -0400
+++ samba-3.0.11/source/lib/replace1.c	2005-02-18 11:57:59.000000000 -0500
@@ -40,3 +40,19 @@
 	return ret;	
 }
 #endif
+
+
+#ifndef HAVE_VSYSLOG
+#ifdef HAVE_SYSLOG
+ void vsyslog (int facility_priority, const char *format, va_list arglist)
+{
+	char *msg = NULL;
+	vasprintf(&msg, format, arglist);
+	if (!msg)
+		return;
+	syslog(facility_priority, "%s", msg);
+	SAFE_FREE(msg);
+}
+#endif /* HAVE_SYSLOG */
+#endif /* HAVE_VSYSLOG */
+


More information about the samba-technical mailing list