1 /*[clinic input] 2 preserve 3 [clinic start generated code]*/ 4 5 #if defined(HAVE_GETSPNAM) 6 7 PyDoc_STRVAR(spwd_getspnam__doc__, 8 "getspnam($module, arg, /)\n" 9 "--\n" 10 "\n" 11 "Return the shadow password database entry for the given user name.\n" 12 "\n" 13 "See `help(spwd)` for more on shadow password database entries."); 14 15 #define SPWD_GETSPNAM_METHODDEF \ 16 {"getspnam", (PyCFunction)spwd_getspnam, METH_O, spwd_getspnam__doc__}, 17 18 static PyObject * 19 spwd_getspnam_impl(PyObject *module, PyObject *arg); 20 21 static PyObject * 22 spwd_getspnam(PyObject *module, PyObject *arg_) 23 { 24 PyObject *return_value = NULL; 25 PyObject *arg; 26 27 if (!PyArg_Parse(arg_, "U:getspnam", &arg)) { 28 goto exit; 29 } 30 return_value = spwd_getspnam_impl(module, arg); 31 32 exit: 33 return return_value; 34 } 35 36 #endif /* defined(HAVE_GETSPNAM) */ 37 38 #if defined(HAVE_GETSPENT) 39 40 PyDoc_STRVAR(spwd_getspall__doc__, 41 "getspall($module, /)\n" 42 "--\n" 43 "\n" 44 "Return a list of all available shadow password database entries, in arbitrary order.\n" 45 "\n" 46 "See `help(spwd)` for more on shadow password database entries."); 47 48 #define SPWD_GETSPALL_METHODDEF \ 49 {"getspall", (PyCFunction)spwd_getspall, METH_NOARGS, spwd_getspall__doc__}, 50 51 static PyObject * 52 spwd_getspall_impl(PyObject *module); 53 54 static PyObject * 55 spwd_getspall(PyObject *module, PyObject *Py_UNUSED(ignored)) 56 { 57 return spwd_getspall_impl(module); 58 } 59 60 #endif /* defined(HAVE_GETSPENT) */ 61 62 #ifndef SPWD_GETSPNAM_METHODDEF 63 #define SPWD_GETSPNAM_METHODDEF 64 #endif /* !defined(SPWD_GETSPNAM_METHODDEF) */ 65 66 #ifndef SPWD_GETSPALL_METHODDEF 67 #define SPWD_GETSPALL_METHODDEF 68 #endif /* !defined(SPWD_GETSPALL_METHODDEF) */ 69 /*[clinic end generated code: output=07cd8af0afd77fe7 input=a9049054013a1b77]*/ 70