db2secDoesGroupExist API - Check if group exists

Determines whether an authid represents a group.

If the groupname exists, the API must be able to return the value DB2SEC_PLUGIN_OK, to indicate success. It must also be able to return the value DB2SEC_PLUGIN_INVALIDUSERORGROUP if the group name is not valid. It is permissible for the API to return the value DB2SEC_PLUGIN_GROUPSTATUSNOTKNOWN if it is impossible to determine if the input is a valid group. If an invalid group (DB2SEC_PLUGIN_INVALIDUSERORGROUP) or group not known (DB2SEC_PLUGIN_GROUPSTATUSNOTKNOWN) value is returned, Db2® might not be able to determine whether the authid is a group or user when issuing the GRANT statement without the keywords USER and GROUP, which would result in the error SQLCODE -569, SQLSTATE 56092 being returned to the user.

API and data structure syntax

     SQL_API_RC ( SQL_API_FN *db2secDoesGroupExist) 
                           ( const char *groupname,
                             db2int32 groupnamelen,
                             char      **errormsg,
                             db2int32 *errormsglen );

db2secDoesGroupExist API parameters

groupname
Input. An authid, upper-cased, with no trailing blanks.
groupnamelen
Input. Length in bytes of the groupname parameter value.
errormsg
Output. A pointer to the address of an ASCII error message string allocated by the plug-in that can be returned in this parameter if the db2secDoesGroupExist API execution is not successful.
errormsglen
Output. A pointer to an integer that indicates the length in bytes of the error message string in errormsg parameter.