Skip Navigation Links | |
Exit Print View | |
man pages section 3: Extended Library Functions, Volume 3 Oracle Solaris 11.1 Information Library |
Extended Library Functions, Volume 3
nvlist_add_boolean_array(3NVPAIR)
nvlist_add_boolean_value(3NVPAIR)
nvlist_add_byte_array(3NVPAIR)
nvlist_add_int16_array(3NVPAIR)
nvlist_add_int32_array(3NVPAIR)
nvlist_add_int64_array(3NVPAIR)
nvlist_add_int8_array(3NVPAIR)
nvlist_add_nvlist_array(3NVPAIR)
nvlist_add_string_array(3NVPAIR)
nvlist_add_uint16_array(3NVPAIR)
nvlist_add_uint32_array(3NVPAIR)
nvlist_add_uint64_array(3NVPAIR)
nvlist_add_uint8_array(3NVPAIR)
nvlist_lookup_boolean(3NVPAIR)
nvlist_lookup_boolean_array(3NVPAIR)
nvlist_lookup_boolean_value(3NVPAIR)
nvlist_lookup_byte_array(3NVPAIR)
nvlist_lookup_int16_array(3NVPAIR)
nvlist_lookup_int32_array(3NVPAIR)
nvlist_lookup_int64_array(3NVPAIR)
nvlist_lookup_int8_array(3NVPAIR)
nvlist_lookup_nv_alloc(3NVPAIR)
nvlist_lookup_nvlist_array(3NVPAIR)
nvlist_lookup_string_array(3NVPAIR)
nvlist_lookup_uint16_array(3NVPAIR)
nvlist_lookup_uint32_array(3NVPAIR)
nvlist_lookup_uint64_array(3NVPAIR)
nvlist_lookup_uint8_array(3NVPAIR)
nvpair_value_boolean_array(3NVPAIR)
nvpair_value_boolean_value(3NVPAIR)
nvpair_value_byte_array(3NVPAIR)
nvpair_value_int16_array(3NVPAIR)
nvpair_value_int32_array(3NVPAIR)
nvpair_value_int64_array(3NVPAIR)
nvpair_value_int8_array(3NVPAIR)
nvpair_value_nvlist_array(3NVPAIR)
nvpair_value_string_array(3NVPAIR)
nvpair_value_uint16_array(3NVPAIR)
nvpair_value_uint32_array(3NVPAIR)
nvpair_value_uint64_array(3NVPAIR)
nvpair_value_uint8_array(3NVPAIR)
papiAttributeListAddBoolean(3PAPI)
papiAttributeListAddCollection(3PAPI)
papiAttributeListAddDatetime(3PAPI)
papiAttributeListAddInteger(3PAPI)
papiAttributeListAddMetadata(3PAPI)
papiAttributeListAddRange(3PAPI)
papiAttributeListAddResolution(3PAPI)
papiAttributeListAddString(3PAPI)
papiAttributeListAddValue(3PAPI)
papiAttributeListDelete(3PAPI)
papiAttributeListFromString(3PAPI)
papiAttributeListGetBoolean(3PAPI)
papiAttributeListGetCollection(3PAPI)
papiAttributeListGetDatetime(3PAPI)
papiAttributeListGetInteger(3PAPI)
papiAttributeListGetMetadata(3PAPI)
papiAttributeListGetNext(3PAPI)
papiAttributeListGetRange(3PAPI)
papiAttributeListGetResolution(3PAPI)
papiAttributeListGetString(3PAPI)
papiAttributeListGetValue(3PAPI)
papiAttributeListToString(3PAPI)
papiJobGetAttributeList(3PAPI)
papiJobSubmitByReference(3PAPI)
papiLibrarySupportedCall(3PAPI)
papiLibrarySupportedCalls(3PAPI)
papiPrinterGetAttributeList(3PAPI)
papiServiceGetAttributeList(3PAPI)
papiServiceGetEncryption(3PAPI)
papiServiceGetServiceName(3PAPI)
papiServiceGetStatusMessage(3PAPI)
papiServiceSetEncryption(3PAPI)
picld_plugin_register(3PICLTREE)
picl_get_frutree_parent(3PICL)
picl_get_propinfo_by_name(3PICL)
picl_get_propval_by_name(3PICL)
picl_set_propval_by_name(3PICL)
picl_walk_tree_by_class(3PICL)
pool_get_owning_resource(3POOL)
pool_get_resource_binding(3POOL)
pool_query_pool_resources(3POOL)
pool_query_resource_components(3POOL)
pool_resource_type_list(3POOL)
pool_resource_xtransfer(3POOL)
ptree_add_row_to_table(3PICLTREE)
ptree_create_and_add_node(3PICLTREE)
ptree_create_and_add_prop(3PICLTREE)
ptree_get_first_prop(3PICLTREE)
ptree_get_frutree_parent(3PICLTREE)
ptree_get_next_by_col(3PICLTREE)
ptree_get_next_by_row(3PICLTREE)
ptree_get_next_prop(3PICLTREE)
ptree_get_node_by_path(3PICLTREE)
ptree_get_prop_by_name(3PICLTREE)
ptree_get_propinfo_by_name(3PICLTREE)
ptree_get_propval_by_name(3PICLTREE)
ptree_init_propinfo(3PICLTREE)
ptree_register_handler(3PICLTREE)
ptree_unregister_handler(3PICLTREE)
ptree_update_propval(3PICLTREE)
ptree_update_propval_by_name(3PICLTREE)
- PAM (Pluggable Authentication Module)
#include <security/pam_appl.h> cc [ flag... ] file ... -lpam [ library ... ]
The PAM framework, libpam, consists of an interface library and multiple authentication service modules. The PAM interface library is the layer implementing the Application Programming Interface ( API ). The authentication service modules are a set of dynamically loadable objects invoked by the PAM API to provide a particular type of user authentication. PAM gives system administrators the flexibility of choosing any authentication service available on the system to perform authentication. This framework also allows new authentication service modules to be plugged in and made available without modifying the applications.
Refer to Chapter 3, Writing PAM Applications and Services, in Developer’s Guide to Oracle Solaris 11 Security for information about providing authentication, account management, session management, and password management through PAM modules.
The PAM library interface consists of six categories of functions, the names for which all start with the prefix pam_.
The first category contains functions for establishing and terminating an authentication activity, which are pam_start(3PAM) and pam_end(3PAM). The functions pam_set_data(3PAM) and pam_get_data(3PAM) maintain module specific data. The functions pam_set_item(3PAM) and pam_get_item(3PAM) maintain state information. pam_strerror(3PAM) is the function that returns error status information.
The second category contains the functions that authenticate an individual user and set the credentials of the user, pam_authenticate(3PAM) and pam_setcred(3PAM).
The third category of PAM interfaces is account management. The function pam_acct_mgmt(3PAM) checks for password aging and access-hour restrictions.
Category four contains the functions that perform session management after access to the system has been granted. See pam_open_session(3PAM) and pam_close_session(3PAM)
The fifth category consists of the function that changes authentication tokens, pam_chauthtok(3PAM). An authentication token is the object used to verify the identity of the user. In UNIX, an authentication token is a user's password.
The sixth category of functions can be used to set values for PAM environment variables. See pam_putenv(3PAM), pam_getenv(3PAM), and pam_getenvlist(3PAM).
The pam_*( ) interfaces are implemented through the library libpam. For each of the categories listed above, excluding categories one and six, dynamically loadable shared modules exist that provides the appropriate service layer functionality upon demand. The functional entry points in the service layer start with the pam_sm_ prefix. The only difference between the pam_sm_*( ) interfaces and their corresponding pam_ interfaces is that all the pam_sm_*( ) interfaces require extra parameters to pass service-specific options to the shared modules. Refer to pam_sm(3PAM) for an overview of the PAM service module APIs.
The pam_eval(3PAM) function can be used by the functions in categories two through five listed above to cause PAM to evaluate a supplied PAM configuration file for the current service.
A sequence of calls sharing a common set of state information is referred to as an authentication transaction. An authentication transaction begins with a call to pam_start(). pam_start() allocates space, performs various initialization activities, and assigns a PAM authentication handle to be used for subsequent calls to the library.
After initiating an authentication transaction, applications can invoke pam_authenticate() to authenticate a particular user, and pam_acct_mgmt() to perform system entry management. For example, the application may want to determine if the user's password has expired.
If the user has been successfully authenticated, the application calls pam_setcred() to set any user credentials associated with the authentication service. Within one authentication transaction (between pam_start() and pam_end()), all calls to the PAM interface should be made with the same authentication handle returned by pam_start(). This is necessary because certain service modules may store module-specific data in a handle that is intended for use by other modules. For example, during the call to pam_authenticate(), service modules may store data in the handle that is intended for use by pam_setcred().
To perform session management, applications call pam_open_session(). Specifically, the system may want to store the total time for the session. The function pam_close_session() closes the current session.
When necessary, applications can call pam_get_item() and pam_set_item() to access and to update specific authentication information. Such information may include the current username.
To terminate an authentication transaction, the application simply calls pam_end(), which frees previously allocated space used to store authentication information.
The authentication service in PAM does not communicate directly with the user; instead it relies on the application to perform all such interactions. The application passes a pointer to the function, conv(), along with any associated application data pointers, through a pam_conv structure to the authentication service when it initiates an authentication transaction, via a call to pam_start(). The service will then use the function, conv(), to prompt the user for data, output error messages, and display text information. Refer to pam_start(3PAM) for more information.
The PAM architecture enables authentication by multiple authentication services through stacking. System entry applications, such as login(1), stack multiple service modules to authenticate users with multiple authentication services. The order in which authentication service modules are stacked is specified in the configuration file pam.conf(4) or the per-service files in /etc/pam.d/. A system administrator determines this ordering, and also determines whether the same password can be used for all authentication services.
The authentication library, /usr/lib/libpam.so.1, implements the framework interface. Various authentication services are implemented by their own loadable modules whose paths are specified through the pam.conf(4) file or the per-service files in /etc/pam.d/.
The PAM functions may return one of the following generic values, or one of the values defined in the specific man pages:
The function returned successfully.
dlopen() failed when dynamically loading a service module.
Symbol not found.
Error in service module.
System error.
Memory buffer error.
Conversation failure.
Permission denied.
See attributes(5) for description of the following attributes:
|
login(1), pam_authenticate(3PAM), pam_chauthtok(3PAM), pam_eval(3PAM), pam_open_session(3PAM), pam_set_item(3PAM), pam_setcred(3PAM), pam_sm(3PAM), pam_start(3PAM), pam_strerror(3PAM), pam.conf(4), attributes(5)
Developer’s Guide to Oracle Solaris 11 Security
The interfaces in libpam() are MT-Safe only if each thread within the multithreaded application uses its own PAM handle.