/*
* 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 <stdlib.h>
#include "files_common.h"
#include <time.h>
#include <exec_attr.h>
#include <strings.h>
#include <ctype.h>
#include <synch.h>
#include <unistd.h>
/*
* files/getexecattr.c -- "files" backend for nsswitch "exec_attr" database
*
* _execattr_files_read_line and _execattr_files_XY_all code based on
* nss_files_read_line and nss_files_XY_all respectively, from files_common.c
*/
/* externs from libnsl */
extern int _readbufline(char *, int, char *, int, int *);
extern char *_exec_wild_id(char *, const char *);
/*
* Hashing functions for exec_attr. We need three.
*
* We hash on field 1 (hash_name), field 6 (hash_id) and
* fields 1 + 6 (nameid).
*/
static uint_t
int linelen)
{
if (keyhash) {
} else {
}
}
static uint_t
int linelen)
{
if (keyhash) {
} else {
}
}
static uint_t
int linelen)
{
if (keyhash) {
} else {
}
}
sizeof (execattr_t),
sizeof (hash_exec)/sizeof (files_hash_func),
};
/*
* check_match: returns 1 if matching entry found, else returns 0.
*/
static int
{
int i;
else
exec_field[0] = NULL;
else
/* No need to check attr field */
for (i = 0; i < 6; i++) {
keyp = exec_field[i];
if (keyp) {
/* compare field */
keyp++;
linep++;
}
return (0);
} else {
/* skip field */
linep++;
}
linep++;
}
return (1);
}
static int
{
}
static int
{
}
static int
{
}
};
/*
* If search for exact match for id failed, get_wild checks if we have
* a wild-card entry for that id.
*/
static nss_status_t
{
if (res == NSS_SUCCESS)
break;
}
if (old_id)
return (res);
}
static nss_status_t
{
_exec_cleanup(res, a);
return (res);
}
static nss_status_t
{
if (res != NSS_SUCCESS)
_exec_cleanup(res, a);
return (res);
}
static nss_status_t
{
if (res != NSS_SUCCESS)
_exec_cleanup(res, a);
return (res);
}
};
/*ARGSUSED*/
const char *dummy2,
const char *dummy3,
const char *dummy4,
const char *dummy5,
const char *dummy6,
const char *dummy7)
{
return (_nss_files_constr(execattr_ops,
sizeof (execattr_ops)/sizeof (execattr_ops[0]),
&hashinfo, FC_FLAG_EXECATTR));
}