/*
* 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 <string.h>
#include <stdlib.h>
#include <dev_alloc.h>
#include <devalloc_impl.h>
char *strtok_r(char *, const char *, char **);
/* externs from getdaent.c */
extern char *trim_white(char *);
extern int pack_white(char *);
extern char *getdadmfield(char *, char *);
extern int getdadmline(char *, int, FILE *);
static struct _dadefbuff {
/* pointer into /etc/security/tsol/devalloc_defaults */
char *_DADEFS;
} *__dadefbuff;
static da_defs_t *dadef_interpret(char *);
int dadef_matchtype(da_defs_t *, char *);
/*
* _dadefalloc -
* allocates common buffers and structures.
* returns pointer to the new structure, else returns NULL on error.
*/
static struct _dadefbuff *
_dadefalloc(void)
{
(unsigned)sizeof (*__dadefbuff));
return (NULL);
__dadefbuff = _df;
}
return (__dadefbuff);
}
/*
* setdadefent -
* rewinds devalloc_defaults file to the begining.
*/
void
setdadefent(void)
{
return;
else
}
/*
* enddadefent -
* closes devalloc_defaults file.
*/
void
enddadefent(void)
{
return;
}
}
void
{
return;
}
/*
* getdadefent -
* When first called, returns a pointer to the first da_defs_t
* structure in devalloc_defaults; thereafter, it returns a pointer to the
* next da_defs_t structure in the file. Thus, successive calls can be
* used to search the entire file.
* call to getdadefent should be bracketed by setdadefent and enddadefent.
* returns NULL on error.
*/
getdadefent(void)
{
return (NULL);
continue;
return (da_def);
}
return (NULL);
}
/*
* getdadeftype -
* searches from the beginning of devalloc_defaults for the device
* specified by its type.
* call to getdadeftype should be bracketed by setdadefent and enddadefent.
* returns pointer to da_defs_t for the device if it is found, else
* returns NULL if device not found or in case of error.
*/
{
return (NULL);
continue;
continue;
return (da_def);
}
return (NULL);
}
/*
* dadef_matchtype -
* checks if the specified da_defs_t is for the device type specified.
* returns 1 if match found, else, returns 0.
*/
int
{
return (0);
}
/*
* dadef_interpret -
* parses val and initializes pointers in da_defs_t.
* returns pointer to parsed da_defs_t entry, else returns NULL on error.
*/
static da_defs_t *
{
int i;
char *opts;
return (NULL);
return (NULL);
/* remove any extraneous whitespace in the options */
}
}
return (&interpdadefs);
}