getgrent.c revision 1fdeec650620e8498c06f832ea4bd2292f7e9632
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#include <grp.h>
#include <idmap.h>
#include "ad_common.h"
static int
{
int buflen;
char *buffer;
return (-1);
} else {
return (-1);
}
return (0);
}
/*
* getbynam gets a group entry by name. This function constructs an ldap
* search filter using the name invocation parameter and the getgrnam search
* filter defined. Once the filter is constructed, we search for a matching
* entry and marshal the data results into struct group for the frontend
* process. The function _nss_ad_group2ent performs the data marshaling.
*/
static nss_status_t
{
char name[SEARCHFILTERLEN];
char *dname;
/* Sanitize name so that it can be used in our LDAP filter */
return ((nss_status_t)NSS_NOTFOUND);
return ((nss_status_t)NSS_NOTFOUND);
*dname = '\0';
dname++;
/*
* Map the name to gid using idmap service.
*/
is_wuser = -1;
is_user = 0; /* Map name to gid */
if (idmaprc != IDMAP_SUCCESS) {
RESET_ERRNO();
return ((nss_status_t)NSS_NOTFOUND);
}
/* Create group(4) style string */
return ((nss_status_t)NSS_NOTFOUND);
/* Marshall the data, sanitize the return status and return */
}
/*
* getbygid gets a group entry by number. This function constructs an ldap
* search filter using the name invocation parameter and the getgrgid search
* filter defined. Once the filter is constructed, we searche for a matching
* entry and marshal the data results into struct group for the frontend
* process. The function _nss_ad_group2ent performs the data marshaling.
*/
static nss_status_t
{
/* nss_ad does not support non ephemeral gids */
goto out;
/* Map the given GID to a SID using the idmap service */
RESET_ERRNO();
goto out;
}
/*
* NULL winname implies a local SID or unresolvable SID both of
* which cannot be used to generated group(4) entry
*/
goto out;
/* Create group(4) style string */
goto out;
/* Marshall the data, sanitize the return status and return */
out:
return (stat);
}
static ad_backend_op_t gr_ops[] = {
};
/*ARGSUSED0*/
const char *dummy3)
{
}