]> git.sur5r.net Git - openldap/blobdiff - contrib/slapd-modules/nssov/netgroup.c
Merge remote-tracking branch 'origin/mdb.master' into OPENLDAP_REL_ENG_2_4
[openldap] / contrib / slapd-modules / nssov / netgroup.c
index b9d95c44c17c2a59c253a2ae95aec1029c338ec7..bf69892a1285069ad7eb4ae7e71f15c410269a0c 100644 (file)
@@ -1,7 +1,9 @@
 /* netgroup.c - netgroup lookup routines */
 /* $OpenLDAP$ */
-/*
- * Copyright 2008 by Howard Chu, Symas Corp.
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>. 
+ *
+ * Copyright 2008-2014 The OpenLDAP Foundation.
+ * Portions Copyright 2008 by Howard Chu, Symas Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -12,7 +14,7 @@
  * top-level directory of the distribution or, alternatively, at
  * <http://www.OpenLDAP.org/license.html>.
  */
-/*
+/* ACKNOWLEDGEMENTS:
  * This code references portions of the nss-ldapd package
  * written by Arthur de Jong. The nss-ldapd code was forked
  * from the nss-ldap library written by Luke Howard.
@@ -138,8 +140,8 @@ static int write_netgroup_triple(TFILE *fp,const char *triple)
                return 0;
        }
        /* write strings */
-       WRITE_INT32(fp,NSLCD_RESULT_SUCCESS);
-       WRITE_INT32(fp,NETGROUP_TYPE_TRIPLE);
+       WRITE_INT32(fp,NSLCD_RESULT_BEGIN);
+       WRITE_INT32(fp,NSLCD_NETGROUP_TYPE_TRIPLE);
        WRITE_STRING_STRIPSPACE_LEN(fp,triple+hostb,hoste-hostb)
        WRITE_STRING_STRIPSPACE_LEN(fp,triple+userb,usere-userb)
        WRITE_STRING_STRIPSPACE_LEN(fp,triple+domainb,domaine-domainb)
@@ -169,9 +171,9 @@ static int write_netgroup(nssov_netgroup_cbp *cbp,Entry *entry)
                for (i=0;i<a->a_numvals;i++)
                {
                        /* write the result code */
-                       WRITE_INT32(cbp->fp,NSLCD_RESULT_SUCCESS);
+                       WRITE_INT32(cbp->fp,NSLCD_RESULT_BEGIN);
                        /* write triple indicator */
-                       WRITE_INT32(cbp->fp,NETGROUP_TYPE_NETGROUP);
+                       WRITE_INT32(cbp->fp,NSLCD_NETGROUP_TYPE_NETGROUP);
                        /* write netgroup name */
                        if (write_string_stripspace_len(cbp->fp,a->a_vals[i].bv_val,a->a_vals[i].bv_len))
                                return -1;
@@ -188,7 +190,7 @@ NSSOV_HANDLE(
        char fbuf[1024];
        struct berval filter = {sizeof(fbuf)};
        filter.bv_val = fbuf;
-       READ_STRING_BUF2(fp,cbp.buf,sizeof(cbp.buf));,
+       READ_STRING(fp,cbp.buf);,
        cbp.name.bv_len = tmpint32;
        cbp.name.bv_val = cbp.buf;
        Debug(LDAP_DEBUG_TRACE,"nssov_netgroup_byname(%s)\n",cbp.name.bv_val,0,0);,