/*
* 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 <secdb.h>
#include <exec_attr.h>
#include <alloca.h>
#include "ldap_common.h"
/* exec_attr attributes filters */
"(SolarisKernelSecurityPolicy=%s)"\
"(SolarisProfileType=%s))"
"(SolarisKernelSecurityPolicy=%s)"\
"(SolarisProfileType=%s))"
"(SolarisProfileId=%s)"\
"(SolarisKernelSecurityPolicy=%s)"\
"(SolarisProfileType=%s))"
"(SolarisProfileId=%s)"\
"(SolarisKernelSecurityPolicy=%s)"\
"(SolarisProfileType=%s))"
"(SolarisProfileId=%s)"\
"(SolarisKernelSecurityPolicy=%s)"\
"(SolarisProfileType=%s))"
"(SolarisProfileId=%s)"\
"(SolarisKernelSecurityPolicy=%s)"\
"(SolarisProfileType=%s))"
/* from libc */
extern int _doexeclist(nss_XbyY_args_t *);
extern char *_exec_wild_id(char *, const char *);
static const char *exec_attrs[] = {
(char *)NULL
};
#ifdef DEBUG
static void
{
}
}
}
}
}
}
}
}
#endif /* DEBUG */
/*
* place the results from ldap object structure into the file format
* returns NSS_STR_PARSE_{SUCCESS, ERANGE, PARSE}
*/
static int
{
return (NSS_STR_PARSE_PARSE);
return (NSS_STR_PARSE_PARSE);
else
policy_str = policy[0];
else
else
else
else
else
return (NSS_STR_PARSE_PARSE);
}
return (NSS_STR_PARSE_SUCCESS);
}
/*
* This is the common ldapexec2str; the string is later consumed by
* str2ent. If result == NULL, we return a list of new-line delimited
* entries; if result != NULL, we also return a list of execstr_ts.
*/
static int
{
char *buffer;
return (NSS_STR_PARSE_PARSE);
goto result_exec2str;
}
} else
else
return (status);
}
static nss_status_t
{
int status;
return (NSS_UNAVAIL);
goto err;
sizeof (buffer));
switch (status) {
case NSS_STR_PARSE_SUCCESS:
if (status != NSS_STR_PARSE_SUCCESS) {
goto err;
}
if (_doexeclist(argp) == 0) {
goto err;
}
break;
case NSS_STR_PARSE_ERANGE:
goto err;
case NSS_STR_PARSE_PARSE:
goto err;
default:
goto err;
}
}
err:
return (nss_stat);
}
/*
* Check if we have either an exact match or a wild-card entry for that id.
*/
static nss_status_t
{
char *wild_id;
int ret;
return ((nss_status_t)NSS_NOTFOUND);
switch (getby_flag) {
sizeof (name)) != 0)
goto go_out;
break;
}
do {
goto go_out;
} else
switch (getby_flag) {
case NSS_DBOP_EXECATTR_BYID:
goto go_out;
goto go_out;
break;
goto go_out;
goto go_out;
break;
default:
goto go_out;
}
if (nss_stat == NSS_SUCCESS)
break;
return (nss_stat);
}
static nss_status_t
{
/* ns_ldap_entry_t -> file format */
if (stat == NSS_STR_PARSE_SUCCESS) {
/* file format -> execstr_t */
if (stat == NSS_STR_PARSE_SUCCESS) {
} else {
}
} else {
/* return file format in argp->buf.buffer */
}
} else {
}
} else {
/* GET_ALL */
}
return (nss_stat);
}
static nss_status_t
{
int ret;
return ((nss_status_t)NSS_NOTFOUND);
return ((nss_status_t)NSS_NOTFOUND);
return ((nss_status_t)NSS_NOTFOUND);
if (nss_stat == NSS_SUCCESS)
return (nss_stat);
}
static nss_status_t
{
if (nss_stat == NSS_SUCCESS)
return (nss_stat);
}
static nss_status_t
{
if (nss_stat == NSS_SUCCESS)
return (nss_stat);
}
};
/*ARGSUSED0*/
const char *dummy2,
const char *dummy3,
const char *dummy4,
const char *dummy5,
const char *dummy6,
const char *dummy7)
{
#ifdef DEBUG
"\n[getexecattr.c: _nss_ldap_exec_attr_constr]\n");
#endif
}