00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "python/py_common.h"
00022 #include "python/py_conv.h"
00023
00024
00025
00026 static struct pyconv py_passwd[] = {
00027 { "pw_name", PY_STRING, offsetof(struct winbindd_response, data.pw.pw_name) },
00028 { "pw_passwd", PY_STRING, offsetof(struct winbindd_response, data.pw.pw_passwd) },
00029 { "pw_uid", PY_UID, offsetof(struct winbindd_response, data.pw.pw_uid) },
00030 { "pw_guid", PY_GID, offsetof(struct winbindd_response, data.pw.pw_gid) },
00031 { "pw_gecos", PY_STRING, offsetof(struct winbindd_response, data.pw.pw_gecos) },
00032 { "pw_dir", PY_STRING, offsetof(struct winbindd_response, data.pw.pw_dir) },
00033 { "pw_shell", PY_STRING, offsetof(struct winbindd_response, data.pw.pw_shell) },
00034 { NULL}
00035 };
00036
00037 BOOL py_from_winbind_passwd(PyObject **dict, struct winbindd_response *response)
00038 {
00039 *dict = from_struct(response, py_passwd);
00040 return True;
00041 }