Skip Navigation Links | |
Exit Print View | |
![]() |
man pages section 3: Extended Library Functions Oracle Solaris 10 1/13 Information Library |
Extended Library Functions - Part 1
Extended Library Functions - Part 2
dat_registry_add_provider(3DAT)
dat_registry_list_providers(3DAT)
dat_registry_remove_provider(3DAT)
dat_set_consumer_context(3DAT)
devid_deviceid_to_nmlist(3DEVID)
di_link_next_by_lnode(3DEVINFO)
di_link_next_by_node(3DEVINFO)
di_lnode_private_get(3DEVINFO)
di_lnode_private_set(3DEVINFO)
di_minor_private_get(3DEVINFO)
di_minor_private_set(3DEVINFO)
di_prom_prop_lookup_bytes(3DEVINFO)
di_prom_prop_lookup_ints(3DEVINFO)
di_prom_prop_lookup_strings(3DEVINFO)
di_prop_lookup_bytes(3DEVINFO)
di_prop_lookup_int64(3DEVINFO)
di_prop_lookup_strings(3DEVINFO)
DmiListComponentsByClass(3DMI)
ea_match_object_catalog(3EXACCT)
Extended Library Functions - Part 3
Extended Library Functions - Part 4
- get profile description and attributes
cc [ flag... ] file... –lsecdb –lsocket –lnsl [ library... ] #include <prof_attr.h> profattr_t *getprofattr(void);
profattr_t *getprofnam(const char *name);
void free_profattr(profattr_t *pd);
void setprofattr(void);
void endprofattr(void);
void getproflist(const char *profname, char **proflist, int *profcnt);
void free_proflist(char **proflist, int profcnt);
The getprofattr() and getprofnam() functions each return a prof_attr entry. Entries can come from any of the sources specified in the nsswitch.conf(4) file.
The getprofattr() function enumerates prof_attr entries. The getprofnam() function searches for a prof_attr entry with a given name. Successive calls to these functions return either successive prof_attr entries or NULL.
The internal representation of a prof_attr entry is a profattr_t structure defined in <prof_attr.h> with the following members:
char *name; /* Name of the profile */ char *res1; /* Reserved for future use */ char *res2; /* Reserved for future use */ char *desc; /* Description/Purpose of the profile */ kva_t *attr; /* Profile attributes */
The free_profattr() function releases memory allocated by the getprofattr() and getprofnam() functions.
The setprofattr() function “rewinds” to the beginning of the enumeration of prof_attr entries. Calls to getprofnam() can leave the enumeration in an indeterminate state. Therefore, setprofattr() should be called before the first call to getprofattr().
The endprofattr() function may be called to indicate that prof_attr processing is complete; the system may then close any open prof_attr file, deallocate storage, and so forth.
The getproflist() function searches for the list of sub-profiles found in the given profname and allocates memory to store this list in proflist. The given profname will be included in the list of sub-profiles. The profcnt argument indicates the number of items currently valid in proflist. Memory allocated by getproflist() should be freed using the free_proflist() function.
The free_proflist() function frees memory allocated by the getproflist() function. The profcnt argument specifies the number of items to free from the proflist argument.
The getprofattr() function returns a pointer to a profattr_t if it successfully enumerates an entry; otherwise it returns NULL, indicating the end of the enumeration.
The getprofnam() function returns a pointer to a profattr_t if it successfully locates the requested entry; otherwise it returns NULL.
Individual attributes in the prof_attr_t structure can be referred to by calling the kva_match(3SECDB) function.
Because the list of legal keys is likely to expand, any code must be written to ignore unknown key-value pairs without error.
The getprofattr() and getprofnam() functions both allocate memory for the pointers they return. This memory should be deallocated with the free_profattr() function.
profiles and their descriptions
See attributes(5) for descriptions of the following attributes:
|
auths(1), profiles(1), getexecattr(3SECDB), getauthattr(3SECDB), prof_attr(4)