nsssrv_netgroup.c revision e563de9203be581acc30c7794f568ae40d22bee0
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase Stephen Gallagher <sgallagh@redhat.com>
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase Copyright (C) 2010 Red Hat
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase This program is free software; you can redistribute it and/or modify
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase it under the terms of the GNU General Public License as published by
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase the Free Software Foundation; either version 3 of the License, or
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase (at your option) any later version.
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase This program is distributed in the hope that it will be useful,
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase but WITHOUT ANY WARRANTY; without even the implied warranty of
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase GNU General Public License for more details.
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase You should have received a copy of the GNU General Public License
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase along with this program. If not, see <http://www.gnu.org/licenses/>.
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehasestatic errno_t get_netgroup_entry(struct nss_ctx *nctx,
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase hret = hash_lookup(nctx->netgroups, &key, &value);
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase *netgr = talloc_get_type(value.ptr, struct getent_ctx);
return ENOENT;
return EIO;
int hret;
return EINVAL;
return EIO;
return EOK;
const char *rawname,
const char *rawname;
if (!cmdctx) {
return ENOMEM;
goto done;
goto done;
if (!req) {
goto done;
done:
int hret;
return EOK;
struct setnetgrent_ctx {
char *netgr_shortname;
const char *rawname;
const char *rawname,
char *domname;
if (!req) {
return NULL;
goto error;
goto error;
if (domname) {
goto error;
goto error;
goto error;
return req;
goto error;
return req;
return req;
return EOK;
goto done;
goto done;
goto done;
goto done;
goto done;
if (!step_ctx) {
goto done;
goto done;
switch (ret) {
case EOK:
case EMSGSIZE:
goto done;
goto done;
done:
return ret;
void *pvt);
netgr);
if (!te) {
goto done;
goto done;
goto done;
done:
return ret;
while (dom) {
if (!name) {
goto done;
goto done;
goto done;
goto done;
&netgr);
goto done;
goto done;
step_ctx);
goto done;
goto done;
done:
return ret;
int ret;
if (err_maj) {
void *pvt)
return EOK;
if (!cmdctx) {
return ENOMEM;
if (!req) {
return EOK;
if (!req) {
return EOK;
return ENOENT;
return ret;
int num);
return EINVAL;
return ret;
goto done;
done:
return EOK;
int count)
num = 0;
return ret;
hostlen);
userlen);
return ret;
grouplen);
num++;
return EOK;
return ret;
return EOK;
if (!netgr) {
int hret;
unsigned long mcount;
return EINVAL;
return EIO;
for (i = 0; i < mcount; i++) {
return EOK;