-
Method start
int System.PAM.PAM()->start(string user, function conversation)
- Description
Starts a PAM session
- Parameter user
user the session will be working with
- Parameter conversation
the conversation function. see System.PAM.default_conversation
- Returns
System.PAM.PAM_SUCCESS on success
-
Method end
int System.PAM.PAM()->end(int status)
- Description
Ends a PAM session
- Parameter status
status sent to system PAM modules, used in their cleanup.
- Returns
System.PAM.PAM_SUCCESS on success
-
Method strerror
string System.PAM.PAM()->strerror(int errnum)
- Description
Converts a PAM error number to a string description.
- Parameter errnum
an error number returned by a PAM function.
- Returns
a string describing the error
-
Method authenticate
int System.PAM.PAM()->authenticate(mixed data, int flags)
- Description
Attempts to authenticate the user specified in start
- Parameter data
a set of data to be sent to the conversation function. this may be used by the conversation
function to provide a conversation response.
- Returns
System.PAM.PAM_SUCCESS on success
-
Method chauthtok
int System.PAM.PAM()->chauthtok(mixed data, int flags)
- Description
Attempts to change the authentication token of the user specified in start
- Parameter data
a set of data to be sent to the conversation function. this may be used by the conversation
function to provide a conversation response.
- Returns
System.PAM.PAM_SUCCESS on success
-
Method open_session
int System.PAM.PAM()->open_session(int flags)
- Description
Starts a session for the user specified in start
- Returns
System.PAM.PAM_SUCCESS on success
-
Method close_session
int System.PAM.PAM()->close_session(int flags)
- Description
Closes the session for the user specified in start
- Returns
System.PAM.PAM_SUCCESS on success
-
Method setcred
int System.PAM.PAM()->setcred(int flags)
- Description
Sets authentication credentials for the user specified in start
- Returns
System.PAM.PAM_SUCCESS on success
-
Method set_item
int System.PAM.PAM()->set_item(int item_type, string|function item)
- Description
Sets the value of a PAM parameter
- Parameter item
The value of the item to be set. If PAM_CONV is specified, item should be
a valid conversation function.
- Returns
System.PAM.PAM_SUCCESS on success
-
Method get_item
string|function|int System.PAM.PAM()->get_item(int item_type)
- Description
Gets the value of a PAM parameter
- Returns
the item as a string or function, or a PAM error code if a failure has occurred.
-
Method create
void System.PAM.PAM()->create(string appname)
- Description
Creates a new PAM object
- Parameter appname
sets the application name that the PAM module will identify itself as.
|