The method_putentry Interface

int method_putentry (void *handlep, char *key, char *table, dbattr_t results[], int size);

The handlep parameter is a handle to the load module opened with the method_open interface. The key parameter refers to an entry in the named table. The table parameter refers to one of the tables. The attributes parameter refers to an array of pointers to attribute names. The values parameter refers to an array of value structures which correspond to the attributes. Each value structure contains a flag indicating if the attribute was output. The size parameter is the number of array elements.

method_putentry stores user, group and system attributes. One or more attributes may be output for each call. Success or failure is reported for each attribute. Values will be saved until method_commit is invoked.

method_putentry is called as a result of calling the putuserattrs, putgroupattrs, and putconfattrs subroutines.

method_putentry returns 0 when the attributes have been 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 information is not supported by the module. A value of EPERM is used when the invoker does not have permission to create the group. A value of ENOENT is used when the entry does not exist. A value of EROFS is used when the module was not opened for updates.