The method_deluser Interface
int method_deluser (void *handlep, char *user, char *attrname);
The handlep parameter is a handle to the load module opened with the method_open interface. The user parameter points to the requested user. The attrname parameter indicates the attribute name of the user to be deleted.
method_deluser removes a single user’s attribute if attrname is supplied or it removes a user’s account and all associated information if just the user name is supplied. A call to method_commit is not required. The user will be removed immediately.
method_deluser is called when putuserattr is invoked with a Type parameter of SEC_DELETE. The value of the User and Attribute parameters will be passed directly to method_deluser.
method_deluser returns 0 when the user has been successfully removed. On failure a value of -1 is returned and the global variable errno is set to indicate the cause. A value of ENOSYS is used when deleting users is not supported by the module. A value of EPERM is used when the invoker does not have permission to delete the user. A value of ENOENT is used when the user does not exist. A value of EROFS is used when the module was not opened for updates.