lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1350 - nss-pam-ldapd-solaris/nss

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd commit: r1350 - nss-pam-ldapd-solaris/nss



Author: arthur
Date: Thu Dec 30 13:09:10 2010
New Revision: 1350
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1350

Log:
move Solaris specific NSS functions to separate file

Added:
   nss-pam-ldapd-solaris/nss/solnss.c
      - copied, changed from r1349, nss-pam-ldapd-solaris/nss/common.c
Modified:
   nss-pam-ldapd-solaris/nss/Makefile.am
   nss-pam-ldapd-solaris/nss/common.c

Modified: nss-pam-ldapd-solaris/nss/Makefile.am
==============================================================================
--- nss-pam-ldapd-solaris/nss/Makefile.am       Wed Dec 29 23:50:31 2010        
(r1349)
+++ nss-pam-ldapd-solaris/nss/Makefile.am       Thu Dec 30 13:09:10 2010        
(r1350)
@@ -31,11 +31,12 @@
 EXTRA_nss_ldap_so_SOURCES = aliases.c ethers.c group.c hosts.c netgroup.c \
                             networks.c passwd.c protocols.c rpc.c services.c \
                             shadow.c
-nss_ldap_so_DEPENDENCIES = $(NSS_MODULE_OBJS)
-nss_ldap_so_LDADD = $(NSS_MODULE_OBJS) ../common/libtio.a ../common/libprot.a
+nss_ldap_so_DEPENDENCIES = $(NSS_MODULE_OBJS) solnss.$(OBJEXT)
+nss_ldap_so_LDADD = $(NSS_MODULE_OBJS)
 if NSS_FLAVOUR_SOLARIS
-nss_ldap_so_LDADD += ../common/libdict.a
+nss_ldap_so_LDADD += solnss.$(OBJEXT) ../common/libdict.a
 endif
+nss_ldap_so_LDADD += ../common/libtio.a ../common/libprot.a
 
 EXTRA_DIST = exports.glibc exports.solaris
 

Modified: nss-pam-ldapd-solaris/nss/common.c
==============================================================================
--- nss-pam-ldapd-solaris/nss/common.c  Wed Dec 29 23:50:31 2010        (r1349)
+++ nss-pam-ldapd-solaris/nss/common.c  Thu Dec 30 13:09:10 2010        (r1350)
@@ -19,38 +19,4 @@
    02110-1301 USA
 */
 
-#include "config.h"
-
-#include <errno.h>
-
-#include "prototypes.h"
-#include "common.h"
-#include "compat/attrs.h"
-
-/* global symbol to prevent NSS name lookups using this module */
 int _nss_ldap_enablelookups=1;
-
-#ifdef NSS_FLAVOUR_SOLARIS
-
-nss_backend_t *nss_ldap_constructor(nss_backend_op_t *ops,size_t sizeofops)
-{
-  struct nss_ldap_backend *ldapbe;
-  ldapbe=(struct nss_ldap_backend *)malloc(sizeof(struct nss_ldap_backend));
-  if (ldapbe==NULL)
-    return NULL;
-  ldapbe->ops=ops;
-  ldapbe->n_ops=sizeofops/sizeof(nss_backend_op_t);
-  ldapbe->fp=NULL;
-  return (nss_backend_t *)ldapbe;
-}
-
-nss_status_t nss_ldap_destructor(nss_backend_t *be,void UNUSED(*args))
-{
-  struct nss_ldap_backend *ldapbe=(struct nss_ldap_backend *)be;
-  if (ldapbe->fp!=NULL)
-    (void)tio_close(ldapbe->fp);
-  free(ldapbe);
-  return NSS_STATUS_SUCCESS;
-}
-
-#endif /* NSS_FLAVOUR_SOLARIS */

Copied and modified: nss-pam-ldapd-solaris/nss/solnss.c (from r1349, 
nss-pam-ldapd-solaris/nss/common.c)
==============================================================================
--- nss-pam-ldapd-solaris/nss/common.c  Wed Dec 29 23:50:31 2010        (r1349, 
copy source)
+++ nss-pam-ldapd-solaris/nss/solnss.c  Thu Dec 30 13:09:10 2010        (r1350)
@@ -1,5 +1,5 @@
 /*
-   common.c - common definitions
+   solnss.c - Solaris specific NSS interface functions
 
    Copyright (C) 2010 Arthur de Jong
 
@@ -27,11 +27,6 @@
 #include "common.h"
 #include "compat/attrs.h"
 
-/* global symbol to prevent NSS name lookups using this module */
-int _nss_ldap_enablelookups=1;
-
-#ifdef NSS_FLAVOUR_SOLARIS
-
 nss_backend_t *nss_ldap_constructor(nss_backend_op_t *ops,size_t sizeofops)
 {
   struct nss_ldap_backend *ldapbe;
@@ -52,5 +47,3 @@
   free(ldapbe);
   return NSS_STATUS_SUCCESS;
 }
-
-#endif /* NSS_FLAVOUR_SOLARIS */
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits