The method_getentry Interface

int method_getentry (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 results parameter refers to an array of data structures, which contains the names of the attributes and their types to be returned by this method, as well as either the value of the corresponding attribute being returned or a flag indicating a cause of failure. The size parameter is the number of array elements.

method_getentry retrieves user, group, and system attributes. One or more attributes may be retrieved for each call. Success or failure is reported for each attribute.

method_getentry is called as a result of calling the getuserattrs andgetgroupattrs subroutines.

method_getentry returns a value of 0 if the key entry was found in the named table. When the entry does not exist in the table, the global variable errno must be set to ENOENT. If an error in the value of table or size is detected, the errno variable must be set to EINVAL. Individual attribute values have additional information about the success or failure for each attribute. On failure a value of -1 is returned.