Lines Matching defs:groups
7640 Returns a list of groups to which a user belongs.
7656 Returns a list of groups to which a user belongs.
7667 int *groups;
7669 gid_t *groups;
7674 * number of supplimental groups a users can belong to.
7676 * getgrouplist() returns both the supplemental groups
7677 * and the primary group, i.e. all of the groups the
7684 groups = PyMem_New(int, ngroups);
7686 groups = PyMem_New(gid_t, ngroups);
7688 if (groups == NULL) {
7693 if (getgrouplist(user, basegid, groups, &ngroups) != -1) {
7699 PyMem_Free(groups);
7703 getgrouplist() sets ngroups to the total number of groups and
7720 __msan_unpoison(groups, ngroups*sizeof(*groups));
7725 PyMem_Free(groups);
7731 PyObject *o = PyLong_FromUnsignedLong((unsigned long)groups[i]);
7733 PyObject *o = _PyLong_FromGid(groups[i]);
7737 PyMem_Free(groups);
7743 PyMem_Free(groups);
7761 // Call getgroups with length 0 to get the actual number of groups
7817 the groups of which the specified username is a member, plus the specified
7835 the groups of which the specified username is a member, plus the specified
8303 groups: object
8306 Set the groups of the current process to list.
8310 os_setgroups(PyObject *module, PyObject *groups)
8313 if (!PySequence_Check(groups)) {
8317 Py_ssize_t len = PySequence_Size(groups);
8322 PyErr_SetString(PyExc_ValueError, "too many groups");
8329 elem = PySequence_GetItem(groups, i);
8336 "groups must be integers");