Skip Navigation Links | |
Exit Print View | |
man pages section 3: Basic Library Functions Oracle Solaris 11.1 Information Library |
enable_extended_FILE_stdio(3C)
posix_spawnattr_getschedparam(3C)
posix_spawnattr_getschedpolicy(3C)
posix_spawnattr_getsigdefault(3C)
posix_spawnattr_getsigignore_np(3C)
posix_spawnattr_getsigmask(3C)
posix_spawnattr_setschedparam(3C)
posix_spawnattr_setschedpolicy(3C)
posix_spawnattr_setsigdefault(3C)
posix_spawnattr_setsigignore_np(3C)
posix_spawnattr_setsigmask(3C)
posix_spawn_file_actions_addclose(3C)
posix_spawn_file_actions_addclosefrom_np(3C)
posix_spawn_file_actions_adddup2(3C)
posix_spawn_file_actions_addopen(3C)
posix_spawn_file_actions_destroy(3C)
posix_spawn_file_actions_init(3C)
pthread_attr_getdetachstate(3C)
pthread_attr_getinheritsched(3C)
pthread_attr_getschedparam(3C)
pthread_attr_getschedpolicy(3C)
pthread_attr_setdetachstate(3C)
pthread_attr_setinheritsched(3C)
pthread_attr_setschedparam(3C)
pthread_attr_setschedpolicy(3C)
pthread_barrierattr_destroy(3C)
pthread_barrierattr_getpshared(3C)
pthread_barrierattr_setpshared(3C)
pthread_condattr_getpshared(3C)
pthread_condattr_setpshared(3C)
pthread_cond_reltimedwait_np(3C)
pthread_key_create_once_np(3C)
pthread_mutexattr_getprioceiling(3C)
pthread_mutexattr_getprotocol(3C)
pthread_mutexattr_getpshared(3C)
pthread_mutexattr_getrobust(3C)
pthread_mutexattr_setprioceiling(3C)
pthread_mutexattr_setprotocol(3C)
pthread_mutexattr_setpshared(3C)
pthread_mutexattr_setrobust(3C)
pthread_mutex_getprioceiling(3C)
pthread_mutex_reltimedlock_np(3C)
pthread_mutex_setprioceiling(3C)
pthread_rwlockattr_destroy(3C)
pthread_rwlockattr_getpshared(3C)
pthread_rwlockattr_setpshared(3C)
pthread_rwlock_reltimedrdlock_np(3C)
pthread_rwlock_reltimedwrlock_np(3C)
pthread_rwlock_timedrdlock(3C)
pthread_rwlock_timedwrlock(3C)
rctlblk_get_enforced_value(3C)
- get user_attr entry
userattr_t *getuserattr(void);
userattr_t *getusernam(const char *name);
userattr_t *getuseruid(uid_t uid);
void free_userattr(userattr_t *userattr);
void setuserattr(void);
void enduserattr(void);
userattr_t *fgetuserattr(FILE *f);
The getuserattr(), getusernam(), and getuseruid() functions each return a user_attr(4) entry. Entries can come from any of the sources specified in the nsswitch.conf(4) file. The getuserattr() function enumerates user_attr entries. The getusernam() function searches for a user_attr entry with a given user name name. The getuseruid() function searches for a user_attr entry with a given user ID uid. Successive calls to these functions return either successive user_attr entries or NULL.
The fgetuserattr() function does not use nsswitch.conf but reads and parses the next line from the stream f. This stream is assumed to have the format of the user_attr files.
The free_userattr() function releases memory allocated by the getusernam(), getuserattr(), and fgetuserattr() functions.
The internal representation of a user_attr entry is a userattr_t structure defined in <user_attr.h> with the following members:
char *name; /* name of the user */ char *qualifier; /* reserved for future use */ char *res1; /* reserved for future use */ char *res2; /* reserved for future use */ kva_t *attr; /* list of attributes */
The setuserattr() function “rewinds” to the beginning of the enumeration of user_attr entries. Calls to getusernam() may leave the enumeration in an indeterminate state, so setuserattr() should be called before the first call to getuserattr().
The enduserattr() function may be called to indicate that user_attr processing is complete; the library may then close any open user_attr file, deallocate any internal storage, and so forth.
The getuserattr() function returns a pointer to a userattr_t if it successfully enumerates an entry; otherwise it returns NULL, indicating the end of the enumeration.
The getusernam() function returns a pointer to a userattr_t if it successfully locates the requested entry; otherwise it returns NULL.
The getuserattr() and getusernam() functions both allocate memory for the pointers they return. This memory should be deallocated with the free_userattr() function.
Individual attributes can be referenced in the attr structure by calling the kva_match(3C) function.
Because the list of legal keys is likely to expand, code must be written to ignore unknown key-value pairs without error.
extended user attributes
configuration file lookup information for the name server switch
See attributes(5) for descriptions of the following attributes:
|
getauthattr(3C), getexecattr(3C), getprofattr(3C), user_attr(4), attributes(5)