def METHOD_NAME(name, result_p, buffer_p, buflen):
    """
    ctypes wrapper for:
        enum nss_status _nss_sss_getgrnam_r(const char *name,
                                            struct group *result,
                                            char *buffer,
                                            size_t buflen,
                                            int *errnop)
    """
    func = nss_sss_ctypes_loader("_nss_sss_getgrnam_r")
    func.restype = c_int
    func.argtypes = [c_char_p, POINTER(Group),
                     c_char_p, c_ulong, POINTER(c_int)]
    errno = POINTER(c_int)(c_int(0))
    name = name.encode('utf-8')
    res = func(c_char_p(name), result_p, buffer_p, buflen, errno)
    return (int(res), int(errno[0]), result_p)