The method_putpwent Interface
int method_putpwent (void *handlep, struct passwd *entry);
The handlep parameter is a handle to the load module opened with the method_open interface. The entry parameter points to the structure to be output. The account name is contained in the structure.
method_putpwent stores user account information given a user entry. The user account information consists of the user name, identifier, primary group identifier, full name, login directory and login shell. Values will be saved until method_commit is invoked.
method_putpwent returns 0 when the user has been successfully updated. 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 updating users is not supported by the module. A value of EPERM is used when the invoker does not have permission to update 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.