1
/* Copyright (C) 1997-2005 Luke Howard.
2
This file is part of the nss_ldap library.
3
Contributed by Luke Howard, <lukeh@padl.com>, 1997.
5
The nss_ldap library is free software; you can redistribute it and/or
6
modify it under the terms of the GNU Library General Public License as
7
published by the Free Software Foundation; either version 2 of the
8
License, or (at your option) any later version.
10
The nss_ldap library is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
Library General Public License for more details.
15
You should have received a copy of the GNU Library General Public
16
License along with the nss_ldap library; see the file COPYING.LIB. If not,
17
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
Boston, MA 02111-1307, USA.
26
/* $Id: irs-grp.c,v 2.26 2005/05/20 05:30:39 lukeh Exp $ */
29
void *gr_pvtinit (void);
31
IRS_EXPORT void gr_close (struct irs_gr *);
32
IRS_EXPORT struct group *gr_next (struct irs_gr *);
33
IRS_EXPORT struct group *gr_byname (struct irs_gr *, const char *);
34
IRS_EXPORT struct group *gr_bygid (struct irs_gr *, gid_t);
35
IRS_EXPORT void gr_rewind (struct irs_gr *);
36
IRS_EXPORT void gr_minimize (struct irs_gr *);
41
char buffer[NSS_BUFLEN_GROUP];
45
IRS_EXPORT struct group *
46
gr_byname (struct irs_gr *this, const char *name)
48
LOOKUP_NAME (name, this, _nss_ldap_filt_getgrnam, LM_GROUP,
49
_nss_ldap_parse_gr, NSS_BUFLEN_GROUP);
52
IRS_EXPORT struct group *
53
gr_bygid (struct irs_gr *this, gid_t gid)
55
LOOKUP_NUMBER (gid, this, _nss_ldap_filt_getgrgid, LM_GROUP,
56
_nss_ldap_parse_gr, NSS_BUFLEN_GROUP);
60
gr_close (struct irs_gr *this)
69
IRS_EXPORT struct group *
70
gr_next (struct irs_gr *this)
72
LOOKUP_GETENT (this, _nss_ldap_filt_getgrent, LM_GROUP, _nss_ldap_parse_gr,
77
gr_rewind (struct irs_gr *this)
83
gr_minimize (struct irs_gr *this)
92
irs_ldap_gr (struct irs_acc *this)
98
gr = calloc (1, sizeof (*gr));
102
pvt = calloc (1, sizeof (*pvt));
111
gr->close = gr_close;
113
gr->byname = gr_byname;
114
gr->bygid = gr_bygid;
115
#ifndef HAVE_USERSEC_H
116
gr->list = make_group_list;
120
gr->rewind = gr_rewind;
121
gr->minimize = gr_minimize;
125
#endif /* HAVE_IRS_H */