s3: Fix libnss_winbind.so's build on Illumos/Solaris
authorIra Cooper <ira@samba.org>
Sun, 30 Sep 2012 19:02:13 +0000 (19:02 +0000)
committerIra Cooper <ira@samba.org>
Sun, 30 Sep 2012 20:56:29 +0000 (22:56 +0200)
Due to not building and linking in the winbind_nss_solaris bits in addition
to the linux bits, nss was broken on Solaris.

Autobuild-User(master): Ira Cooper <ira@samba.org>
Autobuild-Date(master): Sun Sep 30 22:56:30 CEST 2012 on sn-devel-104

nsswitch/winbind_nss_solaris.c
nsswitch/wscript_build

index 5fb37643ce2c92cfe55a87d96f9bf114f4fba954..92da8591b7d9cccc30ed6cbec77113afc4f6aa35 100644 (file)
@@ -26,6 +26,7 @@
 
 #undef DEVELOPER
 
+
 #include "winbind_client.h"
 #include <stdlib.h>
 #include <sys/types.h>
@@ -34,6 +35,7 @@
 #include <pwd.h>
 #include "includes.h"
 #include <syslog.h>
+
 #if !defined(HPUX)
 #include <sys/syslog.h>
 #endif /*hpux*/
 #define NSS_DEBUG(str) ;
 #endif
 
+#if !defined(SMB_MALLOC_P)
+#define SMB_MALLOC_P(type) (type *)malloc(sizeof(type))
+#endif
+
 #define NSS_ARGS(args) ((nss_XbyY_args_t *)args)
 
 #ifdef HPUX
index 0802687eebc374b3e9631d32b6099915b5b47b7e..3931445ea1b9217b1e892bf6c5e1ecc6edc82359 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+import Utils
 
 bld.SAMBA_LIBRARY('winbind-client',
        source='wb_common.c',
@@ -13,13 +14,19 @@ bld.SAMBA_BINARY('nsstest',
        deps='replace dl'
        )
 
-
-bld.SAMBA_LIBRARY('nss_winbind',
-       source='winbind_nss_linux.c',
-       deps='winbind-client',
-       realname='libnss_winbind.so.2',
-       vnum='2')
-
+if Utils.unversioned_sys_platform() == 'linux':
+       bld.SAMBA_LIBRARY('nss_winbind',
+               source='winbind_nss_linux.c',
+               deps='winbind-client',
+               realname='libnss_winbind.so.2',
+               vnum='2')
+
+if Utils.unversioned_sys_platform() == 'sunos':
+       bld.SAMBA_LIBRARY('nss_winbind',
+               source='winbind_nss_solaris.c winbind_nss_linux.c',
+               deps='winbind-client',
+               realname='libnss_winbind.so.2',
+               vnum='2')
 
 if bld.CONFIG_SET('WITH_PAM_MODULES') and bld.CONFIG_SET('HAVE_PAM_START'):
        bld.SAMBA_LIBRARY('pamwinbind',