1
/*****************************************************************************
3
Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
5
This software is subject to the provisions of the Zope Public License,
6
Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
7
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
8
WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
9
WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
10
FOR A PARTICULAR PURPOSE
12
****************************************************************************/
17
#include <sys/types.h>
21
initgroups_initgroups(PyObject *self, PyObject *args)
27
if (!PyArg_ParseTuple(args, "sI:initgroups", &username, &igid))
32
if (initgroups(username, gid) == -1)
33
return PyErr_SetFromErrno(PyExc_OSError);
39
static PyMethodDef InitgroupsMethods[] = {
40
{"initgroups", initgroups_initgroups, METH_VARARGS},
47
Py_InitModule("initgroups", InitgroupsMethods);