[PATCH] hp-ux 11.00 nsswitch,pam
Jeremy Monin
jdm314 at nand.net
Tue Mar 1 12:03:59 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.
Updated for 3.0.12-pre1.
Thanks!
Jeremy Monin
Sysadmin and open source developer
-------------- next part --------------
diff -ur samba-3.0.12pre1-orig/source/configure samba-3.0.12pre1/source/configure
--- samba-3.0.12pre1-orig/source/configure 2005-02-25 14:28:32.000000000 -0500
+++ samba-3.0.12pre1/source/configure 2005-02-28 17:55:10.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.12pre1-orig/source/configure.in samba-3.0.12pre1/source/configure.in
--- samba-3.0.12pre1-orig/source/configure.in 2005-02-25 12:59:40.000000000 -0500
+++ samba-3.0.12pre1/source/configure.in 2005-02-28 17:55:17.000000000 -0500
@@ -4325,7 +4325,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.12pre1-orig/source/lib/replace.c samba-3.0.12pre1/source/lib/replace.c
--- samba-3.0.12pre1-orig/source/lib/replace.c 2005-02-25 12:59:32.000000000 -0500
+++ samba-3.0.12pre1/source/lib/replace.c 2005-02-28 17:55:56.000000000 -0500
@@ -418,21 +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
/*
yes, I know this looks insane, but its really needed. The function in the
diff -ur samba-3.0.12pre1-orig/source/lib/replace1.c samba-3.0.12pre1/source/lib/replace1.c
--- samba-3.0.12pre1-orig/source/lib/replace1.c 2005-02-25 12:59:32.000000000 -0500
+++ samba-3.0.12pre1/source/lib/replace1.c 2005-02-28 17:56:06.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