The method_commit Interface

int method_commit (void *handlep, char *key, char *table);

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. If it is NULL it refers to all entries in the table. The table parameter refers to one of the tables.

method_commit indicates that the specified pending modifications are to be made permanent. An entire table or a single entry within a table may be specified. method_lock will be called prior to calling method_commit. method_unlock will be called after method_commit returns.

method_commit is called when putgroupattr or putuserattr are invoked with a Type parameter of SEC_COMMIT. The value of the Group or User parameter will be passed directly to method_commit.

method_commit returns a value of 0 for success. A value of -1 is returned to indicate an error and the global variable errno is set to indicate the cause. A value of ENOSYS is used when the load module does not support modification requests for any users. A value of EROFS is used when the module is not currently opened for updates. A value of EINVAL is used when the table parameter refers to an invalid table. A value of EIO is used when a potentially temporary input-output error occurs.