Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/nss
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2010-10-14 21:00:51 +0200
committerArthur de Jong <arthur@arthurdejong.org>2010-10-14 21:00:51 +0200
commit9c37b7e296742993a6038000decb0264d23b6341 (patch)
tree4213e87e65c83a0b5ef9b7b6f4d2c5f14091d483 /nss
parent27a586bfe6b8660273855bbc66a62e952588cf6c (diff)
move _nss_ldap_initgroups_dyn() definition to the end to have more logical order
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1272 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nss')
-rw-r--r--nss/group.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/nss/group.c b/nss/group.c
index 68d9ef8..3f6cc17 100644
--- a/nss/group.c
+++ b/nss/group.c
@@ -120,6 +120,30 @@ nss_status_t _nss_ldap_getgrgid_r(
read_group(fp,result,buffer,buflen,errnop));
}
+/* thread-local file pointer to an ongoing request */
+static __thread TFILE *grentfp;
+
+/* start a request to read all groups */
+nss_status_t _nss_ldap_setgrent(int UNUSED(stayopen))
+{
+ NSS_SETENT(grentfp);
+}
+
+/* read a single group from the stream */
+nss_status_t _nss_ldap_getgrent_r(
+ struct group *result,
+ char *buffer,size_t buflen,int *errnop)
+{
+ NSS_GETENT(grentfp,NSLCD_ACTION_GROUP_ALL,
+ read_group(grentfp,result,buffer,buflen,errnop));
+}
+
+/* close the stream opened with setgrent() above */
+nss_status_t _nss_ldap_endgrent(void)
+{
+ NSS_ENDENT(grentfp);
+}
+
/* this function returns a list of groups, documentation for the
interface is scarce (any pointers are welcome) but this is
what is assumed the parameters mean:
@@ -147,27 +171,3 @@ nss_status_t _nss_ldap_initgroups_dyn(
#undef buffer
#undef buflen
}
-
-/* thread-local file pointer to an ongoing request */
-static __thread TFILE *grentfp;
-
-/* start a request to read all groups */
-nss_status_t _nss_ldap_setgrent(int UNUSED(stayopen))
-{
- NSS_SETENT(grentfp);
-}
-
-/* read a single group from the stream */
-nss_status_t _nss_ldap_getgrent_r(
- struct group *result,
- char *buffer,size_t buflen,int *errnop)
-{
- NSS_GETENT(grentfp,NSLCD_ACTION_GROUP_ALL,
- read_group(grentfp,result,buffer,buflen,errnop));
-}
-
-/* close the stream opened with setgrent() above */
-nss_status_t _nss_ldap_endgrent(void)
-{
- NSS_ENDENT(grentfp);
-}