The method_newuser Interface
int method_newuser (void *handlep, char *user);
The handlep parameter is a handle to the load module opened with the method_open interface. The user parameter points to the requested user.
method_newuser creates a user account. The basic user account information must be provided with calls to method_putpwent or method_putentry. The user account information will not be made permanent until method_commit is invoked.
method_newuser is called when putuserattr is invoked with a Type parameter of SEC_NEW. The value of the User parameter will be passed directly to method_newuser.
method_newuser returns 0 when the user has been successfully created. 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 creating users is not supported by the module. A value of EPERM is used when the invoker does not have permission to create the user. A value of EEXIST is used when the user already exists. A value of EROFS is used when the module was not opened for updates. A value of EINVAL is used when the user has an invalid format, length, or composition.