LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - py_winbind.c (source / functions) Hit Total Coverage
Test: coverage report for smb2.twrp.listdir_fix f886ca1c Lines: 503 12227 4.1 %
Date: 2023-11-07 19:11:32 Functions: 21 843 2.5 %

          Line data    Source code
       1             : 
       2             : /* Python wrapper functions auto-generated by pidl */
       3             : #define PY_SSIZE_T_CLEAN 1 /* We use Py_ssize_t for PyArg_ParseTupleAndKeywords */
       4             : #include <Python.h>
       5             : #include "python/py3compat.h"
       6             : #include "includes.h"
       7             : #include "python/modules.h"
       8             : #include <pytalloc.h>
       9             : #include "librpc/rpc/pyrpc.h"
      10             : #include "librpc/rpc/pyrpc_util.h"
      11             : #include "bin/default/librpc/gen_ndr/ndr_winbind.h"
      12             : #include "bin/default/librpc/gen_ndr/ndr_winbind_c.h"
      13             : 
      14             : /*
      15             :  * Suppress compiler warnings if the generated code does not call these
      16             :  * functions
      17             :  */
      18             : #ifndef _MAYBE_UNUSED_
      19             : #ifdef __has_attribute
      20             : #if __has_attribute(unused)
      21             : #define _MAYBE_UNUSED_ __attribute__ ((unused))
      22             : #else
      23             : #define _MAYBE_UNUSED_
      24             : #endif
      25             : #endif
      26             : #endif
      27             : /*
      28             :  * These functions are here to ensure they can be optimized out by
      29             :  * the compiler based on the constant input values
      30             :  */
      31             : 
      32           5 : static inline unsigned long long ndr_sizeof2uintmax(size_t var_size)
      33             : {
      34           5 :         switch (var_size) {
      35           0 :         case 8:
      36           0 :                 return UINT64_MAX;
      37           5 :         case 4:
      38           5 :                 return UINT32_MAX;
      39           0 :         case 2:
      40           0 :                 return UINT16_MAX;
      41           0 :         case 1:
      42           0 :                 return UINT8_MAX;
      43             :         }
      44             : 
      45           0 :         return 0;
      46             : }
      47             : 
      48             : static inline _MAYBE_UNUSED_ long long ndr_sizeof2intmax(size_t var_size)
      49             : {
      50             :         switch (var_size) {
      51             :         case 8:
      52             :                 return INT64_MAX;
      53             :         case 4:
      54             :                 return INT32_MAX;
      55             :         case 2:
      56             :                 return INT16_MAX;
      57             :         case 1:
      58             :                 return INT8_MAX;
      59             :         }
      60             : 
      61             :         return 0;
      62             : }
      63             : 
      64             : #include "librpc/gen_ndr/lsa.h"
      65             : #include "librpc/gen_ndr/netlogon.h"
      66             : #include "librpc/gen_ndr/samr.h"
      67             : #include "librpc/gen_ndr/misc.h"
      68             : #include "librpc/gen_ndr/security.h"
      69             : #include "librpc/gen_ndr/idmap.h"
      70             : static PyTypeObject wbint_TransID_Type;
      71             : static PyTypeObject wbint_TransIDArray_Type;
      72             : static PyTypeObject wbint_userinfo_Type;
      73             : static PyTypeObject wbint_SidArray_Type;
      74             : static PyTypeObject wbint_RidArray_Type;
      75             : static PyTypeObject wbint_Principal_Type;
      76             : static PyTypeObject wbint_Principals_Type;
      77             : static PyTypeObject wbint_userinfos_Type;
      78             : static PyTypeObject wbint_Validation_Type;
      79             : static PyTypeObject wbint_AuthUserInfo_Type;
      80             : static PyTypeObject wbint_PamAuthCrapValidation_Type;
      81             : static PyTypeObject winbind_InterfaceType;
      82             : static PyTypeObject wbint_Ping_Type;
      83             : static PyTypeObject wbint_LookupSid_Type;
      84             : static PyTypeObject wbint_LookupSids_Type;
      85             : static PyTypeObject wbint_LookupName_Type;
      86             : static PyTypeObject wbint_Sids2UnixIDs_Type;
      87             : static PyTypeObject wbint_UnixIDs2Sids_Type;
      88             : static PyTypeObject wbint_AllocateUid_Type;
      89             : static PyTypeObject wbint_AllocateGid_Type;
      90             : static PyTypeObject wbint_GetNssInfo_Type;
      91             : static PyTypeObject wbint_LookupUserAliases_Type;
      92             : static PyTypeObject wbint_LookupUserGroups_Type;
      93             : static PyTypeObject wbint_QuerySequenceNumber_Type;
      94             : static PyTypeObject wbint_LookupGroupMembers_Type;
      95             : static PyTypeObject wbint_LookupAliasMembers_Type;
      96             : static PyTypeObject wbint_QueryGroupList_Type;
      97             : static PyTypeObject wbint_QueryUserRidList_Type;
      98             : static PyTypeObject wbint_DsGetDcName_Type;
      99             : static PyTypeObject wbint_LookupRids_Type;
     100             : static PyTypeObject wbint_CheckMachineAccount_Type;
     101             : static PyTypeObject wbint_ChangeMachineAccount_Type;
     102             : static PyTypeObject wbint_PingDc_Type;
     103             : static PyTypeObject wbint_ListTrustedDomains_Type;
     104             : static PyTypeObject wbint_PamAuth_Type;
     105             : static PyTypeObject wbint_PamAuthCrap_Type;
     106             : static PyTypeObject wbint_PamLogOff_Type;
     107             : static PyTypeObject wbint_PamAuthCrapChangePassword_Type;
     108             : static PyTypeObject wbint_PamAuthChangePassword_Type;
     109             : static PyTypeObject wbint_InitConnection_Type;
     110             : static PyTypeObject winbind_SamLogon_Type;
     111             : static PyTypeObject winbind_DsrUpdateReadOnlyServerDnsRecords_Type;
     112             : static PyTypeObject winbind_LogonControl_Type;
     113             : static PyTypeObject winbind_GetForestTrustInformation_Type;
     114             : static PyTypeObject winbind_SendToSam_Type;
     115             : 
     116             : static PyTypeObject *unixid_Type;
     117             : static PyTypeObject *BaseObject_Type;
     118             : static PyTypeObject *dom_sid_Type;
     119             : static PyTypeObject *netr_Validation_Type;
     120             : static PyTypeObject *lsa_SidArray_Type;
     121             : static PyTypeObject *lsa_RefDomainList_Type;
     122             : static PyTypeObject *lsa_TransNameArray_Type;
     123             : static PyTypeObject *GUID_Type;
     124             : static PyTypeObject *netr_DsRGetDCNameInfo_Type;
     125             : static PyTypeObject *netr_DomainTrustList_Type;
     126             : static PyTypeObject *samr_DomInfo1_Type;
     127             : static PyTypeObject *netr_LogonLevel_Type;
     128             : static PyTypeObject *NL_DNS_NAME_INFO_ARRAY_Type;
     129             : static PyTypeObject *netr_CONTROL_DATA_INFORMATION_Type;
     130             : static PyTypeObject *netr_CONTROL_QUERY_INFORMATION_Type;
     131             : static PyTypeObject *lsa_ForestTrustInformation_Type;
     132             : static PyTypeObject *netr_SendToSamBase_Type;
     133             : static PyTypeObject *ClientConnection_Type;
     134             : static PyTypeObject *ndr_syntax_id_Type;
     135             : 
     136           0 : static PyObject *py_wbint_TransID_get_type_hint(PyObject *obj, void *closure)
     137             : {
     138           0 :         struct wbint_TransID *object = (struct wbint_TransID *)pytalloc_get_ptr(obj);
     139           0 :         PyObject *py_type_hint;
     140           0 :         py_type_hint = PyLong_FromLong((uint16_t)object->type_hint);
     141           0 :         return py_type_hint;
     142             : }
     143             : 
     144           0 : static int py_wbint_TransID_set_type_hint(PyObject *py_obj, PyObject *value, void *closure)
     145             : {
     146           0 :         struct wbint_TransID *object = (struct wbint_TransID *)pytalloc_get_ptr(py_obj);
     147           0 :         if (value == NULL) {
     148           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->type_hint");
     149           0 :                 return -1;
     150             :         }
     151             :         {
     152           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type_hint));
     153           0 :                 if (PyLong_Check(value)) {
     154           0 :                         unsigned long long test_var;
     155           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     156           0 :                         if (PyErr_Occurred() != NULL) {
     157           0 :                                 return -1;
     158             :                         }
     159           0 :                         if (test_var > uint_max) {
     160           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     161             :                                   PyLong_Type.tp_name, uint_max, test_var);
     162           0 :                                 return -1;
     163             :                         }
     164           0 :                         object->type_hint = test_var;
     165             :                 } else {
     166           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     167             :                           PyLong_Type.tp_name);
     168           0 :                         return -1;
     169             :                 }
     170             :         }
     171           0 :         return 0;
     172             : }
     173             : 
     174           0 : static PyObject *py_wbint_TransID_get_domain_index(PyObject *obj, void *closure)
     175             : {
     176           0 :         struct wbint_TransID *object = (struct wbint_TransID *)pytalloc_get_ptr(obj);
     177           0 :         PyObject *py_domain_index;
     178           0 :         py_domain_index = PyLong_FromUnsignedLongLong((uint32_t)object->domain_index);
     179           0 :         return py_domain_index;
     180             : }
     181             : 
     182           0 : static int py_wbint_TransID_set_domain_index(PyObject *py_obj, PyObject *value, void *closure)
     183             : {
     184           0 :         struct wbint_TransID *object = (struct wbint_TransID *)pytalloc_get_ptr(py_obj);
     185           0 :         if (value == NULL) {
     186           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_index");
     187           0 :                 return -1;
     188             :         }
     189             :         {
     190           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->domain_index));
     191           0 :                 if (PyLong_Check(value)) {
     192           0 :                         unsigned long long test_var;
     193           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     194           0 :                         if (PyErr_Occurred() != NULL) {
     195           0 :                                 return -1;
     196             :                         }
     197           0 :                         if (test_var > uint_max) {
     198           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     199             :                                   PyLong_Type.tp_name, uint_max, test_var);
     200           0 :                                 return -1;
     201             :                         }
     202           0 :                         object->domain_index = test_var;
     203             :                 } else {
     204           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     205             :                           PyLong_Type.tp_name);
     206           0 :                         return -1;
     207             :                 }
     208             :         }
     209           0 :         return 0;
     210             : }
     211             : 
     212           0 : static PyObject *py_wbint_TransID_get_rid(PyObject *obj, void *closure)
     213             : {
     214           0 :         struct wbint_TransID *object = (struct wbint_TransID *)pytalloc_get_ptr(obj);
     215           0 :         PyObject *py_rid;
     216           0 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)object->rid);
     217           0 :         return py_rid;
     218             : }
     219             : 
     220           0 : static int py_wbint_TransID_set_rid(PyObject *py_obj, PyObject *value, void *closure)
     221             : {
     222           0 :         struct wbint_TransID *object = (struct wbint_TransID *)pytalloc_get_ptr(py_obj);
     223           0 :         if (value == NULL) {
     224           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rid");
     225           0 :                 return -1;
     226             :         }
     227             :         {
     228           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rid));
     229           0 :                 if (PyLong_Check(value)) {
     230           0 :                         unsigned long long test_var;
     231           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     232           0 :                         if (PyErr_Occurred() != NULL) {
     233           0 :                                 return -1;
     234             :                         }
     235           0 :                         if (test_var > uint_max) {
     236           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     237             :                                   PyLong_Type.tp_name, uint_max, test_var);
     238           0 :                                 return -1;
     239             :                         }
     240           0 :                         object->rid = test_var;
     241             :                 } else {
     242           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     243             :                           PyLong_Type.tp_name);
     244           0 :                         return -1;
     245             :                 }
     246             :         }
     247           0 :         return 0;
     248             : }
     249             : 
     250           0 : static PyObject *py_wbint_TransID_get_xid(PyObject *obj, void *closure)
     251             : {
     252           0 :         struct wbint_TransID *object = (struct wbint_TransID *)pytalloc_get_ptr(obj);
     253           0 :         PyObject *py_xid;
     254           0 :         py_xid = pytalloc_reference_ex(unixid_Type, pytalloc_get_mem_ctx(obj), &object->xid);
     255           0 :         return py_xid;
     256             : }
     257             : 
     258           0 : static int py_wbint_TransID_set_xid(PyObject *py_obj, PyObject *value, void *closure)
     259             : {
     260           0 :         struct wbint_TransID *object = (struct wbint_TransID *)pytalloc_get_ptr(py_obj);
     261           0 :         if (value == NULL) {
     262           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->xid");
     263           0 :                 return -1;
     264             :         }
     265           0 :         PY_CHECK_TYPE(unixid_Type, value, return -1;);
     266           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
     267           0 :                 PyErr_NoMemory();
     268           0 :                 return -1;
     269             :         }
     270           0 :         object->xid = *(struct unixid *)pytalloc_get_ptr(value);
     271           0 :         return 0;
     272             : }
     273             : 
     274             : static PyGetSetDef py_wbint_TransID_getsetters[] = {
     275             :         {
     276             :                 .name = discard_const_p(char, "type_hint"),
     277             :                 .get = py_wbint_TransID_get_type_hint,
     278             :                 .set = py_wbint_TransID_set_type_hint,
     279             :                 .doc = discard_const_p(char, "PIDL-generated element of base type id_type")
     280             :         },
     281             :         {
     282             :                 .name = discard_const_p(char, "domain_index"),
     283             :                 .get = py_wbint_TransID_get_domain_index,
     284             :                 .set = py_wbint_TransID_set_domain_index,
     285             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     286             :         },
     287             :         {
     288             :                 .name = discard_const_p(char, "rid"),
     289             :                 .get = py_wbint_TransID_get_rid,
     290             :                 .set = py_wbint_TransID_set_rid,
     291             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     292             :         },
     293             :         {
     294             :                 .name = discard_const_p(char, "xid"),
     295             :                 .get = py_wbint_TransID_get_xid,
     296             :                 .set = py_wbint_TransID_set_xid,
     297             :                 .doc = discard_const_p(char, "PIDL-generated element of base type unixid")
     298             :         },
     299             :         { .name = NULL }
     300             : };
     301             : 
     302           0 : static PyObject *py_wbint_TransID_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     303             : {
     304           0 :         return pytalloc_new(struct wbint_TransID, type);
     305             : }
     306             : 
     307             : 
     308             : static PyTypeObject wbint_TransID_Type = {
     309             :         PyVarObject_HEAD_INIT(NULL, 0)
     310             :         .tp_name = "winbind.wbint_TransID",
     311             :         .tp_getset = py_wbint_TransID_getsetters,
     312             :         .tp_methods = NULL,
     313             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     314             :         .tp_new = py_wbint_TransID_new,
     315             : };
     316             : 
     317             : 
     318           0 : static PyObject *py_wbint_TransIDArray_get_num_ids(PyObject *obj, void *closure)
     319             : {
     320           0 :         struct wbint_TransIDArray *object = (struct wbint_TransIDArray *)pytalloc_get_ptr(obj);
     321           0 :         PyObject *py_num_ids;
     322           0 :         py_num_ids = PyLong_FromUnsignedLongLong((uint32_t)object->num_ids);
     323           0 :         return py_num_ids;
     324             : }
     325             : 
     326           0 : static int py_wbint_TransIDArray_set_num_ids(PyObject *py_obj, PyObject *value, void *closure)
     327             : {
     328           0 :         struct wbint_TransIDArray *object = (struct wbint_TransIDArray *)pytalloc_get_ptr(py_obj);
     329           0 :         if (value == NULL) {
     330           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_ids");
     331           0 :                 return -1;
     332             :         }
     333             :         {
     334           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_ids));
     335           0 :                 if (PyLong_Check(value)) {
     336           0 :                         unsigned long long test_var;
     337           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     338           0 :                         if (PyErr_Occurred() != NULL) {
     339           0 :                                 return -1;
     340             :                         }
     341           0 :                         if (test_var > uint_max) {
     342           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     343             :                                   PyLong_Type.tp_name, uint_max, test_var);
     344           0 :                                 return -1;
     345             :                         }
     346           0 :                         object->num_ids = test_var;
     347             :                 } else {
     348           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     349             :                           PyLong_Type.tp_name);
     350           0 :                         return -1;
     351             :                 }
     352             :         }
     353           0 :         return 0;
     354             : }
     355             : 
     356           0 : static PyObject *py_wbint_TransIDArray_get_ids(PyObject *obj, void *closure)
     357             : {
     358           0 :         struct wbint_TransIDArray *object = (struct wbint_TransIDArray *)pytalloc_get_ptr(obj);
     359           0 :         PyObject *py_ids;
     360           0 :         py_ids = PyList_New(object->num_ids);
     361           0 :         if (py_ids == NULL) {
     362           0 :                 return NULL;
     363             :         }
     364             :         {
     365             :                 int ids_cntr_0;
     366           0 :                 for (ids_cntr_0 = 0; ids_cntr_0 < (object->num_ids); ids_cntr_0++) {
     367           0 :                         PyObject *py_ids_0;
     368           0 :                         py_ids_0 = pytalloc_reference_ex(&wbint_TransID_Type, object->ids, &object->ids[ids_cntr_0]);
     369           0 :                         PyList_SetItem(py_ids, ids_cntr_0, py_ids_0);
     370             :                 }
     371             :         }
     372           0 :         return py_ids;
     373             : }
     374             : 
     375           0 : static int py_wbint_TransIDArray_set_ids(PyObject *py_obj, PyObject *value, void *closure)
     376             : {
     377           0 :         struct wbint_TransIDArray *object = (struct wbint_TransIDArray *)pytalloc_get_ptr(py_obj);
     378           0 :         if (value == NULL) {
     379           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ids");
     380           0 :                 return -1;
     381             :         }
     382           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
     383             :         {
     384           0 :                 int ids_cntr_0;
     385           0 :                 object->ids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->ids, PyList_GET_SIZE(value));
     386           0 :                 if (!object->ids) { return -1; }
     387           0 :                 talloc_set_name_const(object->ids, "ARRAY: object->ids");
     388           0 :                 for (ids_cntr_0 = 0; ids_cntr_0 < PyList_GET_SIZE(value); ids_cntr_0++) {
     389           0 :                         if (PyList_GET_ITEM(value, ids_cntr_0) == NULL) {
     390           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ids[ids_cntr_0]");
     391           0 :                                 return -1;
     392             :                         }
     393           0 :                         PY_CHECK_TYPE(&wbint_TransID_Type, PyList_GET_ITEM(value, ids_cntr_0), return -1;);
     394           0 :                         if (talloc_reference(object->ids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, ids_cntr_0))) == NULL) {
     395           0 :                                 PyErr_NoMemory();
     396           0 :                                 return -1;
     397             :                         }
     398           0 :                         object->ids[ids_cntr_0] = *(struct wbint_TransID *)pytalloc_get_ptr(PyList_GET_ITEM(value, ids_cntr_0));
     399             :                 }
     400             :         }
     401           0 :         return 0;
     402             : }
     403             : 
     404             : static PyGetSetDef py_wbint_TransIDArray_getsetters[] = {
     405             :         {
     406             :                 .name = discard_const_p(char, "num_ids"),
     407             :                 .get = py_wbint_TransIDArray_get_num_ids,
     408             :                 .set = py_wbint_TransIDArray_set_num_ids,
     409             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     410             :         },
     411             :         {
     412             :                 .name = discard_const_p(char, "ids"),
     413             :                 .get = py_wbint_TransIDArray_get_ids,
     414             :                 .set = py_wbint_TransIDArray_set_ids,
     415             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_TransID")
     416             :         },
     417             :         { .name = NULL }
     418             : };
     419             : 
     420           0 : static PyObject *py_wbint_TransIDArray_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     421             : {
     422           0 :         return pytalloc_new(struct wbint_TransIDArray, type);
     423             : }
     424             : 
     425             : 
     426             : static PyTypeObject wbint_TransIDArray_Type = {
     427             :         PyVarObject_HEAD_INIT(NULL, 0)
     428             :         .tp_name = "winbind.wbint_TransIDArray",
     429             :         .tp_getset = py_wbint_TransIDArray_getsetters,
     430             :         .tp_methods = NULL,
     431             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     432             :         .tp_new = py_wbint_TransIDArray_new,
     433             : };
     434             : 
     435             : 
     436           0 : static PyObject *py_wbint_userinfo_get_domain_name(PyObject *obj, void *closure)
     437             : {
     438           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(obj);
     439           0 :         PyObject *py_domain_name;
     440           0 :         if (object->domain_name == NULL) {
     441           0 :                 Py_RETURN_NONE;
     442             :         }
     443           0 :         if (object->domain_name == NULL) {
     444           0 :                 py_domain_name = Py_None;
     445           0 :                 Py_INCREF(py_domain_name);
     446             :         } else {
     447           0 :                 if (object->domain_name == NULL) {
     448           0 :                         py_domain_name = Py_None;
     449           0 :                         Py_INCREF(py_domain_name);
     450             :                 } else {
     451           0 :                         py_domain_name = PyUnicode_Decode(object->domain_name, strlen(object->domain_name), "utf-8", "ignore");
     452             :                 }
     453             :         }
     454           0 :         return py_domain_name;
     455             : }
     456             : 
     457           0 : static int py_wbint_userinfo_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
     458             : {
     459           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
     460           0 :         if (value == NULL) {
     461           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_name");
     462           0 :                 return -1;
     463             :         }
     464           0 :         if (value == Py_None) {
     465           0 :                 object->domain_name = NULL;
     466             :         } else {
     467           0 :                 object->domain_name = NULL;
     468             :                 {
     469           0 :                         const char *test_str;
     470           0 :                         const char *talloc_str;
     471           0 :                         PyObject *unicode = NULL;
     472           0 :                         if (PyUnicode_Check(value)) {
     473           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     474           0 :                                 if (unicode == NULL) {
     475           0 :                                         PyErr_NoMemory();
     476           0 :                                         return -1;
     477             :                                 }
     478           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     479           0 :                         } else if (PyBytes_Check(value)) {
     480           0 :                                 test_str = PyBytes_AS_STRING(value);
     481             :                         } else {
     482           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     483           0 :                                 return -1;
     484             :                         }
     485           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     486           0 :                         if (unicode != NULL) {
     487           0 :                                 Py_DECREF(unicode);
     488             :                         }
     489           0 :                         if (talloc_str == NULL) {
     490           0 :                                 PyErr_NoMemory();
     491           0 :                                 return -1;
     492             :                         }
     493           0 :                         object->domain_name = talloc_str;
     494             :                 }
     495             :         }
     496           0 :         return 0;
     497             : }
     498             : 
     499           0 : static PyObject *py_wbint_userinfo_get_acct_name(PyObject *obj, void *closure)
     500             : {
     501           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(obj);
     502           0 :         PyObject *py_acct_name;
     503           0 :         if (object->acct_name == NULL) {
     504           0 :                 Py_RETURN_NONE;
     505             :         }
     506           0 :         if (object->acct_name == NULL) {
     507           0 :                 py_acct_name = Py_None;
     508           0 :                 Py_INCREF(py_acct_name);
     509             :         } else {
     510           0 :                 if (object->acct_name == NULL) {
     511           0 :                         py_acct_name = Py_None;
     512           0 :                         Py_INCREF(py_acct_name);
     513             :                 } else {
     514           0 :                         py_acct_name = PyUnicode_Decode(object->acct_name, strlen(object->acct_name), "utf-8", "ignore");
     515             :                 }
     516             :         }
     517           0 :         return py_acct_name;
     518             : }
     519             : 
     520           0 : static int py_wbint_userinfo_set_acct_name(PyObject *py_obj, PyObject *value, void *closure)
     521             : {
     522           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
     523           0 :         if (value == NULL) {
     524           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->acct_name");
     525           0 :                 return -1;
     526             :         }
     527           0 :         if (value == Py_None) {
     528           0 :                 object->acct_name = NULL;
     529             :         } else {
     530           0 :                 object->acct_name = NULL;
     531             :                 {
     532           0 :                         const char *test_str;
     533           0 :                         const char *talloc_str;
     534           0 :                         PyObject *unicode = NULL;
     535           0 :                         if (PyUnicode_Check(value)) {
     536           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     537           0 :                                 if (unicode == NULL) {
     538           0 :                                         PyErr_NoMemory();
     539           0 :                                         return -1;
     540             :                                 }
     541           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     542           0 :                         } else if (PyBytes_Check(value)) {
     543           0 :                                 test_str = PyBytes_AS_STRING(value);
     544             :                         } else {
     545           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     546           0 :                                 return -1;
     547             :                         }
     548           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     549           0 :                         if (unicode != NULL) {
     550           0 :                                 Py_DECREF(unicode);
     551             :                         }
     552           0 :                         if (talloc_str == NULL) {
     553           0 :                                 PyErr_NoMemory();
     554           0 :                                 return -1;
     555             :                         }
     556           0 :                         object->acct_name = talloc_str;
     557             :                 }
     558             :         }
     559           0 :         return 0;
     560             : }
     561             : 
     562           0 : static PyObject *py_wbint_userinfo_get_full_name(PyObject *obj, void *closure)
     563             : {
     564           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(obj);
     565           0 :         PyObject *py_full_name;
     566           0 :         if (object->full_name == NULL) {
     567           0 :                 Py_RETURN_NONE;
     568             :         }
     569           0 :         if (object->full_name == NULL) {
     570           0 :                 py_full_name = Py_None;
     571           0 :                 Py_INCREF(py_full_name);
     572             :         } else {
     573           0 :                 if (object->full_name == NULL) {
     574           0 :                         py_full_name = Py_None;
     575           0 :                         Py_INCREF(py_full_name);
     576             :                 } else {
     577           0 :                         py_full_name = PyUnicode_Decode(object->full_name, strlen(object->full_name), "utf-8", "ignore");
     578             :                 }
     579             :         }
     580           0 :         return py_full_name;
     581             : }
     582             : 
     583           0 : static int py_wbint_userinfo_set_full_name(PyObject *py_obj, PyObject *value, void *closure)
     584             : {
     585           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
     586           0 :         if (value == NULL) {
     587           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->full_name");
     588           0 :                 return -1;
     589             :         }
     590           0 :         if (value == Py_None) {
     591           0 :                 object->full_name = NULL;
     592             :         } else {
     593           0 :                 object->full_name = NULL;
     594             :                 {
     595           0 :                         const char *test_str;
     596           0 :                         const char *talloc_str;
     597           0 :                         PyObject *unicode = NULL;
     598           0 :                         if (PyUnicode_Check(value)) {
     599           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     600           0 :                                 if (unicode == NULL) {
     601           0 :                                         PyErr_NoMemory();
     602           0 :                                         return -1;
     603             :                                 }
     604           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     605           0 :                         } else if (PyBytes_Check(value)) {
     606           0 :                                 test_str = PyBytes_AS_STRING(value);
     607             :                         } else {
     608           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     609           0 :                                 return -1;
     610             :                         }
     611           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     612           0 :                         if (unicode != NULL) {
     613           0 :                                 Py_DECREF(unicode);
     614             :                         }
     615           0 :                         if (talloc_str == NULL) {
     616           0 :                                 PyErr_NoMemory();
     617           0 :                                 return -1;
     618             :                         }
     619           0 :                         object->full_name = talloc_str;
     620             :                 }
     621             :         }
     622           0 :         return 0;
     623             : }
     624             : 
     625           0 : static PyObject *py_wbint_userinfo_get_homedir(PyObject *obj, void *closure)
     626             : {
     627           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(obj);
     628           0 :         PyObject *py_homedir;
     629           0 :         if (object->homedir == NULL) {
     630           0 :                 Py_RETURN_NONE;
     631             :         }
     632           0 :         if (object->homedir == NULL) {
     633           0 :                 py_homedir = Py_None;
     634           0 :                 Py_INCREF(py_homedir);
     635             :         } else {
     636           0 :                 if (object->homedir == NULL) {
     637           0 :                         py_homedir = Py_None;
     638           0 :                         Py_INCREF(py_homedir);
     639             :                 } else {
     640           0 :                         py_homedir = PyUnicode_Decode(object->homedir, strlen(object->homedir), "utf-8", "ignore");
     641             :                 }
     642             :         }
     643           0 :         return py_homedir;
     644             : }
     645             : 
     646           0 : static int py_wbint_userinfo_set_homedir(PyObject *py_obj, PyObject *value, void *closure)
     647             : {
     648           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
     649           0 :         if (value == NULL) {
     650           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->homedir");
     651           0 :                 return -1;
     652             :         }
     653           0 :         if (value == Py_None) {
     654           0 :                 object->homedir = NULL;
     655             :         } else {
     656           0 :                 object->homedir = NULL;
     657             :                 {
     658           0 :                         const char *test_str;
     659           0 :                         const char *talloc_str;
     660           0 :                         PyObject *unicode = NULL;
     661           0 :                         if (PyUnicode_Check(value)) {
     662           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     663           0 :                                 if (unicode == NULL) {
     664           0 :                                         PyErr_NoMemory();
     665           0 :                                         return -1;
     666             :                                 }
     667           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     668           0 :                         } else if (PyBytes_Check(value)) {
     669           0 :                                 test_str = PyBytes_AS_STRING(value);
     670             :                         } else {
     671           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     672           0 :                                 return -1;
     673             :                         }
     674           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     675           0 :                         if (unicode != NULL) {
     676           0 :                                 Py_DECREF(unicode);
     677             :                         }
     678           0 :                         if (talloc_str == NULL) {
     679           0 :                                 PyErr_NoMemory();
     680           0 :                                 return -1;
     681             :                         }
     682           0 :                         object->homedir = talloc_str;
     683             :                 }
     684             :         }
     685           0 :         return 0;
     686             : }
     687             : 
     688           0 : static PyObject *py_wbint_userinfo_get_shell(PyObject *obj, void *closure)
     689             : {
     690           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(obj);
     691           0 :         PyObject *py_shell;
     692           0 :         if (object->shell == NULL) {
     693           0 :                 Py_RETURN_NONE;
     694             :         }
     695           0 :         if (object->shell == NULL) {
     696           0 :                 py_shell = Py_None;
     697           0 :                 Py_INCREF(py_shell);
     698             :         } else {
     699           0 :                 if (object->shell == NULL) {
     700           0 :                         py_shell = Py_None;
     701           0 :                         Py_INCREF(py_shell);
     702             :                 } else {
     703           0 :                         py_shell = PyUnicode_Decode(object->shell, strlen(object->shell), "utf-8", "ignore");
     704             :                 }
     705             :         }
     706           0 :         return py_shell;
     707             : }
     708             : 
     709           0 : static int py_wbint_userinfo_set_shell(PyObject *py_obj, PyObject *value, void *closure)
     710             : {
     711           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
     712           0 :         if (value == NULL) {
     713           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->shell");
     714           0 :                 return -1;
     715             :         }
     716           0 :         if (value == Py_None) {
     717           0 :                 object->shell = NULL;
     718             :         } else {
     719           0 :                 object->shell = NULL;
     720             :                 {
     721           0 :                         const char *test_str;
     722           0 :                         const char *talloc_str;
     723           0 :                         PyObject *unicode = NULL;
     724           0 :                         if (PyUnicode_Check(value)) {
     725           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     726           0 :                                 if (unicode == NULL) {
     727           0 :                                         PyErr_NoMemory();
     728           0 :                                         return -1;
     729             :                                 }
     730           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     731           0 :                         } else if (PyBytes_Check(value)) {
     732           0 :                                 test_str = PyBytes_AS_STRING(value);
     733             :                         } else {
     734           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     735           0 :                                 return -1;
     736             :                         }
     737           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     738           0 :                         if (unicode != NULL) {
     739           0 :                                 Py_DECREF(unicode);
     740             :                         }
     741           0 :                         if (talloc_str == NULL) {
     742           0 :                                 PyErr_NoMemory();
     743           0 :                                 return -1;
     744             :                         }
     745           0 :                         object->shell = talloc_str;
     746             :                 }
     747             :         }
     748           0 :         return 0;
     749             : }
     750             : 
     751           0 : static PyObject *py_wbint_userinfo_get_uid(PyObject *obj, void *closure)
     752             : {
     753           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(obj);
     754           0 :         PyObject *py_uid;
     755           0 :         py_uid = PyLong_FromUnsignedLongLong(object->uid);
     756           0 :         return py_uid;
     757             : }
     758             : 
     759           0 : static int py_wbint_userinfo_set_uid(PyObject *py_obj, PyObject *value, void *closure)
     760             : {
     761           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
     762           0 :         if (value == NULL) {
     763           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->uid");
     764           0 :                 return -1;
     765             :         }
     766             :         {
     767           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->uid));
     768           0 :                 if (PyLong_Check(value)) {
     769           0 :                         unsigned long long test_var;
     770           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     771           0 :                         if (PyErr_Occurred() != NULL) {
     772           0 :                                 return -1;
     773             :                         }
     774           0 :                         if (test_var > uint_max) {
     775           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     776             :                                   PyLong_Type.tp_name, uint_max, test_var);
     777           0 :                                 return -1;
     778             :                         }
     779           0 :                         object->uid = test_var;
     780             :                 } else {
     781           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     782             :                           PyLong_Type.tp_name);
     783           0 :                         return -1;
     784             :                 }
     785             :         }
     786           0 :         return 0;
     787             : }
     788             : 
     789           0 : static PyObject *py_wbint_userinfo_get_primary_gid(PyObject *obj, void *closure)
     790             : {
     791           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(obj);
     792           0 :         PyObject *py_primary_gid;
     793           0 :         py_primary_gid = PyLong_FromUnsignedLongLong(object->primary_gid);
     794           0 :         return py_primary_gid;
     795             : }
     796             : 
     797           0 : static int py_wbint_userinfo_set_primary_gid(PyObject *py_obj, PyObject *value, void *closure)
     798             : {
     799           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
     800           0 :         if (value == NULL) {
     801           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->primary_gid");
     802           0 :                 return -1;
     803             :         }
     804             :         {
     805           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->primary_gid));
     806           0 :                 if (PyLong_Check(value)) {
     807           0 :                         unsigned long long test_var;
     808           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     809           0 :                         if (PyErr_Occurred() != NULL) {
     810           0 :                                 return -1;
     811             :                         }
     812           0 :                         if (test_var > uint_max) {
     813           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     814             :                                   PyLong_Type.tp_name, uint_max, test_var);
     815           0 :                                 return -1;
     816             :                         }
     817           0 :                         object->primary_gid = test_var;
     818             :                 } else {
     819           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     820             :                           PyLong_Type.tp_name);
     821           0 :                         return -1;
     822             :                 }
     823             :         }
     824           0 :         return 0;
     825             : }
     826             : 
     827           0 : static PyObject *py_wbint_userinfo_get_primary_group_name(PyObject *obj, void *closure)
     828             : {
     829           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(obj);
     830           0 :         PyObject *py_primary_group_name;
     831           0 :         if (object->primary_group_name == NULL) {
     832           0 :                 Py_RETURN_NONE;
     833             :         }
     834           0 :         if (object->primary_group_name == NULL) {
     835           0 :                 py_primary_group_name = Py_None;
     836           0 :                 Py_INCREF(py_primary_group_name);
     837             :         } else {
     838           0 :                 if (object->primary_group_name == NULL) {
     839           0 :                         py_primary_group_name = Py_None;
     840           0 :                         Py_INCREF(py_primary_group_name);
     841             :                 } else {
     842           0 :                         py_primary_group_name = PyUnicode_Decode(object->primary_group_name, strlen(object->primary_group_name), "utf-8", "ignore");
     843             :                 }
     844             :         }
     845           0 :         return py_primary_group_name;
     846             : }
     847             : 
     848           0 : static int py_wbint_userinfo_set_primary_group_name(PyObject *py_obj, PyObject *value, void *closure)
     849             : {
     850           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
     851           0 :         if (value == NULL) {
     852           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->primary_group_name");
     853           0 :                 return -1;
     854             :         }
     855           0 :         if (value == Py_None) {
     856           0 :                 object->primary_group_name = NULL;
     857             :         } else {
     858           0 :                 object->primary_group_name = NULL;
     859             :                 {
     860           0 :                         const char *test_str;
     861           0 :                         const char *talloc_str;
     862           0 :                         PyObject *unicode = NULL;
     863           0 :                         if (PyUnicode_Check(value)) {
     864           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     865           0 :                                 if (unicode == NULL) {
     866           0 :                                         PyErr_NoMemory();
     867           0 :                                         return -1;
     868             :                                 }
     869           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     870           0 :                         } else if (PyBytes_Check(value)) {
     871           0 :                                 test_str = PyBytes_AS_STRING(value);
     872             :                         } else {
     873           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     874           0 :                                 return -1;
     875             :                         }
     876           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     877           0 :                         if (unicode != NULL) {
     878           0 :                                 Py_DECREF(unicode);
     879             :                         }
     880           0 :                         if (talloc_str == NULL) {
     881           0 :                                 PyErr_NoMemory();
     882           0 :                                 return -1;
     883             :                         }
     884           0 :                         object->primary_group_name = talloc_str;
     885             :                 }
     886             :         }
     887           0 :         return 0;
     888             : }
     889             : 
     890           0 : static PyObject *py_wbint_userinfo_get_user_sid(PyObject *obj, void *closure)
     891             : {
     892           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(obj);
     893           0 :         PyObject *py_user_sid;
     894           0 :         py_user_sid = pytalloc_reference_ex(dom_sid_Type, pytalloc_get_mem_ctx(obj), &object->user_sid);
     895           0 :         return py_user_sid;
     896             : }
     897             : 
     898           0 : static int py_wbint_userinfo_set_user_sid(PyObject *py_obj, PyObject *value, void *closure)
     899             : {
     900           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
     901           0 :         if (value == NULL) {
     902           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user_sid");
     903           0 :                 return -1;
     904             :         }
     905           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
     906           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
     907           0 :                 PyErr_NoMemory();
     908           0 :                 return -1;
     909             :         }
     910           0 :         object->user_sid = *(struct dom_sid *)pytalloc_get_ptr(value);
     911           0 :         return 0;
     912             : }
     913             : 
     914           0 : static PyObject *py_wbint_userinfo_get_group_sid(PyObject *obj, void *closure)
     915             : {
     916           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(obj);
     917           0 :         PyObject *py_group_sid;
     918           0 :         py_group_sid = pytalloc_reference_ex(dom_sid_Type, pytalloc_get_mem_ctx(obj), &object->group_sid);
     919           0 :         return py_group_sid;
     920             : }
     921             : 
     922           0 : static int py_wbint_userinfo_set_group_sid(PyObject *py_obj, PyObject *value, void *closure)
     923             : {
     924           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
     925           0 :         if (value == NULL) {
     926           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->group_sid");
     927           0 :                 return -1;
     928             :         }
     929           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
     930           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
     931           0 :                 PyErr_NoMemory();
     932           0 :                 return -1;
     933             :         }
     934           0 :         object->group_sid = *(struct dom_sid *)pytalloc_get_ptr(value);
     935           0 :         return 0;
     936             : }
     937             : 
     938             : static PyGetSetDef py_wbint_userinfo_getsetters[] = {
     939             :         {
     940             :                 .name = discard_const_p(char, "domain_name"),
     941             :                 .get = py_wbint_userinfo_get_domain_name,
     942             :                 .set = py_wbint_userinfo_set_domain_name,
     943             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
     944             :         },
     945             :         {
     946             :                 .name = discard_const_p(char, "acct_name"),
     947             :                 .get = py_wbint_userinfo_get_acct_name,
     948             :                 .set = py_wbint_userinfo_set_acct_name,
     949             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
     950             :         },
     951             :         {
     952             :                 .name = discard_const_p(char, "full_name"),
     953             :                 .get = py_wbint_userinfo_get_full_name,
     954             :                 .set = py_wbint_userinfo_set_full_name,
     955             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
     956             :         },
     957             :         {
     958             :                 .name = discard_const_p(char, "homedir"),
     959             :                 .get = py_wbint_userinfo_get_homedir,
     960             :                 .set = py_wbint_userinfo_set_homedir,
     961             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
     962             :         },
     963             :         {
     964             :                 .name = discard_const_p(char, "shell"),
     965             :                 .get = py_wbint_userinfo_get_shell,
     966             :                 .set = py_wbint_userinfo_set_shell,
     967             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
     968             :         },
     969             :         {
     970             :                 .name = discard_const_p(char, "uid"),
     971             :                 .get = py_wbint_userinfo_get_uid,
     972             :                 .set = py_wbint_userinfo_set_uid,
     973             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
     974             :         },
     975             :         {
     976             :                 .name = discard_const_p(char, "primary_gid"),
     977             :                 .get = py_wbint_userinfo_get_primary_gid,
     978             :                 .set = py_wbint_userinfo_set_primary_gid,
     979             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
     980             :         },
     981             :         {
     982             :                 .name = discard_const_p(char, "primary_group_name"),
     983             :                 .get = py_wbint_userinfo_get_primary_group_name,
     984             :                 .set = py_wbint_userinfo_set_primary_group_name,
     985             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
     986             :         },
     987             :         {
     988             :                 .name = discard_const_p(char, "user_sid"),
     989             :                 .get = py_wbint_userinfo_get_user_sid,
     990             :                 .set = py_wbint_userinfo_set_user_sid,
     991             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
     992             :         },
     993             :         {
     994             :                 .name = discard_const_p(char, "group_sid"),
     995             :                 .get = py_wbint_userinfo_get_group_sid,
     996             :                 .set = py_wbint_userinfo_set_group_sid,
     997             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
     998             :         },
     999             :         { .name = NULL }
    1000             : };
    1001             : 
    1002           0 : static PyObject *py_wbint_userinfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1003             : {
    1004           0 :         return pytalloc_new(struct wbint_userinfo, type);
    1005             : }
    1006             : 
    1007           0 : static PyObject *py_wbint_userinfo_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    1008             : {
    1009           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
    1010           0 :         PyObject *ret = NULL;
    1011           0 :         DATA_BLOB blob;
    1012           0 :         enum ndr_err_code err;
    1013           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    1014           0 :         if (tmp_ctx == NULL) {
    1015           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    1016           0 :                 return NULL;
    1017             :         }
    1018           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_wbint_userinfo);
    1019           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1020           0 :                 TALLOC_FREE(tmp_ctx);
    1021           0 :                 PyErr_SetNdrError(err);
    1022           0 :                 return NULL;
    1023             :         }
    1024             : 
    1025           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    1026           0 :         TALLOC_FREE(tmp_ctx);
    1027           0 :         return ret;
    1028             : }
    1029             : 
    1030           0 : static PyObject *py_wbint_userinfo_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    1031             : {
    1032           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
    1033           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1034           0 :         Py_ssize_t blob_length = 0;
    1035           0 :         enum ndr_err_code err;
    1036           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    1037           0 :         PyObject *allow_remaining_obj = NULL;
    1038           0 :         bool allow_remaining = false;
    1039             : 
    1040           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    1041             :                 discard_const_p(char *, kwnames),
    1042             :                 &blob.data, &blob_length,
    1043             :                 &allow_remaining_obj)) {
    1044           0 :                 return NULL;
    1045             :         }
    1046           0 :         blob.length = blob_length;
    1047             : 
    1048           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    1049           0 :                 allow_remaining = true;
    1050             :         }
    1051             : 
    1052           0 :         if (allow_remaining) {
    1053           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_userinfo);
    1054             :         } else {
    1055           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_userinfo);
    1056             :         }
    1057           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1058           0 :                 PyErr_SetNdrError(err);
    1059           0 :                 return NULL;
    1060             :         }
    1061             : 
    1062           0 :         Py_RETURN_NONE;
    1063             : }
    1064             : 
    1065           0 : static PyObject *py_wbint_userinfo_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    1066             : {
    1067           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
    1068           0 :         PyObject *ret;
    1069           0 :         char *retstr;
    1070             : 
    1071           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_wbint_userinfo, "wbint_userinfo", object);
    1072           0 :         ret = PyUnicode_FromString(retstr);
    1073           0 :         talloc_free(retstr);
    1074             : 
    1075           0 :         return ret;
    1076             : }
    1077             : 
    1078             : static PyMethodDef py_wbint_userinfo_methods[] = {
    1079             :         { "__ndr_pack__", (PyCFunction)py_wbint_userinfo_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    1080             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_userinfo_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    1081             :         { "__ndr_print__", (PyCFunction)py_wbint_userinfo_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    1082             :         { NULL, NULL, 0, NULL }
    1083             : };
    1084             : 
    1085             : 
    1086             : static PyTypeObject wbint_userinfo_Type = {
    1087             :         PyVarObject_HEAD_INIT(NULL, 0)
    1088             :         .tp_name = "winbind.wbint_userinfo",
    1089             :         .tp_getset = py_wbint_userinfo_getsetters,
    1090             :         .tp_methods = py_wbint_userinfo_methods,
    1091             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1092             :         .tp_new = py_wbint_userinfo_new,
    1093             : };
    1094             : 
    1095             : 
    1096           0 : static PyObject *py_wbint_SidArray_get_num_sids(PyObject *obj, void *closure)
    1097             : {
    1098           0 :         struct wbint_SidArray *object = (struct wbint_SidArray *)pytalloc_get_ptr(obj);
    1099           0 :         PyObject *py_num_sids;
    1100           0 :         py_num_sids = PyLong_FromUnsignedLongLong((uint32_t)object->num_sids);
    1101           0 :         return py_num_sids;
    1102             : }
    1103             : 
    1104           0 : static int py_wbint_SidArray_set_num_sids(PyObject *py_obj, PyObject *value, void *closure)
    1105             : {
    1106           0 :         struct wbint_SidArray *object = (struct wbint_SidArray *)pytalloc_get_ptr(py_obj);
    1107           0 :         if (value == NULL) {
    1108           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_sids");
    1109           0 :                 return -1;
    1110             :         }
    1111             :         {
    1112           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_sids));
    1113           0 :                 if (PyLong_Check(value)) {
    1114           0 :                         unsigned long long test_var;
    1115           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1116           0 :                         if (PyErr_Occurred() != NULL) {
    1117           0 :                                 return -1;
    1118             :                         }
    1119           0 :                         if (test_var > uint_max) {
    1120           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1121             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1122           0 :                                 return -1;
    1123             :                         }
    1124           0 :                         object->num_sids = test_var;
    1125             :                 } else {
    1126           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1127             :                           PyLong_Type.tp_name);
    1128           0 :                         return -1;
    1129             :                 }
    1130             :         }
    1131           0 :         return 0;
    1132             : }
    1133             : 
    1134           0 : static PyObject *py_wbint_SidArray_get_sids(PyObject *obj, void *closure)
    1135             : {
    1136           0 :         struct wbint_SidArray *object = (struct wbint_SidArray *)pytalloc_get_ptr(obj);
    1137           0 :         PyObject *py_sids;
    1138           0 :         py_sids = PyList_New(object->num_sids);
    1139           0 :         if (py_sids == NULL) {
    1140           0 :                 return NULL;
    1141             :         }
    1142             :         {
    1143             :                 int sids_cntr_0;
    1144           0 :                 for (sids_cntr_0 = 0; sids_cntr_0 < (object->num_sids); sids_cntr_0++) {
    1145           0 :                         PyObject *py_sids_0;
    1146           0 :                         py_sids_0 = pytalloc_reference_ex(dom_sid_Type, object->sids, &object->sids[sids_cntr_0]);
    1147           0 :                         PyList_SetItem(py_sids, sids_cntr_0, py_sids_0);
    1148             :                 }
    1149             :         }
    1150           0 :         return py_sids;
    1151             : }
    1152             : 
    1153           0 : static int py_wbint_SidArray_set_sids(PyObject *py_obj, PyObject *value, void *closure)
    1154             : {
    1155           0 :         struct wbint_SidArray *object = (struct wbint_SidArray *)pytalloc_get_ptr(py_obj);
    1156           0 :         if (value == NULL) {
    1157           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sids");
    1158           0 :                 return -1;
    1159             :         }
    1160           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1161             :         {
    1162           0 :                 int sids_cntr_0;
    1163           0 :                 object->sids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sids, PyList_GET_SIZE(value));
    1164           0 :                 if (!object->sids) { return -1; }
    1165           0 :                 talloc_set_name_const(object->sids, "ARRAY: object->sids");
    1166           0 :                 for (sids_cntr_0 = 0; sids_cntr_0 < PyList_GET_SIZE(value); sids_cntr_0++) {
    1167           0 :                         if (PyList_GET_ITEM(value, sids_cntr_0) == NULL) {
    1168           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sids[sids_cntr_0]");
    1169           0 :                                 return -1;
    1170             :                         }
    1171           0 :                         PY_CHECK_TYPE(dom_sid_Type, PyList_GET_ITEM(value, sids_cntr_0), return -1;);
    1172           0 :                         if (talloc_reference(object->sids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sids_cntr_0))) == NULL) {
    1173           0 :                                 PyErr_NoMemory();
    1174           0 :                                 return -1;
    1175             :                         }
    1176           0 :                         object->sids[sids_cntr_0] = *(struct dom_sid *)pytalloc_get_ptr(PyList_GET_ITEM(value, sids_cntr_0));
    1177             :                 }
    1178             :         }
    1179           0 :         return 0;
    1180             : }
    1181             : 
    1182             : static PyGetSetDef py_wbint_SidArray_getsetters[] = {
    1183             :         {
    1184             :                 .name = discard_const_p(char, "num_sids"),
    1185             :                 .get = py_wbint_SidArray_get_num_sids,
    1186             :                 .set = py_wbint_SidArray_set_num_sids,
    1187             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1188             :         },
    1189             :         {
    1190             :                 .name = discard_const_p(char, "sids"),
    1191             :                 .get = py_wbint_SidArray_get_sids,
    1192             :                 .set = py_wbint_SidArray_set_sids,
    1193             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
    1194             :         },
    1195             :         { .name = NULL }
    1196             : };
    1197             : 
    1198           0 : static PyObject *py_wbint_SidArray_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1199             : {
    1200           0 :         return pytalloc_new(struct wbint_SidArray, type);
    1201             : }
    1202             : 
    1203           0 : static PyObject *py_wbint_SidArray_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    1204             : {
    1205           0 :         struct wbint_SidArray *object = (struct wbint_SidArray *)pytalloc_get_ptr(py_obj);
    1206           0 :         PyObject *ret = NULL;
    1207           0 :         DATA_BLOB blob;
    1208           0 :         enum ndr_err_code err;
    1209           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    1210           0 :         if (tmp_ctx == NULL) {
    1211           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    1212           0 :                 return NULL;
    1213             :         }
    1214           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_wbint_SidArray);
    1215           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1216           0 :                 TALLOC_FREE(tmp_ctx);
    1217           0 :                 PyErr_SetNdrError(err);
    1218           0 :                 return NULL;
    1219             :         }
    1220             : 
    1221           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    1222           0 :         TALLOC_FREE(tmp_ctx);
    1223           0 :         return ret;
    1224             : }
    1225             : 
    1226           0 : static PyObject *py_wbint_SidArray_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    1227             : {
    1228           0 :         struct wbint_SidArray *object = (struct wbint_SidArray *)pytalloc_get_ptr(py_obj);
    1229           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1230           0 :         Py_ssize_t blob_length = 0;
    1231           0 :         enum ndr_err_code err;
    1232           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    1233           0 :         PyObject *allow_remaining_obj = NULL;
    1234           0 :         bool allow_remaining = false;
    1235             : 
    1236           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    1237             :                 discard_const_p(char *, kwnames),
    1238             :                 &blob.data, &blob_length,
    1239             :                 &allow_remaining_obj)) {
    1240           0 :                 return NULL;
    1241             :         }
    1242           0 :         blob.length = blob_length;
    1243             : 
    1244           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    1245           0 :                 allow_remaining = true;
    1246             :         }
    1247             : 
    1248           0 :         if (allow_remaining) {
    1249           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_SidArray);
    1250             :         } else {
    1251           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_SidArray);
    1252             :         }
    1253           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1254           0 :                 PyErr_SetNdrError(err);
    1255           0 :                 return NULL;
    1256             :         }
    1257             : 
    1258           0 :         Py_RETURN_NONE;
    1259             : }
    1260             : 
    1261           0 : static PyObject *py_wbint_SidArray_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    1262             : {
    1263           0 :         struct wbint_SidArray *object = (struct wbint_SidArray *)pytalloc_get_ptr(py_obj);
    1264           0 :         PyObject *ret;
    1265           0 :         char *retstr;
    1266             : 
    1267           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_wbint_SidArray, "wbint_SidArray", object);
    1268           0 :         ret = PyUnicode_FromString(retstr);
    1269           0 :         talloc_free(retstr);
    1270             : 
    1271           0 :         return ret;
    1272             : }
    1273             : 
    1274             : static PyMethodDef py_wbint_SidArray_methods[] = {
    1275             :         { "__ndr_pack__", (PyCFunction)py_wbint_SidArray_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    1276             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_SidArray_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    1277             :         { "__ndr_print__", (PyCFunction)py_wbint_SidArray_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    1278             :         { NULL, NULL, 0, NULL }
    1279             : };
    1280             : 
    1281             : 
    1282             : static PyTypeObject wbint_SidArray_Type = {
    1283             :         PyVarObject_HEAD_INIT(NULL, 0)
    1284             :         .tp_name = "winbind.wbint_SidArray",
    1285             :         .tp_getset = py_wbint_SidArray_getsetters,
    1286             :         .tp_methods = py_wbint_SidArray_methods,
    1287             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1288             :         .tp_new = py_wbint_SidArray_new,
    1289             : };
    1290             : 
    1291             : 
    1292           0 : static PyObject *py_wbint_RidArray_get_num_rids(PyObject *obj, void *closure)
    1293             : {
    1294           0 :         struct wbint_RidArray *object = (struct wbint_RidArray *)pytalloc_get_ptr(obj);
    1295           0 :         PyObject *py_num_rids;
    1296           0 :         py_num_rids = PyLong_FromUnsignedLongLong((uint32_t)object->num_rids);
    1297           0 :         return py_num_rids;
    1298             : }
    1299             : 
    1300           0 : static int py_wbint_RidArray_set_num_rids(PyObject *py_obj, PyObject *value, void *closure)
    1301             : {
    1302           0 :         struct wbint_RidArray *object = (struct wbint_RidArray *)pytalloc_get_ptr(py_obj);
    1303           0 :         if (value == NULL) {
    1304           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_rids");
    1305           0 :                 return -1;
    1306             :         }
    1307             :         {
    1308           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_rids));
    1309           0 :                 if (PyLong_Check(value)) {
    1310           0 :                         unsigned long long test_var;
    1311           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1312           0 :                         if (PyErr_Occurred() != NULL) {
    1313           0 :                                 return -1;
    1314             :                         }
    1315           0 :                         if (test_var > uint_max) {
    1316           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1317             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1318           0 :                                 return -1;
    1319             :                         }
    1320           0 :                         object->num_rids = test_var;
    1321             :                 } else {
    1322           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1323             :                           PyLong_Type.tp_name);
    1324           0 :                         return -1;
    1325             :                 }
    1326             :         }
    1327           0 :         return 0;
    1328             : }
    1329             : 
    1330           0 : static PyObject *py_wbint_RidArray_get_rids(PyObject *obj, void *closure)
    1331             : {
    1332           0 :         struct wbint_RidArray *object = (struct wbint_RidArray *)pytalloc_get_ptr(obj);
    1333           0 :         PyObject *py_rids;
    1334           0 :         py_rids = PyList_New(object->num_rids);
    1335           0 :         if (py_rids == NULL) {
    1336           0 :                 return NULL;
    1337             :         }
    1338             :         {
    1339             :                 int rids_cntr_0;
    1340           0 :                 for (rids_cntr_0 = 0; rids_cntr_0 < (object->num_rids); rids_cntr_0++) {
    1341           0 :                         PyObject *py_rids_0;
    1342           0 :                         py_rids_0 = PyLong_FromUnsignedLongLong((uint32_t)object->rids[rids_cntr_0]);
    1343           0 :                         PyList_SetItem(py_rids, rids_cntr_0, py_rids_0);
    1344             :                 }
    1345             :         }
    1346           0 :         return py_rids;
    1347             : }
    1348             : 
    1349           0 : static int py_wbint_RidArray_set_rids(PyObject *py_obj, PyObject *value, void *closure)
    1350             : {
    1351           0 :         struct wbint_RidArray *object = (struct wbint_RidArray *)pytalloc_get_ptr(py_obj);
    1352           0 :         if (value == NULL) {
    1353           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rids");
    1354           0 :                 return -1;
    1355             :         }
    1356           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1357             :         {
    1358           0 :                 int rids_cntr_0;
    1359           0 :                 object->rids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->rids, PyList_GET_SIZE(value));
    1360           0 :                 if (!object->rids) { return -1; }
    1361           0 :                 talloc_set_name_const(object->rids, "ARRAY: object->rids");
    1362           0 :                 for (rids_cntr_0 = 0; rids_cntr_0 < PyList_GET_SIZE(value); rids_cntr_0++) {
    1363           0 :                         if (PyList_GET_ITEM(value, rids_cntr_0) == NULL) {
    1364           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rids[rids_cntr_0]");
    1365           0 :                                 return -1;
    1366             :                         }
    1367             :                         {
    1368           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rids[rids_cntr_0]));
    1369           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, rids_cntr_0))) {
    1370           0 :                                         unsigned long long test_var;
    1371           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, rids_cntr_0));
    1372           0 :                                         if (PyErr_Occurred() != NULL) {
    1373           0 :                                                 return -1;
    1374             :                                         }
    1375           0 :                                         if (test_var > uint_max) {
    1376           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1377             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    1378           0 :                                                 return -1;
    1379             :                                         }
    1380           0 :                                         object->rids[rids_cntr_0] = test_var;
    1381             :                                 } else {
    1382           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1383             :                                           PyLong_Type.tp_name);
    1384           0 :                                         return -1;
    1385             :                                 }
    1386             :                         }
    1387             :                 }
    1388             :         }
    1389           0 :         return 0;
    1390             : }
    1391             : 
    1392             : static PyGetSetDef py_wbint_RidArray_getsetters[] = {
    1393             :         {
    1394             :                 .name = discard_const_p(char, "num_rids"),
    1395             :                 .get = py_wbint_RidArray_get_num_rids,
    1396             :                 .set = py_wbint_RidArray_set_num_rids,
    1397             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1398             :         },
    1399             :         {
    1400             :                 .name = discard_const_p(char, "rids"),
    1401             :                 .get = py_wbint_RidArray_get_rids,
    1402             :                 .set = py_wbint_RidArray_set_rids,
    1403             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1404             :         },
    1405             :         { .name = NULL }
    1406             : };
    1407             : 
    1408           0 : static PyObject *py_wbint_RidArray_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1409             : {
    1410           0 :         return pytalloc_new(struct wbint_RidArray, type);
    1411             : }
    1412             : 
    1413           0 : static PyObject *py_wbint_RidArray_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    1414             : {
    1415           0 :         struct wbint_RidArray *object = (struct wbint_RidArray *)pytalloc_get_ptr(py_obj);
    1416           0 :         PyObject *ret = NULL;
    1417           0 :         DATA_BLOB blob;
    1418           0 :         enum ndr_err_code err;
    1419           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    1420           0 :         if (tmp_ctx == NULL) {
    1421           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    1422           0 :                 return NULL;
    1423             :         }
    1424           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_wbint_RidArray);
    1425           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1426           0 :                 TALLOC_FREE(tmp_ctx);
    1427           0 :                 PyErr_SetNdrError(err);
    1428           0 :                 return NULL;
    1429             :         }
    1430             : 
    1431           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    1432           0 :         TALLOC_FREE(tmp_ctx);
    1433           0 :         return ret;
    1434             : }
    1435             : 
    1436           0 : static PyObject *py_wbint_RidArray_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    1437             : {
    1438           0 :         struct wbint_RidArray *object = (struct wbint_RidArray *)pytalloc_get_ptr(py_obj);
    1439           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1440           0 :         Py_ssize_t blob_length = 0;
    1441           0 :         enum ndr_err_code err;
    1442           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    1443           0 :         PyObject *allow_remaining_obj = NULL;
    1444           0 :         bool allow_remaining = false;
    1445             : 
    1446           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    1447             :                 discard_const_p(char *, kwnames),
    1448             :                 &blob.data, &blob_length,
    1449             :                 &allow_remaining_obj)) {
    1450           0 :                 return NULL;
    1451             :         }
    1452           0 :         blob.length = blob_length;
    1453             : 
    1454           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    1455           0 :                 allow_remaining = true;
    1456             :         }
    1457             : 
    1458           0 :         if (allow_remaining) {
    1459           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_RidArray);
    1460             :         } else {
    1461           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_RidArray);
    1462             :         }
    1463           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1464           0 :                 PyErr_SetNdrError(err);
    1465           0 :                 return NULL;
    1466             :         }
    1467             : 
    1468           0 :         Py_RETURN_NONE;
    1469             : }
    1470             : 
    1471           0 : static PyObject *py_wbint_RidArray_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    1472             : {
    1473           0 :         struct wbint_RidArray *object = (struct wbint_RidArray *)pytalloc_get_ptr(py_obj);
    1474           0 :         PyObject *ret;
    1475           0 :         char *retstr;
    1476             : 
    1477           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_wbint_RidArray, "wbint_RidArray", object);
    1478           0 :         ret = PyUnicode_FromString(retstr);
    1479           0 :         talloc_free(retstr);
    1480             : 
    1481           0 :         return ret;
    1482             : }
    1483             : 
    1484             : static PyMethodDef py_wbint_RidArray_methods[] = {
    1485             :         { "__ndr_pack__", (PyCFunction)py_wbint_RidArray_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    1486             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_RidArray_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    1487             :         { "__ndr_print__", (PyCFunction)py_wbint_RidArray_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    1488             :         { NULL, NULL, 0, NULL }
    1489             : };
    1490             : 
    1491             : 
    1492             : static PyTypeObject wbint_RidArray_Type = {
    1493             :         PyVarObject_HEAD_INIT(NULL, 0)
    1494             :         .tp_name = "winbind.wbint_RidArray",
    1495             :         .tp_getset = py_wbint_RidArray_getsetters,
    1496             :         .tp_methods = py_wbint_RidArray_methods,
    1497             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1498             :         .tp_new = py_wbint_RidArray_new,
    1499             : };
    1500             : 
    1501             : 
    1502          44 : static PyObject *py_wbint_Principal_get_sid(PyObject *obj, void *closure)
    1503             : {
    1504          44 :         struct wbint_Principal *object = (struct wbint_Principal *)pytalloc_get_ptr(obj);
    1505          44 :         PyObject *py_sid;
    1506          44 :         py_sid = pytalloc_reference_ex(dom_sid_Type, pytalloc_get_mem_ctx(obj), &object->sid);
    1507          44 :         return py_sid;
    1508             : }
    1509             : 
    1510       65558 : static int py_wbint_Principal_set_sid(PyObject *py_obj, PyObject *value, void *closure)
    1511             : {
    1512       65558 :         struct wbint_Principal *object = (struct wbint_Principal *)pytalloc_get_ptr(py_obj);
    1513       65558 :         if (value == NULL) {
    1514           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sid");
    1515           0 :                 return -1;
    1516             :         }
    1517       65558 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    1518       65558 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1519           0 :                 PyErr_NoMemory();
    1520           0 :                 return -1;
    1521             :         }
    1522       65558 :         object->sid = *(struct dom_sid *)pytalloc_get_ptr(value);
    1523       65558 :         return 0;
    1524             : }
    1525             : 
    1526          44 : static PyObject *py_wbint_Principal_get_type(PyObject *obj, void *closure)
    1527             : {
    1528          44 :         struct wbint_Principal *object = (struct wbint_Principal *)pytalloc_get_ptr(obj);
    1529          44 :         PyObject *py_type;
    1530          44 :         py_type = PyLong_FromLong((uint16_t)object->type);
    1531          44 :         return py_type;
    1532             : }
    1533             : 
    1534       65558 : static int py_wbint_Principal_set_type(PyObject *py_obj, PyObject *value, void *closure)
    1535             : {
    1536       65558 :         struct wbint_Principal *object = (struct wbint_Principal *)pytalloc_get_ptr(py_obj);
    1537       65558 :         if (value == NULL) {
    1538           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->type");
    1539           0 :                 return -1;
    1540             :         }
    1541             :         {
    1542       65558 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
    1543       65558 :                 if (PyLong_Check(value)) {
    1544       65558 :                         unsigned long long test_var;
    1545       65558 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1546       65558 :                         if (PyErr_Occurred() != NULL) {
    1547           0 :                                 return -1;
    1548             :                         }
    1549       65558 :                         if (test_var > uint_max) {
    1550           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1551             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1552           0 :                                 return -1;
    1553             :                         }
    1554       65558 :                         object->type = test_var;
    1555             :                 } else {
    1556           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1557             :                           PyLong_Type.tp_name);
    1558           0 :                         return -1;
    1559             :                 }
    1560             :         }
    1561       65558 :         return 0;
    1562             : }
    1563             : 
    1564          44 : static PyObject *py_wbint_Principal_get_name(PyObject *obj, void *closure)
    1565             : {
    1566          44 :         struct wbint_Principal *object = (struct wbint_Principal *)pytalloc_get_ptr(obj);
    1567          44 :         PyObject *py_name;
    1568          44 :         if (object->name == NULL) {
    1569          22 :                 Py_RETURN_NONE;
    1570             :         }
    1571          22 :         if (object->name == NULL) {
    1572           0 :                 py_name = Py_None;
    1573           0 :                 Py_INCREF(py_name);
    1574             :         } else {
    1575          22 :                 if (object->name == NULL) {
    1576           0 :                         py_name = Py_None;
    1577           0 :                         Py_INCREF(py_name);
    1578             :                 } else {
    1579          22 :                         py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
    1580             :                 }
    1581             :         }
    1582          22 :         return py_name;
    1583             : }
    1584             : 
    1585       65558 : static int py_wbint_Principal_set_name(PyObject *py_obj, PyObject *value, void *closure)
    1586             : {
    1587       65558 :         struct wbint_Principal *object = (struct wbint_Principal *)pytalloc_get_ptr(py_obj);
    1588       65558 :         if (value == NULL) {
    1589           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name");
    1590           0 :                 return -1;
    1591             :         }
    1592       65558 :         if (value == Py_None) {
    1593          11 :                 object->name = NULL;
    1594             :         } else {
    1595       65547 :                 object->name = NULL;
    1596             :                 {
    1597       65547 :                         const char *test_str;
    1598       65547 :                         const char *talloc_str;
    1599       65547 :                         PyObject *unicode = NULL;
    1600       65547 :                         if (PyUnicode_Check(value)) {
    1601       65547 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    1602       65547 :                                 if (unicode == NULL) {
    1603           0 :                                         PyErr_NoMemory();
    1604           0 :                                         return -1;
    1605             :                                 }
    1606       65547 :                                 test_str = PyBytes_AS_STRING(unicode);
    1607           0 :                         } else if (PyBytes_Check(value)) {
    1608           0 :                                 test_str = PyBytes_AS_STRING(value);
    1609             :                         } else {
    1610           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    1611           0 :                                 return -1;
    1612             :                         }
    1613       65547 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    1614       65547 :                         if (unicode != NULL) {
    1615       65547 :                                 Py_DECREF(unicode);
    1616             :                         }
    1617       65547 :                         if (talloc_str == NULL) {
    1618           0 :                                 PyErr_NoMemory();
    1619           0 :                                 return -1;
    1620             :                         }
    1621       65547 :                         object->name = talloc_str;
    1622             :                 }
    1623             :         }
    1624           0 :         return 0;
    1625             : }
    1626             : 
    1627             : static PyGetSetDef py_wbint_Principal_getsetters[] = {
    1628             :         {
    1629             :                 .name = discard_const_p(char, "sid"),
    1630             :                 .get = py_wbint_Principal_get_sid,
    1631             :                 .set = py_wbint_Principal_set_sid,
    1632             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
    1633             :         },
    1634             :         {
    1635             :                 .name = discard_const_p(char, "type"),
    1636             :                 .get = py_wbint_Principal_get_type,
    1637             :                 .set = py_wbint_Principal_set_type,
    1638             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_SidType")
    1639             :         },
    1640             :         {
    1641             :                 .name = discard_const_p(char, "name"),
    1642             :                 .get = py_wbint_Principal_get_name,
    1643             :                 .set = py_wbint_Principal_set_name,
    1644             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    1645             :         },
    1646             :         { .name = NULL }
    1647             : };
    1648             : 
    1649       65560 : static PyObject *py_wbint_Principal_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1650             : {
    1651       65560 :         return pytalloc_new(struct wbint_Principal, type);
    1652             : }
    1653             : 
    1654           2 : static PyObject *py_wbint_Principal_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    1655             : {
    1656           2 :         struct wbint_Principal *object = (struct wbint_Principal *)pytalloc_get_ptr(py_obj);
    1657           2 :         PyObject *ret = NULL;
    1658           2 :         DATA_BLOB blob;
    1659           2 :         enum ndr_err_code err;
    1660           2 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    1661           2 :         if (tmp_ctx == NULL) {
    1662           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    1663           0 :                 return NULL;
    1664             :         }
    1665           2 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_wbint_Principal);
    1666           2 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1667           0 :                 TALLOC_FREE(tmp_ctx);
    1668           0 :                 PyErr_SetNdrError(err);
    1669           0 :                 return NULL;
    1670             :         }
    1671             : 
    1672           2 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    1673           2 :         TALLOC_FREE(tmp_ctx);
    1674           2 :         return ret;
    1675             : }
    1676             : 
    1677           2 : static PyObject *py_wbint_Principal_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    1678             : {
    1679           2 :         struct wbint_Principal *object = (struct wbint_Principal *)pytalloc_get_ptr(py_obj);
    1680           2 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1681           2 :         Py_ssize_t blob_length = 0;
    1682           2 :         enum ndr_err_code err;
    1683           2 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    1684           2 :         PyObject *allow_remaining_obj = NULL;
    1685           2 :         bool allow_remaining = false;
    1686             : 
    1687           2 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    1688             :                 discard_const_p(char *, kwnames),
    1689             :                 &blob.data, &blob_length,
    1690             :                 &allow_remaining_obj)) {
    1691           0 :                 return NULL;
    1692             :         }
    1693           2 :         blob.length = blob_length;
    1694             : 
    1695           2 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    1696           0 :                 allow_remaining = true;
    1697             :         }
    1698             : 
    1699           0 :         if (allow_remaining) {
    1700           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_Principal);
    1701             :         } else {
    1702           2 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_Principal);
    1703             :         }
    1704           2 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1705           0 :                 PyErr_SetNdrError(err);
    1706           0 :                 return NULL;
    1707             :         }
    1708             : 
    1709           2 :         Py_RETURN_NONE;
    1710             : }
    1711             : 
    1712           0 : static PyObject *py_wbint_Principal_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    1713             : {
    1714           0 :         struct wbint_Principal *object = (struct wbint_Principal *)pytalloc_get_ptr(py_obj);
    1715           0 :         PyObject *ret;
    1716           0 :         char *retstr;
    1717             : 
    1718           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_wbint_Principal, "wbint_Principal", object);
    1719           0 :         ret = PyUnicode_FromString(retstr);
    1720           0 :         talloc_free(retstr);
    1721             : 
    1722           0 :         return ret;
    1723             : }
    1724             : 
    1725             : static PyMethodDef py_wbint_Principal_methods[] = {
    1726             :         { "__ndr_pack__", (PyCFunction)py_wbint_Principal_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    1727             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_Principal_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    1728             :         { "__ndr_print__", (PyCFunction)py_wbint_Principal_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    1729             :         { NULL, NULL, 0, NULL }
    1730             : };
    1731             : 
    1732             : 
    1733             : static PyTypeObject wbint_Principal_Type = {
    1734             :         PyVarObject_HEAD_INIT(NULL, 0)
    1735             :         .tp_name = "winbind.wbint_Principal",
    1736             :         .tp_getset = py_wbint_Principal_getsetters,
    1737             :         .tp_methods = py_wbint_Principal_methods,
    1738             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1739             :         .tp_new = py_wbint_Principal_new,
    1740             : };
    1741             : 
    1742             : 
    1743           6 : static PyObject *py_wbint_Principals_get_num_principals(PyObject *obj, void *closure)
    1744             : {
    1745           6 :         struct wbint_Principals *object = (struct wbint_Principals *)pytalloc_get_ptr(obj);
    1746           6 :         PyObject *py_num_principals;
    1747           6 :         py_num_principals = PyLong_FromUnsignedLongLong((uint32_t)object->num_principals);
    1748           6 :         return py_num_principals;
    1749             : }
    1750             : 
    1751           3 : static int py_wbint_Principals_set_num_principals(PyObject *py_obj, PyObject *value, void *closure)
    1752             : {
    1753           3 :         struct wbint_Principals *object = (struct wbint_Principals *)pytalloc_get_ptr(py_obj);
    1754           3 :         if (value == NULL) {
    1755           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_principals");
    1756           0 :                 return -1;
    1757             :         }
    1758             :         {
    1759           3 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_principals));
    1760           3 :                 if (PyLong_Check(value)) {
    1761           3 :                         unsigned long long test_var;
    1762           3 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1763           3 :                         if (PyErr_Occurred() != NULL) {
    1764           0 :                                 return -1;
    1765             :                         }
    1766           3 :                         if (test_var > uint_max) {
    1767           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1768             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1769           0 :                                 return -1;
    1770             :                         }
    1771           3 :                         object->num_principals = test_var;
    1772             :                 } else {
    1773           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1774             :                           PyLong_Type.tp_name);
    1775           0 :                         return -1;
    1776             :                 }
    1777             :         }
    1778           3 :         return 0;
    1779             : }
    1780             : 
    1781          20 : static PyObject *py_wbint_Principals_get_principals(PyObject *obj, void *closure)
    1782             : {
    1783          20 :         struct wbint_Principals *object = (struct wbint_Principals *)pytalloc_get_ptr(obj);
    1784          20 :         PyObject *py_principals;
    1785          20 :         py_principals = PyList_New(object->num_principals);
    1786          20 :         if (py_principals == NULL) {
    1787           0 :                 return NULL;
    1788             :         }
    1789             :         {
    1790             :                 int principals_cntr_0;
    1791         220 :                 for (principals_cntr_0 = 0; principals_cntr_0 < (object->num_principals); principals_cntr_0++) {
    1792         200 :                         PyObject *py_principals_0;
    1793         200 :                         py_principals_0 = pytalloc_reference_ex(&wbint_Principal_Type, object->principals, &object->principals[principals_cntr_0]);
    1794         200 :                         PyList_SetItem(py_principals, principals_cntr_0, py_principals_0);
    1795             :                 }
    1796             :         }
    1797           0 :         return py_principals;
    1798             : }
    1799             : 
    1800           3 : static int py_wbint_Principals_set_principals(PyObject *py_obj, PyObject *value, void *closure)
    1801             : {
    1802           3 :         struct wbint_Principals *object = (struct wbint_Principals *)pytalloc_get_ptr(py_obj);
    1803           3 :         if (value == NULL) {
    1804           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->principals");
    1805           0 :                 return -1;
    1806             :         }
    1807           3 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1808             :         {
    1809           3 :                 int principals_cntr_0;
    1810           3 :                 object->principals = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->principals, PyList_GET_SIZE(value));
    1811           3 :                 if (!object->principals) { return -1; }
    1812           3 :                 talloc_set_name_const(object->principals, "ARRAY: object->principals");
    1813       65562 :                 for (principals_cntr_0 = 0; principals_cntr_0 < PyList_GET_SIZE(value); principals_cntr_0++) {
    1814       65556 :                         if (PyList_GET_ITEM(value, principals_cntr_0) == NULL) {
    1815           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->principals[principals_cntr_0]");
    1816           0 :                                 return -1;
    1817             :                         }
    1818       65556 :                         PY_CHECK_TYPE(&wbint_Principal_Type, PyList_GET_ITEM(value, principals_cntr_0), return -1;);
    1819       65556 :                         if (talloc_reference(object->principals, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, principals_cntr_0))) == NULL) {
    1820           0 :                                 PyErr_NoMemory();
    1821           0 :                                 return -1;
    1822             :                         }
    1823       65556 :                         object->principals[principals_cntr_0] = *(struct wbint_Principal *)pytalloc_get_ptr(PyList_GET_ITEM(value, principals_cntr_0));
    1824             :                 }
    1825             :         }
    1826           0 :         return 0;
    1827             : }
    1828             : 
    1829             : static PyGetSetDef py_wbint_Principals_getsetters[] = {
    1830             :         {
    1831             :                 .name = discard_const_p(char, "num_principals"),
    1832             :                 .get = py_wbint_Principals_get_num_principals,
    1833             :                 .set = py_wbint_Principals_set_num_principals,
    1834             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1835             :         },
    1836             :         {
    1837             :                 .name = discard_const_p(char, "principals"),
    1838             :                 .get = py_wbint_Principals_get_principals,
    1839             :                 .set = py_wbint_Principals_set_principals,
    1840             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_Principal")
    1841             :         },
    1842             :         { .name = NULL }
    1843             : };
    1844             : 
    1845           6 : static PyObject *py_wbint_Principals_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1846             : {
    1847           6 :         return pytalloc_new(struct wbint_Principals, type);
    1848             : }
    1849             : 
    1850           3 : static PyObject *py_wbint_Principals_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    1851             : {
    1852           3 :         struct wbint_Principals *object = (struct wbint_Principals *)pytalloc_get_ptr(py_obj);
    1853           3 :         PyObject *ret = NULL;
    1854           3 :         DATA_BLOB blob;
    1855           3 :         enum ndr_err_code err;
    1856           3 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    1857           3 :         if (tmp_ctx == NULL) {
    1858           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    1859           0 :                 return NULL;
    1860             :         }
    1861           3 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_wbint_Principals);
    1862           3 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1863           0 :                 TALLOC_FREE(tmp_ctx);
    1864           0 :                 PyErr_SetNdrError(err);
    1865           0 :                 return NULL;
    1866             :         }
    1867             : 
    1868           3 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    1869           3 :         TALLOC_FREE(tmp_ctx);
    1870           3 :         return ret;
    1871             : }
    1872             : 
    1873           3 : static PyObject *py_wbint_Principals_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    1874             : {
    1875           3 :         struct wbint_Principals *object = (struct wbint_Principals *)pytalloc_get_ptr(py_obj);
    1876           3 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1877           3 :         Py_ssize_t blob_length = 0;
    1878           3 :         enum ndr_err_code err;
    1879           3 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    1880           3 :         PyObject *allow_remaining_obj = NULL;
    1881           3 :         bool allow_remaining = false;
    1882             : 
    1883           3 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    1884             :                 discard_const_p(char *, kwnames),
    1885             :                 &blob.data, &blob_length,
    1886             :                 &allow_remaining_obj)) {
    1887           0 :                 return NULL;
    1888             :         }
    1889           3 :         blob.length = blob_length;
    1890             : 
    1891           3 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    1892           0 :                 allow_remaining = true;
    1893             :         }
    1894             : 
    1895           0 :         if (allow_remaining) {
    1896           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_Principals);
    1897             :         } else {
    1898           3 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_Principals);
    1899             :         }
    1900           3 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1901           0 :                 PyErr_SetNdrError(err);
    1902           0 :                 return NULL;
    1903             :         }
    1904             : 
    1905           3 :         Py_RETURN_NONE;
    1906             : }
    1907             : 
    1908           0 : static PyObject *py_wbint_Principals_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    1909             : {
    1910           0 :         struct wbint_Principals *object = (struct wbint_Principals *)pytalloc_get_ptr(py_obj);
    1911           0 :         PyObject *ret;
    1912           0 :         char *retstr;
    1913             : 
    1914           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_wbint_Principals, "wbint_Principals", object);
    1915           0 :         ret = PyUnicode_FromString(retstr);
    1916           0 :         talloc_free(retstr);
    1917             : 
    1918           0 :         return ret;
    1919             : }
    1920             : 
    1921             : static PyMethodDef py_wbint_Principals_methods[] = {
    1922             :         { "__ndr_pack__", (PyCFunction)py_wbint_Principals_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    1923             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_Principals_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    1924             :         { "__ndr_print__", (PyCFunction)py_wbint_Principals_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    1925             :         { NULL, NULL, 0, NULL }
    1926             : };
    1927             : 
    1928             : 
    1929             : static PyTypeObject wbint_Principals_Type = {
    1930             :         PyVarObject_HEAD_INIT(NULL, 0)
    1931             :         .tp_name = "winbind.wbint_Principals",
    1932             :         .tp_getset = py_wbint_Principals_getsetters,
    1933             :         .tp_methods = py_wbint_Principals_methods,
    1934             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1935             :         .tp_new = py_wbint_Principals_new,
    1936             : };
    1937             : 
    1938             : 
    1939           0 : static PyObject *py_wbint_userinfos_get_num_userinfos(PyObject *obj, void *closure)
    1940             : {
    1941           0 :         struct wbint_userinfos *object = (struct wbint_userinfos *)pytalloc_get_ptr(obj);
    1942           0 :         PyObject *py_num_userinfos;
    1943           0 :         py_num_userinfos = PyLong_FromUnsignedLongLong((uint32_t)object->num_userinfos);
    1944           0 :         return py_num_userinfos;
    1945             : }
    1946             : 
    1947           0 : static int py_wbint_userinfos_set_num_userinfos(PyObject *py_obj, PyObject *value, void *closure)
    1948             : {
    1949           0 :         struct wbint_userinfos *object = (struct wbint_userinfos *)pytalloc_get_ptr(py_obj);
    1950           0 :         if (value == NULL) {
    1951           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_userinfos");
    1952           0 :                 return -1;
    1953             :         }
    1954             :         {
    1955           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_userinfos));
    1956           0 :                 if (PyLong_Check(value)) {
    1957           0 :                         unsigned long long test_var;
    1958           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1959           0 :                         if (PyErr_Occurred() != NULL) {
    1960           0 :                                 return -1;
    1961             :                         }
    1962           0 :                         if (test_var > uint_max) {
    1963           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1964             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1965           0 :                                 return -1;
    1966             :                         }
    1967           0 :                         object->num_userinfos = test_var;
    1968             :                 } else {
    1969           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1970             :                           PyLong_Type.tp_name);
    1971           0 :                         return -1;
    1972             :                 }
    1973             :         }
    1974           0 :         return 0;
    1975             : }
    1976             : 
    1977           0 : static PyObject *py_wbint_userinfos_get_userinfos(PyObject *obj, void *closure)
    1978             : {
    1979           0 :         struct wbint_userinfos *object = (struct wbint_userinfos *)pytalloc_get_ptr(obj);
    1980           0 :         PyObject *py_userinfos;
    1981           0 :         py_userinfos = PyList_New(object->num_userinfos);
    1982           0 :         if (py_userinfos == NULL) {
    1983           0 :                 return NULL;
    1984             :         }
    1985             :         {
    1986             :                 int userinfos_cntr_0;
    1987           0 :                 for (userinfos_cntr_0 = 0; userinfos_cntr_0 < (object->num_userinfos); userinfos_cntr_0++) {
    1988           0 :                         PyObject *py_userinfos_0;
    1989           0 :                         py_userinfos_0 = pytalloc_reference_ex(&wbint_userinfo_Type, object->userinfos, &object->userinfos[userinfos_cntr_0]);
    1990           0 :                         PyList_SetItem(py_userinfos, userinfos_cntr_0, py_userinfos_0);
    1991             :                 }
    1992             :         }
    1993           0 :         return py_userinfos;
    1994             : }
    1995             : 
    1996           0 : static int py_wbint_userinfos_set_userinfos(PyObject *py_obj, PyObject *value, void *closure)
    1997             : {
    1998           0 :         struct wbint_userinfos *object = (struct wbint_userinfos *)pytalloc_get_ptr(py_obj);
    1999           0 :         if (value == NULL) {
    2000           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->userinfos");
    2001           0 :                 return -1;
    2002             :         }
    2003           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    2004             :         {
    2005           0 :                 int userinfos_cntr_0;
    2006           0 :                 object->userinfos = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->userinfos, PyList_GET_SIZE(value));
    2007           0 :                 if (!object->userinfos) { return -1; }
    2008           0 :                 talloc_set_name_const(object->userinfos, "ARRAY: object->userinfos");
    2009           0 :                 for (userinfos_cntr_0 = 0; userinfos_cntr_0 < PyList_GET_SIZE(value); userinfos_cntr_0++) {
    2010           0 :                         if (PyList_GET_ITEM(value, userinfos_cntr_0) == NULL) {
    2011           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->userinfos[userinfos_cntr_0]");
    2012           0 :                                 return -1;
    2013             :                         }
    2014           0 :                         PY_CHECK_TYPE(&wbint_userinfo_Type, PyList_GET_ITEM(value, userinfos_cntr_0), return -1;);
    2015           0 :                         if (talloc_reference(object->userinfos, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, userinfos_cntr_0))) == NULL) {
    2016           0 :                                 PyErr_NoMemory();
    2017           0 :                                 return -1;
    2018             :                         }
    2019           0 :                         object->userinfos[userinfos_cntr_0] = *(struct wbint_userinfo *)pytalloc_get_ptr(PyList_GET_ITEM(value, userinfos_cntr_0));
    2020             :                 }
    2021             :         }
    2022           0 :         return 0;
    2023             : }
    2024             : 
    2025             : static PyGetSetDef py_wbint_userinfos_getsetters[] = {
    2026             :         {
    2027             :                 .name = discard_const_p(char, "num_userinfos"),
    2028             :                 .get = py_wbint_userinfos_get_num_userinfos,
    2029             :                 .set = py_wbint_userinfos_set_num_userinfos,
    2030             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2031             :         },
    2032             :         {
    2033             :                 .name = discard_const_p(char, "userinfos"),
    2034             :                 .get = py_wbint_userinfos_get_userinfos,
    2035             :                 .set = py_wbint_userinfos_set_userinfos,
    2036             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_userinfo")
    2037             :         },
    2038             :         { .name = NULL }
    2039             : };
    2040             : 
    2041           0 : static PyObject *py_wbint_userinfos_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2042             : {
    2043           0 :         return pytalloc_new(struct wbint_userinfos, type);
    2044             : }
    2045             : 
    2046           0 : static PyObject *py_wbint_userinfos_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2047             : {
    2048           0 :         struct wbint_userinfos *object = (struct wbint_userinfos *)pytalloc_get_ptr(py_obj);
    2049           0 :         PyObject *ret = NULL;
    2050           0 :         DATA_BLOB blob;
    2051           0 :         enum ndr_err_code err;
    2052           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2053           0 :         if (tmp_ctx == NULL) {
    2054           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2055           0 :                 return NULL;
    2056             :         }
    2057           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_wbint_userinfos);
    2058           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2059           0 :                 TALLOC_FREE(tmp_ctx);
    2060           0 :                 PyErr_SetNdrError(err);
    2061           0 :                 return NULL;
    2062             :         }
    2063             : 
    2064           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2065           0 :         TALLOC_FREE(tmp_ctx);
    2066           0 :         return ret;
    2067             : }
    2068             : 
    2069           0 : static PyObject *py_wbint_userinfos_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2070             : {
    2071           0 :         struct wbint_userinfos *object = (struct wbint_userinfos *)pytalloc_get_ptr(py_obj);
    2072           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2073           0 :         Py_ssize_t blob_length = 0;
    2074           0 :         enum ndr_err_code err;
    2075           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2076           0 :         PyObject *allow_remaining_obj = NULL;
    2077           0 :         bool allow_remaining = false;
    2078             : 
    2079           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    2080             :                 discard_const_p(char *, kwnames),
    2081             :                 &blob.data, &blob_length,
    2082             :                 &allow_remaining_obj)) {
    2083           0 :                 return NULL;
    2084             :         }
    2085           0 :         blob.length = blob_length;
    2086             : 
    2087           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    2088           0 :                 allow_remaining = true;
    2089             :         }
    2090             : 
    2091           0 :         if (allow_remaining) {
    2092           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_userinfos);
    2093             :         } else {
    2094           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_userinfos);
    2095             :         }
    2096           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2097           0 :                 PyErr_SetNdrError(err);
    2098           0 :                 return NULL;
    2099             :         }
    2100             : 
    2101           0 :         Py_RETURN_NONE;
    2102             : }
    2103             : 
    2104           0 : static PyObject *py_wbint_userinfos_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    2105             : {
    2106           0 :         struct wbint_userinfos *object = (struct wbint_userinfos *)pytalloc_get_ptr(py_obj);
    2107           0 :         PyObject *ret;
    2108           0 :         char *retstr;
    2109             : 
    2110           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_wbint_userinfos, "wbint_userinfos", object);
    2111           0 :         ret = PyUnicode_FromString(retstr);
    2112           0 :         talloc_free(retstr);
    2113             : 
    2114           0 :         return ret;
    2115             : }
    2116             : 
    2117             : static PyMethodDef py_wbint_userinfos_methods[] = {
    2118             :         { "__ndr_pack__", (PyCFunction)py_wbint_userinfos_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    2119             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_userinfos_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    2120             :         { "__ndr_print__", (PyCFunction)py_wbint_userinfos_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    2121             :         { NULL, NULL, 0, NULL }
    2122             : };
    2123             : 
    2124             : 
    2125             : static PyTypeObject wbint_userinfos_Type = {
    2126             :         PyVarObject_HEAD_INIT(NULL, 0)
    2127             :         .tp_name = "winbind.wbint_userinfos",
    2128             :         .tp_getset = py_wbint_userinfos_getsetters,
    2129             :         .tp_methods = py_wbint_userinfos_methods,
    2130             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2131             :         .tp_new = py_wbint_userinfos_new,
    2132             : };
    2133             : 
    2134             : 
    2135           0 : static PyObject *py_wbint_Validation_get_level(PyObject *obj, void *closure)
    2136             : {
    2137           0 :         struct wbint_Validation *object = (struct wbint_Validation *)pytalloc_get_ptr(obj);
    2138           0 :         PyObject *py_level;
    2139           0 :         py_level = PyLong_FromLong((uint16_t)object->level);
    2140           0 :         return py_level;
    2141             : }
    2142             : 
    2143           0 : static int py_wbint_Validation_set_level(PyObject *py_obj, PyObject *value, void *closure)
    2144             : {
    2145           0 :         struct wbint_Validation *object = (struct wbint_Validation *)pytalloc_get_ptr(py_obj);
    2146           0 :         if (value == NULL) {
    2147           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
    2148           0 :                 return -1;
    2149             :         }
    2150             :         {
    2151           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
    2152           0 :                 if (PyLong_Check(value)) {
    2153           0 :                         unsigned long long test_var;
    2154           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2155           0 :                         if (PyErr_Occurred() != NULL) {
    2156           0 :                                 return -1;
    2157             :                         }
    2158           0 :                         if (test_var > uint_max) {
    2159           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2160             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2161           0 :                                 return -1;
    2162             :                         }
    2163           0 :                         object->level = test_var;
    2164             :                 } else {
    2165           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2166             :                           PyLong_Type.tp_name);
    2167           0 :                         return -1;
    2168             :                 }
    2169             :         }
    2170           0 :         return 0;
    2171             : }
    2172             : 
    2173           0 : static PyObject *py_wbint_Validation_get_validation(PyObject *obj, void *closure)
    2174             : {
    2175           0 :         struct wbint_Validation *object = (struct wbint_Validation *)pytalloc_get_ptr(obj);
    2176           0 :         PyObject *py_validation;
    2177           0 :         if (object->validation == NULL) {
    2178           0 :                 Py_RETURN_NONE;
    2179             :         }
    2180           0 :         if (object->validation == NULL) {
    2181           0 :                 py_validation = Py_None;
    2182           0 :                 Py_INCREF(py_validation);
    2183             :         } else {
    2184           0 :                 py_validation = pyrpc_import_union(netr_Validation_Type, object->validation, object->level, object->validation, "union netr_Validation");
    2185           0 :                 if (py_validation == NULL) {
    2186           0 :                         return NULL;
    2187             :                 }
    2188             :         }
    2189           0 :         return py_validation;
    2190             : }
    2191             : 
    2192           0 : static int py_wbint_Validation_set_validation(PyObject *py_obj, PyObject *value, void *closure)
    2193             : {
    2194           0 :         struct wbint_Validation *object = (struct wbint_Validation *)pytalloc_get_ptr(py_obj);
    2195           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->validation));
    2196           0 :         if (value == NULL) {
    2197           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->validation");
    2198           0 :                 return -1;
    2199             :         }
    2200           0 :         if (value == Py_None) {
    2201           0 :                 object->validation = NULL;
    2202             :         } else {
    2203           0 :                 object->validation = NULL;
    2204             :                 {
    2205           0 :                         union netr_Validation *validation_switch_1;
    2206           0 :                         validation_switch_1 = (union netr_Validation *)pyrpc_export_union(netr_Validation_Type, pytalloc_get_mem_ctx(py_obj), object->level, value, "union netr_Validation");
    2207           0 :                         if (validation_switch_1 == NULL) {
    2208           0 :                                 return -1;
    2209             :                         }
    2210           0 :                         object->validation = validation_switch_1;
    2211             :                 }
    2212             :         }
    2213           0 :         return 0;
    2214             : }
    2215             : 
    2216           0 : static PyObject *py_wbint_Validation_get_krb5ccname(PyObject *obj, void *closure)
    2217             : {
    2218           0 :         struct wbint_Validation *object = (struct wbint_Validation *)pytalloc_get_ptr(obj);
    2219           0 :         PyObject *py_krb5ccname;
    2220           0 :         if (object->krb5ccname == NULL) {
    2221           0 :                 Py_RETURN_NONE;
    2222             :         }
    2223           0 :         if (object->krb5ccname == NULL) {
    2224           0 :                 py_krb5ccname = Py_None;
    2225           0 :                 Py_INCREF(py_krb5ccname);
    2226             :         } else {
    2227           0 :                 if (object->krb5ccname == NULL) {
    2228           0 :                         py_krb5ccname = Py_None;
    2229           0 :                         Py_INCREF(py_krb5ccname);
    2230             :                 } else {
    2231           0 :                         py_krb5ccname = PyUnicode_Decode(object->krb5ccname, strlen(object->krb5ccname), "utf-8", "ignore");
    2232             :                 }
    2233             :         }
    2234           0 :         return py_krb5ccname;
    2235             : }
    2236             : 
    2237           0 : static int py_wbint_Validation_set_krb5ccname(PyObject *py_obj, PyObject *value, void *closure)
    2238             : {
    2239           0 :         struct wbint_Validation *object = (struct wbint_Validation *)pytalloc_get_ptr(py_obj);
    2240           0 :         if (value == NULL) {
    2241           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->krb5ccname");
    2242           0 :                 return -1;
    2243             :         }
    2244           0 :         if (value == Py_None) {
    2245           0 :                 object->krb5ccname = NULL;
    2246             :         } else {
    2247           0 :                 object->krb5ccname = NULL;
    2248             :                 {
    2249           0 :                         const char *test_str;
    2250           0 :                         const char *talloc_str;
    2251           0 :                         PyObject *unicode = NULL;
    2252           0 :                         if (PyUnicode_Check(value)) {
    2253           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    2254           0 :                                 if (unicode == NULL) {
    2255           0 :                                         PyErr_NoMemory();
    2256           0 :                                         return -1;
    2257             :                                 }
    2258           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    2259           0 :                         } else if (PyBytes_Check(value)) {
    2260           0 :                                 test_str = PyBytes_AS_STRING(value);
    2261             :                         } else {
    2262           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    2263           0 :                                 return -1;
    2264             :                         }
    2265           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    2266           0 :                         if (unicode != NULL) {
    2267           0 :                                 Py_DECREF(unicode);
    2268             :                         }
    2269           0 :                         if (talloc_str == NULL) {
    2270           0 :                                 PyErr_NoMemory();
    2271           0 :                                 return -1;
    2272             :                         }
    2273           0 :                         object->krb5ccname = talloc_str;
    2274             :                 }
    2275             :         }
    2276           0 :         return 0;
    2277             : }
    2278             : 
    2279             : static PyGetSetDef py_wbint_Validation_getsetters[] = {
    2280             :         {
    2281             :                 .name = discard_const_p(char, "level"),
    2282             :                 .get = py_wbint_Validation_get_level,
    2283             :                 .set = py_wbint_Validation_set_level,
    2284             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    2285             :         },
    2286             :         {
    2287             :                 .name = discard_const_p(char, "validation"),
    2288             :                 .get = py_wbint_Validation_get_validation,
    2289             :                 .set = py_wbint_Validation_set_validation,
    2290             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Validation")
    2291             :         },
    2292             :         {
    2293             :                 .name = discard_const_p(char, "krb5ccname"),
    2294             :                 .get = py_wbint_Validation_get_krb5ccname,
    2295             :                 .set = py_wbint_Validation_set_krb5ccname,
    2296             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2297             :         },
    2298             :         { .name = NULL }
    2299             : };
    2300             : 
    2301           0 : static PyObject *py_wbint_Validation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2302             : {
    2303           0 :         return pytalloc_new(struct wbint_Validation, type);
    2304             : }
    2305             : 
    2306           0 : static PyObject *py_wbint_Validation_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2307             : {
    2308           0 :         struct wbint_Validation *object = (struct wbint_Validation *)pytalloc_get_ptr(py_obj);
    2309           0 :         PyObject *ret = NULL;
    2310           0 :         DATA_BLOB blob;
    2311           0 :         enum ndr_err_code err;
    2312           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2313           0 :         if (tmp_ctx == NULL) {
    2314           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2315           0 :                 return NULL;
    2316             :         }
    2317           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_wbint_Validation);
    2318           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2319           0 :                 TALLOC_FREE(tmp_ctx);
    2320           0 :                 PyErr_SetNdrError(err);
    2321           0 :                 return NULL;
    2322             :         }
    2323             : 
    2324           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2325           0 :         TALLOC_FREE(tmp_ctx);
    2326           0 :         return ret;
    2327             : }
    2328             : 
    2329           0 : static PyObject *py_wbint_Validation_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2330             : {
    2331           0 :         struct wbint_Validation *object = (struct wbint_Validation *)pytalloc_get_ptr(py_obj);
    2332           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2333           0 :         Py_ssize_t blob_length = 0;
    2334           0 :         enum ndr_err_code err;
    2335           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2336           0 :         PyObject *allow_remaining_obj = NULL;
    2337           0 :         bool allow_remaining = false;
    2338             : 
    2339           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    2340             :                 discard_const_p(char *, kwnames),
    2341             :                 &blob.data, &blob_length,
    2342             :                 &allow_remaining_obj)) {
    2343           0 :                 return NULL;
    2344             :         }
    2345           0 :         blob.length = blob_length;
    2346             : 
    2347           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    2348           0 :                 allow_remaining = true;
    2349             :         }
    2350             : 
    2351           0 :         if (allow_remaining) {
    2352           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_Validation);
    2353             :         } else {
    2354           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_Validation);
    2355             :         }
    2356           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2357           0 :                 PyErr_SetNdrError(err);
    2358           0 :                 return NULL;
    2359             :         }
    2360             : 
    2361           0 :         Py_RETURN_NONE;
    2362             : }
    2363             : 
    2364           0 : static PyObject *py_wbint_Validation_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    2365             : {
    2366           0 :         struct wbint_Validation *object = (struct wbint_Validation *)pytalloc_get_ptr(py_obj);
    2367           0 :         PyObject *ret;
    2368           0 :         char *retstr;
    2369             : 
    2370           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_wbint_Validation, "wbint_Validation", object);
    2371           0 :         ret = PyUnicode_FromString(retstr);
    2372           0 :         talloc_free(retstr);
    2373             : 
    2374           0 :         return ret;
    2375             : }
    2376             : 
    2377             : static PyMethodDef py_wbint_Validation_methods[] = {
    2378             :         { "__ndr_pack__", (PyCFunction)py_wbint_Validation_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    2379             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_Validation_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    2380             :         { "__ndr_print__", (PyCFunction)py_wbint_Validation_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    2381             :         { NULL, NULL, 0, NULL }
    2382             : };
    2383             : 
    2384             : 
    2385             : static PyTypeObject wbint_Validation_Type = {
    2386             :         PyVarObject_HEAD_INIT(NULL, 0)
    2387             :         .tp_name = "winbind.wbint_Validation",
    2388             :         .tp_getset = py_wbint_Validation_getsetters,
    2389             :         .tp_methods = py_wbint_Validation_methods,
    2390             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2391             :         .tp_new = py_wbint_Validation_new,
    2392             : };
    2393             : 
    2394             : 
    2395           0 : static PyObject *py_wbint_AuthUserInfo_get_username(PyObject *obj, void *closure)
    2396             : {
    2397           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(obj);
    2398           0 :         PyObject *py_username;
    2399           0 :         if (object->username == NULL) {
    2400           0 :                 Py_RETURN_NONE;
    2401             :         }
    2402           0 :         if (object->username == NULL) {
    2403           0 :                 py_username = Py_None;
    2404           0 :                 Py_INCREF(py_username);
    2405             :         } else {
    2406           0 :                 if (object->username == NULL) {
    2407           0 :                         py_username = Py_None;
    2408           0 :                         Py_INCREF(py_username);
    2409             :                 } else {
    2410           0 :                         py_username = PyUnicode_Decode(object->username, strlen(object->username), "utf-8", "ignore");
    2411             :                 }
    2412             :         }
    2413           0 :         return py_username;
    2414             : }
    2415             : 
    2416           0 : static int py_wbint_AuthUserInfo_set_username(PyObject *py_obj, PyObject *value, void *closure)
    2417             : {
    2418           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(py_obj);
    2419           0 :         if (value == NULL) {
    2420           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->username");
    2421           0 :                 return -1;
    2422             :         }
    2423           0 :         if (value == Py_None) {
    2424           0 :                 object->username = NULL;
    2425             :         } else {
    2426           0 :                 object->username = NULL;
    2427             :                 {
    2428           0 :                         const char *test_str;
    2429           0 :                         const char *talloc_str;
    2430           0 :                         PyObject *unicode = NULL;
    2431           0 :                         if (PyUnicode_Check(value)) {
    2432           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    2433           0 :                                 if (unicode == NULL) {
    2434           0 :                                         PyErr_NoMemory();
    2435           0 :                                         return -1;
    2436             :                                 }
    2437           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    2438           0 :                         } else if (PyBytes_Check(value)) {
    2439           0 :                                 test_str = PyBytes_AS_STRING(value);
    2440             :                         } else {
    2441           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    2442           0 :                                 return -1;
    2443             :                         }
    2444           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    2445           0 :                         if (unicode != NULL) {
    2446           0 :                                 Py_DECREF(unicode);
    2447             :                         }
    2448           0 :                         if (talloc_str == NULL) {
    2449           0 :                                 PyErr_NoMemory();
    2450           0 :                                 return -1;
    2451             :                         }
    2452           0 :                         object->username = talloc_str;
    2453             :                 }
    2454             :         }
    2455           0 :         return 0;
    2456             : }
    2457             : 
    2458           0 : static PyObject *py_wbint_AuthUserInfo_get_password(PyObject *obj, void *closure)
    2459             : {
    2460           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(obj);
    2461           0 :         PyObject *py_password;
    2462           0 :         if (object->password == NULL) {
    2463           0 :                 Py_RETURN_NONE;
    2464             :         }
    2465           0 :         if (object->password == NULL) {
    2466           0 :                 py_password = Py_None;
    2467           0 :                 Py_INCREF(py_password);
    2468             :         } else {
    2469           0 :                 if (object->password == NULL) {
    2470           0 :                         py_password = Py_None;
    2471           0 :                         Py_INCREF(py_password);
    2472             :                 } else {
    2473           0 :                         py_password = PyUnicode_Decode(object->password, strlen(object->password), "utf-8", "ignore");
    2474             :                 }
    2475             :         }
    2476           0 :         return py_password;
    2477             : }
    2478             : 
    2479           0 : static int py_wbint_AuthUserInfo_set_password(PyObject *py_obj, PyObject *value, void *closure)
    2480             : {
    2481           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(py_obj);
    2482           0 :         if (value == NULL) {
    2483           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->password");
    2484           0 :                 return -1;
    2485             :         }
    2486           0 :         if (value == Py_None) {
    2487           0 :                 object->password = NULL;
    2488             :         } else {
    2489           0 :                 object->password = NULL;
    2490             :                 {
    2491           0 :                         const char *test_str;
    2492           0 :                         const char *talloc_str;
    2493           0 :                         PyObject *unicode = NULL;
    2494           0 :                         if (PyUnicode_Check(value)) {
    2495           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    2496           0 :                                 if (unicode == NULL) {
    2497           0 :                                         PyErr_NoMemory();
    2498           0 :                                         return -1;
    2499             :                                 }
    2500           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    2501           0 :                         } else if (PyBytes_Check(value)) {
    2502           0 :                                 test_str = PyBytes_AS_STRING(value);
    2503             :                         } else {
    2504           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    2505           0 :                                 return -1;
    2506             :                         }
    2507           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    2508           0 :                         if (unicode != NULL) {
    2509           0 :                                 Py_DECREF(unicode);
    2510             :                         }
    2511           0 :                         if (talloc_str == NULL) {
    2512           0 :                                 PyErr_NoMemory();
    2513           0 :                                 return -1;
    2514             :                         }
    2515           0 :                         object->password = talloc_str;
    2516             :                 }
    2517             :         }
    2518           0 :         return 0;
    2519             : }
    2520             : 
    2521           0 : static PyObject *py_wbint_AuthUserInfo_get_krb5_cc_type(PyObject *obj, void *closure)
    2522             : {
    2523           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(obj);
    2524           0 :         PyObject *py_krb5_cc_type;
    2525           0 :         if (object->krb5_cc_type == NULL) {
    2526           0 :                 Py_RETURN_NONE;
    2527             :         }
    2528           0 :         if (object->krb5_cc_type == NULL) {
    2529           0 :                 py_krb5_cc_type = Py_None;
    2530           0 :                 Py_INCREF(py_krb5_cc_type);
    2531             :         } else {
    2532           0 :                 if (object->krb5_cc_type == NULL) {
    2533           0 :                         py_krb5_cc_type = Py_None;
    2534           0 :                         Py_INCREF(py_krb5_cc_type);
    2535             :                 } else {
    2536           0 :                         py_krb5_cc_type = PyUnicode_Decode(object->krb5_cc_type, strlen(object->krb5_cc_type), "utf-8", "ignore");
    2537             :                 }
    2538             :         }
    2539           0 :         return py_krb5_cc_type;
    2540             : }
    2541             : 
    2542           0 : static int py_wbint_AuthUserInfo_set_krb5_cc_type(PyObject *py_obj, PyObject *value, void *closure)
    2543             : {
    2544           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(py_obj);
    2545           0 :         if (value == NULL) {
    2546           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->krb5_cc_type");
    2547           0 :                 return -1;
    2548             :         }
    2549           0 :         if (value == Py_None) {
    2550           0 :                 object->krb5_cc_type = NULL;
    2551             :         } else {
    2552           0 :                 object->krb5_cc_type = NULL;
    2553             :                 {
    2554           0 :                         const char *test_str;
    2555           0 :                         const char *talloc_str;
    2556           0 :                         PyObject *unicode = NULL;
    2557           0 :                         if (PyUnicode_Check(value)) {
    2558           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    2559           0 :                                 if (unicode == NULL) {
    2560           0 :                                         PyErr_NoMemory();
    2561           0 :                                         return -1;
    2562             :                                 }
    2563           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    2564           0 :                         } else if (PyBytes_Check(value)) {
    2565           0 :                                 test_str = PyBytes_AS_STRING(value);
    2566             :                         } else {
    2567           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    2568           0 :                                 return -1;
    2569             :                         }
    2570           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    2571           0 :                         if (unicode != NULL) {
    2572           0 :                                 Py_DECREF(unicode);
    2573             :                         }
    2574           0 :                         if (talloc_str == NULL) {
    2575           0 :                                 PyErr_NoMemory();
    2576           0 :                                 return -1;
    2577             :                         }
    2578           0 :                         object->krb5_cc_type = talloc_str;
    2579             :                 }
    2580             :         }
    2581           0 :         return 0;
    2582             : }
    2583             : 
    2584           0 : static PyObject *py_wbint_AuthUserInfo_get_uid(PyObject *obj, void *closure)
    2585             : {
    2586           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(obj);
    2587           0 :         PyObject *py_uid;
    2588           0 :         py_uid = PyLong_FromUnsignedLongLong(object->uid);
    2589           0 :         return py_uid;
    2590             : }
    2591             : 
    2592           0 : static int py_wbint_AuthUserInfo_set_uid(PyObject *py_obj, PyObject *value, void *closure)
    2593             : {
    2594           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(py_obj);
    2595           0 :         if (value == NULL) {
    2596           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->uid");
    2597           0 :                 return -1;
    2598             :         }
    2599             :         {
    2600           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->uid));
    2601           0 :                 if (PyLong_Check(value)) {
    2602           0 :                         unsigned long long test_var;
    2603           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2604           0 :                         if (PyErr_Occurred() != NULL) {
    2605           0 :                                 return -1;
    2606             :                         }
    2607           0 :                         if (test_var > uint_max) {
    2608           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2609             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2610           0 :                                 return -1;
    2611             :                         }
    2612           0 :                         object->uid = test_var;
    2613             :                 } else {
    2614           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2615             :                           PyLong_Type.tp_name);
    2616           0 :                         return -1;
    2617             :                 }
    2618             :         }
    2619           0 :         return 0;
    2620             : }
    2621             : 
    2622             : static PyGetSetDef py_wbint_AuthUserInfo_getsetters[] = {
    2623             :         {
    2624             :                 .name = discard_const_p(char, "username"),
    2625             :                 .get = py_wbint_AuthUserInfo_get_username,
    2626             :                 .set = py_wbint_AuthUserInfo_set_username,
    2627             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2628             :         },
    2629             :         {
    2630             :                 .name = discard_const_p(char, "password"),
    2631             :                 .get = py_wbint_AuthUserInfo_get_password,
    2632             :                 .set = py_wbint_AuthUserInfo_set_password,
    2633             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2634             :         },
    2635             :         {
    2636             :                 .name = discard_const_p(char, "krb5_cc_type"),
    2637             :                 .get = py_wbint_AuthUserInfo_get_krb5_cc_type,
    2638             :                 .set = py_wbint_AuthUserInfo_set_krb5_cc_type,
    2639             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2640             :         },
    2641             :         {
    2642             :                 .name = discard_const_p(char, "uid"),
    2643             :                 .get = py_wbint_AuthUserInfo_get_uid,
    2644             :                 .set = py_wbint_AuthUserInfo_set_uid,
    2645             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
    2646             :         },
    2647             :         { .name = NULL }
    2648             : };
    2649             : 
    2650           0 : static PyObject *py_wbint_AuthUserInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2651             : {
    2652           0 :         return pytalloc_new(struct wbint_AuthUserInfo, type);
    2653             : }
    2654             : 
    2655           0 : static PyObject *py_wbint_AuthUserInfo_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2656             : {
    2657           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(py_obj);
    2658           0 :         PyObject *ret = NULL;
    2659           0 :         DATA_BLOB blob;
    2660           0 :         enum ndr_err_code err;
    2661           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2662           0 :         if (tmp_ctx == NULL) {
    2663           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2664           0 :                 return NULL;
    2665             :         }
    2666           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_wbint_AuthUserInfo);
    2667           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2668           0 :                 TALLOC_FREE(tmp_ctx);
    2669           0 :                 PyErr_SetNdrError(err);
    2670           0 :                 return NULL;
    2671             :         }
    2672             : 
    2673           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2674           0 :         TALLOC_FREE(tmp_ctx);
    2675           0 :         return ret;
    2676             : }
    2677             : 
    2678           0 : static PyObject *py_wbint_AuthUserInfo_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2679             : {
    2680           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(py_obj);
    2681           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2682           0 :         Py_ssize_t blob_length = 0;
    2683           0 :         enum ndr_err_code err;
    2684           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2685           0 :         PyObject *allow_remaining_obj = NULL;
    2686           0 :         bool allow_remaining = false;
    2687             : 
    2688           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    2689             :                 discard_const_p(char *, kwnames),
    2690             :                 &blob.data, &blob_length,
    2691             :                 &allow_remaining_obj)) {
    2692           0 :                 return NULL;
    2693             :         }
    2694           0 :         blob.length = blob_length;
    2695             : 
    2696           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    2697           0 :                 allow_remaining = true;
    2698             :         }
    2699             : 
    2700           0 :         if (allow_remaining) {
    2701           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_AuthUserInfo);
    2702             :         } else {
    2703           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_AuthUserInfo);
    2704             :         }
    2705           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2706           0 :                 PyErr_SetNdrError(err);
    2707           0 :                 return NULL;
    2708             :         }
    2709             : 
    2710           0 :         Py_RETURN_NONE;
    2711             : }
    2712             : 
    2713           0 : static PyObject *py_wbint_AuthUserInfo_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    2714             : {
    2715           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(py_obj);
    2716           0 :         PyObject *ret;
    2717           0 :         char *retstr;
    2718             : 
    2719           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_wbint_AuthUserInfo, "wbint_AuthUserInfo", object);
    2720           0 :         ret = PyUnicode_FromString(retstr);
    2721           0 :         talloc_free(retstr);
    2722             : 
    2723           0 :         return ret;
    2724             : }
    2725             : 
    2726             : static PyMethodDef py_wbint_AuthUserInfo_methods[] = {
    2727             :         { "__ndr_pack__", (PyCFunction)py_wbint_AuthUserInfo_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    2728             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_AuthUserInfo_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    2729             :         { "__ndr_print__", (PyCFunction)py_wbint_AuthUserInfo_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    2730             :         { NULL, NULL, 0, NULL }
    2731             : };
    2732             : 
    2733             : 
    2734             : static PyTypeObject wbint_AuthUserInfo_Type = {
    2735             :         PyVarObject_HEAD_INIT(NULL, 0)
    2736             :         .tp_name = "winbind.wbint_AuthUserInfo",
    2737             :         .tp_getset = py_wbint_AuthUserInfo_getsetters,
    2738             :         .tp_methods = py_wbint_AuthUserInfo_methods,
    2739             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2740             :         .tp_new = py_wbint_AuthUserInfo_new,
    2741             : };
    2742             : 
    2743             : 
    2744           0 : static PyObject *py_wbint_PamAuthCrapValidation_get_level(PyObject *obj, void *closure)
    2745             : {
    2746           0 :         struct wbint_PamAuthCrapValidation *object = (struct wbint_PamAuthCrapValidation *)pytalloc_get_ptr(obj);
    2747           0 :         PyObject *py_level;
    2748           0 :         py_level = PyLong_FromLong((uint16_t)object->level);
    2749           0 :         return py_level;
    2750             : }
    2751             : 
    2752           0 : static int py_wbint_PamAuthCrapValidation_set_level(PyObject *py_obj, PyObject *value, void *closure)
    2753             : {
    2754           0 :         struct wbint_PamAuthCrapValidation *object = (struct wbint_PamAuthCrapValidation *)pytalloc_get_ptr(py_obj);
    2755           0 :         if (value == NULL) {
    2756           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
    2757           0 :                 return -1;
    2758             :         }
    2759             :         {
    2760           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
    2761           0 :                 if (PyLong_Check(value)) {
    2762           0 :                         unsigned long long test_var;
    2763           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2764           0 :                         if (PyErr_Occurred() != NULL) {
    2765           0 :                                 return -1;
    2766             :                         }
    2767           0 :                         if (test_var > uint_max) {
    2768           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2769             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2770           0 :                                 return -1;
    2771             :                         }
    2772           0 :                         object->level = test_var;
    2773             :                 } else {
    2774           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2775             :                           PyLong_Type.tp_name);
    2776           0 :                         return -1;
    2777             :                 }
    2778             :         }
    2779           0 :         return 0;
    2780             : }
    2781             : 
    2782           0 : static PyObject *py_wbint_PamAuthCrapValidation_get_validation(PyObject *obj, void *closure)
    2783             : {
    2784           0 :         struct wbint_PamAuthCrapValidation *object = (struct wbint_PamAuthCrapValidation *)pytalloc_get_ptr(obj);
    2785           0 :         PyObject *py_validation;
    2786           0 :         if (object->validation == NULL) {
    2787           0 :                 Py_RETURN_NONE;
    2788             :         }
    2789           0 :         if (object->validation == NULL) {
    2790           0 :                 py_validation = Py_None;
    2791           0 :                 Py_INCREF(py_validation);
    2792             :         } else {
    2793           0 :                 py_validation = pyrpc_import_union(netr_Validation_Type, object->validation, object->level, object->validation, "union netr_Validation");
    2794           0 :                 if (py_validation == NULL) {
    2795           0 :                         return NULL;
    2796             :                 }
    2797             :         }
    2798           0 :         return py_validation;
    2799             : }
    2800             : 
    2801           0 : static int py_wbint_PamAuthCrapValidation_set_validation(PyObject *py_obj, PyObject *value, void *closure)
    2802             : {
    2803           0 :         struct wbint_PamAuthCrapValidation *object = (struct wbint_PamAuthCrapValidation *)pytalloc_get_ptr(py_obj);
    2804           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->validation));
    2805           0 :         if (value == NULL) {
    2806           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->validation");
    2807           0 :                 return -1;
    2808             :         }
    2809           0 :         if (value == Py_None) {
    2810           0 :                 object->validation = NULL;
    2811             :         } else {
    2812           0 :                 object->validation = NULL;
    2813             :                 {
    2814           0 :                         union netr_Validation *validation_switch_1;
    2815           0 :                         validation_switch_1 = (union netr_Validation *)pyrpc_export_union(netr_Validation_Type, pytalloc_get_mem_ctx(py_obj), object->level, value, "union netr_Validation");
    2816           0 :                         if (validation_switch_1 == NULL) {
    2817           0 :                                 return -1;
    2818             :                         }
    2819           0 :                         object->validation = validation_switch_1;
    2820             :                 }
    2821             :         }
    2822           0 :         return 0;
    2823             : }
    2824             : 
    2825             : static PyGetSetDef py_wbint_PamAuthCrapValidation_getsetters[] = {
    2826             :         {
    2827             :                 .name = discard_const_p(char, "level"),
    2828             :                 .get = py_wbint_PamAuthCrapValidation_get_level,
    2829             :                 .set = py_wbint_PamAuthCrapValidation_set_level,
    2830             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    2831             :         },
    2832             :         {
    2833             :                 .name = discard_const_p(char, "validation"),
    2834             :                 .get = py_wbint_PamAuthCrapValidation_get_validation,
    2835             :                 .set = py_wbint_PamAuthCrapValidation_set_validation,
    2836             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Validation")
    2837             :         },
    2838             :         { .name = NULL }
    2839             : };
    2840             : 
    2841           0 : static PyObject *py_wbint_PamAuthCrapValidation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2842             : {
    2843           0 :         return pytalloc_new(struct wbint_PamAuthCrapValidation, type);
    2844             : }
    2845             : 
    2846           0 : static PyObject *py_wbint_PamAuthCrapValidation_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2847             : {
    2848           0 :         struct wbint_PamAuthCrapValidation *object = (struct wbint_PamAuthCrapValidation *)pytalloc_get_ptr(py_obj);
    2849           0 :         PyObject *ret = NULL;
    2850           0 :         DATA_BLOB blob;
    2851           0 :         enum ndr_err_code err;
    2852           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2853           0 :         if (tmp_ctx == NULL) {
    2854           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2855           0 :                 return NULL;
    2856             :         }
    2857           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_wbint_PamAuthCrapValidation);
    2858           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2859           0 :                 TALLOC_FREE(tmp_ctx);
    2860           0 :                 PyErr_SetNdrError(err);
    2861           0 :                 return NULL;
    2862             :         }
    2863             : 
    2864           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2865           0 :         TALLOC_FREE(tmp_ctx);
    2866           0 :         return ret;
    2867             : }
    2868             : 
    2869           0 : static PyObject *py_wbint_PamAuthCrapValidation_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2870             : {
    2871           0 :         struct wbint_PamAuthCrapValidation *object = (struct wbint_PamAuthCrapValidation *)pytalloc_get_ptr(py_obj);
    2872           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2873           0 :         Py_ssize_t blob_length = 0;
    2874           0 :         enum ndr_err_code err;
    2875           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2876           0 :         PyObject *allow_remaining_obj = NULL;
    2877           0 :         bool allow_remaining = false;
    2878             : 
    2879           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    2880             :                 discard_const_p(char *, kwnames),
    2881             :                 &blob.data, &blob_length,
    2882             :                 &allow_remaining_obj)) {
    2883           0 :                 return NULL;
    2884             :         }
    2885           0 :         blob.length = blob_length;
    2886             : 
    2887           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    2888           0 :                 allow_remaining = true;
    2889             :         }
    2890             : 
    2891           0 :         if (allow_remaining) {
    2892           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_PamAuthCrapValidation);
    2893             :         } else {
    2894           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_PamAuthCrapValidation);
    2895             :         }
    2896           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2897           0 :                 PyErr_SetNdrError(err);
    2898           0 :                 return NULL;
    2899             :         }
    2900             : 
    2901           0 :         Py_RETURN_NONE;
    2902             : }
    2903             : 
    2904           0 : static PyObject *py_wbint_PamAuthCrapValidation_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    2905             : {
    2906           0 :         struct wbint_PamAuthCrapValidation *object = (struct wbint_PamAuthCrapValidation *)pytalloc_get_ptr(py_obj);
    2907           0 :         PyObject *ret;
    2908           0 :         char *retstr;
    2909             : 
    2910           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_wbint_PamAuthCrapValidation, "wbint_PamAuthCrapValidation", object);
    2911           0 :         ret = PyUnicode_FromString(retstr);
    2912           0 :         talloc_free(retstr);
    2913             : 
    2914           0 :         return ret;
    2915             : }
    2916             : 
    2917             : static PyMethodDef py_wbint_PamAuthCrapValidation_methods[] = {
    2918             :         { "__ndr_pack__", (PyCFunction)py_wbint_PamAuthCrapValidation_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    2919             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthCrapValidation_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    2920             :         { "__ndr_print__", (PyCFunction)py_wbint_PamAuthCrapValidation_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    2921             :         { NULL, NULL, 0, NULL }
    2922             : };
    2923             : 
    2924             : 
    2925             : static PyTypeObject wbint_PamAuthCrapValidation_Type = {
    2926             :         PyVarObject_HEAD_INIT(NULL, 0)
    2927             :         .tp_name = "winbind.wbint_PamAuthCrapValidation",
    2928             :         .tp_getset = py_wbint_PamAuthCrapValidation_getsetters,
    2929             :         .tp_methods = py_wbint_PamAuthCrapValidation_methods,
    2930             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2931             :         .tp_new = py_wbint_PamAuthCrapValidation_new,
    2932             : };
    2933             : 
    2934             : 
    2935             : 
    2936           0 : static PyObject *py_wbint_Ping_in_get_in_data(PyObject *obj, void *closure)
    2937             : {
    2938           0 :         struct wbint_Ping *object = (struct wbint_Ping *)pytalloc_get_ptr(obj);
    2939           0 :         PyObject *py_in_data;
    2940           0 :         py_in_data = PyLong_FromUnsignedLongLong((uint32_t)object->in.in_data);
    2941           0 :         return py_in_data;
    2942             : }
    2943             : 
    2944           0 : static int py_wbint_Ping_in_set_in_data(PyObject *py_obj, PyObject *value, void *closure)
    2945             : {
    2946           0 :         struct wbint_Ping *object = (struct wbint_Ping *)pytalloc_get_ptr(py_obj);
    2947           0 :         if (value == NULL) {
    2948           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.in_data");
    2949           0 :                 return -1;
    2950             :         }
    2951             :         {
    2952           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.in_data));
    2953           0 :                 if (PyLong_Check(value)) {
    2954           0 :                         unsigned long long test_var;
    2955           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2956           0 :                         if (PyErr_Occurred() != NULL) {
    2957           0 :                                 return -1;
    2958             :                         }
    2959           0 :                         if (test_var > uint_max) {
    2960           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2961             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2962           0 :                                 return -1;
    2963             :                         }
    2964           0 :                         object->in.in_data = test_var;
    2965             :                 } else {
    2966           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2967             :                           PyLong_Type.tp_name);
    2968           0 :                         return -1;
    2969             :                 }
    2970             :         }
    2971           0 :         return 0;
    2972             : }
    2973             : 
    2974           0 : static PyObject *py_wbint_Ping_out_get_out_data(PyObject *obj, void *closure)
    2975             : {
    2976           0 :         struct wbint_Ping *object = (struct wbint_Ping *)pytalloc_get_ptr(obj);
    2977           0 :         PyObject *py_out_data;
    2978           0 :         if (object->out.out_data == NULL) {
    2979           0 :                 Py_RETURN_NONE;
    2980             :         }
    2981           0 :         py_out_data = PyLong_FromUnsignedLongLong((uint32_t)*object->out.out_data);
    2982           0 :         return py_out_data;
    2983             : }
    2984             : 
    2985           0 : static int py_wbint_Ping_out_set_out_data(PyObject *py_obj, PyObject *value, void *closure)
    2986             : {
    2987           0 :         struct wbint_Ping *object = (struct wbint_Ping *)pytalloc_get_ptr(py_obj);
    2988           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.out_data));
    2989           0 :         if (value == NULL) {
    2990           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.out_data");
    2991           0 :                 return -1;
    2992             :         }
    2993           0 :         object->out.out_data = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.out_data);
    2994           0 :         if (object->out.out_data == NULL) {
    2995           0 :                 PyErr_NoMemory();
    2996           0 :                 return -1;
    2997             :         }
    2998             :         {
    2999           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.out_data));
    3000           0 :                 if (PyLong_Check(value)) {
    3001           0 :                         unsigned long long test_var;
    3002           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3003           0 :                         if (PyErr_Occurred() != NULL) {
    3004           0 :                                 return -1;
    3005             :                         }
    3006           0 :                         if (test_var > uint_max) {
    3007           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3008             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3009           0 :                                 return -1;
    3010             :                         }
    3011           0 :                         *object->out.out_data = test_var;
    3012             :                 } else {
    3013           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3014             :                           PyLong_Type.tp_name);
    3015           0 :                         return -1;
    3016             :                 }
    3017             :         }
    3018           0 :         return 0;
    3019             : }
    3020             : 
    3021           0 : static PyObject *py_wbint_Ping_get_result(PyObject *obj, void *closure)
    3022             : {
    3023           0 :         struct wbint_Ping *object = (struct wbint_Ping *)pytalloc_get_ptr(obj);
    3024           0 :         PyObject *py_result;
    3025           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    3026           0 :         return py_result;
    3027             : }
    3028             : 
    3029           0 : static int py_wbint_Ping_set_result(PyObject *py_obj, PyObject *value, void *closure)
    3030             : {
    3031           0 :         struct wbint_Ping *object = (struct wbint_Ping *)pytalloc_get_ptr(py_obj);
    3032           0 :         if (value == NULL) {
    3033           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    3034           0 :                 return -1;
    3035             :         }
    3036           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    3037           0 :         return 0;
    3038             : }
    3039             : 
    3040             : static PyGetSetDef py_wbint_Ping_getsetters[] = {
    3041             :         {
    3042             :                 .name = discard_const_p(char, "in_in_data"),
    3043             :                 .get = py_wbint_Ping_in_get_in_data,
    3044             :                 .set = py_wbint_Ping_in_set_in_data,
    3045             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3046             :         },
    3047             :         {
    3048             :                 .name = discard_const_p(char, "out_out_data"),
    3049             :                 .get = py_wbint_Ping_out_get_out_data,
    3050             :                 .set = py_wbint_Ping_out_set_out_data,
    3051             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3052             :         },
    3053             :         {
    3054             :                 .name = discard_const_p(char, "result"),
    3055             :                 .get = py_wbint_Ping_get_result,
    3056             :                 .set = py_wbint_Ping_set_result,
    3057             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    3058             :         },
    3059             :         { .name = NULL }
    3060             : };
    3061             : 
    3062           0 : static PyObject *py_wbint_Ping_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3063             : {
    3064           0 :         PyObject *self = pytalloc_new(struct wbint_Ping, type);
    3065           0 :         struct wbint_Ping *_self = (struct wbint_Ping *)pytalloc_get_ptr(self);
    3066           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    3067           0 :         _self->out.out_data = talloc_zero(mem_ctx, uint32_t);
    3068           0 :         return self;
    3069             : }
    3070             : 
    3071           0 : static PyObject *py_wbint_Ping_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    3072             : {
    3073             : 
    3074             : 
    3075           0 :         return PyLong_FromLong(0);
    3076             : }
    3077             : 
    3078           0 : static PyObject *py_wbint_Ping_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
    3079             : {
    3080           0 :         const struct ndr_interface_call *call = NULL;
    3081           0 :         struct wbint_Ping *object = (struct wbint_Ping *)pytalloc_get_ptr(py_obj);
    3082           0 :         PyObject *ret = NULL;
    3083           0 :         struct ndr_push *push = NULL;
    3084           0 :         DATA_BLOB blob;
    3085           0 :         enum ndr_err_code err;
    3086             : 
    3087           0 :         if (ndr_table_winbind.num_calls < 1) {
    3088           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_Ping_ndr_pack");
    3089           0 :                 return NULL;
    3090             :         }
    3091           0 :         call = &ndr_table_winbind.calls[0];
    3092             : 
    3093           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    3094           0 :         if (push == NULL) {
    3095           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    3096           0 :                 return NULL;
    3097             :         }
    3098             : 
    3099           0 :         push->flags |= ndr_push_flags;
    3100             : 
    3101           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    3102           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3103           0 :                 TALLOC_FREE(push);
    3104           0 :                 PyErr_SetNdrError(err);
    3105           0 :                 return NULL;
    3106             :         }
    3107           0 :         blob = ndr_push_blob(push);
    3108           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    3109           0 :         TALLOC_FREE(push);
    3110           0 :         return ret;
    3111             : }
    3112             : 
    3113           0 : static PyObject *py_wbint_Ping_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3114             : {
    3115           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    3116           0 :         PyObject *bigendian_obj = NULL;
    3117           0 :         PyObject *ndr64_obj = NULL;
    3118           0 :         libndr_flags ndr_push_flags = 0;
    3119             : 
    3120           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    3121             :                 discard_const_p(char *, kwnames),
    3122             :                 &bigendian_obj,
    3123             :                 &ndr64_obj)) {
    3124           0 :                 return NULL;
    3125             :         }
    3126             : 
    3127           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    3128           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    3129             :         }
    3130           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    3131           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    3132             :         }
    3133             : 
    3134           0 :         return py_wbint_Ping_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    3135             : }
    3136             : 
    3137           0 : static PyObject *py_wbint_Ping_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3138             : {
    3139           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    3140           0 :         PyObject *bigendian_obj = NULL;
    3141           0 :         PyObject *ndr64_obj = NULL;
    3142           0 :         libndr_flags ndr_push_flags = 0;
    3143             : 
    3144           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    3145             :                 discard_const_p(char *, kwnames),
    3146             :                 &bigendian_obj,
    3147             :                 &ndr64_obj)) {
    3148           0 :                 return NULL;
    3149             :         }
    3150             : 
    3151           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    3152           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    3153             :         }
    3154           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    3155           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    3156             :         }
    3157             : 
    3158           0 :         return py_wbint_Ping_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    3159             : }
    3160             : 
    3161           0 : static PyObject *py_wbint_Ping_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
    3162             : {
    3163           0 :         const struct ndr_interface_call *call = NULL;
    3164           0 :         struct wbint_Ping *object = (struct wbint_Ping *)pytalloc_get_ptr(py_obj);
    3165           0 :         struct ndr_pull *pull = NULL;
    3166           0 :         enum ndr_err_code err;
    3167             : 
    3168           0 :         if (ndr_table_winbind.num_calls < 1) {
    3169           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_Ping_ndr_unpack");
    3170           0 :                 return NULL;
    3171             :         }
    3172           0 :         call = &ndr_table_winbind.calls[0];
    3173             : 
    3174           0 :         pull = ndr_pull_init_blob(blob, object);
    3175           0 :         if (pull == NULL) {
    3176           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    3177           0 :                 return NULL;
    3178             :         }
    3179             : 
    3180           0 :         pull->flags |= ndr_pull_flags;
    3181             : 
    3182           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    3183           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3184           0 :                 TALLOC_FREE(pull);
    3185           0 :                 PyErr_SetNdrError(err);
    3186           0 :                 return NULL;
    3187             :         }
    3188           0 :         if (!allow_remaining) {
    3189           0 :                 uint32_t highest_ofs;
    3190             : 
    3191           0 :                 if (pull->offset > pull->relative_highest_offset) {
    3192           0 :                         highest_ofs = pull->offset;
    3193             :                 } else {
    3194           0 :                         highest_ofs = pull->relative_highest_offset;
    3195             :                 }
    3196           0 :                 if (highest_ofs < pull->data_size) {
    3197           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    3198             :                                 "not all bytes consumed ofs[%u] size[%u]",
    3199             :                                 highest_ofs, pull->data_size);
    3200           0 :                         TALLOC_FREE(pull);
    3201           0 :                         PyErr_SetNdrError(err);
    3202           0 :                         return NULL;
    3203             :                 }
    3204             :         }
    3205             : 
    3206           0 :         TALLOC_FREE(pull);
    3207           0 :         Py_RETURN_NONE;
    3208             : }
    3209             : 
    3210           0 : static PyObject *py_wbint_Ping_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3211             : {
    3212           0 :         DATA_BLOB blob;
    3213           0 :         Py_ssize_t blob_length = 0;
    3214           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    3215           0 :         PyObject *bigendian_obj = NULL;
    3216           0 :         PyObject *ndr64_obj = NULL;
    3217           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    3218           0 :         PyObject *allow_remaining_obj = NULL;
    3219           0 :         bool allow_remaining = false;
    3220             : 
    3221           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    3222             :                 discard_const_p(char *, kwnames),
    3223             :                 &blob.data, &blob_length,
    3224             :                 &bigendian_obj,
    3225             :                 &ndr64_obj,
    3226             :                 &allow_remaining_obj)) {
    3227           0 :                 return NULL;
    3228             :         }
    3229           0 :         blob.length = blob_length;
    3230             : 
    3231           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    3232           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    3233             :         }
    3234           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    3235           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    3236             :         }
    3237             : 
    3238           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    3239           0 :                 allow_remaining = true;
    3240             :         }
    3241             : 
    3242           0 :         return py_wbint_Ping_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    3243             : }
    3244             : 
    3245           0 : static PyObject *py_wbint_Ping_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3246             : {
    3247           0 :         DATA_BLOB blob;
    3248           0 :         Py_ssize_t blob_length = 0;
    3249           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    3250           0 :         PyObject *bigendian_obj = NULL;
    3251           0 :         PyObject *ndr64_obj = NULL;
    3252           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    3253           0 :         PyObject *allow_remaining_obj = NULL;
    3254           0 :         bool allow_remaining = false;
    3255             : 
    3256           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    3257             :                 discard_const_p(char *, kwnames),
    3258             :                 &blob.data, &blob_length,
    3259             :                 &bigendian_obj,
    3260             :                 &ndr64_obj,
    3261             :                 &allow_remaining_obj)) {
    3262           0 :                 return NULL;
    3263             :         }
    3264           0 :         blob.length = blob_length;
    3265             : 
    3266           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    3267           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    3268             :         }
    3269           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    3270           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    3271             :         }
    3272             : 
    3273           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    3274           0 :                 allow_remaining = true;
    3275             :         }
    3276             : 
    3277           0 :         return py_wbint_Ping_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    3278             : }
    3279             : 
    3280           0 : static PyObject *py_wbint_Ping_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
    3281             : {
    3282           0 :         const struct ndr_interface_call *call = NULL;
    3283           0 :         struct wbint_Ping *object = (struct wbint_Ping *)pytalloc_get_ptr(py_obj);
    3284           0 :         PyObject *ret;
    3285           0 :         char *retstr;
    3286             : 
    3287           0 :         if (ndr_table_winbind.num_calls < 1) {
    3288           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_Ping_ndr_print");
    3289           0 :                 return NULL;
    3290             :         }
    3291           0 :         call = &ndr_table_winbind.calls[0];
    3292             : 
    3293           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    3294           0 :         ret = PyUnicode_FromString(retstr);
    3295           0 :         TALLOC_FREE(retstr);
    3296             : 
    3297           0 :         return ret;
    3298             : }
    3299             : 
    3300           0 : static PyObject *py_wbint_Ping_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    3301             : {
    3302           0 :         return py_wbint_Ping_ndr_print(py_obj, "wbint_Ping_in", NDR_IN);
    3303             : }
    3304             : 
    3305           0 : static PyObject *py_wbint_Ping_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    3306             : {
    3307           0 :         return py_wbint_Ping_ndr_print(py_obj, "wbint_Ping_out", NDR_OUT);
    3308             : }
    3309             : 
    3310             : static PyMethodDef py_wbint_Ping_methods[] = {
    3311             :         { "opnum", (PyCFunction)py_wbint_Ping_ndr_opnum, METH_NOARGS|METH_CLASS,
    3312             :                 "winbind.wbint_Ping.opnum() -> 0 (0x00) " },
    3313             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_Ping_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    3314             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    3315             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_Ping_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    3316             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    3317             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_Ping_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    3318             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    3319             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_Ping_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    3320             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    3321             :         { "__ndr_print_in__", (PyCFunction)py_wbint_Ping_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    3322             :         { "__ndr_print_out__", (PyCFunction)py_wbint_Ping_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    3323             :         { NULL, NULL, 0, NULL }
    3324             : };
    3325             : 
    3326             : 
    3327             : static PyTypeObject wbint_Ping_Type = {
    3328             :         PyVarObject_HEAD_INIT(NULL, 0)
    3329             :         .tp_name = "winbind.wbint_Ping",
    3330             :         .tp_getset = py_wbint_Ping_getsetters,
    3331             :         .tp_methods = py_wbint_Ping_methods,
    3332             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3333             :         .tp_new = py_wbint_Ping_new,
    3334             : };
    3335             : 
    3336           0 : static bool pack_py_wbint_Ping_args_in(PyObject *args, PyObject *kwargs, struct wbint_Ping *r)
    3337             : {
    3338           0 :         PyObject *py_in_data;
    3339           0 :         const char *kwnames[] = {
    3340             :                 "in_data", NULL
    3341             :         };
    3342             : 
    3343           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:wbint_Ping", discard_const_p(char *, kwnames), &py_in_data)) {
    3344           0 :                 return false;
    3345             :         }
    3346             : 
    3347           0 :         if (py_in_data == NULL) {
    3348           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.in_data");
    3349           0 :                 return false;
    3350             :         }
    3351             :         {
    3352           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.in_data));
    3353           0 :                 if (PyLong_Check(py_in_data)) {
    3354           0 :                         unsigned long long test_var;
    3355           0 :                         test_var = PyLong_AsUnsignedLongLong(py_in_data);
    3356           0 :                         if (PyErr_Occurred() != NULL) {
    3357           0 :                                 return false;
    3358             :                         }
    3359           0 :                         if (test_var > uint_max) {
    3360           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3361             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3362           0 :                                 return false;
    3363             :                         }
    3364           0 :                         r->in.in_data = test_var;
    3365             :                 } else {
    3366           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3367             :                           PyLong_Type.tp_name);
    3368           0 :                         return false;
    3369             :                 }
    3370             :         }
    3371           0 :         return true;
    3372             : }
    3373             : 
    3374           0 : static PyObject *unpack_py_wbint_Ping_args_out(struct wbint_Ping *r)
    3375             : {
    3376           0 :         PyObject *result;
    3377           0 :         PyObject *py_out_data;
    3378           0 :         py_out_data = PyLong_FromUnsignedLongLong((uint32_t)*r->out.out_data);
    3379           0 :         result = py_out_data;
    3380           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    3381           0 :                 PyErr_SetNTSTATUS(r->out.result);
    3382           0 :                 return NULL;
    3383             :         }
    3384             : 
    3385           0 :         return result;
    3386             : }
    3387             : 
    3388             : 
    3389           0 : static PyObject *py_wbint_LookupSid_in_get_sid(PyObject *obj, void *closure)
    3390             : {
    3391           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(obj);
    3392           0 :         PyObject *py_sid;
    3393           0 :         if (object->in.sid == NULL) {
    3394           0 :                 Py_RETURN_NONE;
    3395             :         }
    3396           0 :         py_sid = pytalloc_reference_ex(dom_sid_Type, object->in.sid, object->in.sid);
    3397           0 :         return py_sid;
    3398             : }
    3399             : 
    3400           0 : static int py_wbint_LookupSid_in_set_sid(PyObject *py_obj, PyObject *value, void *closure)
    3401             : {
    3402           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(py_obj);
    3403           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sid));
    3404           0 :         if (value == NULL) {
    3405           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.sid");
    3406           0 :                 return -1;
    3407             :         }
    3408           0 :         object->in.sid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sid);
    3409           0 :         if (object->in.sid == NULL) {
    3410           0 :                 PyErr_NoMemory();
    3411           0 :                 return -1;
    3412             :         }
    3413           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    3414           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3415           0 :                 PyErr_NoMemory();
    3416           0 :                 return -1;
    3417             :         }
    3418           0 :         object->in.sid = (struct dom_sid *)pytalloc_get_ptr(value);
    3419           0 :         return 0;
    3420             : }
    3421             : 
    3422           0 : static PyObject *py_wbint_LookupSid_out_get_type(PyObject *obj, void *closure)
    3423             : {
    3424           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(obj);
    3425           0 :         PyObject *py_type;
    3426           0 :         if (object->out.type == NULL) {
    3427           0 :                 Py_RETURN_NONE;
    3428             :         }
    3429           0 :         py_type = PyLong_FromLong((uint16_t)*object->out.type);
    3430           0 :         return py_type;
    3431             : }
    3432             : 
    3433           0 : static int py_wbint_LookupSid_out_set_type(PyObject *py_obj, PyObject *value, void *closure)
    3434             : {
    3435           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(py_obj);
    3436           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.type));
    3437           0 :         if (value == NULL) {
    3438           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.type");
    3439           0 :                 return -1;
    3440             :         }
    3441           0 :         object->out.type = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.type);
    3442           0 :         if (object->out.type == NULL) {
    3443           0 :                 PyErr_NoMemory();
    3444           0 :                 return -1;
    3445             :         }
    3446             :         {
    3447           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.type));
    3448           0 :                 if (PyLong_Check(value)) {
    3449           0 :                         unsigned long long test_var;
    3450           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3451           0 :                         if (PyErr_Occurred() != NULL) {
    3452           0 :                                 return -1;
    3453             :                         }
    3454           0 :                         if (test_var > uint_max) {
    3455           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3456             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3457           0 :                                 return -1;
    3458             :                         }
    3459           0 :                         *object->out.type = test_var;
    3460             :                 } else {
    3461           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3462             :                           PyLong_Type.tp_name);
    3463           0 :                         return -1;
    3464             :                 }
    3465             :         }
    3466           0 :         return 0;
    3467             : }
    3468             : 
    3469           0 : static PyObject *py_wbint_LookupSid_out_get_domain(PyObject *obj, void *closure)
    3470             : {
    3471           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(obj);
    3472           0 :         PyObject *py_domain;
    3473           0 :         if (object->out.domain == NULL) {
    3474           0 :                 Py_RETURN_NONE;
    3475             :         }
    3476           0 :         if (*object->out.domain == NULL) {
    3477           0 :                 py_domain = Py_None;
    3478           0 :                 Py_INCREF(py_domain);
    3479             :         } else {
    3480           0 :                 if (*object->out.domain == NULL) {
    3481           0 :                         py_domain = Py_None;
    3482           0 :                         Py_INCREF(py_domain);
    3483             :                 } else {
    3484           0 :                         py_domain = PyUnicode_Decode(*object->out.domain, strlen(*object->out.domain), "utf-8", "ignore");
    3485             :                 }
    3486             :         }
    3487           0 :         return py_domain;
    3488             : }
    3489             : 
    3490           0 : static int py_wbint_LookupSid_out_set_domain(PyObject *py_obj, PyObject *value, void *closure)
    3491             : {
    3492           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(py_obj);
    3493           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.domain));
    3494           0 :         if (value == NULL) {
    3495           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.domain");
    3496           0 :                 return -1;
    3497             :         }
    3498           0 :         object->out.domain = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.domain);
    3499           0 :         if (object->out.domain == NULL) {
    3500           0 :                 PyErr_NoMemory();
    3501           0 :                 return -1;
    3502             :         }
    3503           0 :         if (value == Py_None) {
    3504           0 :                 *object->out.domain = NULL;
    3505             :         } else {
    3506           0 :                 *object->out.domain = NULL;
    3507             :                 {
    3508           0 :                         const char *test_str;
    3509           0 :                         const char *talloc_str;
    3510           0 :                         PyObject *unicode = NULL;
    3511           0 :                         if (PyUnicode_Check(value)) {
    3512           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    3513           0 :                                 if (unicode == NULL) {
    3514           0 :                                         PyErr_NoMemory();
    3515           0 :                                         return -1;
    3516             :                                 }
    3517           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    3518           0 :                         } else if (PyBytes_Check(value)) {
    3519           0 :                                 test_str = PyBytes_AS_STRING(value);
    3520             :                         } else {
    3521           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    3522           0 :                                 return -1;
    3523             :                         }
    3524           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    3525           0 :                         if (unicode != NULL) {
    3526           0 :                                 Py_DECREF(unicode);
    3527             :                         }
    3528           0 :                         if (talloc_str == NULL) {
    3529           0 :                                 PyErr_NoMemory();
    3530           0 :                                 return -1;
    3531             :                         }
    3532           0 :                         *object->out.domain = talloc_str;
    3533             :                 }
    3534             :         }
    3535           0 :         return 0;
    3536             : }
    3537             : 
    3538           0 : static PyObject *py_wbint_LookupSid_out_get_name(PyObject *obj, void *closure)
    3539             : {
    3540           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(obj);
    3541           0 :         PyObject *py_name;
    3542           0 :         if (object->out.name == NULL) {
    3543           0 :                 Py_RETURN_NONE;
    3544             :         }
    3545           0 :         if (*object->out.name == NULL) {
    3546           0 :                 py_name = Py_None;
    3547           0 :                 Py_INCREF(py_name);
    3548             :         } else {
    3549           0 :                 if (*object->out.name == NULL) {
    3550           0 :                         py_name = Py_None;
    3551           0 :                         Py_INCREF(py_name);
    3552             :                 } else {
    3553           0 :                         py_name = PyUnicode_Decode(*object->out.name, strlen(*object->out.name), "utf-8", "ignore");
    3554             :                 }
    3555             :         }
    3556           0 :         return py_name;
    3557             : }
    3558             : 
    3559           0 : static int py_wbint_LookupSid_out_set_name(PyObject *py_obj, PyObject *value, void *closure)
    3560             : {
    3561           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(py_obj);
    3562           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.name));
    3563           0 :         if (value == NULL) {
    3564           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.name");
    3565           0 :                 return -1;
    3566             :         }
    3567           0 :         object->out.name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.name);
    3568           0 :         if (object->out.name == NULL) {
    3569           0 :                 PyErr_NoMemory();
    3570           0 :                 return -1;
    3571             :         }
    3572           0 :         if (value == Py_None) {
    3573           0 :                 *object->out.name = NULL;
    3574             :         } else {
    3575           0 :                 *object->out.name = NULL;
    3576             :                 {
    3577           0 :                         const char *test_str;
    3578           0 :                         const char *talloc_str;
    3579           0 :                         PyObject *unicode = NULL;
    3580           0 :                         if (PyUnicode_Check(value)) {
    3581           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    3582           0 :                                 if (unicode == NULL) {
    3583           0 :                                         PyErr_NoMemory();
    3584           0 :                                         return -1;
    3585             :                                 }
    3586           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    3587           0 :                         } else if (PyBytes_Check(value)) {
    3588           0 :                                 test_str = PyBytes_AS_STRING(value);
    3589             :                         } else {
    3590           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    3591           0 :                                 return -1;
    3592             :                         }
    3593           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    3594           0 :                         if (unicode != NULL) {
    3595           0 :                                 Py_DECREF(unicode);
    3596             :                         }
    3597           0 :                         if (talloc_str == NULL) {
    3598           0 :                                 PyErr_NoMemory();
    3599           0 :                                 return -1;
    3600             :                         }
    3601           0 :                         *object->out.name = talloc_str;
    3602             :                 }
    3603             :         }
    3604           0 :         return 0;
    3605             : }
    3606             : 
    3607           0 : static PyObject *py_wbint_LookupSid_get_result(PyObject *obj, void *closure)
    3608             : {
    3609           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(obj);
    3610           0 :         PyObject *py_result;
    3611           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    3612           0 :         return py_result;
    3613             : }
    3614             : 
    3615           0 : static int py_wbint_LookupSid_set_result(PyObject *py_obj, PyObject *value, void *closure)
    3616             : {
    3617           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(py_obj);
    3618           0 :         if (value == NULL) {
    3619           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    3620           0 :                 return -1;
    3621             :         }
    3622           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    3623           0 :         return 0;
    3624             : }
    3625             : 
    3626             : static PyGetSetDef py_wbint_LookupSid_getsetters[] = {
    3627             :         {
    3628             :                 .name = discard_const_p(char, "in_sid"),
    3629             :                 .get = py_wbint_LookupSid_in_get_sid,
    3630             :                 .set = py_wbint_LookupSid_in_set_sid,
    3631             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
    3632             :         },
    3633             :         {
    3634             :                 .name = discard_const_p(char, "out_type"),
    3635             :                 .get = py_wbint_LookupSid_out_get_type,
    3636             :                 .set = py_wbint_LookupSid_out_set_type,
    3637             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_SidType")
    3638             :         },
    3639             :         {
    3640             :                 .name = discard_const_p(char, "out_domain"),
    3641             :                 .get = py_wbint_LookupSid_out_get_domain,
    3642             :                 .set = py_wbint_LookupSid_out_set_domain,
    3643             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    3644             :         },
    3645             :         {
    3646             :                 .name = discard_const_p(char, "out_name"),
    3647             :                 .get = py_wbint_LookupSid_out_get_name,
    3648             :                 .set = py_wbint_LookupSid_out_set_name,
    3649             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    3650             :         },
    3651             :         {
    3652             :                 .name = discard_const_p(char, "result"),
    3653             :                 .get = py_wbint_LookupSid_get_result,
    3654             :                 .set = py_wbint_LookupSid_set_result,
    3655             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    3656             :         },
    3657             :         { .name = NULL }
    3658             : };
    3659             : 
    3660           0 : static PyObject *py_wbint_LookupSid_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3661             : {
    3662           0 :         PyObject *self = pytalloc_new(struct wbint_LookupSid, type);
    3663           0 :         struct wbint_LookupSid *_self = (struct wbint_LookupSid *)pytalloc_get_ptr(self);
    3664           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    3665           0 :         _self->in.sid = talloc_zero(mem_ctx, struct dom_sid);
    3666           0 :         _self->out.type = talloc_zero(mem_ctx, enum lsa_SidType);
    3667           0 :         return self;
    3668             : }
    3669             : 
    3670           0 : static PyObject *py_wbint_LookupSid_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    3671             : {
    3672             : 
    3673             : 
    3674           0 :         return PyLong_FromLong(1);
    3675             : }
    3676             : 
    3677           0 : static PyObject *py_wbint_LookupSid_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
    3678             : {
    3679           0 :         const struct ndr_interface_call *call = NULL;
    3680           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(py_obj);
    3681           0 :         PyObject *ret = NULL;
    3682           0 :         struct ndr_push *push = NULL;
    3683           0 :         DATA_BLOB blob;
    3684           0 :         enum ndr_err_code err;
    3685             : 
    3686           0 :         if (ndr_table_winbind.num_calls < 2) {
    3687           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupSid_ndr_pack");
    3688           0 :                 return NULL;
    3689             :         }
    3690           0 :         call = &ndr_table_winbind.calls[1];
    3691             : 
    3692           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    3693           0 :         if (push == NULL) {
    3694           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    3695           0 :                 return NULL;
    3696             :         }
    3697             : 
    3698           0 :         push->flags |= ndr_push_flags;
    3699             : 
    3700           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    3701           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3702           0 :                 TALLOC_FREE(push);
    3703           0 :                 PyErr_SetNdrError(err);
    3704           0 :                 return NULL;
    3705             :         }
    3706           0 :         blob = ndr_push_blob(push);
    3707           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    3708           0 :         TALLOC_FREE(push);
    3709           0 :         return ret;
    3710             : }
    3711             : 
    3712           0 : static PyObject *py_wbint_LookupSid_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3713             : {
    3714           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    3715           0 :         PyObject *bigendian_obj = NULL;
    3716           0 :         PyObject *ndr64_obj = NULL;
    3717           0 :         libndr_flags ndr_push_flags = 0;
    3718             : 
    3719           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    3720             :                 discard_const_p(char *, kwnames),
    3721             :                 &bigendian_obj,
    3722             :                 &ndr64_obj)) {
    3723           0 :                 return NULL;
    3724             :         }
    3725             : 
    3726           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    3727           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    3728             :         }
    3729           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    3730           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    3731             :         }
    3732             : 
    3733           0 :         return py_wbint_LookupSid_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    3734             : }
    3735             : 
    3736           0 : static PyObject *py_wbint_LookupSid_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3737             : {
    3738           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    3739           0 :         PyObject *bigendian_obj = NULL;
    3740           0 :         PyObject *ndr64_obj = NULL;
    3741           0 :         libndr_flags ndr_push_flags = 0;
    3742             : 
    3743           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    3744             :                 discard_const_p(char *, kwnames),
    3745             :                 &bigendian_obj,
    3746             :                 &ndr64_obj)) {
    3747           0 :                 return NULL;
    3748             :         }
    3749             : 
    3750           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    3751           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    3752             :         }
    3753           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    3754           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    3755             :         }
    3756             : 
    3757           0 :         return py_wbint_LookupSid_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    3758             : }
    3759             : 
    3760           0 : static PyObject *py_wbint_LookupSid_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
    3761             : {
    3762           0 :         const struct ndr_interface_call *call = NULL;
    3763           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(py_obj);
    3764           0 :         struct ndr_pull *pull = NULL;
    3765           0 :         enum ndr_err_code err;
    3766             : 
    3767           0 :         if (ndr_table_winbind.num_calls < 2) {
    3768           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupSid_ndr_unpack");
    3769           0 :                 return NULL;
    3770             :         }
    3771           0 :         call = &ndr_table_winbind.calls[1];
    3772             : 
    3773           0 :         pull = ndr_pull_init_blob(blob, object);
    3774           0 :         if (pull == NULL) {
    3775           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    3776           0 :                 return NULL;
    3777             :         }
    3778             : 
    3779           0 :         pull->flags |= ndr_pull_flags;
    3780             : 
    3781           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    3782           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3783           0 :                 TALLOC_FREE(pull);
    3784           0 :                 PyErr_SetNdrError(err);
    3785           0 :                 return NULL;
    3786             :         }
    3787           0 :         if (!allow_remaining) {
    3788           0 :                 uint32_t highest_ofs;
    3789             : 
    3790           0 :                 if (pull->offset > pull->relative_highest_offset) {
    3791           0 :                         highest_ofs = pull->offset;
    3792             :                 } else {
    3793           0 :                         highest_ofs = pull->relative_highest_offset;
    3794             :                 }
    3795           0 :                 if (highest_ofs < pull->data_size) {
    3796           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    3797             :                                 "not all bytes consumed ofs[%u] size[%u]",
    3798             :                                 highest_ofs, pull->data_size);
    3799           0 :                         TALLOC_FREE(pull);
    3800           0 :                         PyErr_SetNdrError(err);
    3801           0 :                         return NULL;
    3802             :                 }
    3803             :         }
    3804             : 
    3805           0 :         TALLOC_FREE(pull);
    3806           0 :         Py_RETURN_NONE;
    3807             : }
    3808             : 
    3809           0 : static PyObject *py_wbint_LookupSid_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3810             : {
    3811           0 :         DATA_BLOB blob;
    3812           0 :         Py_ssize_t blob_length = 0;
    3813           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    3814           0 :         PyObject *bigendian_obj = NULL;
    3815           0 :         PyObject *ndr64_obj = NULL;
    3816           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    3817           0 :         PyObject *allow_remaining_obj = NULL;
    3818           0 :         bool allow_remaining = false;
    3819             : 
    3820           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    3821             :                 discard_const_p(char *, kwnames),
    3822             :                 &blob.data, &blob_length,
    3823             :                 &bigendian_obj,
    3824             :                 &ndr64_obj,
    3825             :                 &allow_remaining_obj)) {
    3826           0 :                 return NULL;
    3827             :         }
    3828           0 :         blob.length = blob_length;
    3829             : 
    3830           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    3831           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    3832             :         }
    3833           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    3834           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    3835             :         }
    3836             : 
    3837           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    3838           0 :                 allow_remaining = true;
    3839             :         }
    3840             : 
    3841           0 :         return py_wbint_LookupSid_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    3842             : }
    3843             : 
    3844           0 : static PyObject *py_wbint_LookupSid_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3845             : {
    3846           0 :         DATA_BLOB blob;
    3847           0 :         Py_ssize_t blob_length = 0;
    3848           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    3849           0 :         PyObject *bigendian_obj = NULL;
    3850           0 :         PyObject *ndr64_obj = NULL;
    3851           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    3852           0 :         PyObject *allow_remaining_obj = NULL;
    3853           0 :         bool allow_remaining = false;
    3854             : 
    3855           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    3856             :                 discard_const_p(char *, kwnames),
    3857             :                 &blob.data, &blob_length,
    3858             :                 &bigendian_obj,
    3859             :                 &ndr64_obj,
    3860             :                 &allow_remaining_obj)) {
    3861           0 :                 return NULL;
    3862             :         }
    3863           0 :         blob.length = blob_length;
    3864             : 
    3865           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    3866           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    3867             :         }
    3868           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    3869           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    3870             :         }
    3871             : 
    3872           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    3873           0 :                 allow_remaining = true;
    3874             :         }
    3875             : 
    3876           0 :         return py_wbint_LookupSid_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    3877             : }
    3878             : 
    3879           0 : static PyObject *py_wbint_LookupSid_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
    3880             : {
    3881           0 :         const struct ndr_interface_call *call = NULL;
    3882           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(py_obj);
    3883           0 :         PyObject *ret;
    3884           0 :         char *retstr;
    3885             : 
    3886           0 :         if (ndr_table_winbind.num_calls < 2) {
    3887           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupSid_ndr_print");
    3888           0 :                 return NULL;
    3889             :         }
    3890           0 :         call = &ndr_table_winbind.calls[1];
    3891             : 
    3892           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    3893           0 :         ret = PyUnicode_FromString(retstr);
    3894           0 :         TALLOC_FREE(retstr);
    3895             : 
    3896           0 :         return ret;
    3897             : }
    3898             : 
    3899           0 : static PyObject *py_wbint_LookupSid_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    3900             : {
    3901           0 :         return py_wbint_LookupSid_ndr_print(py_obj, "wbint_LookupSid_in", NDR_IN);
    3902             : }
    3903             : 
    3904           0 : static PyObject *py_wbint_LookupSid_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    3905             : {
    3906           0 :         return py_wbint_LookupSid_ndr_print(py_obj, "wbint_LookupSid_out", NDR_OUT);
    3907             : }
    3908             : 
    3909             : static PyMethodDef py_wbint_LookupSid_methods[] = {
    3910             :         { "opnum", (PyCFunction)py_wbint_LookupSid_ndr_opnum, METH_NOARGS|METH_CLASS,
    3911             :                 "winbind.wbint_LookupSid.opnum() -> 1 (0x01) " },
    3912             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupSid_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    3913             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    3914             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupSid_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    3915             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    3916             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupSid_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    3917             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    3918             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupSid_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    3919             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    3920             :         { "__ndr_print_in__", (PyCFunction)py_wbint_LookupSid_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    3921             :         { "__ndr_print_out__", (PyCFunction)py_wbint_LookupSid_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    3922             :         { NULL, NULL, 0, NULL }
    3923             : };
    3924             : 
    3925             : 
    3926             : static PyTypeObject wbint_LookupSid_Type = {
    3927             :         PyVarObject_HEAD_INIT(NULL, 0)
    3928             :         .tp_name = "winbind.wbint_LookupSid",
    3929             :         .tp_getset = py_wbint_LookupSid_getsetters,
    3930             :         .tp_methods = py_wbint_LookupSid_methods,
    3931             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3932             :         .tp_new = py_wbint_LookupSid_new,
    3933             : };
    3934             : 
    3935           0 : static bool pack_py_wbint_LookupSid_args_in(PyObject *args, PyObject *kwargs, struct wbint_LookupSid *r)
    3936             : {
    3937           0 :         PyObject *py_sid;
    3938           0 :         const char *kwnames[] = {
    3939             :                 "sid", NULL
    3940             :         };
    3941             : 
    3942           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:wbint_LookupSid", discard_const_p(char *, kwnames), &py_sid)) {
    3943           0 :                 return false;
    3944             :         }
    3945             : 
    3946           0 :         if (py_sid == NULL) {
    3947           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.sid");
    3948           0 :                 return false;
    3949             :         }
    3950           0 :         r->in.sid = talloc_ptrtype(r, r->in.sid);
    3951           0 :         if (r->in.sid == NULL) {
    3952           0 :                 PyErr_NoMemory();
    3953           0 :                 return false;
    3954             :         }
    3955           0 :         PY_CHECK_TYPE(dom_sid_Type, py_sid, return false;);
    3956           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_sid)) == NULL) {
    3957           0 :                 PyErr_NoMemory();
    3958           0 :                 return false;
    3959             :         }
    3960           0 :         r->in.sid = (struct dom_sid *)pytalloc_get_ptr(py_sid);
    3961           0 :         return true;
    3962             : }
    3963             : 
    3964           0 : static PyObject *unpack_py_wbint_LookupSid_args_out(struct wbint_LookupSid *r)
    3965             : {
    3966           0 :         PyObject *result;
    3967           0 :         PyObject *py_type;
    3968           0 :         PyObject *py_domain;
    3969           0 :         PyObject *py_name;
    3970           0 :         result = PyTuple_New(3);
    3971           0 :         py_type = PyLong_FromLong((uint16_t)*r->out.type);
    3972           0 :         PyTuple_SetItem(result, 0, py_type);
    3973           0 :         if (*r->out.domain == NULL) {
    3974           0 :                 py_domain = Py_None;
    3975           0 :                 Py_INCREF(py_domain);
    3976             :         } else {
    3977           0 :                 if (*r->out.domain == NULL) {
    3978           0 :                         py_domain = Py_None;
    3979           0 :                         Py_INCREF(py_domain);
    3980             :                 } else {
    3981           0 :                         py_domain = PyUnicode_Decode(*r->out.domain, strlen(*r->out.domain), "utf-8", "ignore");
    3982             :                 }
    3983             :         }
    3984           0 :         PyTuple_SetItem(result, 1, py_domain);
    3985           0 :         if (*r->out.name == NULL) {
    3986           0 :                 py_name = Py_None;
    3987           0 :                 Py_INCREF(py_name);
    3988             :         } else {
    3989           0 :                 if (*r->out.name == NULL) {
    3990           0 :                         py_name = Py_None;
    3991           0 :                         Py_INCREF(py_name);
    3992             :                 } else {
    3993           0 :                         py_name = PyUnicode_Decode(*r->out.name, strlen(*r->out.name), "utf-8", "ignore");
    3994             :                 }
    3995             :         }
    3996           0 :         PyTuple_SetItem(result, 2, py_name);
    3997           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    3998           0 :                 PyErr_SetNTSTATUS(r->out.result);
    3999           0 :                 return NULL;
    4000             :         }
    4001             : 
    4002           0 :         return result;
    4003             : }
    4004             : 
    4005             : 
    4006           0 : static PyObject *py_wbint_LookupSids_in_get_sids(PyObject *obj, void *closure)
    4007             : {
    4008           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(obj);
    4009           0 :         PyObject *py_sids;
    4010           0 :         if (object->in.sids == NULL) {
    4011           0 :                 Py_RETURN_NONE;
    4012             :         }
    4013           0 :         py_sids = pytalloc_reference_ex(lsa_SidArray_Type, object->in.sids, object->in.sids);
    4014           0 :         return py_sids;
    4015             : }
    4016             : 
    4017           0 : static int py_wbint_LookupSids_in_set_sids(PyObject *py_obj, PyObject *value, void *closure)
    4018             : {
    4019           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(py_obj);
    4020           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sids));
    4021           0 :         if (value == NULL) {
    4022           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.sids");
    4023           0 :                 return -1;
    4024             :         }
    4025           0 :         object->in.sids = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sids);
    4026           0 :         if (object->in.sids == NULL) {
    4027           0 :                 PyErr_NoMemory();
    4028           0 :                 return -1;
    4029             :         }
    4030           0 :         PY_CHECK_TYPE(lsa_SidArray_Type, value, return -1;);
    4031           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4032           0 :                 PyErr_NoMemory();
    4033           0 :                 return -1;
    4034             :         }
    4035           0 :         object->in.sids = (struct lsa_SidArray *)pytalloc_get_ptr(value);
    4036           0 :         return 0;
    4037             : }
    4038             : 
    4039           0 : static PyObject *py_wbint_LookupSids_out_get_domains(PyObject *obj, void *closure)
    4040             : {
    4041           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(obj);
    4042           0 :         PyObject *py_domains;
    4043           0 :         if (object->out.domains == NULL) {
    4044           0 :                 Py_RETURN_NONE;
    4045             :         }
    4046           0 :         py_domains = pytalloc_reference_ex(lsa_RefDomainList_Type, object->out.domains, object->out.domains);
    4047           0 :         return py_domains;
    4048             : }
    4049             : 
    4050           0 : static int py_wbint_LookupSids_out_set_domains(PyObject *py_obj, PyObject *value, void *closure)
    4051             : {
    4052           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(py_obj);
    4053           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.domains));
    4054           0 :         if (value == NULL) {
    4055           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.domains");
    4056           0 :                 return -1;
    4057             :         }
    4058           0 :         object->out.domains = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.domains);
    4059           0 :         if (object->out.domains == NULL) {
    4060           0 :                 PyErr_NoMemory();
    4061           0 :                 return -1;
    4062             :         }
    4063           0 :         PY_CHECK_TYPE(lsa_RefDomainList_Type, value, return -1;);
    4064           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4065           0 :                 PyErr_NoMemory();
    4066           0 :                 return -1;
    4067             :         }
    4068           0 :         object->out.domains = (struct lsa_RefDomainList *)pytalloc_get_ptr(value);
    4069           0 :         return 0;
    4070             : }
    4071             : 
    4072           0 : static PyObject *py_wbint_LookupSids_out_get_names(PyObject *obj, void *closure)
    4073             : {
    4074           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(obj);
    4075           0 :         PyObject *py_names;
    4076           0 :         if (object->out.names == NULL) {
    4077           0 :                 Py_RETURN_NONE;
    4078             :         }
    4079           0 :         py_names = pytalloc_reference_ex(lsa_TransNameArray_Type, object->out.names, object->out.names);
    4080           0 :         return py_names;
    4081             : }
    4082             : 
    4083           0 : static int py_wbint_LookupSids_out_set_names(PyObject *py_obj, PyObject *value, void *closure)
    4084             : {
    4085           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(py_obj);
    4086           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.names));
    4087           0 :         if (value == NULL) {
    4088           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.names");
    4089           0 :                 return -1;
    4090             :         }
    4091           0 :         object->out.names = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.names);
    4092           0 :         if (object->out.names == NULL) {
    4093           0 :                 PyErr_NoMemory();
    4094           0 :                 return -1;
    4095             :         }
    4096           0 :         PY_CHECK_TYPE(lsa_TransNameArray_Type, value, return -1;);
    4097           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4098           0 :                 PyErr_NoMemory();
    4099           0 :                 return -1;
    4100             :         }
    4101           0 :         object->out.names = (struct lsa_TransNameArray *)pytalloc_get_ptr(value);
    4102           0 :         return 0;
    4103             : }
    4104             : 
    4105           0 : static PyObject *py_wbint_LookupSids_get_result(PyObject *obj, void *closure)
    4106             : {
    4107           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(obj);
    4108           0 :         PyObject *py_result;
    4109           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    4110           0 :         return py_result;
    4111             : }
    4112             : 
    4113           0 : static int py_wbint_LookupSids_set_result(PyObject *py_obj, PyObject *value, void *closure)
    4114             : {
    4115           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(py_obj);
    4116           0 :         if (value == NULL) {
    4117           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    4118           0 :                 return -1;
    4119             :         }
    4120           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    4121           0 :         return 0;
    4122             : }
    4123             : 
    4124             : static PyGetSetDef py_wbint_LookupSids_getsetters[] = {
    4125             :         {
    4126             :                 .name = discard_const_p(char, "in_sids"),
    4127             :                 .get = py_wbint_LookupSids_in_get_sids,
    4128             :                 .set = py_wbint_LookupSids_in_set_sids,
    4129             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_SidArray")
    4130             :         },
    4131             :         {
    4132             :                 .name = discard_const_p(char, "out_domains"),
    4133             :                 .get = py_wbint_LookupSids_out_get_domains,
    4134             :                 .set = py_wbint_LookupSids_out_set_domains,
    4135             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_RefDomainList")
    4136             :         },
    4137             :         {
    4138             :                 .name = discard_const_p(char, "out_names"),
    4139             :                 .get = py_wbint_LookupSids_out_get_names,
    4140             :                 .set = py_wbint_LookupSids_out_set_names,
    4141             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_TransNameArray")
    4142             :         },
    4143             :         {
    4144             :                 .name = discard_const_p(char, "result"),
    4145             :                 .get = py_wbint_LookupSids_get_result,
    4146             :                 .set = py_wbint_LookupSids_set_result,
    4147             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    4148             :         },
    4149             :         { .name = NULL }
    4150             : };
    4151             : 
    4152           0 : static PyObject *py_wbint_LookupSids_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4153             : {
    4154           0 :         PyObject *self = pytalloc_new(struct wbint_LookupSids, type);
    4155           0 :         struct wbint_LookupSids *_self = (struct wbint_LookupSids *)pytalloc_get_ptr(self);
    4156           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    4157           0 :         _self->in.sids = talloc_zero(mem_ctx, struct lsa_SidArray);
    4158           0 :         _self->out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList);
    4159           0 :         _self->out.names = talloc_zero(mem_ctx, struct lsa_TransNameArray);
    4160           0 :         return self;
    4161             : }
    4162             : 
    4163           0 : static PyObject *py_wbint_LookupSids_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    4164             : {
    4165             : 
    4166             : 
    4167           0 :         return PyLong_FromLong(2);
    4168             : }
    4169             : 
    4170           0 : static PyObject *py_wbint_LookupSids_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
    4171             : {
    4172           0 :         const struct ndr_interface_call *call = NULL;
    4173           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(py_obj);
    4174           0 :         PyObject *ret = NULL;
    4175           0 :         struct ndr_push *push = NULL;
    4176           0 :         DATA_BLOB blob;
    4177           0 :         enum ndr_err_code err;
    4178             : 
    4179           0 :         if (ndr_table_winbind.num_calls < 3) {
    4180           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupSids_ndr_pack");
    4181           0 :                 return NULL;
    4182             :         }
    4183           0 :         call = &ndr_table_winbind.calls[2];
    4184             : 
    4185           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    4186           0 :         if (push == NULL) {
    4187           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4188           0 :                 return NULL;
    4189             :         }
    4190             : 
    4191           0 :         push->flags |= ndr_push_flags;
    4192             : 
    4193           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    4194           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4195           0 :                 TALLOC_FREE(push);
    4196           0 :                 PyErr_SetNdrError(err);
    4197           0 :                 return NULL;
    4198             :         }
    4199           0 :         blob = ndr_push_blob(push);
    4200           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4201           0 :         TALLOC_FREE(push);
    4202           0 :         return ret;
    4203             : }
    4204             : 
    4205           0 : static PyObject *py_wbint_LookupSids_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4206             : {
    4207           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    4208           0 :         PyObject *bigendian_obj = NULL;
    4209           0 :         PyObject *ndr64_obj = NULL;
    4210           0 :         libndr_flags ndr_push_flags = 0;
    4211             : 
    4212           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    4213             :                 discard_const_p(char *, kwnames),
    4214             :                 &bigendian_obj,
    4215             :                 &ndr64_obj)) {
    4216           0 :                 return NULL;
    4217             :         }
    4218             : 
    4219           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    4220           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    4221             :         }
    4222           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    4223           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    4224             :         }
    4225             : 
    4226           0 :         return py_wbint_LookupSids_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    4227             : }
    4228             : 
    4229           0 : static PyObject *py_wbint_LookupSids_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4230             : {
    4231           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    4232           0 :         PyObject *bigendian_obj = NULL;
    4233           0 :         PyObject *ndr64_obj = NULL;
    4234           0 :         libndr_flags ndr_push_flags = 0;
    4235             : 
    4236           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    4237             :                 discard_const_p(char *, kwnames),
    4238             :                 &bigendian_obj,
    4239             :                 &ndr64_obj)) {
    4240           0 :                 return NULL;
    4241             :         }
    4242             : 
    4243           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    4244           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    4245             :         }
    4246           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    4247           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    4248             :         }
    4249             : 
    4250           0 :         return py_wbint_LookupSids_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    4251             : }
    4252             : 
    4253           0 : static PyObject *py_wbint_LookupSids_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
    4254             : {
    4255           0 :         const struct ndr_interface_call *call = NULL;
    4256           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(py_obj);
    4257           0 :         struct ndr_pull *pull = NULL;
    4258           0 :         enum ndr_err_code err;
    4259             : 
    4260           0 :         if (ndr_table_winbind.num_calls < 3) {
    4261           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupSids_ndr_unpack");
    4262           0 :                 return NULL;
    4263             :         }
    4264           0 :         call = &ndr_table_winbind.calls[2];
    4265             : 
    4266           0 :         pull = ndr_pull_init_blob(blob, object);
    4267           0 :         if (pull == NULL) {
    4268           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4269           0 :                 return NULL;
    4270             :         }
    4271             : 
    4272           0 :         pull->flags |= ndr_pull_flags;
    4273             : 
    4274           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    4275           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4276           0 :                 TALLOC_FREE(pull);
    4277           0 :                 PyErr_SetNdrError(err);
    4278           0 :                 return NULL;
    4279             :         }
    4280           0 :         if (!allow_remaining) {
    4281           0 :                 uint32_t highest_ofs;
    4282             : 
    4283           0 :                 if (pull->offset > pull->relative_highest_offset) {
    4284           0 :                         highest_ofs = pull->offset;
    4285             :                 } else {
    4286           0 :                         highest_ofs = pull->relative_highest_offset;
    4287             :                 }
    4288           0 :                 if (highest_ofs < pull->data_size) {
    4289           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    4290             :                                 "not all bytes consumed ofs[%u] size[%u]",
    4291             :                                 highest_ofs, pull->data_size);
    4292           0 :                         TALLOC_FREE(pull);
    4293           0 :                         PyErr_SetNdrError(err);
    4294           0 :                         return NULL;
    4295             :                 }
    4296             :         }
    4297             : 
    4298           0 :         TALLOC_FREE(pull);
    4299           0 :         Py_RETURN_NONE;
    4300             : }
    4301             : 
    4302           0 : static PyObject *py_wbint_LookupSids_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4303             : {
    4304           0 :         DATA_BLOB blob;
    4305           0 :         Py_ssize_t blob_length = 0;
    4306           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    4307           0 :         PyObject *bigendian_obj = NULL;
    4308           0 :         PyObject *ndr64_obj = NULL;
    4309           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    4310           0 :         PyObject *allow_remaining_obj = NULL;
    4311           0 :         bool allow_remaining = false;
    4312             : 
    4313           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    4314             :                 discard_const_p(char *, kwnames),
    4315             :                 &blob.data, &blob_length,
    4316             :                 &bigendian_obj,
    4317             :                 &ndr64_obj,
    4318             :                 &allow_remaining_obj)) {
    4319           0 :                 return NULL;
    4320             :         }
    4321           0 :         blob.length = blob_length;
    4322             : 
    4323           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    4324           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    4325             :         }
    4326           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    4327           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    4328             :         }
    4329             : 
    4330           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4331           0 :                 allow_remaining = true;
    4332             :         }
    4333             : 
    4334           0 :         return py_wbint_LookupSids_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    4335             : }
    4336             : 
    4337           0 : static PyObject *py_wbint_LookupSids_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4338             : {
    4339           0 :         DATA_BLOB blob;
    4340           0 :         Py_ssize_t blob_length = 0;
    4341           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    4342           0 :         PyObject *bigendian_obj = NULL;
    4343           0 :         PyObject *ndr64_obj = NULL;
    4344           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    4345           0 :         PyObject *allow_remaining_obj = NULL;
    4346           0 :         bool allow_remaining = false;
    4347             : 
    4348           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    4349             :                 discard_const_p(char *, kwnames),
    4350             :                 &blob.data, &blob_length,
    4351             :                 &bigendian_obj,
    4352             :                 &ndr64_obj,
    4353             :                 &allow_remaining_obj)) {
    4354           0 :                 return NULL;
    4355             :         }
    4356           0 :         blob.length = blob_length;
    4357             : 
    4358           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    4359           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    4360             :         }
    4361           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    4362           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    4363             :         }
    4364             : 
    4365           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4366           0 :                 allow_remaining = true;
    4367             :         }
    4368             : 
    4369           0 :         return py_wbint_LookupSids_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    4370             : }
    4371             : 
    4372           0 : static PyObject *py_wbint_LookupSids_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
    4373             : {
    4374           0 :         const struct ndr_interface_call *call = NULL;
    4375           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(py_obj);
    4376           0 :         PyObject *ret;
    4377           0 :         char *retstr;
    4378             : 
    4379           0 :         if (ndr_table_winbind.num_calls < 3) {
    4380           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupSids_ndr_print");
    4381           0 :                 return NULL;
    4382             :         }
    4383           0 :         call = &ndr_table_winbind.calls[2];
    4384             : 
    4385           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    4386           0 :         ret = PyUnicode_FromString(retstr);
    4387           0 :         TALLOC_FREE(retstr);
    4388             : 
    4389           0 :         return ret;
    4390             : }
    4391             : 
    4392           0 : static PyObject *py_wbint_LookupSids_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4393             : {
    4394           0 :         return py_wbint_LookupSids_ndr_print(py_obj, "wbint_LookupSids_in", NDR_IN);
    4395             : }
    4396             : 
    4397           0 : static PyObject *py_wbint_LookupSids_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4398             : {
    4399           0 :         return py_wbint_LookupSids_ndr_print(py_obj, "wbint_LookupSids_out", NDR_OUT);
    4400             : }
    4401             : 
    4402             : static PyMethodDef py_wbint_LookupSids_methods[] = {
    4403             :         { "opnum", (PyCFunction)py_wbint_LookupSids_ndr_opnum, METH_NOARGS|METH_CLASS,
    4404             :                 "winbind.wbint_LookupSids.opnum() -> 2 (0x02) " },
    4405             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupSids_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    4406             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    4407             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupSids_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    4408             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    4409             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupSids_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    4410             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    4411             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupSids_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    4412             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    4413             :         { "__ndr_print_in__", (PyCFunction)py_wbint_LookupSids_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    4414             :         { "__ndr_print_out__", (PyCFunction)py_wbint_LookupSids_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    4415             :         { NULL, NULL, 0, NULL }
    4416             : };
    4417             : 
    4418             : 
    4419             : static PyTypeObject wbint_LookupSids_Type = {
    4420             :         PyVarObject_HEAD_INIT(NULL, 0)
    4421             :         .tp_name = "winbind.wbint_LookupSids",
    4422             :         .tp_getset = py_wbint_LookupSids_getsetters,
    4423             :         .tp_methods = py_wbint_LookupSids_methods,
    4424             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4425             :         .tp_new = py_wbint_LookupSids_new,
    4426             : };
    4427             : 
    4428           0 : static bool pack_py_wbint_LookupSids_args_in(PyObject *args, PyObject *kwargs, struct wbint_LookupSids *r)
    4429             : {
    4430           0 :         PyObject *py_sids;
    4431           0 :         const char *kwnames[] = {
    4432             :                 "sids", NULL
    4433             :         };
    4434             : 
    4435           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:wbint_LookupSids", discard_const_p(char *, kwnames), &py_sids)) {
    4436           0 :                 return false;
    4437             :         }
    4438             : 
    4439           0 :         if (py_sids == NULL) {
    4440           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.sids");
    4441           0 :                 return false;
    4442             :         }
    4443           0 :         r->in.sids = talloc_ptrtype(r, r->in.sids);
    4444           0 :         if (r->in.sids == NULL) {
    4445           0 :                 PyErr_NoMemory();
    4446           0 :                 return false;
    4447             :         }
    4448           0 :         PY_CHECK_TYPE(lsa_SidArray_Type, py_sids, return false;);
    4449           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_sids)) == NULL) {
    4450           0 :                 PyErr_NoMemory();
    4451           0 :                 return false;
    4452             :         }
    4453           0 :         r->in.sids = (struct lsa_SidArray *)pytalloc_get_ptr(py_sids);
    4454           0 :         return true;
    4455             : }
    4456             : 
    4457           0 : static PyObject *unpack_py_wbint_LookupSids_args_out(struct wbint_LookupSids *r)
    4458             : {
    4459           0 :         PyObject *result;
    4460           0 :         PyObject *py_domains;
    4461           0 :         PyObject *py_names;
    4462           0 :         result = PyTuple_New(2);
    4463           0 :         py_domains = pytalloc_reference_ex(lsa_RefDomainList_Type, r->out.domains, r->out.domains);
    4464           0 :         PyTuple_SetItem(result, 0, py_domains);
    4465           0 :         py_names = pytalloc_reference_ex(lsa_TransNameArray_Type, r->out.names, r->out.names);
    4466           0 :         PyTuple_SetItem(result, 1, py_names);
    4467           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    4468           0 :                 PyErr_SetNTSTATUS(r->out.result);
    4469           0 :                 return NULL;
    4470             :         }
    4471             : 
    4472           0 :         return result;
    4473             : }
    4474             : 
    4475             : 
    4476           0 : static PyObject *py_wbint_LookupName_in_get_domain(PyObject *obj, void *closure)
    4477             : {
    4478           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(obj);
    4479           0 :         PyObject *py_domain;
    4480           0 :         if (object->in.domain == NULL) {
    4481           0 :                 Py_RETURN_NONE;
    4482             :         }
    4483           0 :         if (object->in.domain == NULL) {
    4484           0 :                 py_domain = Py_None;
    4485           0 :                 Py_INCREF(py_domain);
    4486             :         } else {
    4487           0 :                 py_domain = PyUnicode_Decode(object->in.domain, strlen(object->in.domain), "utf-8", "ignore");
    4488             :         }
    4489           0 :         return py_domain;
    4490             : }
    4491             : 
    4492           0 : static int py_wbint_LookupName_in_set_domain(PyObject *py_obj, PyObject *value, void *closure)
    4493             : {
    4494           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(py_obj);
    4495           0 :         if (value == NULL) {
    4496           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain");
    4497           0 :                 return -1;
    4498             :         }
    4499           0 :         object->in.domain = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.domain);
    4500           0 :         if (object->in.domain == NULL) {
    4501           0 :                 PyErr_NoMemory();
    4502           0 :                 return -1;
    4503             :         }
    4504             :         {
    4505           0 :                 const char *test_str;
    4506           0 :                 const char *talloc_str;
    4507           0 :                 PyObject *unicode = NULL;
    4508           0 :                 if (PyUnicode_Check(value)) {
    4509           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    4510           0 :                         if (unicode == NULL) {
    4511           0 :                                 PyErr_NoMemory();
    4512           0 :                                 return -1;
    4513             :                         }
    4514           0 :                         test_str = PyBytes_AS_STRING(unicode);
    4515           0 :                 } else if (PyBytes_Check(value)) {
    4516           0 :                         test_str = PyBytes_AS_STRING(value);
    4517             :                 } else {
    4518           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    4519           0 :                         return -1;
    4520             :                 }
    4521           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    4522           0 :                 if (unicode != NULL) {
    4523           0 :                         Py_DECREF(unicode);
    4524             :                 }
    4525           0 :                 if (talloc_str == NULL) {
    4526           0 :                         PyErr_NoMemory();
    4527           0 :                         return -1;
    4528             :                 }
    4529           0 :                 object->in.domain = talloc_str;
    4530             :         }
    4531           0 :         return 0;
    4532             : }
    4533             : 
    4534           0 : static PyObject *py_wbint_LookupName_in_get_name(PyObject *obj, void *closure)
    4535             : {
    4536           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(obj);
    4537           0 :         PyObject *py_name;
    4538           0 :         if (object->in.name == NULL) {
    4539           0 :                 Py_RETURN_NONE;
    4540             :         }
    4541           0 :         if (object->in.name == NULL) {
    4542           0 :                 py_name = Py_None;
    4543           0 :                 Py_INCREF(py_name);
    4544             :         } else {
    4545           0 :                 py_name = PyUnicode_Decode(object->in.name, strlen(object->in.name), "utf-8", "ignore");
    4546             :         }
    4547           0 :         return py_name;
    4548             : }
    4549             : 
    4550           0 : static int py_wbint_LookupName_in_set_name(PyObject *py_obj, PyObject *value, void *closure)
    4551             : {
    4552           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(py_obj);
    4553           0 :         if (value == NULL) {
    4554           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.name");
    4555           0 :                 return -1;
    4556             :         }
    4557           0 :         object->in.name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.name);
    4558           0 :         if (object->in.name == NULL) {
    4559           0 :                 PyErr_NoMemory();
    4560           0 :                 return -1;
    4561             :         }
    4562             :         {
    4563           0 :                 const char *test_str;
    4564           0 :                 const char *talloc_str;
    4565           0 :                 PyObject *unicode = NULL;
    4566           0 :                 if (PyUnicode_Check(value)) {
    4567           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    4568           0 :                         if (unicode == NULL) {
    4569           0 :                                 PyErr_NoMemory();
    4570           0 :                                 return -1;
    4571             :                         }
    4572           0 :                         test_str = PyBytes_AS_STRING(unicode);
    4573           0 :                 } else if (PyBytes_Check(value)) {
    4574           0 :                         test_str = PyBytes_AS_STRING(value);
    4575             :                 } else {
    4576           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    4577           0 :                         return -1;
    4578             :                 }
    4579           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    4580           0 :                 if (unicode != NULL) {
    4581           0 :                         Py_DECREF(unicode);
    4582             :                 }
    4583           0 :                 if (talloc_str == NULL) {
    4584           0 :                         PyErr_NoMemory();
    4585           0 :                         return -1;
    4586             :                 }
    4587           0 :                 object->in.name = talloc_str;
    4588             :         }
    4589           0 :         return 0;
    4590             : }
    4591             : 
    4592           0 : static PyObject *py_wbint_LookupName_in_get_flags(PyObject *obj, void *closure)
    4593             : {
    4594           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(obj);
    4595           0 :         PyObject *py_flags;
    4596           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
    4597           0 :         return py_flags;
    4598             : }
    4599             : 
    4600           0 : static int py_wbint_LookupName_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
    4601             : {
    4602           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(py_obj);
    4603           0 :         if (value == NULL) {
    4604           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
    4605           0 :                 return -1;
    4606             :         }
    4607             :         {
    4608           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
    4609           0 :                 if (PyLong_Check(value)) {
    4610           0 :                         unsigned long long test_var;
    4611           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4612           0 :                         if (PyErr_Occurred() != NULL) {
    4613           0 :                                 return -1;
    4614             :                         }
    4615           0 :                         if (test_var > uint_max) {
    4616           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4617             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4618           0 :                                 return -1;
    4619             :                         }
    4620           0 :                         object->in.flags = test_var;
    4621             :                 } else {
    4622           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4623             :                           PyLong_Type.tp_name);
    4624           0 :                         return -1;
    4625             :                 }
    4626             :         }
    4627           0 :         return 0;
    4628             : }
    4629             : 
    4630           0 : static PyObject *py_wbint_LookupName_out_get_type(PyObject *obj, void *closure)
    4631             : {
    4632           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(obj);
    4633           0 :         PyObject *py_type;
    4634           0 :         if (object->out.type == NULL) {
    4635           0 :                 Py_RETURN_NONE;
    4636             :         }
    4637           0 :         py_type = PyLong_FromLong((uint16_t)*object->out.type);
    4638           0 :         return py_type;
    4639             : }
    4640             : 
    4641           0 : static int py_wbint_LookupName_out_set_type(PyObject *py_obj, PyObject *value, void *closure)
    4642             : {
    4643           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(py_obj);
    4644           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.type));
    4645           0 :         if (value == NULL) {
    4646           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.type");
    4647           0 :                 return -1;
    4648             :         }
    4649           0 :         object->out.type = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.type);
    4650           0 :         if (object->out.type == NULL) {
    4651           0 :                 PyErr_NoMemory();
    4652           0 :                 return -1;
    4653             :         }
    4654             :         {
    4655           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.type));
    4656           0 :                 if (PyLong_Check(value)) {
    4657           0 :                         unsigned long long test_var;
    4658           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4659           0 :                         if (PyErr_Occurred() != NULL) {
    4660           0 :                                 return -1;
    4661             :                         }
    4662           0 :                         if (test_var > uint_max) {
    4663           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4664             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4665           0 :                                 return -1;
    4666             :                         }
    4667           0 :                         *object->out.type = test_var;
    4668             :                 } else {
    4669           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4670             :                           PyLong_Type.tp_name);
    4671           0 :                         return -1;
    4672             :                 }
    4673             :         }
    4674           0 :         return 0;
    4675             : }
    4676             : 
    4677           0 : static PyObject *py_wbint_LookupName_out_get_sid(PyObject *obj, void *closure)
    4678             : {
    4679           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(obj);
    4680           0 :         PyObject *py_sid;
    4681           0 :         if (object->out.sid == NULL) {
    4682           0 :                 Py_RETURN_NONE;
    4683             :         }
    4684           0 :         py_sid = pytalloc_reference_ex(dom_sid_Type, object->out.sid, object->out.sid);
    4685           0 :         return py_sid;
    4686             : }
    4687             : 
    4688           0 : static int py_wbint_LookupName_out_set_sid(PyObject *py_obj, PyObject *value, void *closure)
    4689             : {
    4690           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(py_obj);
    4691           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sid));
    4692           0 :         if (value == NULL) {
    4693           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.sid");
    4694           0 :                 return -1;
    4695             :         }
    4696           0 :         object->out.sid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sid);
    4697           0 :         if (object->out.sid == NULL) {
    4698           0 :                 PyErr_NoMemory();
    4699           0 :                 return -1;
    4700             :         }
    4701           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    4702           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4703           0 :                 PyErr_NoMemory();
    4704           0 :                 return -1;
    4705             :         }
    4706           0 :         object->out.sid = (struct dom_sid *)pytalloc_get_ptr(value);
    4707           0 :         return 0;
    4708             : }
    4709             : 
    4710           0 : static PyObject *py_wbint_LookupName_get_result(PyObject *obj, void *closure)
    4711             : {
    4712           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(obj);
    4713           0 :         PyObject *py_result;
    4714           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    4715           0 :         return py_result;
    4716             : }
    4717             : 
    4718           0 : static int py_wbint_LookupName_set_result(PyObject *py_obj, PyObject *value, void *closure)
    4719             : {
    4720           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(py_obj);
    4721           0 :         if (value == NULL) {
    4722           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    4723           0 :                 return -1;
    4724             :         }
    4725           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    4726           0 :         return 0;
    4727             : }
    4728             : 
    4729             : static PyGetSetDef py_wbint_LookupName_getsetters[] = {
    4730             :         {
    4731             :                 .name = discard_const_p(char, "in_domain"),
    4732             :                 .get = py_wbint_LookupName_in_get_domain,
    4733             :                 .set = py_wbint_LookupName_in_set_domain,
    4734             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    4735             :         },
    4736             :         {
    4737             :                 .name = discard_const_p(char, "in_name"),
    4738             :                 .get = py_wbint_LookupName_in_get_name,
    4739             :                 .set = py_wbint_LookupName_in_set_name,
    4740             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    4741             :         },
    4742             :         {
    4743             :                 .name = discard_const_p(char, "in_flags"),
    4744             :                 .get = py_wbint_LookupName_in_get_flags,
    4745             :                 .set = py_wbint_LookupName_in_set_flags,
    4746             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4747             :         },
    4748             :         {
    4749             :                 .name = discard_const_p(char, "out_type"),
    4750             :                 .get = py_wbint_LookupName_out_get_type,
    4751             :                 .set = py_wbint_LookupName_out_set_type,
    4752             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_SidType")
    4753             :         },
    4754             :         {
    4755             :                 .name = discard_const_p(char, "out_sid"),
    4756             :                 .get = py_wbint_LookupName_out_get_sid,
    4757             :                 .set = py_wbint_LookupName_out_set_sid,
    4758             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
    4759             :         },
    4760             :         {
    4761             :                 .name = discard_const_p(char, "result"),
    4762             :                 .get = py_wbint_LookupName_get_result,
    4763             :                 .set = py_wbint_LookupName_set_result,
    4764             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    4765             :         },
    4766             :         { .name = NULL }
    4767             : };
    4768             : 
    4769           0 : static PyObject *py_wbint_LookupName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4770             : {
    4771           0 :         PyObject *self = pytalloc_new(struct wbint_LookupName, type);
    4772           0 :         struct wbint_LookupName *_self = (struct wbint_LookupName *)pytalloc_get_ptr(self);
    4773           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    4774           0 :         _self->out.type = talloc_zero(mem_ctx, enum lsa_SidType);
    4775           0 :         _self->out.sid = talloc_zero(mem_ctx, struct dom_sid);
    4776           0 :         return self;
    4777             : }
    4778             : 
    4779           0 : static PyObject *py_wbint_LookupName_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    4780             : {
    4781             : 
    4782             : 
    4783           0 :         return PyLong_FromLong(3);
    4784             : }
    4785             : 
    4786           0 : static PyObject *py_wbint_LookupName_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
    4787             : {
    4788           0 :         const struct ndr_interface_call *call = NULL;
    4789           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(py_obj);
    4790           0 :         PyObject *ret = NULL;
    4791           0 :         struct ndr_push *push = NULL;
    4792           0 :         DATA_BLOB blob;
    4793           0 :         enum ndr_err_code err;
    4794             : 
    4795           0 :         if (ndr_table_winbind.num_calls < 4) {
    4796           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupName_ndr_pack");
    4797           0 :                 return NULL;
    4798             :         }
    4799           0 :         call = &ndr_table_winbind.calls[3];
    4800             : 
    4801           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    4802           0 :         if (push == NULL) {
    4803           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4804           0 :                 return NULL;
    4805             :         }
    4806             : 
    4807           0 :         push->flags |= ndr_push_flags;
    4808             : 
    4809           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    4810           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4811           0 :                 TALLOC_FREE(push);
    4812           0 :                 PyErr_SetNdrError(err);
    4813           0 :                 return NULL;
    4814             :         }
    4815           0 :         blob = ndr_push_blob(push);
    4816           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4817           0 :         TALLOC_FREE(push);
    4818           0 :         return ret;
    4819             : }
    4820             : 
    4821           0 : static PyObject *py_wbint_LookupName_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4822             : {
    4823           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    4824           0 :         PyObject *bigendian_obj = NULL;
    4825           0 :         PyObject *ndr64_obj = NULL;
    4826           0 :         libndr_flags ndr_push_flags = 0;
    4827             : 
    4828           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    4829             :                 discard_const_p(char *, kwnames),
    4830             :                 &bigendian_obj,
    4831             :                 &ndr64_obj)) {
    4832           0 :                 return NULL;
    4833             :         }
    4834             : 
    4835           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    4836           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    4837             :         }
    4838           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    4839           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    4840             :         }
    4841             : 
    4842           0 :         return py_wbint_LookupName_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    4843             : }
    4844             : 
    4845           0 : static PyObject *py_wbint_LookupName_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4846             : {
    4847           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    4848           0 :         PyObject *bigendian_obj = NULL;
    4849           0 :         PyObject *ndr64_obj = NULL;
    4850           0 :         libndr_flags ndr_push_flags = 0;
    4851             : 
    4852           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    4853             :                 discard_const_p(char *, kwnames),
    4854             :                 &bigendian_obj,
    4855             :                 &ndr64_obj)) {
    4856           0 :                 return NULL;
    4857             :         }
    4858             : 
    4859           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    4860           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    4861             :         }
    4862           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    4863           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    4864             :         }
    4865             : 
    4866           0 :         return py_wbint_LookupName_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    4867             : }
    4868             : 
    4869           0 : static PyObject *py_wbint_LookupName_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
    4870             : {
    4871           0 :         const struct ndr_interface_call *call = NULL;
    4872           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(py_obj);
    4873           0 :         struct ndr_pull *pull = NULL;
    4874           0 :         enum ndr_err_code err;
    4875             : 
    4876           0 :         if (ndr_table_winbind.num_calls < 4) {
    4877           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupName_ndr_unpack");
    4878           0 :                 return NULL;
    4879             :         }
    4880           0 :         call = &ndr_table_winbind.calls[3];
    4881             : 
    4882           0 :         pull = ndr_pull_init_blob(blob, object);
    4883           0 :         if (pull == NULL) {
    4884           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4885           0 :                 return NULL;
    4886             :         }
    4887             : 
    4888           0 :         pull->flags |= ndr_pull_flags;
    4889             : 
    4890           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    4891           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4892           0 :                 TALLOC_FREE(pull);
    4893           0 :                 PyErr_SetNdrError(err);
    4894           0 :                 return NULL;
    4895             :         }
    4896           0 :         if (!allow_remaining) {
    4897           0 :                 uint32_t highest_ofs;
    4898             : 
    4899           0 :                 if (pull->offset > pull->relative_highest_offset) {
    4900           0 :                         highest_ofs = pull->offset;
    4901             :                 } else {
    4902           0 :                         highest_ofs = pull->relative_highest_offset;
    4903             :                 }
    4904           0 :                 if (highest_ofs < pull->data_size) {
    4905           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    4906             :                                 "not all bytes consumed ofs[%u] size[%u]",
    4907             :                                 highest_ofs, pull->data_size);
    4908           0 :                         TALLOC_FREE(pull);
    4909           0 :                         PyErr_SetNdrError(err);
    4910           0 :                         return NULL;
    4911             :                 }
    4912             :         }
    4913             : 
    4914           0 :         TALLOC_FREE(pull);
    4915           0 :         Py_RETURN_NONE;
    4916             : }
    4917             : 
    4918           0 : static PyObject *py_wbint_LookupName_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4919             : {
    4920           0 :         DATA_BLOB blob;
    4921           0 :         Py_ssize_t blob_length = 0;
    4922           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    4923           0 :         PyObject *bigendian_obj = NULL;
    4924           0 :         PyObject *ndr64_obj = NULL;
    4925           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    4926           0 :         PyObject *allow_remaining_obj = NULL;
    4927           0 :         bool allow_remaining = false;
    4928             : 
    4929           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    4930             :                 discard_const_p(char *, kwnames),
    4931             :                 &blob.data, &blob_length,
    4932             :                 &bigendian_obj,
    4933             :                 &ndr64_obj,
    4934             :                 &allow_remaining_obj)) {
    4935           0 :                 return NULL;
    4936             :         }
    4937           0 :         blob.length = blob_length;
    4938             : 
    4939           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    4940           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    4941             :         }
    4942           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    4943           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    4944             :         }
    4945             : 
    4946           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4947           0 :                 allow_remaining = true;
    4948             :         }
    4949             : 
    4950           0 :         return py_wbint_LookupName_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    4951             : }
    4952             : 
    4953           0 : static PyObject *py_wbint_LookupName_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4954             : {
    4955           0 :         DATA_BLOB blob;
    4956           0 :         Py_ssize_t blob_length = 0;
    4957           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    4958           0 :         PyObject *bigendian_obj = NULL;
    4959           0 :         PyObject *ndr64_obj = NULL;
    4960           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    4961           0 :         PyObject *allow_remaining_obj = NULL;
    4962           0 :         bool allow_remaining = false;
    4963             : 
    4964           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    4965             :                 discard_const_p(char *, kwnames),
    4966             :                 &blob.data, &blob_length,
    4967             :                 &bigendian_obj,
    4968             :                 &ndr64_obj,
    4969             :                 &allow_remaining_obj)) {
    4970           0 :                 return NULL;
    4971             :         }
    4972           0 :         blob.length = blob_length;
    4973             : 
    4974           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    4975           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    4976             :         }
    4977           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    4978           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    4979             :         }
    4980             : 
    4981           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4982           0 :                 allow_remaining = true;
    4983             :         }
    4984             : 
    4985           0 :         return py_wbint_LookupName_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    4986             : }
    4987             : 
    4988           0 : static PyObject *py_wbint_LookupName_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
    4989             : {
    4990           0 :         const struct ndr_interface_call *call = NULL;
    4991           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(py_obj);
    4992           0 :         PyObject *ret;
    4993           0 :         char *retstr;
    4994             : 
    4995           0 :         if (ndr_table_winbind.num_calls < 4) {
    4996           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupName_ndr_print");
    4997           0 :                 return NULL;
    4998             :         }
    4999           0 :         call = &ndr_table_winbind.calls[3];
    5000             : 
    5001           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    5002           0 :         ret = PyUnicode_FromString(retstr);
    5003           0 :         TALLOC_FREE(retstr);
    5004             : 
    5005           0 :         return ret;
    5006             : }
    5007             : 
    5008           0 : static PyObject *py_wbint_LookupName_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5009             : {
    5010           0 :         return py_wbint_LookupName_ndr_print(py_obj, "wbint_LookupName_in", NDR_IN);
    5011             : }
    5012             : 
    5013           0 : static PyObject *py_wbint_LookupName_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5014             : {
    5015           0 :         return py_wbint_LookupName_ndr_print(py_obj, "wbint_LookupName_out", NDR_OUT);
    5016             : }
    5017             : 
    5018             : static PyMethodDef py_wbint_LookupName_methods[] = {
    5019             :         { "opnum", (PyCFunction)py_wbint_LookupName_ndr_opnum, METH_NOARGS|METH_CLASS,
    5020             :                 "winbind.wbint_LookupName.opnum() -> 3 (0x03) " },
    5021             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupName_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    5022             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    5023             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupName_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    5024             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    5025             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupName_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    5026             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    5027             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupName_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    5028             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    5029             :         { "__ndr_print_in__", (PyCFunction)py_wbint_LookupName_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    5030             :         { "__ndr_print_out__", (PyCFunction)py_wbint_LookupName_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    5031             :         { NULL, NULL, 0, NULL }
    5032             : };
    5033             : 
    5034             : 
    5035             : static PyTypeObject wbint_LookupName_Type = {
    5036             :         PyVarObject_HEAD_INIT(NULL, 0)
    5037             :         .tp_name = "winbind.wbint_LookupName",
    5038             :         .tp_getset = py_wbint_LookupName_getsetters,
    5039             :         .tp_methods = py_wbint_LookupName_methods,
    5040             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5041             :         .tp_new = py_wbint_LookupName_new,
    5042             : };
    5043             : 
    5044           0 : static bool pack_py_wbint_LookupName_args_in(PyObject *args, PyObject *kwargs, struct wbint_LookupName *r)
    5045             : {
    5046           0 :         PyObject *py_domain;
    5047           0 :         PyObject *py_name;
    5048           0 :         PyObject *py_flags;
    5049           0 :         const char *kwnames[] = {
    5050             :                 "domain", "name", "flags", NULL
    5051             :         };
    5052             : 
    5053           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:wbint_LookupName", discard_const_p(char *, kwnames), &py_domain, &py_name, &py_flags)) {
    5054           0 :                 return false;
    5055             :         }
    5056             : 
    5057           0 :         if (py_domain == NULL) {
    5058           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain");
    5059           0 :                 return false;
    5060             :         }
    5061           0 :         r->in.domain = talloc_ptrtype(r, r->in.domain);
    5062           0 :         if (r->in.domain == NULL) {
    5063           0 :                 PyErr_NoMemory();
    5064           0 :                 return false;
    5065             :         }
    5066             :         {
    5067           0 :                 const char *test_str;
    5068           0 :                 const char *talloc_str;
    5069           0 :                 PyObject *unicode = NULL;
    5070           0 :                 if (PyUnicode_Check(py_domain)) {
    5071           0 :                         unicode = PyUnicode_AsEncodedString(py_domain, "utf-8", "ignore");
    5072           0 :                         if (unicode == NULL) {
    5073           0 :                                 PyErr_NoMemory();
    5074           0 :                                 return false;
    5075             :                         }
    5076           0 :                         test_str = PyBytes_AS_STRING(unicode);
    5077           0 :                 } else if (PyBytes_Check(py_domain)) {
    5078           0 :                         test_str = PyBytes_AS_STRING(py_domain);
    5079             :                 } else {
    5080           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain)->tp_name);
    5081           0 :                         return false;
    5082             :                 }
    5083           0 :                 talloc_str = talloc_strdup(r, test_str);
    5084           0 :                 if (unicode != NULL) {
    5085           0 :                         Py_DECREF(unicode);
    5086             :                 }
    5087           0 :                 if (talloc_str == NULL) {
    5088           0 :                         PyErr_NoMemory();
    5089           0 :                         return false;
    5090             :                 }
    5091           0 :                 r->in.domain = talloc_str;
    5092             :         }
    5093           0 :         if (py_name == NULL) {
    5094           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.name");
    5095           0 :                 return false;
    5096             :         }
    5097           0 :         r->in.name = talloc_ptrtype(r, r->in.name);
    5098           0 :         if (r->in.name == NULL) {
    5099           0 :                 PyErr_NoMemory();
    5100           0 :                 return false;
    5101             :         }
    5102             :         {
    5103           0 :                 const char *test_str;
    5104           0 :                 const char *talloc_str;
    5105           0 :                 PyObject *unicode = NULL;
    5106           0 :                 if (PyUnicode_Check(py_name)) {
    5107           0 :                         unicode = PyUnicode_AsEncodedString(py_name, "utf-8", "ignore");
    5108           0 :                         if (unicode == NULL) {
    5109           0 :                                 PyErr_NoMemory();
    5110           0 :                                 return false;
    5111             :                         }
    5112           0 :                         test_str = PyBytes_AS_STRING(unicode);
    5113           0 :                 } else if (PyBytes_Check(py_name)) {
    5114           0 :                         test_str = PyBytes_AS_STRING(py_name);
    5115             :                 } else {
    5116           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_name)->tp_name);
    5117           0 :                         return false;
    5118             :                 }
    5119           0 :                 talloc_str = talloc_strdup(r, test_str);
    5120           0 :                 if (unicode != NULL) {
    5121           0 :                         Py_DECREF(unicode);
    5122             :                 }
    5123           0 :                 if (talloc_str == NULL) {
    5124           0 :                         PyErr_NoMemory();
    5125           0 :                         return false;
    5126             :                 }
    5127           0 :                 r->in.name = talloc_str;
    5128             :         }
    5129           0 :         if (py_flags == NULL) {
    5130           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
    5131           0 :                 return false;
    5132             :         }
    5133             :         {
    5134           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
    5135           0 :                 if (PyLong_Check(py_flags)) {
    5136           0 :                         unsigned long long test_var;
    5137           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
    5138           0 :                         if (PyErr_Occurred() != NULL) {
    5139           0 :                                 return false;
    5140             :                         }
    5141           0 :                         if (test_var > uint_max) {
    5142           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5143             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5144           0 :                                 return false;
    5145             :                         }
    5146           0 :                         r->in.flags = test_var;
    5147             :                 } else {
    5148           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5149             :                           PyLong_Type.tp_name);
    5150           0 :                         return false;
    5151             :                 }
    5152             :         }
    5153           0 :         return true;
    5154             : }
    5155             : 
    5156           0 : static PyObject *unpack_py_wbint_LookupName_args_out(struct wbint_LookupName *r)
    5157             : {
    5158           0 :         PyObject *result;
    5159           0 :         PyObject *py_type;
    5160           0 :         PyObject *py_sid;
    5161           0 :         result = PyTuple_New(2);
    5162           0 :         py_type = PyLong_FromLong((uint16_t)*r->out.type);
    5163           0 :         PyTuple_SetItem(result, 0, py_type);
    5164           0 :         py_sid = pytalloc_reference_ex(dom_sid_Type, r->out.sid, r->out.sid);
    5165           0 :         PyTuple_SetItem(result, 1, py_sid);
    5166           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    5167           0 :                 PyErr_SetNTSTATUS(r->out.result);
    5168           0 :                 return NULL;
    5169             :         }
    5170             : 
    5171           0 :         return result;
    5172             : }
    5173             : 
    5174             : 
    5175           0 : static PyObject *py_wbint_Sids2UnixIDs_in_get_domains(PyObject *obj, void *closure)
    5176             : {
    5177           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(obj);
    5178           0 :         PyObject *py_domains;
    5179           0 :         if (object->in.domains == NULL) {
    5180           0 :                 Py_RETURN_NONE;
    5181             :         }
    5182           0 :         py_domains = pytalloc_reference_ex(lsa_RefDomainList_Type, object->in.domains, object->in.domains);
    5183           0 :         return py_domains;
    5184             : }
    5185             : 
    5186           0 : static int py_wbint_Sids2UnixIDs_in_set_domains(PyObject *py_obj, PyObject *value, void *closure)
    5187             : {
    5188           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(py_obj);
    5189           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domains));
    5190           0 :         if (value == NULL) {
    5191           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domains");
    5192           0 :                 return -1;
    5193             :         }
    5194           0 :         object->in.domains = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.domains);
    5195           0 :         if (object->in.domains == NULL) {
    5196           0 :                 PyErr_NoMemory();
    5197           0 :                 return -1;
    5198             :         }
    5199           0 :         PY_CHECK_TYPE(lsa_RefDomainList_Type, value, return -1;);
    5200           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5201           0 :                 PyErr_NoMemory();
    5202           0 :                 return -1;
    5203             :         }
    5204           0 :         object->in.domains = (struct lsa_RefDomainList *)pytalloc_get_ptr(value);
    5205           0 :         return 0;
    5206             : }
    5207             : 
    5208           0 : static PyObject *py_wbint_Sids2UnixIDs_in_get_ids(PyObject *obj, void *closure)
    5209             : {
    5210           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(obj);
    5211           0 :         PyObject *py_ids;
    5212           0 :         if (object->in.ids == NULL) {
    5213           0 :                 Py_RETURN_NONE;
    5214             :         }
    5215           0 :         py_ids = pytalloc_reference_ex(&wbint_TransIDArray_Type, object->in.ids, object->in.ids);
    5216           0 :         return py_ids;
    5217             : }
    5218             : 
    5219           0 : static int py_wbint_Sids2UnixIDs_in_set_ids(PyObject *py_obj, PyObject *value, void *closure)
    5220             : {
    5221           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(py_obj);
    5222           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.ids));
    5223           0 :         if (value == NULL) {
    5224           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.ids");
    5225           0 :                 return -1;
    5226             :         }
    5227           0 :         object->in.ids = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.ids);
    5228           0 :         if (object->in.ids == NULL) {
    5229           0 :                 PyErr_NoMemory();
    5230           0 :                 return -1;
    5231             :         }
    5232           0 :         PY_CHECK_TYPE(&wbint_TransIDArray_Type, value, return -1;);
    5233           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5234           0 :                 PyErr_NoMemory();
    5235           0 :                 return -1;
    5236             :         }
    5237           0 :         object->in.ids = (struct wbint_TransIDArray *)pytalloc_get_ptr(value);
    5238           0 :         return 0;
    5239             : }
    5240             : 
    5241           0 : static PyObject *py_wbint_Sids2UnixIDs_out_get_ids(PyObject *obj, void *closure)
    5242             : {
    5243           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(obj);
    5244           0 :         PyObject *py_ids;
    5245           0 :         if (object->out.ids == NULL) {
    5246           0 :                 Py_RETURN_NONE;
    5247             :         }
    5248           0 :         py_ids = pytalloc_reference_ex(&wbint_TransIDArray_Type, object->out.ids, object->out.ids);
    5249           0 :         return py_ids;
    5250             : }
    5251             : 
    5252           0 : static int py_wbint_Sids2UnixIDs_out_set_ids(PyObject *py_obj, PyObject *value, void *closure)
    5253             : {
    5254           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(py_obj);
    5255           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ids));
    5256           0 :         if (value == NULL) {
    5257           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ids");
    5258           0 :                 return -1;
    5259             :         }
    5260           0 :         object->out.ids = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ids);
    5261           0 :         if (object->out.ids == NULL) {
    5262           0 :                 PyErr_NoMemory();
    5263           0 :                 return -1;
    5264             :         }
    5265           0 :         PY_CHECK_TYPE(&wbint_TransIDArray_Type, value, return -1;);
    5266           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5267           0 :                 PyErr_NoMemory();
    5268           0 :                 return -1;
    5269             :         }
    5270           0 :         object->out.ids = (struct wbint_TransIDArray *)pytalloc_get_ptr(value);
    5271           0 :         return 0;
    5272             : }
    5273             : 
    5274           0 : static PyObject *py_wbint_Sids2UnixIDs_get_result(PyObject *obj, void *closure)
    5275             : {
    5276           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(obj);
    5277           0 :         PyObject *py_result;
    5278           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    5279           0 :         return py_result;
    5280             : }
    5281             : 
    5282           0 : static int py_wbint_Sids2UnixIDs_set_result(PyObject *py_obj, PyObject *value, void *closure)
    5283             : {
    5284           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(py_obj);
    5285           0 :         if (value == NULL) {
    5286           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    5287           0 :                 return -1;
    5288             :         }
    5289           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    5290           0 :         return 0;
    5291             : }
    5292             : 
    5293             : static PyGetSetDef py_wbint_Sids2UnixIDs_getsetters[] = {
    5294             :         {
    5295             :                 .name = discard_const_p(char, "in_domains"),
    5296             :                 .get = py_wbint_Sids2UnixIDs_in_get_domains,
    5297             :                 .set = py_wbint_Sids2UnixIDs_in_set_domains,
    5298             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_RefDomainList")
    5299             :         },
    5300             :         {
    5301             :                 .name = discard_const_p(char, "in_ids"),
    5302             :                 .get = py_wbint_Sids2UnixIDs_in_get_ids,
    5303             :                 .set = py_wbint_Sids2UnixIDs_in_set_ids,
    5304             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_TransIDArray")
    5305             :         },
    5306             :         {
    5307             :                 .name = discard_const_p(char, "out_ids"),
    5308             :                 .get = py_wbint_Sids2UnixIDs_out_get_ids,
    5309             :                 .set = py_wbint_Sids2UnixIDs_out_set_ids,
    5310             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_TransIDArray")
    5311             :         },
    5312             :         {
    5313             :                 .name = discard_const_p(char, "result"),
    5314             :                 .get = py_wbint_Sids2UnixIDs_get_result,
    5315             :                 .set = py_wbint_Sids2UnixIDs_set_result,
    5316             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    5317             :         },
    5318             :         { .name = NULL }
    5319             : };
    5320             : 
    5321           0 : static PyObject *py_wbint_Sids2UnixIDs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5322             : {
    5323           0 :         PyObject *self = pytalloc_new(struct wbint_Sids2UnixIDs, type);
    5324           0 :         struct wbint_Sids2UnixIDs *_self = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(self);
    5325           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    5326           0 :         _self->in.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList);
    5327           0 :         _self->in.ids = talloc_zero(mem_ctx, struct wbint_TransIDArray);
    5328           0 :         _self->out.ids = talloc_zero(mem_ctx, struct wbint_TransIDArray);
    5329           0 :         return self;
    5330             : }
    5331             : 
    5332           0 : static PyObject *py_wbint_Sids2UnixIDs_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    5333             : {
    5334             : 
    5335             : 
    5336           0 :         return PyLong_FromLong(4);
    5337             : }
    5338             : 
    5339           0 : static PyObject *py_wbint_Sids2UnixIDs_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
    5340             : {
    5341           0 :         const struct ndr_interface_call *call = NULL;
    5342           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(py_obj);
    5343           0 :         PyObject *ret = NULL;
    5344           0 :         struct ndr_push *push = NULL;
    5345           0 :         DATA_BLOB blob;
    5346           0 :         enum ndr_err_code err;
    5347             : 
    5348           0 :         if (ndr_table_winbind.num_calls < 5) {
    5349           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_Sids2UnixIDs_ndr_pack");
    5350           0 :                 return NULL;
    5351             :         }
    5352           0 :         call = &ndr_table_winbind.calls[4];
    5353             : 
    5354           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    5355           0 :         if (push == NULL) {
    5356           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    5357           0 :                 return NULL;
    5358             :         }
    5359             : 
    5360           0 :         push->flags |= ndr_push_flags;
    5361             : 
    5362           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    5363           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5364           0 :                 TALLOC_FREE(push);
    5365           0 :                 PyErr_SetNdrError(err);
    5366           0 :                 return NULL;
    5367             :         }
    5368           0 :         blob = ndr_push_blob(push);
    5369           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    5370           0 :         TALLOC_FREE(push);
    5371           0 :         return ret;
    5372             : }
    5373             : 
    5374           0 : static PyObject *py_wbint_Sids2UnixIDs_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5375             : {
    5376           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    5377           0 :         PyObject *bigendian_obj = NULL;
    5378           0 :         PyObject *ndr64_obj = NULL;
    5379           0 :         libndr_flags ndr_push_flags = 0;
    5380             : 
    5381           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    5382             :                 discard_const_p(char *, kwnames),
    5383             :                 &bigendian_obj,
    5384             :                 &ndr64_obj)) {
    5385           0 :                 return NULL;
    5386             :         }
    5387             : 
    5388           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    5389           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    5390             :         }
    5391           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    5392           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    5393             :         }
    5394             : 
    5395           0 :         return py_wbint_Sids2UnixIDs_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    5396             : }
    5397             : 
    5398           0 : static PyObject *py_wbint_Sids2UnixIDs_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5399             : {
    5400           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    5401           0 :         PyObject *bigendian_obj = NULL;
    5402           0 :         PyObject *ndr64_obj = NULL;
    5403           0 :         libndr_flags ndr_push_flags = 0;
    5404             : 
    5405           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    5406             :                 discard_const_p(char *, kwnames),
    5407             :                 &bigendian_obj,
    5408             :                 &ndr64_obj)) {
    5409           0 :                 return NULL;
    5410             :         }
    5411             : 
    5412           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    5413           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    5414             :         }
    5415           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    5416           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    5417             :         }
    5418             : 
    5419           0 :         return py_wbint_Sids2UnixIDs_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    5420             : }
    5421             : 
    5422           0 : static PyObject *py_wbint_Sids2UnixIDs_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
    5423             : {
    5424           0 :         const struct ndr_interface_call *call = NULL;
    5425           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(py_obj);
    5426           0 :         struct ndr_pull *pull = NULL;
    5427           0 :         enum ndr_err_code err;
    5428             : 
    5429           0 :         if (ndr_table_winbind.num_calls < 5) {
    5430           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_Sids2UnixIDs_ndr_unpack");
    5431           0 :                 return NULL;
    5432             :         }
    5433           0 :         call = &ndr_table_winbind.calls[4];
    5434             : 
    5435           0 :         pull = ndr_pull_init_blob(blob, object);
    5436           0 :         if (pull == NULL) {
    5437           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    5438           0 :                 return NULL;
    5439             :         }
    5440             : 
    5441           0 :         pull->flags |= ndr_pull_flags;
    5442             : 
    5443           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    5444           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5445           0 :                 TALLOC_FREE(pull);
    5446           0 :                 PyErr_SetNdrError(err);
    5447           0 :                 return NULL;
    5448             :         }
    5449           0 :         if (!allow_remaining) {
    5450           0 :                 uint32_t highest_ofs;
    5451             : 
    5452           0 :                 if (pull->offset > pull->relative_highest_offset) {
    5453           0 :                         highest_ofs = pull->offset;
    5454             :                 } else {
    5455           0 :                         highest_ofs = pull->relative_highest_offset;
    5456             :                 }
    5457           0 :                 if (highest_ofs < pull->data_size) {
    5458           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    5459             :                                 "not all bytes consumed ofs[%u] size[%u]",
    5460             :                                 highest_ofs, pull->data_size);
    5461           0 :                         TALLOC_FREE(pull);
    5462           0 :                         PyErr_SetNdrError(err);
    5463           0 :                         return NULL;
    5464             :                 }
    5465             :         }
    5466             : 
    5467           0 :         TALLOC_FREE(pull);
    5468           0 :         Py_RETURN_NONE;
    5469             : }
    5470             : 
    5471           0 : static PyObject *py_wbint_Sids2UnixIDs_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5472             : {
    5473           0 :         DATA_BLOB blob;
    5474           0 :         Py_ssize_t blob_length = 0;
    5475           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    5476           0 :         PyObject *bigendian_obj = NULL;
    5477           0 :         PyObject *ndr64_obj = NULL;
    5478           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    5479           0 :         PyObject *allow_remaining_obj = NULL;
    5480           0 :         bool allow_remaining = false;
    5481             : 
    5482           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    5483             :                 discard_const_p(char *, kwnames),
    5484             :                 &blob.data, &blob_length,
    5485             :                 &bigendian_obj,
    5486             :                 &ndr64_obj,
    5487             :                 &allow_remaining_obj)) {
    5488           0 :                 return NULL;
    5489             :         }
    5490           0 :         blob.length = blob_length;
    5491             : 
    5492           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    5493           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    5494             :         }
    5495           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    5496           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    5497             :         }
    5498             : 
    5499           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    5500           0 :                 allow_remaining = true;
    5501             :         }
    5502             : 
    5503           0 :         return py_wbint_Sids2UnixIDs_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    5504             : }
    5505             : 
    5506           0 : static PyObject *py_wbint_Sids2UnixIDs_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5507             : {
    5508           0 :         DATA_BLOB blob;
    5509           0 :         Py_ssize_t blob_length = 0;
    5510           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    5511           0 :         PyObject *bigendian_obj = NULL;
    5512           0 :         PyObject *ndr64_obj = NULL;
    5513           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    5514           0 :         PyObject *allow_remaining_obj = NULL;
    5515           0 :         bool allow_remaining = false;
    5516             : 
    5517           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    5518             :                 discard_const_p(char *, kwnames),
    5519             :                 &blob.data, &blob_length,
    5520             :                 &bigendian_obj,
    5521             :                 &ndr64_obj,
    5522             :                 &allow_remaining_obj)) {
    5523           0 :                 return NULL;
    5524             :         }
    5525           0 :         blob.length = blob_length;
    5526             : 
    5527           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    5528           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    5529             :         }
    5530           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    5531           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    5532             :         }
    5533             : 
    5534           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    5535           0 :                 allow_remaining = true;
    5536             :         }
    5537             : 
    5538           0 :         return py_wbint_Sids2UnixIDs_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    5539             : }
    5540             : 
    5541           0 : static PyObject *py_wbint_Sids2UnixIDs_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
    5542             : {
    5543           0 :         const struct ndr_interface_call *call = NULL;
    5544           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(py_obj);
    5545           0 :         PyObject *ret;
    5546           0 :         char *retstr;
    5547             : 
    5548           0 :         if (ndr_table_winbind.num_calls < 5) {
    5549           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_Sids2UnixIDs_ndr_print");
    5550           0 :                 return NULL;
    5551             :         }
    5552           0 :         call = &ndr_table_winbind.calls[4];
    5553             : 
    5554           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    5555           0 :         ret = PyUnicode_FromString(retstr);
    5556           0 :         TALLOC_FREE(retstr);
    5557             : 
    5558           0 :         return ret;
    5559             : }
    5560             : 
    5561           0 : static PyObject *py_wbint_Sids2UnixIDs_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5562             : {
    5563           0 :         return py_wbint_Sids2UnixIDs_ndr_print(py_obj, "wbint_Sids2UnixIDs_in", NDR_IN);
    5564             : }
    5565             : 
    5566           0 : static PyObject *py_wbint_Sids2UnixIDs_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5567             : {
    5568           0 :         return py_wbint_Sids2UnixIDs_ndr_print(py_obj, "wbint_Sids2UnixIDs_out", NDR_OUT);
    5569             : }
    5570             : 
    5571             : static PyMethodDef py_wbint_Sids2UnixIDs_methods[] = {
    5572             :         { "opnum", (PyCFunction)py_wbint_Sids2UnixIDs_ndr_opnum, METH_NOARGS|METH_CLASS,
    5573             :                 "winbind.wbint_Sids2UnixIDs.opnum() -> 4 (0x04) " },
    5574             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_Sids2UnixIDs_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    5575             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    5576             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_Sids2UnixIDs_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    5577             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    5578             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_Sids2UnixIDs_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    5579             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    5580             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_Sids2UnixIDs_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    5581             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    5582             :         { "__ndr_print_in__", (PyCFunction)py_wbint_Sids2UnixIDs_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    5583             :         { "__ndr_print_out__", (PyCFunction)py_wbint_Sids2UnixIDs_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    5584             :         { NULL, NULL, 0, NULL }
    5585             : };
    5586             : 
    5587             : 
    5588             : static PyTypeObject wbint_Sids2UnixIDs_Type = {
    5589             :         PyVarObject_HEAD_INIT(NULL, 0)
    5590             :         .tp_name = "winbind.wbint_Sids2UnixIDs",
    5591             :         .tp_getset = py_wbint_Sids2UnixIDs_getsetters,
    5592             :         .tp_methods = py_wbint_Sids2UnixIDs_methods,
    5593             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5594             :         .tp_new = py_wbint_Sids2UnixIDs_new,
    5595             : };
    5596             : 
    5597           0 : static bool pack_py_wbint_Sids2UnixIDs_args_in(PyObject *args, PyObject *kwargs, struct wbint_Sids2UnixIDs *r)
    5598             : {
    5599           0 :         PyObject *py_domains;
    5600           0 :         PyObject *py_ids;
    5601           0 :         const char *kwnames[] = {
    5602             :                 "domains", "ids", NULL
    5603             :         };
    5604             : 
    5605           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:wbint_Sids2UnixIDs", discard_const_p(char *, kwnames), &py_domains, &py_ids)) {
    5606           0 :                 return false;
    5607             :         }
    5608             : 
    5609           0 :         if (py_domains == NULL) {
    5610           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domains");
    5611           0 :                 return false;
    5612             :         }
    5613           0 :         r->in.domains = talloc_ptrtype(r, r->in.domains);
    5614           0 :         if (r->in.domains == NULL) {
    5615           0 :                 PyErr_NoMemory();
    5616           0 :                 return false;
    5617             :         }
    5618           0 :         PY_CHECK_TYPE(lsa_RefDomainList_Type, py_domains, return false;);
    5619           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_domains)) == NULL) {
    5620           0 :                 PyErr_NoMemory();
    5621           0 :                 return false;
    5622             :         }
    5623           0 :         r->in.domains = (struct lsa_RefDomainList *)pytalloc_get_ptr(py_domains);
    5624           0 :         if (py_ids == NULL) {
    5625           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.ids");
    5626           0 :                 return false;
    5627             :         }
    5628           0 :         r->in.ids = talloc_ptrtype(r, r->in.ids);
    5629           0 :         if (r->in.ids == NULL) {
    5630           0 :                 PyErr_NoMemory();
    5631           0 :                 return false;
    5632             :         }
    5633           0 :         PY_CHECK_TYPE(&wbint_TransIDArray_Type, py_ids, return false;);
    5634           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_ids)) == NULL) {
    5635           0 :                 PyErr_NoMemory();
    5636           0 :                 return false;
    5637             :         }
    5638           0 :         r->in.ids = (struct wbint_TransIDArray *)pytalloc_get_ptr(py_ids);
    5639           0 :         return true;
    5640             : }
    5641             : 
    5642           0 : static PyObject *unpack_py_wbint_Sids2UnixIDs_args_out(struct wbint_Sids2UnixIDs *r)
    5643             : {
    5644           0 :         PyObject *result;
    5645           0 :         PyObject *py_ids;
    5646           0 :         py_ids = pytalloc_reference_ex(&wbint_TransIDArray_Type, r->out.ids, r->out.ids);
    5647           0 :         result = py_ids;
    5648           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    5649           0 :                 PyErr_SetNTSTATUS(r->out.result);
    5650           0 :                 return NULL;
    5651             :         }
    5652             : 
    5653           0 :         return result;
    5654             : }
    5655             : 
    5656             : 
    5657           0 : static PyObject *py_wbint_UnixIDs2Sids_in_get_domain_name(PyObject *obj, void *closure)
    5658             : {
    5659           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(obj);
    5660           0 :         PyObject *py_domain_name;
    5661           0 :         if (object->in.domain_name == NULL) {
    5662           0 :                 Py_RETURN_NONE;
    5663             :         }
    5664           0 :         if (object->in.domain_name == NULL) {
    5665           0 :                 py_domain_name = Py_None;
    5666           0 :                 Py_INCREF(py_domain_name);
    5667             :         } else {
    5668           0 :                 py_domain_name = PyUnicode_Decode(object->in.domain_name, strlen(object->in.domain_name), "utf-8", "ignore");
    5669             :         }
    5670           0 :         return py_domain_name;
    5671             : }
    5672             : 
    5673           0 : static int py_wbint_UnixIDs2Sids_in_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
    5674             : {
    5675           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(py_obj);
    5676           0 :         if (value == NULL) {
    5677           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_name");
    5678           0 :                 return -1;
    5679             :         }
    5680           0 :         object->in.domain_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.domain_name);
    5681           0 :         if (object->in.domain_name == NULL) {
    5682           0 :                 PyErr_NoMemory();
    5683           0 :                 return -1;
    5684             :         }
    5685             :         {
    5686           0 :                 const char *test_str;
    5687           0 :                 const char *talloc_str;
    5688           0 :                 PyObject *unicode = NULL;
    5689           0 :                 if (PyUnicode_Check(value)) {
    5690           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    5691           0 :                         if (unicode == NULL) {
    5692           0 :                                 PyErr_NoMemory();
    5693           0 :                                 return -1;
    5694             :                         }
    5695           0 :                         test_str = PyBytes_AS_STRING(unicode);
    5696           0 :                 } else if (PyBytes_Check(value)) {
    5697           0 :                         test_str = PyBytes_AS_STRING(value);
    5698             :                 } else {
    5699           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    5700           0 :                         return -1;
    5701             :                 }
    5702           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    5703           0 :                 if (unicode != NULL) {
    5704           0 :                         Py_DECREF(unicode);
    5705             :                 }
    5706           0 :                 if (talloc_str == NULL) {
    5707           0 :                         PyErr_NoMemory();
    5708           0 :                         return -1;
    5709             :                 }
    5710           0 :                 object->in.domain_name = talloc_str;
    5711             :         }
    5712           0 :         return 0;
    5713             : }
    5714             : 
    5715           0 : static PyObject *py_wbint_UnixIDs2Sids_in_get_domain_sid(PyObject *obj, void *closure)
    5716             : {
    5717           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(obj);
    5718           0 :         PyObject *py_domain_sid;
    5719           0 :         py_domain_sid = pytalloc_reference_ex(dom_sid_Type, pytalloc_get_mem_ctx(obj), &object->in.domain_sid);
    5720           0 :         return py_domain_sid;
    5721             : }
    5722             : 
    5723           0 : static int py_wbint_UnixIDs2Sids_in_set_domain_sid(PyObject *py_obj, PyObject *value, void *closure)
    5724             : {
    5725           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(py_obj);
    5726           0 :         if (value == NULL) {
    5727           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_sid");
    5728           0 :                 return -1;
    5729             :         }
    5730           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    5731           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5732           0 :                 PyErr_NoMemory();
    5733           0 :                 return -1;
    5734             :         }
    5735           0 :         object->in.domain_sid = *(struct dom_sid *)pytalloc_get_ptr(value);
    5736           0 :         return 0;
    5737             : }
    5738             : 
    5739           0 : static PyObject *py_wbint_UnixIDs2Sids_in_get_num_ids(PyObject *obj, void *closure)
    5740             : {
    5741           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(obj);
    5742           0 :         PyObject *py_num_ids;
    5743           0 :         py_num_ids = PyLong_FromUnsignedLongLong((uint32_t)object->in.num_ids);
    5744           0 :         return py_num_ids;
    5745             : }
    5746             : 
    5747           0 : static int py_wbint_UnixIDs2Sids_in_set_num_ids(PyObject *py_obj, PyObject *value, void *closure)
    5748             : {
    5749           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(py_obj);
    5750           0 :         if (value == NULL) {
    5751           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.num_ids");
    5752           0 :                 return -1;
    5753             :         }
    5754             :         {
    5755           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.num_ids));
    5756           0 :                 if (PyLong_Check(value)) {
    5757           0 :                         unsigned long long test_var;
    5758           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5759           0 :                         if (PyErr_Occurred() != NULL) {
    5760           0 :                                 return -1;
    5761             :                         }
    5762           0 :                         if (test_var > uint_max) {
    5763           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5764             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5765           0 :                                 return -1;
    5766             :                         }
    5767           0 :                         object->in.num_ids = test_var;
    5768             :                 } else {
    5769           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5770             :                           PyLong_Type.tp_name);
    5771           0 :                         return -1;
    5772             :                 }
    5773             :         }
    5774           0 :         return 0;
    5775             : }
    5776             : 
    5777           0 : static PyObject *py_wbint_UnixIDs2Sids_in_get_xids(PyObject *obj, void *closure)
    5778             : {
    5779           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(obj);
    5780           0 :         PyObject *py_xids;
    5781           0 :         py_xids = PyList_New(object->in.num_ids);
    5782           0 :         if (py_xids == NULL) {
    5783           0 :                 return NULL;
    5784             :         }
    5785             :         {
    5786             :                 int xids_cntr_0;
    5787           0 :                 for (xids_cntr_0 = 0; xids_cntr_0 < (object->in.num_ids); xids_cntr_0++) {
    5788           0 :                         PyObject *py_xids_0;
    5789           0 :                         py_xids_0 = pytalloc_reference_ex(unixid_Type, object->in.xids, &object->in.xids[xids_cntr_0]);
    5790           0 :                         PyList_SetItem(py_xids, xids_cntr_0, py_xids_0);
    5791             :                 }
    5792             :         }
    5793           0 :         return py_xids;
    5794             : }
    5795             : 
    5796           0 : static int py_wbint_UnixIDs2Sids_in_set_xids(PyObject *py_obj, PyObject *value, void *closure)
    5797             : {
    5798           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(py_obj);
    5799           0 :         if (value == NULL) {
    5800           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.xids");
    5801           0 :                 return -1;
    5802             :         }
    5803           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5804             :         {
    5805           0 :                 int xids_cntr_0;
    5806           0 :                 object->in.xids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.xids, PyList_GET_SIZE(value));
    5807           0 :                 if (!object->in.xids) { return -1; }
    5808           0 :                 talloc_set_name_const(object->in.xids, "ARRAY: object->in.xids");
    5809           0 :                 for (xids_cntr_0 = 0; xids_cntr_0 < PyList_GET_SIZE(value); xids_cntr_0++) {
    5810           0 :                         if (PyList_GET_ITEM(value, xids_cntr_0) == NULL) {
    5811           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.xids[xids_cntr_0]");
    5812           0 :                                 return -1;
    5813             :                         }
    5814           0 :                         PY_CHECK_TYPE(unixid_Type, PyList_GET_ITEM(value, xids_cntr_0), return -1;);
    5815           0 :                         if (talloc_reference(object->in.xids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, xids_cntr_0))) == NULL) {
    5816           0 :                                 PyErr_NoMemory();
    5817           0 :                                 return -1;
    5818             :                         }
    5819           0 :                         object->in.xids[xids_cntr_0] = *(struct unixid *)pytalloc_get_ptr(PyList_GET_ITEM(value, xids_cntr_0));
    5820             :                 }
    5821             :         }
    5822           0 :         return 0;
    5823             : }
    5824             : 
    5825           0 : static PyObject *py_wbint_UnixIDs2Sids_out_get_xids(PyObject *obj, void *closure)
    5826             : {
    5827           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(obj);
    5828           0 :         PyObject *py_xids;
    5829           0 :         py_xids = PyList_New(object->in.num_ids);
    5830           0 :         if (py_xids == NULL) {
    5831           0 :                 return NULL;
    5832             :         }
    5833             :         {
    5834             :                 int xids_cntr_0;
    5835           0 :                 for (xids_cntr_0 = 0; xids_cntr_0 < (object->in.num_ids); xids_cntr_0++) {
    5836           0 :                         PyObject *py_xids_0;
    5837           0 :                         py_xids_0 = pytalloc_reference_ex(unixid_Type, object->out.xids, &object->out.xids[xids_cntr_0]);
    5838           0 :                         PyList_SetItem(py_xids, xids_cntr_0, py_xids_0);
    5839             :                 }
    5840             :         }
    5841           0 :         return py_xids;
    5842             : }
    5843             : 
    5844           0 : static int py_wbint_UnixIDs2Sids_out_set_xids(PyObject *py_obj, PyObject *value, void *closure)
    5845             : {
    5846           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(py_obj);
    5847           0 :         if (value == NULL) {
    5848           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.xids");
    5849           0 :                 return -1;
    5850             :         }
    5851           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5852             :         {
    5853           0 :                 int xids_cntr_0;
    5854           0 :                 object->out.xids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.xids, PyList_GET_SIZE(value));
    5855           0 :                 if (!object->out.xids) { return -1; }
    5856           0 :                 talloc_set_name_const(object->out.xids, "ARRAY: object->out.xids");
    5857           0 :                 for (xids_cntr_0 = 0; xids_cntr_0 < PyList_GET_SIZE(value); xids_cntr_0++) {
    5858           0 :                         if (PyList_GET_ITEM(value, xids_cntr_0) == NULL) {
    5859           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.xids[xids_cntr_0]");
    5860           0 :                                 return -1;
    5861             :                         }
    5862           0 :                         PY_CHECK_TYPE(unixid_Type, PyList_GET_ITEM(value, xids_cntr_0), return -1;);
    5863           0 :                         if (talloc_reference(object->out.xids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, xids_cntr_0))) == NULL) {
    5864           0 :                                 PyErr_NoMemory();
    5865           0 :                                 return -1;
    5866             :                         }
    5867           0 :                         object->out.xids[xids_cntr_0] = *(struct unixid *)pytalloc_get_ptr(PyList_GET_ITEM(value, xids_cntr_0));
    5868             :                 }
    5869             :         }
    5870           0 :         return 0;
    5871             : }
    5872             : 
    5873           0 : static PyObject *py_wbint_UnixIDs2Sids_out_get_sids(PyObject *obj, void *closure)
    5874             : {
    5875           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(obj);
    5876           0 :         PyObject *py_sids;
    5877           0 :         py_sids = PyList_New(object->in.num_ids);
    5878           0 :         if (py_sids == NULL) {
    5879           0 :                 return NULL;
    5880             :         }
    5881             :         {
    5882             :                 int sids_cntr_0;
    5883           0 :                 for (sids_cntr_0 = 0; sids_cntr_0 < (object->in.num_ids); sids_cntr_0++) {
    5884           0 :                         PyObject *py_sids_0;
    5885           0 :                         py_sids_0 = pytalloc_reference_ex(dom_sid_Type, object->out.sids, &object->out.sids[sids_cntr_0]);
    5886           0 :                         PyList_SetItem(py_sids, sids_cntr_0, py_sids_0);
    5887             :                 }
    5888             :         }
    5889           0 :         return py_sids;
    5890             : }
    5891             : 
    5892           0 : static int py_wbint_UnixIDs2Sids_out_set_sids(PyObject *py_obj, PyObject *value, void *closure)
    5893             : {
    5894           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(py_obj);
    5895           0 :         if (value == NULL) {
    5896           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.sids");
    5897           0 :                 return -1;
    5898             :         }
    5899           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5900             :         {
    5901           0 :                 int sids_cntr_0;
    5902           0 :                 object->out.sids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sids, PyList_GET_SIZE(value));
    5903           0 :                 if (!object->out.sids) { return -1; }
    5904           0 :                 talloc_set_name_const(object->out.sids, "ARRAY: object->out.sids");
    5905           0 :                 for (sids_cntr_0 = 0; sids_cntr_0 < PyList_GET_SIZE(value); sids_cntr_0++) {
    5906           0 :                         if (PyList_GET_ITEM(value, sids_cntr_0) == NULL) {
    5907           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.sids[sids_cntr_0]");
    5908           0 :                                 return -1;
    5909             :                         }
    5910           0 :                         PY_CHECK_TYPE(dom_sid_Type, PyList_GET_ITEM(value, sids_cntr_0), return -1;);
    5911           0 :                         if (talloc_reference(object->out.sids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sids_cntr_0))) == NULL) {
    5912           0 :                                 PyErr_NoMemory();
    5913           0 :                                 return -1;
    5914             :                         }
    5915           0 :                         object->out.sids[sids_cntr_0] = *(struct dom_sid *)pytalloc_get_ptr(PyList_GET_ITEM(value, sids_cntr_0));
    5916             :                 }
    5917             :         }
    5918           0 :         return 0;
    5919             : }
    5920             : 
    5921           0 : static PyObject *py_wbint_UnixIDs2Sids_get_result(PyObject *obj, void *closure)
    5922             : {
    5923           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(obj);
    5924           0 :         PyObject *py_result;
    5925           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    5926           0 :         return py_result;
    5927             : }
    5928             : 
    5929           0 : static int py_wbint_UnixIDs2Sids_set_result(PyObject *py_obj, PyObject *value, void *closure)
    5930             : {
    5931           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(py_obj);
    5932           0 :         if (value == NULL) {
    5933           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    5934           0 :                 return -1;
    5935             :         }
    5936           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    5937           0 :         return 0;
    5938             : }
    5939             : 
    5940             : static PyGetSetDef py_wbint_UnixIDs2Sids_getsetters[] = {
    5941             :         {
    5942             :                 .name = discard_const_p(char, "in_domain_name"),
    5943             :                 .get = py_wbint_UnixIDs2Sids_in_get_domain_name,
    5944             :                 .set = py_wbint_UnixIDs2Sids_in_set_domain_name,
    5945             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    5946             :         },
    5947             :         {
    5948             :                 .name = discard_const_p(char, "in_domain_sid"),
    5949             :                 .get = py_wbint_UnixIDs2Sids_in_get_domain_sid,
    5950             :                 .set = py_wbint_UnixIDs2Sids_in_set_domain_sid,
    5951             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
    5952             :         },
    5953             :         {
    5954             :                 .name = discard_const_p(char, "in_num_ids"),
    5955             :                 .get = py_wbint_UnixIDs2Sids_in_get_num_ids,
    5956             :                 .set = py_wbint_UnixIDs2Sids_in_set_num_ids,
    5957             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5958             :         },
    5959             :         {
    5960             :                 .name = discard_const_p(char, "in_xids"),
    5961             :                 .get = py_wbint_UnixIDs2Sids_in_get_xids,
    5962             :                 .set = py_wbint_UnixIDs2Sids_in_set_xids,
    5963             :                 .doc = discard_const_p(char, "PIDL-generated element of base type unixid")
    5964             :         },
    5965             :         {
    5966             :                 .name = discard_const_p(char, "out_xids"),
    5967             :                 .get = py_wbint_UnixIDs2Sids_out_get_xids,
    5968             :                 .set = py_wbint_UnixIDs2Sids_out_set_xids,
    5969             :                 .doc = discard_const_p(char, "PIDL-generated element of base type unixid")
    5970             :         },
    5971             :         {
    5972             :                 .name = discard_const_p(char, "out_sids"),
    5973             :                 .get = py_wbint_UnixIDs2Sids_out_get_sids,
    5974             :                 .set = py_wbint_UnixIDs2Sids_out_set_sids,
    5975             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
    5976             :         },
    5977             :         {
    5978             :                 .name = discard_const_p(char, "result"),
    5979             :                 .get = py_wbint_UnixIDs2Sids_get_result,
    5980             :                 .set = py_wbint_UnixIDs2Sids_set_result,
    5981             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    5982             :         },
    5983             :         { .name = NULL }
    5984             : };
    5985             : 
    5986           0 : static PyObject *py_wbint_UnixIDs2Sids_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5987             : {
    5988           0 :         PyObject *self = pytalloc_new(struct wbint_UnixIDs2Sids, type);
    5989           0 :         return self;
    5990             : }
    5991             : 
    5992           0 : static PyObject *py_wbint_UnixIDs2Sids_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    5993             : {
    5994             : 
    5995             : 
    5996           0 :         return PyLong_FromLong(5);
    5997             : }
    5998             : 
    5999           0 : static PyObject *py_wbint_UnixIDs2Sids_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
    6000             : {
    6001           0 :         const struct ndr_interface_call *call = NULL;
    6002           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(py_obj);
    6003           0 :         PyObject *ret = NULL;
    6004           0 :         struct ndr_push *push = NULL;
    6005           0 :         DATA_BLOB blob;
    6006           0 :         enum ndr_err_code err;
    6007             : 
    6008           0 :         if (ndr_table_winbind.num_calls < 6) {
    6009           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_UnixIDs2Sids_ndr_pack");
    6010           0 :                 return NULL;
    6011             :         }
    6012           0 :         call = &ndr_table_winbind.calls[5];
    6013             : 
    6014           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    6015           0 :         if (push == NULL) {
    6016           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6017           0 :                 return NULL;
    6018             :         }
    6019             : 
    6020           0 :         push->flags |= ndr_push_flags;
    6021             : 
    6022           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    6023           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6024           0 :                 TALLOC_FREE(push);
    6025           0 :                 PyErr_SetNdrError(err);
    6026           0 :                 return NULL;
    6027             :         }
    6028           0 :         blob = ndr_push_blob(push);
    6029           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6030           0 :         TALLOC_FREE(push);
    6031           0 :         return ret;
    6032             : }
    6033             : 
    6034           0 : static PyObject *py_wbint_UnixIDs2Sids_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6035             : {
    6036           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    6037           0 :         PyObject *bigendian_obj = NULL;
    6038           0 :         PyObject *ndr64_obj = NULL;
    6039           0 :         libndr_flags ndr_push_flags = 0;
    6040             : 
    6041           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    6042             :                 discard_const_p(char *, kwnames),
    6043             :                 &bigendian_obj,
    6044             :                 &ndr64_obj)) {
    6045           0 :                 return NULL;
    6046             :         }
    6047             : 
    6048           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    6049           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    6050             :         }
    6051           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    6052           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    6053             :         }
    6054             : 
    6055           0 :         return py_wbint_UnixIDs2Sids_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    6056             : }
    6057             : 
    6058           0 : static PyObject *py_wbint_UnixIDs2Sids_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6059             : {
    6060           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    6061           0 :         PyObject *bigendian_obj = NULL;
    6062           0 :         PyObject *ndr64_obj = NULL;
    6063           0 :         libndr_flags ndr_push_flags = 0;
    6064             : 
    6065           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    6066             :                 discard_const_p(char *, kwnames),
    6067             :                 &bigendian_obj,
    6068             :                 &ndr64_obj)) {
    6069           0 :                 return NULL;
    6070             :         }
    6071             : 
    6072           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    6073           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    6074             :         }
    6075           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    6076           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    6077             :         }
    6078             : 
    6079           0 :         return py_wbint_UnixIDs2Sids_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    6080             : }
    6081             : 
    6082           0 : static PyObject *py_wbint_UnixIDs2Sids_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
    6083             : {
    6084           0 :         const struct ndr_interface_call *call = NULL;
    6085           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(py_obj);
    6086           0 :         struct ndr_pull *pull = NULL;
    6087           0 :         enum ndr_err_code err;
    6088             : 
    6089           0 :         if (ndr_table_winbind.num_calls < 6) {
    6090           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_UnixIDs2Sids_ndr_unpack");
    6091           0 :                 return NULL;
    6092             :         }
    6093           0 :         call = &ndr_table_winbind.calls[5];
    6094             : 
    6095           0 :         pull = ndr_pull_init_blob(blob, object);
    6096           0 :         if (pull == NULL) {
    6097           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6098           0 :                 return NULL;
    6099             :         }
    6100             : 
    6101           0 :         pull->flags |= ndr_pull_flags;
    6102             : 
    6103           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    6104           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6105           0 :                 TALLOC_FREE(pull);
    6106           0 :                 PyErr_SetNdrError(err);
    6107           0 :                 return NULL;
    6108             :         }
    6109           0 :         if (!allow_remaining) {
    6110           0 :                 uint32_t highest_ofs;
    6111             : 
    6112           0 :                 if (pull->offset > pull->relative_highest_offset) {
    6113           0 :                         highest_ofs = pull->offset;
    6114             :                 } else {
    6115           0 :                         highest_ofs = pull->relative_highest_offset;
    6116             :                 }
    6117           0 :                 if (highest_ofs < pull->data_size) {
    6118           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    6119             :                                 "not all bytes consumed ofs[%u] size[%u]",
    6120             :                                 highest_ofs, pull->data_size);
    6121           0 :                         TALLOC_FREE(pull);
    6122           0 :                         PyErr_SetNdrError(err);
    6123           0 :                         return NULL;
    6124             :                 }
    6125             :         }
    6126             : 
    6127           0 :         TALLOC_FREE(pull);
    6128           0 :         Py_RETURN_NONE;
    6129             : }
    6130             : 
    6131           0 : static PyObject *py_wbint_UnixIDs2Sids_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6132             : {
    6133           0 :         DATA_BLOB blob;
    6134           0 :         Py_ssize_t blob_length = 0;
    6135           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    6136           0 :         PyObject *bigendian_obj = NULL;
    6137           0 :         PyObject *ndr64_obj = NULL;
    6138           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    6139           0 :         PyObject *allow_remaining_obj = NULL;
    6140           0 :         bool allow_remaining = false;
    6141             : 
    6142           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    6143             :                 discard_const_p(char *, kwnames),
    6144             :                 &blob.data, &blob_length,
    6145             :                 &bigendian_obj,
    6146             :                 &ndr64_obj,
    6147             :                 &allow_remaining_obj)) {
    6148           0 :                 return NULL;
    6149             :         }
    6150           0 :         blob.length = blob_length;
    6151             : 
    6152           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    6153           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    6154             :         }
    6155           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    6156           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    6157             :         }
    6158             : 
    6159           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6160           0 :                 allow_remaining = true;
    6161             :         }
    6162             : 
    6163           0 :         return py_wbint_UnixIDs2Sids_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    6164             : }
    6165             : 
    6166           0 : static PyObject *py_wbint_UnixIDs2Sids_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6167             : {
    6168           0 :         DATA_BLOB blob;
    6169           0 :         Py_ssize_t blob_length = 0;
    6170           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    6171           0 :         PyObject *bigendian_obj = NULL;
    6172           0 :         PyObject *ndr64_obj = NULL;
    6173           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    6174           0 :         PyObject *allow_remaining_obj = NULL;
    6175           0 :         bool allow_remaining = false;
    6176             : 
    6177           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    6178             :                 discard_const_p(char *, kwnames),
    6179             :                 &blob.data, &blob_length,
    6180             :                 &bigendian_obj,
    6181             :                 &ndr64_obj,
    6182             :                 &allow_remaining_obj)) {
    6183           0 :                 return NULL;
    6184             :         }
    6185           0 :         blob.length = blob_length;
    6186             : 
    6187           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    6188           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    6189             :         }
    6190           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    6191           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    6192             :         }
    6193             : 
    6194           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6195           0 :                 allow_remaining = true;
    6196             :         }
    6197             : 
    6198           0 :         return py_wbint_UnixIDs2Sids_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    6199             : }
    6200             : 
    6201           0 : static PyObject *py_wbint_UnixIDs2Sids_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
    6202             : {
    6203           0 :         const struct ndr_interface_call *call = NULL;
    6204           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(py_obj);
    6205           0 :         PyObject *ret;
    6206           0 :         char *retstr;
    6207             : 
    6208           0 :         if (ndr_table_winbind.num_calls < 6) {
    6209           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_UnixIDs2Sids_ndr_print");
    6210           0 :                 return NULL;
    6211             :         }
    6212           0 :         call = &ndr_table_winbind.calls[5];
    6213             : 
    6214           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    6215           0 :         ret = PyUnicode_FromString(retstr);
    6216           0 :         TALLOC_FREE(retstr);
    6217             : 
    6218           0 :         return ret;
    6219             : }
    6220             : 
    6221           0 : static PyObject *py_wbint_UnixIDs2Sids_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6222             : {
    6223           0 :         return py_wbint_UnixIDs2Sids_ndr_print(py_obj, "wbint_UnixIDs2Sids_in", NDR_IN);
    6224             : }
    6225             : 
    6226           0 : static PyObject *py_wbint_UnixIDs2Sids_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6227             : {
    6228           0 :         return py_wbint_UnixIDs2Sids_ndr_print(py_obj, "wbint_UnixIDs2Sids_out", NDR_OUT);
    6229             : }
    6230             : 
    6231             : static PyMethodDef py_wbint_UnixIDs2Sids_methods[] = {
    6232             :         { "opnum", (PyCFunction)py_wbint_UnixIDs2Sids_ndr_opnum, METH_NOARGS|METH_CLASS,
    6233             :                 "winbind.wbint_UnixIDs2Sids.opnum() -> 5 (0x05) " },
    6234             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_UnixIDs2Sids_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    6235             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    6236             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_UnixIDs2Sids_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    6237             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    6238             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_UnixIDs2Sids_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    6239             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    6240             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_UnixIDs2Sids_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    6241             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    6242             :         { "__ndr_print_in__", (PyCFunction)py_wbint_UnixIDs2Sids_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    6243             :         { "__ndr_print_out__", (PyCFunction)py_wbint_UnixIDs2Sids_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    6244             :         { NULL, NULL, 0, NULL }
    6245             : };
    6246             : 
    6247             : 
    6248             : static PyTypeObject wbint_UnixIDs2Sids_Type = {
    6249             :         PyVarObject_HEAD_INIT(NULL, 0)
    6250             :         .tp_name = "winbind.wbint_UnixIDs2Sids",
    6251             :         .tp_getset = py_wbint_UnixIDs2Sids_getsetters,
    6252             :         .tp_methods = py_wbint_UnixIDs2Sids_methods,
    6253             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6254             :         .tp_new = py_wbint_UnixIDs2Sids_new,
    6255             : };
    6256             : 
    6257           0 : static bool pack_py_wbint_UnixIDs2Sids_args_in(PyObject *args, PyObject *kwargs, struct wbint_UnixIDs2Sids *r)
    6258             : {
    6259           0 :         PyObject *py_domain_name;
    6260           0 :         PyObject *py_domain_sid;
    6261           0 :         PyObject *py_num_ids;
    6262           0 :         PyObject *py_xids;
    6263           0 :         const char *kwnames[] = {
    6264             :                 "domain_name", "domain_sid", "num_ids", "xids", NULL
    6265             :         };
    6266             : 
    6267           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:wbint_UnixIDs2Sids", discard_const_p(char *, kwnames), &py_domain_name, &py_domain_sid, &py_num_ids, &py_xids)) {
    6268           0 :                 return false;
    6269             :         }
    6270             : 
    6271           0 :         if (py_domain_name == NULL) {
    6272           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_name");
    6273           0 :                 return false;
    6274             :         }
    6275           0 :         r->in.domain_name = talloc_ptrtype(r, r->in.domain_name);
    6276           0 :         if (r->in.domain_name == NULL) {
    6277           0 :                 PyErr_NoMemory();
    6278           0 :                 return false;
    6279             :         }
    6280             :         {
    6281           0 :                 const char *test_str;
    6282           0 :                 const char *talloc_str;
    6283           0 :                 PyObject *unicode = NULL;
    6284           0 :                 if (PyUnicode_Check(py_domain_name)) {
    6285           0 :                         unicode = PyUnicode_AsEncodedString(py_domain_name, "utf-8", "ignore");
    6286           0 :                         if (unicode == NULL) {
    6287           0 :                                 PyErr_NoMemory();
    6288           0 :                                 return false;
    6289             :                         }
    6290           0 :                         test_str = PyBytes_AS_STRING(unicode);
    6291           0 :                 } else if (PyBytes_Check(py_domain_name)) {
    6292           0 :                         test_str = PyBytes_AS_STRING(py_domain_name);
    6293             :                 } else {
    6294           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain_name)->tp_name);
    6295           0 :                         return false;
    6296             :                 }
    6297           0 :                 talloc_str = talloc_strdup(r, test_str);
    6298           0 :                 if (unicode != NULL) {
    6299           0 :                         Py_DECREF(unicode);
    6300             :                 }
    6301           0 :                 if (talloc_str == NULL) {
    6302           0 :                         PyErr_NoMemory();
    6303           0 :                         return false;
    6304             :                 }
    6305           0 :                 r->in.domain_name = talloc_str;
    6306             :         }
    6307           0 :         if (py_domain_sid == NULL) {
    6308           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_sid");
    6309           0 :                 return false;
    6310             :         }
    6311           0 :         PY_CHECK_TYPE(dom_sid_Type, py_domain_sid, return false;);
    6312           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_sid)) == NULL) {
    6313           0 :                 PyErr_NoMemory();
    6314           0 :                 return false;
    6315             :         }
    6316           0 :         r->in.domain_sid = *(struct dom_sid *)pytalloc_get_ptr(py_domain_sid);
    6317           0 :         if (py_num_ids == NULL) {
    6318           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.num_ids");
    6319           0 :                 return false;
    6320             :         }
    6321             :         {
    6322           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.num_ids));
    6323           0 :                 if (PyLong_Check(py_num_ids)) {
    6324           0 :                         unsigned long long test_var;
    6325           0 :                         test_var = PyLong_AsUnsignedLongLong(py_num_ids);
    6326           0 :                         if (PyErr_Occurred() != NULL) {
    6327           0 :                                 return false;
    6328             :                         }
    6329           0 :                         if (test_var > uint_max) {
    6330           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6331             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6332           0 :                                 return false;
    6333             :                         }
    6334           0 :                         r->in.num_ids = test_var;
    6335             :                 } else {
    6336           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6337             :                           PyLong_Type.tp_name);
    6338           0 :                         return false;
    6339             :                 }
    6340             :         }
    6341           0 :         if (py_xids == NULL) {
    6342           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.xids");
    6343           0 :                 return false;
    6344             :         }
    6345           0 :         PY_CHECK_TYPE(&PyList_Type, py_xids, return false;);
    6346             :         {
    6347           0 :                 int xids_cntr_0;
    6348           0 :                 r->in.xids = talloc_array_ptrtype(r, r->in.xids, PyList_GET_SIZE(py_xids));
    6349           0 :                 if (!r->in.xids) { return false; }
    6350           0 :                 talloc_set_name_const(r->in.xids, "ARRAY: r->in.xids");
    6351           0 :                 for (xids_cntr_0 = 0; xids_cntr_0 < PyList_GET_SIZE(py_xids); xids_cntr_0++) {
    6352           0 :                         if (PyList_GET_ITEM(py_xids, xids_cntr_0) == NULL) {
    6353           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.xids[xids_cntr_0]");
    6354           0 :                                 return false;
    6355             :                         }
    6356           0 :                         PY_CHECK_TYPE(unixid_Type, PyList_GET_ITEM(py_xids, xids_cntr_0), return false;);
    6357           0 :                         if (talloc_reference(r->in.xids, pytalloc_get_mem_ctx(PyList_GET_ITEM(py_xids, xids_cntr_0))) == NULL) {
    6358           0 :                                 PyErr_NoMemory();
    6359           0 :                                 return false;
    6360             :                         }
    6361           0 :                         r->in.xids[xids_cntr_0] = *(struct unixid *)pytalloc_get_ptr(PyList_GET_ITEM(py_xids, xids_cntr_0));
    6362             :                 }
    6363             :         }
    6364           0 :         return true;
    6365             : }
    6366             : 
    6367           0 : static PyObject *unpack_py_wbint_UnixIDs2Sids_args_out(struct wbint_UnixIDs2Sids *r)
    6368             : {
    6369           0 :         PyObject *result;
    6370           0 :         PyObject *py_xids;
    6371           0 :         PyObject *py_sids;
    6372           0 :         result = PyTuple_New(2);
    6373           0 :         py_xids = PyList_New(r->in.num_ids);
    6374           0 :         if (py_xids == NULL) {
    6375           0 :                 return NULL;
    6376             :         }
    6377             :         {
    6378             :                 int xids_cntr_0;
    6379           0 :                 for (xids_cntr_0 = 0; xids_cntr_0 < (r->in.num_ids); xids_cntr_0++) {
    6380           0 :                         PyObject *py_xids_0;
    6381           0 :                         py_xids_0 = pytalloc_reference_ex(unixid_Type, r->out.xids, &r->out.xids[xids_cntr_0]);
    6382           0 :                         PyList_SetItem(py_xids, xids_cntr_0, py_xids_0);
    6383             :                 }
    6384             :         }
    6385           0 :         PyTuple_SetItem(result, 0, py_xids);
    6386           0 :         py_sids = PyList_New(r->in.num_ids);
    6387           0 :         if (py_sids == NULL) {
    6388           0 :                 return NULL;
    6389             :         }
    6390             :         {
    6391             :                 int sids_cntr_0;
    6392           0 :                 for (sids_cntr_0 = 0; sids_cntr_0 < (r->in.num_ids); sids_cntr_0++) {
    6393           0 :                         PyObject *py_sids_0;
    6394           0 :                         py_sids_0 = pytalloc_reference_ex(dom_sid_Type, r->out.sids, &r->out.sids[sids_cntr_0]);
    6395           0 :                         PyList_SetItem(py_sids, sids_cntr_0, py_sids_0);
    6396             :                 }
    6397             :         }
    6398           0 :         PyTuple_SetItem(result, 1, py_sids);
    6399           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    6400           0 :                 PyErr_SetNTSTATUS(r->out.result);
    6401           0 :                 return NULL;
    6402             :         }
    6403             : 
    6404           0 :         return result;
    6405             : }
    6406             : 
    6407             : 
    6408           0 : static PyObject *py_wbint_AllocateUid_out_get_uid(PyObject *obj, void *closure)
    6409             : {
    6410           0 :         struct wbint_AllocateUid *object = (struct wbint_AllocateUid *)pytalloc_get_ptr(obj);
    6411           0 :         PyObject *py_uid;
    6412           0 :         if (object->out.uid == NULL) {
    6413           0 :                 Py_RETURN_NONE;
    6414             :         }
    6415           0 :         py_uid = PyLong_FromUnsignedLongLong(*object->out.uid);
    6416           0 :         return py_uid;
    6417             : }
    6418             : 
    6419           0 : static int py_wbint_AllocateUid_out_set_uid(PyObject *py_obj, PyObject *value, void *closure)
    6420             : {
    6421           0 :         struct wbint_AllocateUid *object = (struct wbint_AllocateUid *)pytalloc_get_ptr(py_obj);
    6422           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.uid));
    6423           0 :         if (value == NULL) {
    6424           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.uid");
    6425           0 :                 return -1;
    6426             :         }
    6427           0 :         object->out.uid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.uid);
    6428           0 :         if (object->out.uid == NULL) {
    6429           0 :                 PyErr_NoMemory();
    6430           0 :                 return -1;
    6431             :         }
    6432             :         {
    6433           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.uid));
    6434           0 :                 if (PyLong_Check(value)) {
    6435           0 :                         unsigned long long test_var;
    6436           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6437           0 :                         if (PyErr_Occurred() != NULL) {
    6438           0 :                                 return -1;
    6439             :                         }
    6440           0 :                         if (test_var > uint_max) {
    6441           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6442             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6443           0 :                                 return -1;
    6444             :                         }
    6445           0 :                         *object->out.uid = test_var;
    6446             :                 } else {
    6447           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6448             :                           PyLong_Type.tp_name);
    6449           0 :                         return -1;
    6450             :                 }
    6451             :         }
    6452           0 :         return 0;
    6453             : }
    6454             : 
    6455           0 : static PyObject *py_wbint_AllocateUid_get_result(PyObject *obj, void *closure)
    6456             : {
    6457           0 :         struct wbint_AllocateUid *object = (struct wbint_AllocateUid *)pytalloc_get_ptr(obj);
    6458           0 :         PyObject *py_result;
    6459           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    6460           0 :         return py_result;
    6461             : }
    6462             : 
    6463           0 : static int py_wbint_AllocateUid_set_result(PyObject *py_obj, PyObject *value, void *closure)
    6464             : {
    6465           0 :         struct wbint_AllocateUid *object = (struct wbint_AllocateUid *)pytalloc_get_ptr(py_obj);
    6466           0 :         if (value == NULL) {
    6467           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    6468           0 :                 return -1;
    6469             :         }
    6470           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    6471           0 :         return 0;
    6472             : }
    6473             : 
    6474             : static PyGetSetDef py_wbint_AllocateUid_getsetters[] = {
    6475             :         {
    6476             :                 .name = discard_const_p(char, "out_uid"),
    6477             :                 .get = py_wbint_AllocateUid_out_get_uid,
    6478             :                 .set = py_wbint_AllocateUid_out_set_uid,
    6479             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
    6480             :         },
    6481             :         {
    6482             :                 .name = discard_const_p(char, "result"),
    6483             :                 .get = py_wbint_AllocateUid_get_result,
    6484             :                 .set = py_wbint_AllocateUid_set_result,
    6485             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    6486             :         },
    6487             :         { .name = NULL }
    6488             : };
    6489             : 
    6490           0 : static PyObject *py_wbint_AllocateUid_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6491             : {
    6492           0 :         PyObject *self = pytalloc_new(struct wbint_AllocateUid, type);
    6493           0 :         struct wbint_AllocateUid *_self = (struct wbint_AllocateUid *)pytalloc_get_ptr(self);
    6494           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    6495           0 :         _self->out.uid = talloc_zero(mem_ctx, uint64_t);
    6496           0 :         return self;
    6497             : }
    6498             : 
    6499           0 : static PyObject *py_wbint_AllocateUid_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    6500             : {
    6501             : 
    6502             : 
    6503           0 :         return PyLong_FromLong(6);
    6504             : }
    6505             : 
    6506           0 : static PyObject *py_wbint_AllocateUid_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
    6507             : {
    6508           0 :         const struct ndr_interface_call *call = NULL;
    6509           0 :         struct wbint_AllocateUid *object = (struct wbint_AllocateUid *)pytalloc_get_ptr(py_obj);
    6510           0 :         PyObject *ret = NULL;
    6511           0 :         struct ndr_push *push = NULL;
    6512           0 :         DATA_BLOB blob;
    6513           0 :         enum ndr_err_code err;
    6514             : 
    6515           0 :         if (ndr_table_winbind.num_calls < 7) {
    6516           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_AllocateUid_ndr_pack");
    6517           0 :                 return NULL;
    6518             :         }
    6519           0 :         call = &ndr_table_winbind.calls[6];
    6520             : 
    6521           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    6522           0 :         if (push == NULL) {
    6523           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6524           0 :                 return NULL;
    6525             :         }
    6526             : 
    6527           0 :         push->flags |= ndr_push_flags;
    6528             : 
    6529           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    6530           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6531           0 :                 TALLOC_FREE(push);
    6532           0 :                 PyErr_SetNdrError(err);
    6533           0 :                 return NULL;
    6534             :         }
    6535           0 :         blob = ndr_push_blob(push);
    6536           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6537           0 :         TALLOC_FREE(push);
    6538           0 :         return ret;
    6539             : }
    6540             : 
    6541           0 : static PyObject *py_wbint_AllocateUid_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6542             : {
    6543           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    6544           0 :         PyObject *bigendian_obj = NULL;
    6545           0 :         PyObject *ndr64_obj = NULL;
    6546           0 :         libndr_flags ndr_push_flags = 0;
    6547             : 
    6548           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    6549             :                 discard_const_p(char *, kwnames),
    6550             :                 &bigendian_obj,
    6551             :                 &ndr64_obj)) {
    6552           0 :                 return NULL;
    6553             :         }
    6554             : 
    6555           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    6556           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    6557             :         }
    6558           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    6559           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    6560             :         }
    6561             : 
    6562           0 :         return py_wbint_AllocateUid_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    6563             : }
    6564             : 
    6565           0 : static PyObject *py_wbint_AllocateUid_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6566             : {
    6567           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    6568           0 :         PyObject *bigendian_obj = NULL;
    6569           0 :         PyObject *ndr64_obj = NULL;
    6570           0 :         libndr_flags ndr_push_flags = 0;
    6571             : 
    6572           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    6573             :                 discard_const_p(char *, kwnames),
    6574             :                 &bigendian_obj,
    6575             :                 &ndr64_obj)) {
    6576           0 :                 return NULL;
    6577             :         }
    6578             : 
    6579           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    6580           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    6581             :         }
    6582           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    6583           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    6584             :         }
    6585             : 
    6586           0 :         return py_wbint_AllocateUid_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    6587             : }
    6588             : 
    6589           0 : static PyObject *py_wbint_AllocateUid_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
    6590             : {
    6591           0 :         const struct ndr_interface_call *call = NULL;
    6592           0 :         struct wbint_AllocateUid *object = (struct wbint_AllocateUid *)pytalloc_get_ptr(py_obj);
    6593           0 :         struct ndr_pull *pull = NULL;
    6594           0 :         enum ndr_err_code err;
    6595             : 
    6596           0 :         if (ndr_table_winbind.num_calls < 7) {
    6597           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_AllocateUid_ndr_unpack");
    6598           0 :                 return NULL;
    6599             :         }
    6600           0 :         call = &ndr_table_winbind.calls[6];
    6601             : 
    6602           0 :         pull = ndr_pull_init_blob(blob, object);
    6603           0 :         if (pull == NULL) {
    6604           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6605           0 :                 return NULL;
    6606             :         }
    6607             : 
    6608           0 :         pull->flags |= ndr_pull_flags;
    6609             : 
    6610           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    6611           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6612           0 :                 TALLOC_FREE(pull);
    6613           0 :                 PyErr_SetNdrError(err);
    6614           0 :                 return NULL;
    6615             :         }
    6616           0 :         if (!allow_remaining) {
    6617           0 :                 uint32_t highest_ofs;
    6618             : 
    6619           0 :                 if (pull->offset > pull->relative_highest_offset) {
    6620           0 :                         highest_ofs = pull->offset;
    6621             :                 } else {
    6622           0 :                         highest_ofs = pull->relative_highest_offset;
    6623             :                 }
    6624           0 :                 if (highest_ofs < pull->data_size) {
    6625           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    6626             :                                 "not all bytes consumed ofs[%u] size[%u]",
    6627             :                                 highest_ofs, pull->data_size);
    6628           0 :                         TALLOC_FREE(pull);
    6629           0 :                         PyErr_SetNdrError(err);
    6630           0 :                         return NULL;
    6631             :                 }
    6632             :         }
    6633             : 
    6634           0 :         TALLOC_FREE(pull);
    6635           0 :         Py_RETURN_NONE;
    6636             : }
    6637             : 
    6638           0 : static PyObject *py_wbint_AllocateUid_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6639             : {
    6640           0 :         DATA_BLOB blob;
    6641           0 :         Py_ssize_t blob_length = 0;
    6642           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    6643           0 :         PyObject *bigendian_obj = NULL;
    6644           0 :         PyObject *ndr64_obj = NULL;
    6645           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    6646           0 :         PyObject *allow_remaining_obj = NULL;
    6647           0 :         bool allow_remaining = false;
    6648             : 
    6649           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    6650             :                 discard_const_p(char *, kwnames),
    6651             :                 &blob.data, &blob_length,
    6652             :                 &bigendian_obj,
    6653             :                 &ndr64_obj,
    6654             :                 &allow_remaining_obj)) {
    6655           0 :                 return NULL;
    6656             :         }
    6657           0 :         blob.length = blob_length;
    6658             : 
    6659           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    6660           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    6661             :         }
    6662           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    6663           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    6664             :         }
    6665             : 
    6666           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6667           0 :                 allow_remaining = true;
    6668             :         }
    6669             : 
    6670           0 :         return py_wbint_AllocateUid_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    6671             : }
    6672             : 
    6673           0 : static PyObject *py_wbint_AllocateUid_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6674             : {
    6675           0 :         DATA_BLOB blob;
    6676           0 :         Py_ssize_t blob_length = 0;
    6677           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    6678           0 :         PyObject *bigendian_obj = NULL;
    6679           0 :         PyObject *ndr64_obj = NULL;
    6680           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    6681           0 :         PyObject *allow_remaining_obj = NULL;
    6682           0 :         bool allow_remaining = false;
    6683             : 
    6684           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    6685             :                 discard_const_p(char *, kwnames),
    6686             :                 &blob.data, &blob_length,
    6687             :                 &bigendian_obj,
    6688             :                 &ndr64_obj,
    6689             :                 &allow_remaining_obj)) {
    6690           0 :                 return NULL;
    6691             :         }
    6692           0 :         blob.length = blob_length;
    6693             : 
    6694           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    6695           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    6696             :         }
    6697           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    6698           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    6699             :         }
    6700             : 
    6701           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6702           0 :                 allow_remaining = true;
    6703             :         }
    6704             : 
    6705           0 :         return py_wbint_AllocateUid_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    6706             : }
    6707             : 
    6708           0 : static PyObject *py_wbint_AllocateUid_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
    6709             : {
    6710           0 :         const struct ndr_interface_call *call = NULL;
    6711           0 :         struct wbint_AllocateUid *object = (struct wbint_AllocateUid *)pytalloc_get_ptr(py_obj);
    6712           0 :         PyObject *ret;
    6713           0 :         char *retstr;
    6714             : 
    6715           0 :         if (ndr_table_winbind.num_calls < 7) {
    6716           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_AllocateUid_ndr_print");
    6717           0 :                 return NULL;
    6718             :         }
    6719           0 :         call = &ndr_table_winbind.calls[6];
    6720             : 
    6721           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    6722           0 :         ret = PyUnicode_FromString(retstr);
    6723           0 :         TALLOC_FREE(retstr);
    6724             : 
    6725           0 :         return ret;
    6726             : }
    6727             : 
    6728           0 : static PyObject *py_wbint_AllocateUid_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6729             : {
    6730           0 :         return py_wbint_AllocateUid_ndr_print(py_obj, "wbint_AllocateUid_in", NDR_IN);
    6731             : }
    6732             : 
    6733           0 : static PyObject *py_wbint_AllocateUid_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6734             : {
    6735           0 :         return py_wbint_AllocateUid_ndr_print(py_obj, "wbint_AllocateUid_out", NDR_OUT);
    6736             : }
    6737             : 
    6738             : static PyMethodDef py_wbint_AllocateUid_methods[] = {
    6739             :         { "opnum", (PyCFunction)py_wbint_AllocateUid_ndr_opnum, METH_NOARGS|METH_CLASS,
    6740             :                 "winbind.wbint_AllocateUid.opnum() -> 6 (0x06) " },
    6741             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_AllocateUid_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    6742             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    6743             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_AllocateUid_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    6744             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    6745             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_AllocateUid_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    6746             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    6747             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_AllocateUid_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    6748             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    6749             :         { "__ndr_print_in__", (PyCFunction)py_wbint_AllocateUid_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    6750             :         { "__ndr_print_out__", (PyCFunction)py_wbint_AllocateUid_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    6751             :         { NULL, NULL, 0, NULL }
    6752             : };
    6753             : 
    6754             : 
    6755             : static PyTypeObject wbint_AllocateUid_Type = {
    6756             :         PyVarObject_HEAD_INIT(NULL, 0)
    6757             :         .tp_name = "winbind.wbint_AllocateUid",
    6758             :         .tp_getset = py_wbint_AllocateUid_getsetters,
    6759             :         .tp_methods = py_wbint_AllocateUid_methods,
    6760             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6761             :         .tp_new = py_wbint_AllocateUid_new,
    6762             : };
    6763             : 
    6764           0 : static bool pack_py_wbint_AllocateUid_args_in(PyObject *args, PyObject *kwargs, struct wbint_AllocateUid *r)
    6765             : {
    6766           0 :         const char *kwnames[] = {
    6767             :                 NULL
    6768             :         };
    6769             : 
    6770           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":wbint_AllocateUid", discard_const_p(char *, kwnames))) {
    6771           0 :                 return false;
    6772             :         }
    6773             : 
    6774           0 :         return true;
    6775             : }
    6776             : 
    6777           0 : static PyObject *unpack_py_wbint_AllocateUid_args_out(struct wbint_AllocateUid *r)
    6778             : {
    6779           0 :         PyObject *result;
    6780           0 :         PyObject *py_uid;
    6781           0 :         py_uid = PyLong_FromUnsignedLongLong(*r->out.uid);
    6782           0 :         result = py_uid;
    6783           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    6784           0 :                 PyErr_SetNTSTATUS(r->out.result);
    6785           0 :                 return NULL;
    6786             :         }
    6787             : 
    6788           0 :         return result;
    6789             : }
    6790             : 
    6791             : 
    6792           0 : static PyObject *py_wbint_AllocateGid_out_get_gid(PyObject *obj, void *closure)
    6793             : {
    6794           0 :         struct wbint_AllocateGid *object = (struct wbint_AllocateGid *)pytalloc_get_ptr(obj);
    6795           0 :         PyObject *py_gid;
    6796           0 :         if (object->out.gid == NULL) {
    6797           0 :                 Py_RETURN_NONE;
    6798             :         }
    6799           0 :         py_gid = PyLong_FromUnsignedLongLong(*object->out.gid);
    6800           0 :         return py_gid;
    6801             : }
    6802             : 
    6803           0 : static int py_wbint_AllocateGid_out_set_gid(PyObject *py_obj, PyObject *value, void *closure)
    6804             : {
    6805           0 :         struct wbint_AllocateGid *object = (struct wbint_AllocateGid *)pytalloc_get_ptr(py_obj);
    6806           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.gid));
    6807           0 :         if (value == NULL) {
    6808           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.gid");
    6809           0 :                 return -1;
    6810             :         }
    6811           0 :         object->out.gid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.gid);
    6812           0 :         if (object->out.gid == NULL) {
    6813           0 :                 PyErr_NoMemory();
    6814           0 :                 return -1;
    6815             :         }
    6816             :         {
    6817           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.gid));
    6818           0 :                 if (PyLong_Check(value)) {
    6819           0 :                         unsigned long long test_var;
    6820           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6821           0 :                         if (PyErr_Occurred() != NULL) {
    6822           0 :                                 return -1;
    6823             :                         }
    6824           0 :                         if (test_var > uint_max) {
    6825           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6826             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6827           0 :                                 return -1;
    6828             :                         }
    6829           0 :                         *object->out.gid = test_var;
    6830             :                 } else {
    6831           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6832             :                           PyLong_Type.tp_name);
    6833           0 :                         return -1;
    6834             :                 }
    6835             :         }
    6836           0 :         return 0;
    6837             : }
    6838             : 
    6839           0 : static PyObject *py_wbint_AllocateGid_get_result(PyObject *obj, void *closure)
    6840             : {
    6841           0 :         struct wbint_AllocateGid *object = (struct wbint_AllocateGid *)pytalloc_get_ptr(obj);
    6842           0 :         PyObject *py_result;
    6843           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    6844           0 :         return py_result;
    6845             : }
    6846             : 
    6847           0 : static int py_wbint_AllocateGid_set_result(PyObject *py_obj, PyObject *value, void *closure)
    6848             : {
    6849           0 :         struct wbint_AllocateGid *object = (struct wbint_AllocateGid *)pytalloc_get_ptr(py_obj);
    6850           0 :         if (value == NULL) {
    6851           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    6852           0 :                 return -1;
    6853             :         }
    6854           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    6855           0 :         return 0;
    6856             : }
    6857             : 
    6858             : static PyGetSetDef py_wbint_AllocateGid_getsetters[] = {
    6859             :         {
    6860             :                 .name = discard_const_p(char, "out_gid"),
    6861             :                 .get = py_wbint_AllocateGid_out_get_gid,
    6862             :                 .set = py_wbint_AllocateGid_out_set_gid,
    6863             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
    6864             :         },
    6865             :         {
    6866             :                 .name = discard_const_p(char, "result"),
    6867             :                 .get = py_wbint_AllocateGid_get_result,
    6868             :                 .set = py_wbint_AllocateGid_set_result,
    6869             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    6870             :         },
    6871             :         { .name = NULL }
    6872             : };
    6873             : 
    6874           0 : static PyObject *py_wbint_AllocateGid_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6875             : {
    6876           0 :         PyObject *self = pytalloc_new(struct wbint_AllocateGid, type);
    6877           0 :         struct wbint_AllocateGid *_self = (struct wbint_AllocateGid *)pytalloc_get_ptr(self);
    6878           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    6879           0 :         _self->out.gid = talloc_zero(mem_ctx, uint64_t);
    6880           0 :         return self;
    6881             : }
    6882             : 
    6883           0 : static PyObject *py_wbint_AllocateGid_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    6884             : {
    6885             : 
    6886             : 
    6887           0 :         return PyLong_FromLong(7);
    6888             : }
    6889             : 
    6890           0 : static PyObject *py_wbint_AllocateGid_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
    6891             : {
    6892           0 :         const struct ndr_interface_call *call = NULL;
    6893           0 :         struct wbint_AllocateGid *object = (struct wbint_AllocateGid *)pytalloc_get_ptr(py_obj);
    6894           0 :         PyObject *ret = NULL;
    6895           0 :         struct ndr_push *push = NULL;
    6896           0 :         DATA_BLOB blob;
    6897           0 :         enum ndr_err_code err;
    6898             : 
    6899           0 :         if (ndr_table_winbind.num_calls < 8) {
    6900           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_AllocateGid_ndr_pack");
    6901           0 :                 return NULL;
    6902             :         }
    6903           0 :         call = &ndr_table_winbind.calls[7];
    6904             : 
    6905           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    6906           0 :         if (push == NULL) {
    6907           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6908           0 :                 return NULL;
    6909             :         }
    6910             : 
    6911           0 :         push->flags |= ndr_push_flags;
    6912             : 
    6913           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    6914           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6915           0 :                 TALLOC_FREE(push);
    6916           0 :                 PyErr_SetNdrError(err);
    6917           0 :                 return NULL;
    6918             :         }
    6919           0 :         blob = ndr_push_blob(push);
    6920           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6921           0 :         TALLOC_FREE(push);
    6922           0 :         return ret;
    6923             : }
    6924             : 
    6925           0 : static PyObject *py_wbint_AllocateGid_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6926             : {
    6927           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    6928           0 :         PyObject *bigendian_obj = NULL;
    6929           0 :         PyObject *ndr64_obj = NULL;
    6930           0 :         libndr_flags ndr_push_flags = 0;
    6931             : 
    6932           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    6933             :                 discard_const_p(char *, kwnames),
    6934             :                 &bigendian_obj,
    6935             :                 &ndr64_obj)) {
    6936           0 :                 return NULL;
    6937             :         }
    6938             : 
    6939           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    6940           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    6941             :         }
    6942           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    6943           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    6944             :         }
    6945             : 
    6946           0 :         return py_wbint_AllocateGid_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    6947             : }
    6948             : 
    6949           0 : static PyObject *py_wbint_AllocateGid_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6950             : {
    6951           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    6952           0 :         PyObject *bigendian_obj = NULL;
    6953           0 :         PyObject *ndr64_obj = NULL;
    6954           0 :         libndr_flags ndr_push_flags = 0;
    6955             : 
    6956           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    6957             :                 discard_const_p(char *, kwnames),
    6958             :                 &bigendian_obj,
    6959             :                 &ndr64_obj)) {
    6960           0 :                 return NULL;
    6961             :         }
    6962             : 
    6963           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    6964           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    6965             :         }
    6966           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    6967           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    6968             :         }
    6969             : 
    6970           0 :         return py_wbint_AllocateGid_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    6971             : }
    6972             : 
    6973           0 : static PyObject *py_wbint_AllocateGid_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
    6974             : {
    6975           0 :         const struct ndr_interface_call *call = NULL;
    6976           0 :         struct wbint_AllocateGid *object = (struct wbint_AllocateGid *)pytalloc_get_ptr(py_obj);
    6977           0 :         struct ndr_pull *pull = NULL;
    6978           0 :         enum ndr_err_code err;
    6979             : 
    6980           0 :         if (ndr_table_winbind.num_calls < 8) {
    6981           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_AllocateGid_ndr_unpack");
    6982           0 :                 return NULL;
    6983             :         }
    6984           0 :         call = &ndr_table_winbind.calls[7];
    6985             : 
    6986           0 :         pull = ndr_pull_init_blob(blob, object);
    6987           0 :         if (pull == NULL) {
    6988           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6989           0 :                 return NULL;
    6990             :         }
    6991             : 
    6992           0 :         pull->flags |= ndr_pull_flags;
    6993             : 
    6994           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    6995           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6996           0 :                 TALLOC_FREE(pull);
    6997           0 :                 PyErr_SetNdrError(err);
    6998           0 :                 return NULL;
    6999             :         }
    7000           0 :         if (!allow_remaining) {
    7001           0 :                 uint32_t highest_ofs;
    7002             : 
    7003           0 :                 if (pull->offset > pull->relative_highest_offset) {
    7004           0 :                         highest_ofs = pull->offset;
    7005             :                 } else {
    7006           0 :                         highest_ofs = pull->relative_highest_offset;
    7007             :                 }
    7008           0 :                 if (highest_ofs < pull->data_size) {
    7009           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    7010             :                                 "not all bytes consumed ofs[%u] size[%u]",
    7011             :                                 highest_ofs, pull->data_size);
    7012           0 :                         TALLOC_FREE(pull);
    7013           0 :                         PyErr_SetNdrError(err);
    7014           0 :                         return NULL;
    7015             :                 }
    7016             :         }
    7017             : 
    7018           0 :         TALLOC_FREE(pull);
    7019           0 :         Py_RETURN_NONE;
    7020             : }
    7021             : 
    7022           0 : static PyObject *py_wbint_AllocateGid_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7023             : {
    7024           0 :         DATA_BLOB blob;
    7025           0 :         Py_ssize_t blob_length = 0;
    7026           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    7027           0 :         PyObject *bigendian_obj = NULL;
    7028           0 :         PyObject *ndr64_obj = NULL;
    7029           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    7030           0 :         PyObject *allow_remaining_obj = NULL;
    7031           0 :         bool allow_remaining = false;
    7032             : 
    7033           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    7034             :                 discard_const_p(char *, kwnames),
    7035             :                 &blob.data, &blob_length,
    7036             :                 &bigendian_obj,
    7037             :                 &ndr64_obj,
    7038             :                 &allow_remaining_obj)) {
    7039           0 :                 return NULL;
    7040             :         }
    7041           0 :         blob.length = blob_length;
    7042             : 
    7043           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    7044           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    7045             :         }
    7046           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    7047           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    7048             :         }
    7049             : 
    7050           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7051           0 :                 allow_remaining = true;
    7052             :         }
    7053             : 
    7054           0 :         return py_wbint_AllocateGid_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    7055             : }
    7056             : 
    7057           0 : static PyObject *py_wbint_AllocateGid_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7058             : {
    7059           0 :         DATA_BLOB blob;
    7060           0 :         Py_ssize_t blob_length = 0;
    7061           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    7062           0 :         PyObject *bigendian_obj = NULL;
    7063           0 :         PyObject *ndr64_obj = NULL;
    7064           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    7065           0 :         PyObject *allow_remaining_obj = NULL;
    7066           0 :         bool allow_remaining = false;
    7067             : 
    7068           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    7069             :                 discard_const_p(char *, kwnames),
    7070             :                 &blob.data, &blob_length,
    7071             :                 &bigendian_obj,
    7072             :                 &ndr64_obj,
    7073             :                 &allow_remaining_obj)) {
    7074           0 :                 return NULL;
    7075             :         }
    7076           0 :         blob.length = blob_length;
    7077             : 
    7078           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    7079           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    7080             :         }
    7081           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    7082           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    7083             :         }
    7084             : 
    7085           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7086           0 :                 allow_remaining = true;
    7087             :         }
    7088             : 
    7089           0 :         return py_wbint_AllocateGid_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    7090             : }
    7091             : 
    7092           0 : static PyObject *py_wbint_AllocateGid_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
    7093             : {
    7094           0 :         const struct ndr_interface_call *call = NULL;
    7095           0 :         struct wbint_AllocateGid *object = (struct wbint_AllocateGid *)pytalloc_get_ptr(py_obj);
    7096           0 :         PyObject *ret;
    7097           0 :         char *retstr;
    7098             : 
    7099           0 :         if (ndr_table_winbind.num_calls < 8) {
    7100           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_AllocateGid_ndr_print");
    7101           0 :                 return NULL;
    7102             :         }
    7103           0 :         call = &ndr_table_winbind.calls[7];
    7104             : 
    7105           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    7106           0 :         ret = PyUnicode_FromString(retstr);
    7107           0 :         TALLOC_FREE(retstr);
    7108             : 
    7109           0 :         return ret;
    7110             : }
    7111             : 
    7112           0 : static PyObject *py_wbint_AllocateGid_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7113             : {
    7114           0 :         return py_wbint_AllocateGid_ndr_print(py_obj, "wbint_AllocateGid_in", NDR_IN);
    7115             : }
    7116             : 
    7117           0 : static PyObject *py_wbint_AllocateGid_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7118             : {
    7119           0 :         return py_wbint_AllocateGid_ndr_print(py_obj, "wbint_AllocateGid_out", NDR_OUT);
    7120             : }
    7121             : 
    7122             : static PyMethodDef py_wbint_AllocateGid_methods[] = {
    7123             :         { "opnum", (PyCFunction)py_wbint_AllocateGid_ndr_opnum, METH_NOARGS|METH_CLASS,
    7124             :                 "winbind.wbint_AllocateGid.opnum() -> 7 (0x07) " },
    7125             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_AllocateGid_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    7126             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    7127             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_AllocateGid_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    7128             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    7129             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_AllocateGid_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    7130             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    7131             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_AllocateGid_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    7132             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    7133             :         { "__ndr_print_in__", (PyCFunction)py_wbint_AllocateGid_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    7134             :         { "__ndr_print_out__", (PyCFunction)py_wbint_AllocateGid_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    7135             :         { NULL, NULL, 0, NULL }
    7136             : };
    7137             : 
    7138             : 
    7139             : static PyTypeObject wbint_AllocateGid_Type = {
    7140             :         PyVarObject_HEAD_INIT(NULL, 0)
    7141             :         .tp_name = "winbind.wbint_AllocateGid",
    7142             :         .tp_getset = py_wbint_AllocateGid_getsetters,
    7143             :         .tp_methods = py_wbint_AllocateGid_methods,
    7144             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7145             :         .tp_new = py_wbint_AllocateGid_new,
    7146             : };
    7147             : 
    7148           0 : static bool pack_py_wbint_AllocateGid_args_in(PyObject *args, PyObject *kwargs, struct wbint_AllocateGid *r)
    7149             : {
    7150           0 :         const char *kwnames[] = {
    7151             :                 NULL
    7152             :         };
    7153             : 
    7154           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":wbint_AllocateGid", discard_const_p(char *, kwnames))) {
    7155           0 :                 return false;
    7156             :         }
    7157             : 
    7158           0 :         return true;
    7159             : }
    7160             : 
    7161           0 : static PyObject *unpack_py_wbint_AllocateGid_args_out(struct wbint_AllocateGid *r)
    7162             : {
    7163           0 :         PyObject *result;
    7164           0 :         PyObject *py_gid;
    7165           0 :         py_gid = PyLong_FromUnsignedLongLong(*r->out.gid);
    7166           0 :         result = py_gid;
    7167           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    7168           0 :                 PyErr_SetNTSTATUS(r->out.result);
    7169           0 :                 return NULL;
    7170             :         }
    7171             : 
    7172           0 :         return result;
    7173             : }
    7174             : 
    7175             : 
    7176           0 : static PyObject *py_wbint_GetNssInfo_in_get_info(PyObject *obj, void *closure)
    7177             : {
    7178           0 :         struct wbint_GetNssInfo *object = (struct wbint_GetNssInfo *)pytalloc_get_ptr(obj);
    7179           0 :         PyObject *py_info;
    7180           0 :         if (object->in.info == NULL) {
    7181           0 :                 Py_RETURN_NONE;
    7182             :         }
    7183           0 :         py_info = pytalloc_reference_ex(&wbint_userinfo_Type, object->in.info, object->in.info);
    7184           0 :         return py_info;
    7185             : }
    7186             : 
    7187           0 : static int py_wbint_GetNssInfo_in_set_info(PyObject *py_obj, PyObject *value, void *closure)
    7188             : {
    7189           0 :         struct wbint_GetNssInfo *object = (struct wbint_GetNssInfo *)pytalloc_get_ptr(py_obj);
    7190           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info));
    7191           0 :         if (value == NULL) {
    7192           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.info");
    7193           0 :                 return -1;
    7194             :         }
    7195           0 :         object->in.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info);
    7196           0 :         if (object->in.info == NULL) {
    7197           0 :                 PyErr_NoMemory();
    7198           0 :                 return -1;
    7199             :         }
    7200           0 :         PY_CHECK_TYPE(&wbint_userinfo_Type, value, return -1;);
    7201           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7202           0 :                 PyErr_NoMemory();
    7203           0 :                 return -1;
    7204             :         }
    7205           0 :         object->in.info = (struct wbint_userinfo *)pytalloc_get_ptr(value);
    7206           0 :         return 0;
    7207             : }
    7208             : 
    7209           0 : static PyObject *py_wbint_GetNssInfo_out_get_info(PyObject *obj, void *closure)
    7210             : {
    7211           0 :         struct wbint_GetNssInfo *object = (struct wbint_GetNssInfo *)pytalloc_get_ptr(obj);
    7212           0 :         PyObject *py_info;
    7213           0 :         if (object->out.info == NULL) {
    7214           0 :                 Py_RETURN_NONE;
    7215             :         }
    7216           0 :         py_info = pytalloc_reference_ex(&wbint_userinfo_Type, object->out.info, object->out.info);
    7217           0 :         return py_info;
    7218             : }
    7219             : 
    7220           0 : static int py_wbint_GetNssInfo_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
    7221             : {
    7222           0 :         struct wbint_GetNssInfo *object = (struct wbint_GetNssInfo *)pytalloc_get_ptr(py_obj);
    7223           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
    7224           0 :         if (value == NULL) {
    7225           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
    7226           0 :                 return -1;
    7227             :         }
    7228           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
    7229           0 :         if (object->out.info == NULL) {
    7230           0 :                 PyErr_NoMemory();
    7231           0 :                 return -1;
    7232             :         }
    7233           0 :         PY_CHECK_TYPE(&wbint_userinfo_Type, value, return -1;);
    7234           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7235           0 :                 PyErr_NoMemory();
    7236           0 :                 return -1;
    7237             :         }
    7238           0 :         object->out.info = (struct wbint_userinfo *)pytalloc_get_ptr(value);
    7239           0 :         return 0;
    7240             : }
    7241             : 
    7242           0 : static PyObject *py_wbint_GetNssInfo_get_result(PyObject *obj, void *closure)
    7243             : {
    7244           0 :         struct wbint_GetNssInfo *object = (struct wbint_GetNssInfo *)pytalloc_get_ptr(obj);
    7245           0 :         PyObject *py_result;
    7246           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    7247           0 :         return py_result;
    7248             : }
    7249             : 
    7250           0 : static int py_wbint_GetNssInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
    7251             : {
    7252           0 :         struct wbint_GetNssInfo *object = (struct wbint_GetNssInfo *)pytalloc_get_ptr(py_obj);
    7253           0 :         if (value == NULL) {
    7254           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    7255           0 :                 return -1;
    7256             :         }
    7257           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    7258           0 :         return 0;
    7259             : }
    7260             : 
    7261             : static PyGetSetDef py_wbint_GetNssInfo_getsetters[] = {
    7262             :         {
    7263             :                 .name = discard_const_p(char, "in_info"),
    7264             :                 .get = py_wbint_GetNssInfo_in_get_info,
    7265             :                 .set = py_wbint_GetNssInfo_in_set_info,
    7266             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_userinfo")
    7267             :         },
    7268             :         {
    7269             :                 .name = discard_const_p(char, "out_info"),
    7270             :                 .get = py_wbint_GetNssInfo_out_get_info,
    7271             :                 .set = py_wbint_GetNssInfo_out_set_info,
    7272             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_userinfo")
    7273             :         },
    7274             :         {
    7275             :                 .name = discard_const_p(char, "result"),
    7276             :                 .get = py_wbint_GetNssInfo_get_result,
    7277             :                 .set = py_wbint_GetNssInfo_set_result,
    7278             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    7279             :         },
    7280             :         { .name = NULL }
    7281             : };
    7282             : 
    7283           0 : static PyObject *py_wbint_GetNssInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7284             : {
    7285           0 :         PyObject *self = pytalloc_new(struct wbint_GetNssInfo, type);
    7286           0 :         struct wbint_GetNssInfo *_self = (struct wbint_GetNssInfo *)pytalloc_get_ptr(self);
    7287           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    7288           0 :         _self->in.info = talloc_zero(mem_ctx, struct wbint_userinfo);
    7289           0 :         _self->out.info = talloc_zero(mem_ctx, struct wbint_userinfo);
    7290           0 :         return self;
    7291             : }
    7292             : 
    7293           0 : static PyObject *py_wbint_GetNssInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    7294             : {
    7295             : 
    7296             : 
    7297           0 :         return PyLong_FromLong(8);
    7298             : }
    7299             : 
    7300           0 : static PyObject *py_wbint_GetNssInfo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
    7301             : {
    7302           0 :         const struct ndr_interface_call *call = NULL;
    7303           0 :         struct wbint_GetNssInfo *object = (struct wbint_GetNssInfo *)pytalloc_get_ptr(py_obj);
    7304           0 :         PyObject *ret = NULL;
    7305           0 :         struct ndr_push *push = NULL;
    7306           0 :         DATA_BLOB blob;
    7307           0 :         enum ndr_err_code err;
    7308             : 
    7309           0 :         if (ndr_table_winbind.num_calls < 9) {
    7310           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_GetNssInfo_ndr_pack");
    7311           0 :                 return NULL;
    7312             :         }
    7313           0 :         call = &ndr_table_winbind.calls[8];
    7314             : 
    7315           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    7316           0 :         if (push == NULL) {
    7317           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7318           0 :                 return NULL;
    7319             :         }
    7320             : 
    7321           0 :         push->flags |= ndr_push_flags;
    7322             : 
    7323           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    7324           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7325           0 :                 TALLOC_FREE(push);
    7326           0 :                 PyErr_SetNdrError(err);
    7327           0 :                 return NULL;
    7328             :         }
    7329           0 :         blob = ndr_push_blob(push);
    7330           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    7331           0 :         TALLOC_FREE(push);
    7332           0 :         return ret;
    7333             : }
    7334             : 
    7335           0 : static PyObject *py_wbint_GetNssInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7336             : {
    7337           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    7338           0 :         PyObject *bigendian_obj = NULL;
    7339           0 :         PyObject *ndr64_obj = NULL;
    7340           0 :         libndr_flags ndr_push_flags = 0;
    7341             : 
    7342           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    7343             :                 discard_const_p(char *, kwnames),
    7344             :                 &bigendian_obj,
    7345             :                 &ndr64_obj)) {
    7346           0 :                 return NULL;
    7347             :         }
    7348             : 
    7349           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    7350           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    7351             :         }
    7352           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    7353           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    7354             :         }
    7355             : 
    7356           0 :         return py_wbint_GetNssInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    7357             : }
    7358             : 
    7359           0 : static PyObject *py_wbint_GetNssInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7360             : {
    7361           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    7362           0 :         PyObject *bigendian_obj = NULL;
    7363           0 :         PyObject *ndr64_obj = NULL;
    7364           0 :         libndr_flags ndr_push_flags = 0;
    7365             : 
    7366           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    7367             :                 discard_const_p(char *, kwnames),
    7368             :                 &bigendian_obj,
    7369             :                 &ndr64_obj)) {
    7370           0 :                 return NULL;
    7371             :         }
    7372             : 
    7373           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    7374           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    7375             :         }
    7376           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    7377           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    7378             :         }
    7379             : 
    7380           0 :         return py_wbint_GetNssInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    7381             : }
    7382             : 
    7383           0 : static PyObject *py_wbint_GetNssInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
    7384             : {
    7385           0 :         const struct ndr_interface_call *call = NULL;
    7386           0 :         struct wbint_GetNssInfo *object = (struct wbint_GetNssInfo *)pytalloc_get_ptr(py_obj);
    7387           0 :         struct ndr_pull *pull = NULL;
    7388           0 :         enum ndr_err_code err;
    7389             : 
    7390           0 :         if (ndr_table_winbind.num_calls < 9) {
    7391           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_GetNssInfo_ndr_unpack");
    7392           0 :                 return NULL;
    7393             :         }
    7394           0 :         call = &ndr_table_winbind.calls[8];
    7395             : 
    7396           0 :         pull = ndr_pull_init_blob(blob, object);
    7397           0 :         if (pull == NULL) {
    7398           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7399           0 :                 return NULL;
    7400             :         }
    7401             : 
    7402           0 :         pull->flags |= ndr_pull_flags;
    7403             : 
    7404           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    7405           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7406           0 :                 TALLOC_FREE(pull);
    7407           0 :                 PyErr_SetNdrError(err);
    7408           0 :                 return NULL;
    7409             :         }
    7410           0 :         if (!allow_remaining) {
    7411           0 :                 uint32_t highest_ofs;
    7412             : 
    7413           0 :                 if (pull->offset > pull->relative_highest_offset) {
    7414           0 :                         highest_ofs = pull->offset;
    7415             :                 } else {
    7416           0 :                         highest_ofs = pull->relative_highest_offset;
    7417             :                 }
    7418           0 :                 if (highest_ofs < pull->data_size) {
    7419           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    7420             :                                 "not all bytes consumed ofs[%u] size[%u]",
    7421             :                                 highest_ofs, pull->data_size);
    7422           0 :                         TALLOC_FREE(pull);
    7423           0 :                         PyErr_SetNdrError(err);
    7424           0 :                         return NULL;
    7425             :                 }
    7426             :         }
    7427             : 
    7428           0 :         TALLOC_FREE(pull);
    7429           0 :         Py_RETURN_NONE;
    7430             : }
    7431             : 
    7432           0 : static PyObject *py_wbint_GetNssInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7433             : {
    7434           0 :         DATA_BLOB blob;
    7435           0 :         Py_ssize_t blob_length = 0;
    7436           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    7437           0 :         PyObject *bigendian_obj = NULL;
    7438           0 :         PyObject *ndr64_obj = NULL;
    7439           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    7440           0 :         PyObject *allow_remaining_obj = NULL;
    7441           0 :         bool allow_remaining = false;
    7442             : 
    7443           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    7444             :                 discard_const_p(char *, kwnames),
    7445             :                 &blob.data, &blob_length,
    7446             :                 &bigendian_obj,
    7447             :                 &ndr64_obj,
    7448             :                 &allow_remaining_obj)) {
    7449           0 :                 return NULL;
    7450             :         }
    7451           0 :         blob.length = blob_length;
    7452             : 
    7453           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    7454           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    7455             :         }
    7456           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    7457           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    7458             :         }
    7459             : 
    7460           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7461           0 :                 allow_remaining = true;
    7462             :         }
    7463             : 
    7464           0 :         return py_wbint_GetNssInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    7465             : }
    7466             : 
    7467           0 : static PyObject *py_wbint_GetNssInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7468             : {
    7469           0 :         DATA_BLOB blob;
    7470           0 :         Py_ssize_t blob_length = 0;
    7471           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    7472           0 :         PyObject *bigendian_obj = NULL;
    7473           0 :         PyObject *ndr64_obj = NULL;
    7474           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    7475           0 :         PyObject *allow_remaining_obj = NULL;
    7476           0 :         bool allow_remaining = false;
    7477             : 
    7478           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    7479             :                 discard_const_p(char *, kwnames),
    7480             :                 &blob.data, &blob_length,
    7481             :                 &bigendian_obj,
    7482             :                 &ndr64_obj,
    7483             :                 &allow_remaining_obj)) {
    7484           0 :                 return NULL;
    7485             :         }
    7486           0 :         blob.length = blob_length;
    7487             : 
    7488           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    7489           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    7490             :         }
    7491           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    7492           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    7493             :         }
    7494             : 
    7495           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7496           0 :                 allow_remaining = true;
    7497             :         }
    7498             : 
    7499           0 :         return py_wbint_GetNssInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    7500             : }
    7501             : 
    7502           0 : static PyObject *py_wbint_GetNssInfo_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
    7503             : {
    7504           0 :         const struct ndr_interface_call *call = NULL;
    7505           0 :         struct wbint_GetNssInfo *object = (struct wbint_GetNssInfo *)pytalloc_get_ptr(py_obj);
    7506           0 :         PyObject *ret;
    7507           0 :         char *retstr;
    7508             : 
    7509           0 :         if (ndr_table_winbind.num_calls < 9) {
    7510           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_GetNssInfo_ndr_print");
    7511           0 :                 return NULL;
    7512             :         }
    7513           0 :         call = &ndr_table_winbind.calls[8];
    7514             : 
    7515           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    7516           0 :         ret = PyUnicode_FromString(retstr);
    7517           0 :         TALLOC_FREE(retstr);
    7518             : 
    7519           0 :         return ret;
    7520             : }
    7521             : 
    7522           0 : static PyObject *py_wbint_GetNssInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7523             : {
    7524           0 :         return py_wbint_GetNssInfo_ndr_print(py_obj, "wbint_GetNssInfo_in", NDR_IN);
    7525             : }
    7526             : 
    7527           0 : static PyObject *py_wbint_GetNssInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7528             : {
    7529           0 :         return py_wbint_GetNssInfo_ndr_print(py_obj, "wbint_GetNssInfo_out", NDR_OUT);
    7530             : }
    7531             : 
    7532             : static PyMethodDef py_wbint_GetNssInfo_methods[] = {
    7533             :         { "opnum", (PyCFunction)py_wbint_GetNssInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
    7534             :                 "winbind.wbint_GetNssInfo.opnum() -> 8 (0x08) " },
    7535             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_GetNssInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    7536             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    7537             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_GetNssInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    7538             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    7539             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_GetNssInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    7540             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    7541             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_GetNssInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    7542             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    7543             :         { "__ndr_print_in__", (PyCFunction)py_wbint_GetNssInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    7544             :         { "__ndr_print_out__", (PyCFunction)py_wbint_GetNssInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    7545             :         { NULL, NULL, 0, NULL }
    7546             : };
    7547             : 
    7548             : 
    7549             : static PyTypeObject wbint_GetNssInfo_Type = {
    7550             :         PyVarObject_HEAD_INIT(NULL, 0)
    7551             :         .tp_name = "winbind.wbint_GetNssInfo",
    7552             :         .tp_getset = py_wbint_GetNssInfo_getsetters,
    7553             :         .tp_methods = py_wbint_GetNssInfo_methods,
    7554             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7555             :         .tp_new = py_wbint_GetNssInfo_new,
    7556             : };
    7557             : 
    7558           0 : static bool pack_py_wbint_GetNssInfo_args_in(PyObject *args, PyObject *kwargs, struct wbint_GetNssInfo *r)
    7559             : {
    7560           0 :         PyObject *py_info;
    7561           0 :         const char *kwnames[] = {
    7562             :                 "info", NULL
    7563             :         };
    7564             : 
    7565           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:wbint_GetNssInfo", discard_const_p(char *, kwnames), &py_info)) {
    7566           0 :                 return false;
    7567             :         }
    7568             : 
    7569           0 :         if (py_info == NULL) {
    7570           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info");
    7571           0 :                 return false;
    7572             :         }
    7573           0 :         r->in.info = talloc_ptrtype(r, r->in.info);
    7574           0 :         if (r->in.info == NULL) {
    7575           0 :                 PyErr_NoMemory();
    7576           0 :                 return false;
    7577             :         }
    7578           0 :         PY_CHECK_TYPE(&wbint_userinfo_Type, py_info, return false;);
    7579           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info)) == NULL) {
    7580           0 :                 PyErr_NoMemory();
    7581           0 :                 return false;
    7582             :         }
    7583           0 :         r->in.info = (struct wbint_userinfo *)pytalloc_get_ptr(py_info);
    7584           0 :         return true;
    7585             : }
    7586             : 
    7587           0 : static PyObject *unpack_py_wbint_GetNssInfo_args_out(struct wbint_GetNssInfo *r)
    7588             : {
    7589           0 :         PyObject *result;
    7590           0 :         PyObject *py_info;
    7591           0 :         py_info = pytalloc_reference_ex(&wbint_userinfo_Type, r->out.info, r->out.info);
    7592           0 :         result = py_info;
    7593           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    7594           0 :                 PyErr_SetNTSTATUS(r->out.result);
    7595           0 :                 return NULL;
    7596             :         }
    7597             : 
    7598           0 :         return result;
    7599             : }
    7600             : 
    7601             : 
    7602           0 : static PyObject *py_wbint_LookupUserAliases_in_get_sids(PyObject *obj, void *closure)
    7603             : {
    7604           0 :         struct wbint_LookupUserAliases *object = (struct wbint_LookupUserAliases *)pytalloc_get_ptr(obj);
    7605           0 :         PyObject *py_sids;
    7606           0 :         if (object->in.sids == NULL) {
    7607           0 :                 Py_RETURN_NONE;
    7608             :         }
    7609           0 :         py_sids = pytalloc_reference_ex(&wbint_SidArray_Type, object->in.sids, object->in.sids);
    7610           0 :         return py_sids;
    7611             : }
    7612             : 
    7613           0 : static int py_wbint_LookupUserAliases_in_set_sids(PyObject *py_obj, PyObject *value, void *closure)
    7614             : {
    7615           0 :         struct wbint_LookupUserAliases *object = (struct wbint_LookupUserAliases *)pytalloc_get_ptr(py_obj);
    7616           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sids));
    7617           0 :         if (value == NULL) {
    7618           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.sids");
    7619           0 :                 return -1;
    7620             :         }
    7621           0 :         object->in.sids = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sids);
    7622           0 :         if (object->in.sids == NULL) {
    7623           0 :                 PyErr_NoMemory();
    7624           0 :                 return -1;
    7625             :         }
    7626           0 :         PY_CHECK_TYPE(&wbint_SidArray_Type, value, return -1;);
    7627           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7628           0 :                 PyErr_NoMemory();
    7629           0 :                 return -1;
    7630             :         }
    7631           0 :         object->in.sids = (struct wbint_SidArray *)pytalloc_get_ptr(value);
    7632           0 :         return 0;
    7633             : }
    7634             : 
    7635           0 : static PyObject *py_wbint_LookupUserAliases_out_get_rids(PyObject *obj, void *closure)
    7636             : {
    7637           0 :         struct wbint_LookupUserAliases *object = (struct wbint_LookupUserAliases *)pytalloc_get_ptr(obj);
    7638           0 :         PyObject *py_rids;
    7639           0 :         if (object->out.rids == NULL) {
    7640           0 :                 Py_RETURN_NONE;
    7641             :         }
    7642           0 :         py_rids = pytalloc_reference_ex(&wbint_RidArray_Type, object->out.rids, object->out.rids);
    7643           0 :         return py_rids;
    7644             : }
    7645             : 
    7646           0 : static int py_wbint_LookupUserAliases_out_set_rids(PyObject *py_obj, PyObject *value, void *closure)
    7647             : {
    7648           0 :         struct wbint_LookupUserAliases *object = (struct wbint_LookupUserAliases *)pytalloc_get_ptr(py_obj);
    7649           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.rids));
    7650           0 :         if (value == NULL) {
    7651           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.rids");
    7652           0 :                 return -1;
    7653             :         }
    7654           0 :         object->out.rids = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.rids);
    7655           0 :         if (object->out.rids == NULL) {
    7656           0 :                 PyErr_NoMemory();
    7657           0 :                 return -1;
    7658             :         }
    7659           0 :         PY_CHECK_TYPE(&wbint_RidArray_Type, value, return -1;);
    7660           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7661           0 :                 PyErr_NoMemory();
    7662           0 :                 return -1;
    7663             :         }
    7664           0 :         object->out.rids = (struct wbint_RidArray *)pytalloc_get_ptr(value);
    7665           0 :         return 0;
    7666             : }
    7667             : 
    7668           0 : static PyObject *py_wbint_LookupUserAliases_get_result(PyObject *obj, void *closure)
    7669             : {
    7670           0 :         struct wbint_LookupUserAliases *object = (struct wbint_LookupUserAliases *)pytalloc_get_ptr(obj);
    7671           0 :         PyObject *py_result;
    7672           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    7673           0 :         return py_result;
    7674             : }
    7675             : 
    7676           0 : static int py_wbint_LookupUserAliases_set_result(PyObject *py_obj, PyObject *value, void *closure)
    7677             : {
    7678           0 :         struct wbint_LookupUserAliases *object = (struct wbint_LookupUserAliases *)pytalloc_get_ptr(py_obj);
    7679           0 :         if (value == NULL) {
    7680           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    7681           0 :                 return -1;
    7682             :         }
    7683           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    7684           0 :         return 0;
    7685             : }
    7686             : 
    7687             : static PyGetSetDef py_wbint_LookupUserAliases_getsetters[] = {
    7688             :         {
    7689             :                 .name = discard_const_p(char, "in_sids"),
    7690             :                 .get = py_wbint_LookupUserAliases_in_get_sids,
    7691             :                 .set = py_wbint_LookupUserAliases_in_set_sids,
    7692             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_SidArray")
    7693             :         },
    7694             :         {
    7695             :                 .name = discard_const_p(char, "out_rids"),
    7696             :                 .get = py_wbint_LookupUserAliases_out_get_rids,
    7697             :                 .set = py_wbint_LookupUserAliases_out_set_rids,
    7698             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_RidArray")
    7699             :         },
    7700             :         {
    7701             :                 .name = discard_const_p(char, "result"),
    7702             :                 .get = py_wbint_LookupUserAliases_get_result,
    7703             :                 .set = py_wbint_LookupUserAliases_set_result,
    7704             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    7705             :         },
    7706             :         { .name = NULL }
    7707             : };
    7708             : 
    7709           0 : static PyObject *py_wbint_LookupUserAliases_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7710             : {
    7711           0 :         PyObject *self = pytalloc_new(struct wbint_LookupUserAliases, type);
    7712           0 :         struct wbint_LookupUserAliases *_self = (struct wbint_LookupUserAliases *)pytalloc_get_ptr(self);
    7713           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    7714           0 :         _self->in.sids = talloc_zero(mem_ctx, struct wbint_SidArray);
    7715           0 :         _self->out.rids = talloc_zero(mem_ctx, struct wbint_RidArray);
    7716           0 :         return self;
    7717             : }
    7718             : 
    7719           0 : static PyObject *py_wbint_LookupUserAliases_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    7720             : {
    7721             : 
    7722             : 
    7723           0 :         return PyLong_FromLong(9);
    7724             : }
    7725             : 
    7726           0 : static PyObject *py_wbint_LookupUserAliases_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
    7727             : {
    7728           0 :         const struct ndr_interface_call *call = NULL;
    7729           0 :         struct wbint_LookupUserAliases *object = (struct wbint_LookupUserAliases *)pytalloc_get_ptr(py_obj);
    7730           0 :         PyObject *ret = NULL;
    7731           0 :         struct ndr_push *push = NULL;
    7732           0 :         DATA_BLOB blob;
    7733           0 :         enum ndr_err_code err;
    7734             : 
    7735           0 :         if (ndr_table_winbind.num_calls < 10) {
    7736           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupUserAliases_ndr_pack");
    7737           0 :                 return NULL;
    7738             :         }
    7739           0 :         call = &ndr_table_winbind.calls[9];
    7740             : 
    7741           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    7742           0 :         if (push == NULL) {
    7743           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7744           0 :                 return NULL;
    7745             :         }
    7746             : 
    7747           0 :         push->flags |= ndr_push_flags;
    7748             : 
    7749           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    7750           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7751           0 :                 TALLOC_FREE(push);
    7752           0 :                 PyErr_SetNdrError(err);
    7753           0 :                 return NULL;
    7754             :         }
    7755           0 :         blob = ndr_push_blob(push);
    7756           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    7757           0 :         TALLOC_FREE(push);
    7758           0 :         return ret;
    7759             : }
    7760             : 
    7761           0 : static PyObject *py_wbint_LookupUserAliases_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7762             : {
    7763           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    7764           0 :         PyObject *bigendian_obj = NULL;
    7765           0 :         PyObject *ndr64_obj = NULL;
    7766           0 :         libndr_flags ndr_push_flags = 0;
    7767             : 
    7768           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    7769             :                 discard_const_p(char *, kwnames),
    7770             :                 &bigendian_obj,
    7771             :                 &ndr64_obj)) {
    7772           0 :                 return NULL;
    7773             :         }
    7774             : 
    7775           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    7776           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    7777             :         }
    7778           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    7779           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    7780             :         }
    7781             : 
    7782           0 :         return py_wbint_LookupUserAliases_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    7783             : }
    7784             : 
    7785           0 : static PyObject *py_wbint_LookupUserAliases_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7786             : {
    7787           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    7788           0 :         PyObject *bigendian_obj = NULL;
    7789           0 :         PyObject *ndr64_obj = NULL;
    7790           0 :         libndr_flags ndr_push_flags = 0;
    7791             : 
    7792           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    7793             :                 discard_const_p(char *, kwnames),
    7794             :                 &bigendian_obj,
    7795             :                 &ndr64_obj)) {
    7796           0 :                 return NULL;
    7797             :         }
    7798             : 
    7799           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    7800           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    7801             :         }
    7802           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    7803           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    7804             :         }
    7805             : 
    7806           0 :         return py_wbint_LookupUserAliases_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    7807             : }
    7808             : 
    7809           0 : static PyObject *py_wbint_LookupUserAliases_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
    7810             : {
    7811           0 :         const struct ndr_interface_call *call = NULL;
    7812           0 :         struct wbint_LookupUserAliases *object = (struct wbint_LookupUserAliases *)pytalloc_get_ptr(py_obj);
    7813           0 :         struct ndr_pull *pull = NULL;
    7814           0 :         enum ndr_err_code err;
    7815             : 
    7816           0 :         if (ndr_table_winbind.num_calls < 10) {
    7817           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupUserAliases_ndr_unpack");
    7818           0 :                 return NULL;
    7819             :         }
    7820           0 :         call = &ndr_table_winbind.calls[9];
    7821             : 
    7822           0 :         pull = ndr_pull_init_blob(blob, object);
    7823           0 :         if (pull == NULL) {
    7824           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7825           0 :                 return NULL;
    7826             :         }
    7827             : 
    7828           0 :         pull->flags |= ndr_pull_flags;
    7829             : 
    7830           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    7831           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7832           0 :                 TALLOC_FREE(pull);
    7833           0 :                 PyErr_SetNdrError(err);
    7834           0 :                 return NULL;
    7835             :         }
    7836           0 :         if (!allow_remaining) {
    7837           0 :                 uint32_t highest_ofs;
    7838             : 
    7839           0 :                 if (pull->offset > pull->relative_highest_offset) {
    7840           0 :                         highest_ofs = pull->offset;
    7841             :                 } else {
    7842           0 :                         highest_ofs = pull->relative_highest_offset;
    7843             :                 }
    7844           0 :                 if (highest_ofs < pull->data_size) {
    7845           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    7846             :                                 "not all bytes consumed ofs[%u] size[%u]",
    7847             :                                 highest_ofs, pull->data_size);
    7848           0 :                         TALLOC_FREE(pull);
    7849           0 :                         PyErr_SetNdrError(err);
    7850           0 :                         return NULL;
    7851             :                 }
    7852             :         }
    7853             : 
    7854           0 :         TALLOC_FREE(pull);
    7855           0 :         Py_RETURN_NONE;
    7856             : }
    7857             : 
    7858           0 : static PyObject *py_wbint_LookupUserAliases_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7859             : {
    7860           0 :         DATA_BLOB blob;
    7861           0 :         Py_ssize_t blob_length = 0;
    7862           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    7863           0 :         PyObject *bigendian_obj = NULL;
    7864           0 :         PyObject *ndr64_obj = NULL;
    7865           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    7866           0 :         PyObject *allow_remaining_obj = NULL;
    7867           0 :         bool allow_remaining = false;
    7868             : 
    7869           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    7870             :                 discard_const_p(char *, kwnames),
    7871             :                 &blob.data, &blob_length,
    7872             :                 &bigendian_obj,
    7873             :                 &ndr64_obj,
    7874             :                 &allow_remaining_obj)) {
    7875           0 :                 return NULL;
    7876             :         }
    7877           0 :         blob.length = blob_length;
    7878             : 
    7879           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    7880           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    7881             :         }
    7882           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    7883           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    7884             :         }
    7885             : 
    7886           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7887           0 :                 allow_remaining = true;
    7888             :         }
    7889             : 
    7890           0 :         return py_wbint_LookupUserAliases_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    7891             : }
    7892             : 
    7893           0 : static PyObject *py_wbint_LookupUserAliases_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7894             : {
    7895           0 :         DATA_BLOB blob;
    7896           0 :         Py_ssize_t blob_length = 0;
    7897           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    7898           0 :         PyObject *bigendian_obj = NULL;
    7899           0 :         PyObject *ndr64_obj = NULL;
    7900           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    7901           0 :         PyObject *allow_remaining_obj = NULL;
    7902           0 :         bool allow_remaining = false;
    7903             : 
    7904           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    7905             :                 discard_const_p(char *, kwnames),
    7906             :                 &blob.data, &blob_length,
    7907             :                 &bigendian_obj,
    7908             :                 &ndr64_obj,
    7909             :                 &allow_remaining_obj)) {
    7910           0 :                 return NULL;
    7911             :         }
    7912           0 :         blob.length = blob_length;
    7913             : 
    7914           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    7915           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    7916             :         }
    7917           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    7918           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    7919             :         }
    7920             : 
    7921           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7922           0 :                 allow_remaining = true;
    7923             :         }
    7924             : 
    7925           0 :         return py_wbint_LookupUserAliases_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    7926             : }
    7927             : 
    7928           0 : static PyObject *py_wbint_LookupUserAliases_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
    7929             : {
    7930           0 :         const struct ndr_interface_call *call = NULL;
    7931           0 :         struct wbint_LookupUserAliases *object = (struct wbint_LookupUserAliases *)pytalloc_get_ptr(py_obj);
    7932           0 :         PyObject *ret;
    7933           0 :         char *retstr;
    7934             : 
    7935           0 :         if (ndr_table_winbind.num_calls < 10) {
    7936           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupUserAliases_ndr_print");
    7937           0 :                 return NULL;
    7938             :         }
    7939           0 :         call = &ndr_table_winbind.calls[9];
    7940             : 
    7941           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    7942           0 :         ret = PyUnicode_FromString(retstr);
    7943           0 :         TALLOC_FREE(retstr);
    7944             : 
    7945           0 :         return ret;
    7946             : }
    7947             : 
    7948           0 : static PyObject *py_wbint_LookupUserAliases_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7949             : {
    7950           0 :         return py_wbint_LookupUserAliases_ndr_print(py_obj, "wbint_LookupUserAliases_in", NDR_IN);
    7951             : }
    7952             : 
    7953           0 : static PyObject *py_wbint_LookupUserAliases_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7954             : {
    7955           0 :         return py_wbint_LookupUserAliases_ndr_print(py_obj, "wbint_LookupUserAliases_out", NDR_OUT);
    7956             : }
    7957             : 
    7958             : static PyMethodDef py_wbint_LookupUserAliases_methods[] = {
    7959             :         { "opnum", (PyCFunction)py_wbint_LookupUserAliases_ndr_opnum, METH_NOARGS|METH_CLASS,
    7960             :                 "winbind.wbint_LookupUserAliases.opnum() -> 9 (0x09) " },
    7961             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupUserAliases_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    7962             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    7963             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupUserAliases_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    7964             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    7965             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupUserAliases_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    7966             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    7967             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupUserAliases_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    7968             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    7969             :         { "__ndr_print_in__", (PyCFunction)py_wbint_LookupUserAliases_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    7970             :         { "__ndr_print_out__", (PyCFunction)py_wbint_LookupUserAliases_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    7971             :         { NULL, NULL, 0, NULL }
    7972             : };
    7973             : 
    7974             : 
    7975             : static PyTypeObject wbint_LookupUserAliases_Type = {
    7976             :         PyVarObject_HEAD_INIT(NULL, 0)
    7977             :         .tp_name = "winbind.wbint_LookupUserAliases",
    7978             :         .tp_getset = py_wbint_LookupUserAliases_getsetters,
    7979             :         .tp_methods = py_wbint_LookupUserAliases_methods,
    7980             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7981             :         .tp_new = py_wbint_LookupUserAliases_new,
    7982             : };
    7983             : 
    7984           0 : static bool pack_py_wbint_LookupUserAliases_args_in(PyObject *args, PyObject *kwargs, struct wbint_LookupUserAliases *r)
    7985             : {
    7986           0 :         PyObject *py_sids;
    7987           0 :         const char *kwnames[] = {
    7988             :                 "sids", NULL
    7989             :         };
    7990             : 
    7991           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:wbint_LookupUserAliases", discard_const_p(char *, kwnames), &py_sids)) {
    7992           0 :                 return false;
    7993             :         }
    7994             : 
    7995           0 :         if (py_sids == NULL) {
    7996           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.sids");
    7997           0 :                 return false;
    7998             :         }
    7999           0 :         r->in.sids = talloc_ptrtype(r, r->in.sids);
    8000           0 :         if (r->in.sids == NULL) {
    8001           0 :                 PyErr_NoMemory();
    8002           0 :                 return false;
    8003             :         }
    8004           0 :         PY_CHECK_TYPE(&wbint_SidArray_Type, py_sids, return false;);
    8005           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_sids)) == NULL) {
    8006           0 :                 PyErr_NoMemory();
    8007           0 :                 return false;
    8008             :         }
    8009           0 :         r->in.sids = (struct wbint_SidArray *)pytalloc_get_ptr(py_sids);
    8010           0 :         return true;
    8011             : }
    8012             : 
    8013           0 : static PyObject *unpack_py_wbint_LookupUserAliases_args_out(struct wbint_LookupUserAliases *r)
    8014             : {
    8015           0 :         PyObject *result;
    8016           0 :         PyObject *py_rids;
    8017           0 :         py_rids = pytalloc_reference_ex(&wbint_RidArray_Type, r->out.rids, r->out.rids);
    8018           0 :         result = py_rids;
    8019           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    8020           0 :                 PyErr_SetNTSTATUS(r->out.result);
    8021           0 :                 return NULL;
    8022             :         }
    8023             : 
    8024           0 :         return result;
    8025             : }
    8026             : 
    8027             : 
    8028           0 : static PyObject *py_wbint_LookupUserGroups_in_get_sid(PyObject *obj, void *closure)
    8029             : {
    8030           0 :         struct wbint_LookupUserGroups *object = (struct wbint_LookupUserGroups *)pytalloc_get_ptr(obj);
    8031           0 :         PyObject *py_sid;
    8032           0 :         if (object->in.sid == NULL) {
    8033           0 :                 Py_RETURN_NONE;
    8034             :         }
    8035           0 :         py_sid = pytalloc_reference_ex(dom_sid_Type, object->in.sid, object->in.sid);
    8036           0 :         return py_sid;
    8037             : }
    8038             : 
    8039           0 : static int py_wbint_LookupUserGroups_in_set_sid(PyObject *py_obj, PyObject *value, void *closure)
    8040             : {
    8041           0 :         struct wbint_LookupUserGroups *object = (struct wbint_LookupUserGroups *)pytalloc_get_ptr(py_obj);
    8042           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sid));
    8043           0 :         if (value == NULL) {
    8044           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.sid");
    8045           0 :                 return -1;
    8046             :         }
    8047           0 :         object->in.sid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sid);
    8048           0 :         if (object->in.sid == NULL) {
    8049           0 :                 PyErr_NoMemory();
    8050           0 :                 return -1;
    8051             :         }
    8052           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    8053           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8054           0 :                 PyErr_NoMemory();
    8055           0 :                 return -1;
    8056             :         }
    8057           0 :         object->in.sid = (struct dom_sid *)pytalloc_get_ptr(value);
    8058           0 :         return 0;
    8059             : }
    8060             : 
    8061           0 : static PyObject *py_wbint_LookupUserGroups_out_get_sids(PyObject *obj, void *closure)
    8062             : {
    8063           0 :         struct wbint_LookupUserGroups *object = (struct wbint_LookupUserGroups *)pytalloc_get_ptr(obj);
    8064           0 :         PyObject *py_sids;
    8065           0 :         if (object->out.sids == NULL) {
    8066           0 :                 Py_RETURN_NONE;
    8067             :         }
    8068           0 :         py_sids = pytalloc_reference_ex(&wbint_SidArray_Type, object->out.sids, object->out.sids);
    8069           0 :         return py_sids;
    8070             : }
    8071             : 
    8072           0 : static int py_wbint_LookupUserGroups_out_set_sids(PyObject *py_obj, PyObject *value, void *closure)
    8073             : {
    8074           0 :         struct wbint_LookupUserGroups *object = (struct wbint_LookupUserGroups *)pytalloc_get_ptr(py_obj);
    8075           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sids));
    8076           0 :         if (value == NULL) {
    8077           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.sids");
    8078           0 :                 return -1;
    8079             :         }
    8080           0 :         object->out.sids = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sids);
    8081           0 :         if (object->out.sids == NULL) {
    8082           0 :                 PyErr_NoMemory();
    8083           0 :                 return -1;
    8084             :         }
    8085           0 :         PY_CHECK_TYPE(&wbint_SidArray_Type, value, return -1;);
    8086           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8087           0 :                 PyErr_NoMemory();
    8088           0 :                 return -1;
    8089             :         }
    8090           0 :         object->out.sids = (struct wbint_SidArray *)pytalloc_get_ptr(value);
    8091           0 :         return 0;
    8092             : }
    8093             : 
    8094           0 : static PyObject *py_wbint_LookupUserGroups_get_result(PyObject *obj, void *closure)
    8095             : {
    8096           0 :         struct wbint_LookupUserGroups *object = (struct wbint_LookupUserGroups *)pytalloc_get_ptr(obj);
    8097           0 :         PyObject *py_result;
    8098           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    8099           0 :         return py_result;
    8100             : }
    8101             : 
    8102           0 : static int py_wbint_LookupUserGroups_set_result(PyObject *py_obj, PyObject *value, void *closure)
    8103             : {
    8104           0 :         struct wbint_LookupUserGroups *object = (struct wbint_LookupUserGroups *)pytalloc_get_ptr(py_obj);
    8105           0 :         if (value == NULL) {
    8106           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    8107           0 :                 return -1;
    8108             :         }
    8109           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    8110           0 :         return 0;
    8111             : }
    8112             : 
    8113             : static PyGetSetDef py_wbint_LookupUserGroups_getsetters[] = {
    8114             :         {
    8115             :                 .name = discard_const_p(char, "in_sid"),
    8116             :                 .get = py_wbint_LookupUserGroups_in_get_sid,
    8117             :                 .set = py_wbint_LookupUserGroups_in_set_sid,
    8118             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
    8119             :         },
    8120             :         {
    8121             :                 .name = discard_const_p(char, "out_sids"),
    8122             :                 .get = py_wbint_LookupUserGroups_out_get_sids,
    8123             :                 .set = py_wbint_LookupUserGroups_out_set_sids,
    8124             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_SidArray")
    8125             :         },
    8126             :         {
    8127             :                 .name = discard_const_p(char, "result"),
    8128             :                 .get = py_wbint_LookupUserGroups_get_result,
    8129             :                 .set = py_wbint_LookupUserGroups_set_result,
    8130             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    8131             :         },
    8132             :         { .name = NULL }
    8133             : };
    8134             : 
    8135           0 : static PyObject *py_wbint_LookupUserGroups_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8136             : {
    8137           0 :         PyObject *self = pytalloc_new(struct wbint_LookupUserGroups, type);
    8138           0 :         struct wbint_LookupUserGroups *_self = (struct wbint_LookupUserGroups *)pytalloc_get_ptr(self);
    8139           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    8140           0 :         _self->in.sid = talloc_zero(mem_ctx, struct dom_sid);
    8141           0 :         _self->out.sids = talloc_zero(mem_ctx, struct wbint_SidArray);
    8142           0 :         return self;
    8143             : }
    8144             : 
    8145           0 : static PyObject *py_wbint_LookupUserGroups_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    8146             : {
    8147             : 
    8148             : 
    8149           0 :         return PyLong_FromLong(10);
    8150             : }
    8151             : 
    8152           0 : static PyObject *py_wbint_LookupUserGroups_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
    8153             : {
    8154           0 :         const struct ndr_interface_call *call = NULL;
    8155           0 :         struct wbint_LookupUserGroups *object = (struct wbint_LookupUserGroups *)pytalloc_get_ptr(py_obj);
    8156           0 :         PyObject *ret = NULL;
    8157           0 :         struct ndr_push *push = NULL;
    8158           0 :         DATA_BLOB blob;
    8159           0 :         enum ndr_err_code err;
    8160             : 
    8161           0 :         if (ndr_table_winbind.num_calls < 11) {
    8162           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupUserGroups_ndr_pack");
    8163           0 :                 return NULL;
    8164             :         }
    8165           0 :         call = &ndr_table_winbind.calls[10];
    8166             : 
    8167           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    8168           0 :         if (push == NULL) {
    8169           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    8170           0 :                 return NULL;
    8171             :         }
    8172             : 
    8173           0 :         push->flags |= ndr_push_flags;
    8174             : 
    8175           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    8176           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    8177           0 :                 TALLOC_FREE(push);
    8178           0 :                 PyErr_SetNdrError(err);
    8179           0 :                 return NULL;
    8180             :         }
    8181           0 :         blob = ndr_push_blob(push);
    8182           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    8183           0 :         TALLOC_FREE(push);
    8184           0 :         return ret;
    8185             : }
    8186             : 
    8187           0 : static PyObject *py_wbint_LookupUserGroups_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    8188             : {
    8189           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    8190           0 :         PyObject *bigendian_obj = NULL;
    8191           0 :         PyObject *ndr64_obj = NULL;
    8192           0 :         libndr_flags ndr_push_flags = 0;
    8193             : 
    8194           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    8195             :                 discard_const_p(char *, kwnames),
    8196             :                 &bigendian_obj,
    8197             :                 &ndr64_obj)) {
    8198           0 :                 return NULL;
    8199             :         }
    8200             : 
    8201           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    8202           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    8203             :         }
    8204           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    8205           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    8206             :         }
    8207             : 
    8208           0 :         return py_wbint_LookupUserGroups_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    8209             : }
    8210             : 
    8211           0 : static PyObject *py_wbint_LookupUserGroups_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    8212             : {
    8213           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    8214           0 :         PyObject *bigendian_obj = NULL;
    8215           0 :         PyObject *ndr64_obj = NULL;
    8216           0 :         libndr_flags ndr_push_flags = 0;
    8217             : 
    8218           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    8219             :                 discard_const_p(char *, kwnames),
    8220             :                 &bigendian_obj,
    8221             :                 &ndr64_obj)) {
    8222           0 :                 return NULL;
    8223             :         }
    8224             : 
    8225           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    8226           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    8227             :         }
    8228           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    8229           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    8230             :         }
    8231             : 
    8232           0 :         return py_wbint_LookupUserGroups_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    8233             : }
    8234             : 
    8235           0 : static PyObject *py_wbint_LookupUserGroups_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
    8236             : {
    8237           0 :         const struct ndr_interface_call *call = NULL;
    8238           0 :         struct wbint_LookupUserGroups *object = (struct wbint_LookupUserGroups *)pytalloc_get_ptr(py_obj);
    8239           0 :         struct ndr_pull *pull = NULL;
    8240           0 :         enum ndr_err_code err;
    8241             : 
    8242           0 :         if (ndr_table_winbind.num_calls < 11) {
    8243           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupUserGroups_ndr_unpack");
    8244           0 :                 return NULL;
    8245             :         }
    8246           0 :         call = &ndr_table_winbind.calls[10];
    8247             : 
    8248           0 :         pull = ndr_pull_init_blob(blob, object);
    8249           0 :         if (pull == NULL) {
    8250           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    8251           0 :                 return NULL;
    8252             :         }
    8253             : 
    8254           0 :         pull->flags |= ndr_pull_flags;
    8255             : 
    8256           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    8257           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    8258           0 :                 TALLOC_FREE(pull);
    8259           0 :                 PyErr_SetNdrError(err);
    8260           0 :                 return NULL;
    8261             :         }
    8262           0 :         if (!allow_remaining) {
    8263           0 :                 uint32_t highest_ofs;
    8264             : 
    8265           0 :                 if (pull->offset > pull->relative_highest_offset) {
    8266           0 :                         highest_ofs = pull->offset;
    8267             :                 } else {
    8268           0 :                         highest_ofs = pull->relative_highest_offset;
    8269             :                 }
    8270           0 :                 if (highest_ofs < pull->data_size) {
    8271           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    8272             :                                 "not all bytes consumed ofs[%u] size[%u]",
    8273             :                                 highest_ofs, pull->data_size);
    8274           0 :                         TALLOC_FREE(pull);
    8275           0 :                         PyErr_SetNdrError(err);
    8276           0 :                         return NULL;
    8277             :                 }
    8278             :         }
    8279             : 
    8280           0 :         TALLOC_FREE(pull);
    8281           0 :         Py_RETURN_NONE;
    8282             : }
    8283             : 
    8284           0 : static PyObject *py_wbint_LookupUserGroups_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    8285             : {
    8286           0 :         DATA_BLOB blob;
    8287           0 :         Py_ssize_t blob_length = 0;
    8288           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    8289           0 :         PyObject *bigendian_obj = NULL;
    8290           0 :         PyObject *ndr64_obj = NULL;
    8291           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    8292           0 :         PyObject *allow_remaining_obj = NULL;
    8293           0 :         bool allow_remaining = false;
    8294             : 
    8295           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    8296             :                 discard_const_p(char *, kwnames),
    8297             :                 &blob.data, &blob_length,
    8298             :                 &bigendian_obj,
    8299             :                 &ndr64_obj,
    8300             :                 &allow_remaining_obj)) {
    8301           0 :                 return NULL;
    8302             :         }
    8303           0 :         blob.length = blob_length;
    8304             : 
    8305           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    8306           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    8307             :         }
    8308           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    8309           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    8310             :         }
    8311             : 
    8312           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    8313           0 :                 allow_remaining = true;
    8314             :         }
    8315             : 
    8316           0 :         return py_wbint_LookupUserGroups_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    8317             : }
    8318             : 
    8319           0 : static PyObject *py_wbint_LookupUserGroups_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    8320             : {
    8321           0 :         DATA_BLOB blob;
    8322           0 :         Py_ssize_t blob_length = 0;
    8323           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    8324           0 :         PyObject *bigendian_obj = NULL;
    8325           0 :         PyObject *ndr64_obj = NULL;
    8326           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    8327           0 :         PyObject *allow_remaining_obj = NULL;
    8328           0 :         bool allow_remaining = false;
    8329             : 
    8330           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    8331             :                 discard_const_p(char *, kwnames),
    8332             :                 &blob.data, &blob_length,
    8333             :                 &bigendian_obj,
    8334             :                 &ndr64_obj,
    8335             :                 &allow_remaining_obj)) {
    8336           0 :                 return NULL;
    8337             :         }
    8338           0 :         blob.length = blob_length;
    8339             : 
    8340           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    8341           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    8342             :         }
    8343           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    8344           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    8345             :         }
    8346             : 
    8347           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    8348           0 :                 allow_remaining = true;
    8349             :         }
    8350             : 
    8351           0 :         return py_wbint_LookupUserGroups_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    8352             : }
    8353             : 
    8354           0 : static PyObject *py_wbint_LookupUserGroups_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
    8355             : {
    8356           0 :         const struct ndr_interface_call *call = NULL;
    8357           0 :         struct wbint_LookupUserGroups *object = (struct wbint_LookupUserGroups *)pytalloc_get_ptr(py_obj);
    8358           0 :         PyObject *ret;
    8359           0 :         char *retstr;
    8360             : 
    8361           0 :         if (ndr_table_winbind.num_calls < 11) {
    8362           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupUserGroups_ndr_print");
    8363           0 :                 return NULL;
    8364             :         }
    8365           0 :         call = &ndr_table_winbind.calls[10];
    8366             : 
    8367           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    8368           0 :         ret = PyUnicode_FromString(retstr);
    8369           0 :         TALLOC_FREE(retstr);
    8370             : 
    8371           0 :         return ret;
    8372             : }
    8373             : 
    8374           0 : static PyObject *py_wbint_LookupUserGroups_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    8375             : {
    8376           0 :         return py_wbint_LookupUserGroups_ndr_print(py_obj, "wbint_LookupUserGroups_in", NDR_IN);
    8377             : }
    8378             : 
    8379           0 : static PyObject *py_wbint_LookupUserGroups_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    8380             : {
    8381           0 :         return py_wbint_LookupUserGroups_ndr_print(py_obj, "wbint_LookupUserGroups_out", NDR_OUT);
    8382             : }
    8383             : 
    8384             : static PyMethodDef py_wbint_LookupUserGroups_methods[] = {
    8385             :         { "opnum", (PyCFunction)py_wbint_LookupUserGroups_ndr_opnum, METH_NOARGS|METH_CLASS,
    8386             :                 "winbind.wbint_LookupUserGroups.opnum() -> 10 (0x0a) " },
    8387             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupUserGroups_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    8388             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    8389             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupUserGroups_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    8390             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    8391             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupUserGroups_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    8392             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    8393             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupUserGroups_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    8394             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    8395             :         { "__ndr_print_in__", (PyCFunction)py_wbint_LookupUserGroups_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    8396             :         { "__ndr_print_out__", (PyCFunction)py_wbint_LookupUserGroups_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    8397             :         { NULL, NULL, 0, NULL }
    8398             : };
    8399             : 
    8400             : 
    8401             : static PyTypeObject wbint_LookupUserGroups_Type = {
    8402             :         PyVarObject_HEAD_INIT(NULL, 0)
    8403             :         .tp_name = "winbind.wbint_LookupUserGroups",
    8404             :         .tp_getset = py_wbint_LookupUserGroups_getsetters,
    8405             :         .tp_methods = py_wbint_LookupUserGroups_methods,
    8406             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    8407             :         .tp_new = py_wbint_LookupUserGroups_new,
    8408             : };
    8409             : 
    8410           0 : static bool pack_py_wbint_LookupUserGroups_args_in(PyObject *args, PyObject *kwargs, struct wbint_LookupUserGroups *r)
    8411             : {
    8412           0 :         PyObject *py_sid;
    8413           0 :         const char *kwnames[] = {
    8414             :                 "sid", NULL
    8415             :         };
    8416             : 
    8417           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:wbint_LookupUserGroups", discard_const_p(char *, kwnames), &py_sid)) {
    8418           0 :                 return false;
    8419             :         }
    8420             : 
    8421           0 :         if (py_sid == NULL) {
    8422           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.sid");
    8423           0 :                 return false;
    8424             :         }
    8425           0 :         r->in.sid = talloc_ptrtype(r, r->in.sid);
    8426           0 :         if (r->in.sid == NULL) {
    8427           0 :                 PyErr_NoMemory();
    8428           0 :                 return false;
    8429             :         }
    8430           0 :         PY_CHECK_TYPE(dom_sid_Type, py_sid, return false;);
    8431           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_sid)) == NULL) {
    8432           0 :                 PyErr_NoMemory();
    8433           0 :                 return false;
    8434             :         }
    8435           0 :         r->in.sid = (struct dom_sid *)pytalloc_get_ptr(py_sid);
    8436           0 :         return true;
    8437             : }
    8438             : 
    8439           0 : static PyObject *unpack_py_wbint_LookupUserGroups_args_out(struct wbint_LookupUserGroups *r)
    8440             : {
    8441           0 :         PyObject *result;
    8442           0 :         PyObject *py_sids;
    8443           0 :         py_sids = pytalloc_reference_ex(&wbint_SidArray_Type, r->out.sids, r->out.sids);
    8444           0 :         result = py_sids;
    8445           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    8446           0 :                 PyErr_SetNTSTATUS(r->out.result);
    8447           0 :                 return NULL;
    8448             :         }
    8449             : 
    8450           0 :         return result;
    8451             : }
    8452             : 
    8453             : 
    8454           0 : static PyObject *py_wbint_QuerySequenceNumber_out_get_sequence(PyObject *obj, void *closure)
    8455             : {
    8456           0 :         struct wbint_QuerySequenceNumber *object = (struct wbint_QuerySequenceNumber *)pytalloc_get_ptr(obj);
    8457           0 :         PyObject *py_sequence;
    8458           0 :         if (object->out.sequence == NULL) {
    8459           0 :                 Py_RETURN_NONE;
    8460             :         }
    8461           0 :         py_sequence = PyLong_FromUnsignedLongLong((uint32_t)*object->out.sequence);
    8462           0 :         return py_sequence;
    8463             : }
    8464             : 
    8465           0 : static int py_wbint_QuerySequenceNumber_out_set_sequence(PyObject *py_obj, PyObject *value, void *closure)
    8466             : {
    8467           0 :         struct wbint_QuerySequenceNumber *object = (struct wbint_QuerySequenceNumber *)pytalloc_get_ptr(py_obj);
    8468           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sequence));
    8469           0 :         if (value == NULL) {
    8470           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.sequence");
    8471           0 :                 return -1;
    8472             :         }
    8473           0 :         object->out.sequence = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sequence);
    8474           0 :         if (object->out.sequence == NULL) {
    8475           0 :                 PyErr_NoMemory();
    8476           0 :                 return -1;
    8477             :         }
    8478             :         {
    8479           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.sequence));
    8480           0 :                 if (PyLong_Check(value)) {
    8481           0 :                         unsigned long long test_var;
    8482           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8483           0 :                         if (PyErr_Occurred() != NULL) {
    8484           0 :                                 return -1;
    8485             :                         }
    8486           0 :                         if (test_var > uint_max) {
    8487           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8488             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8489           0 :                                 return -1;
    8490             :                         }
    8491           0 :                         *object->out.sequence = test_var;
    8492             :                 } else {
    8493           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8494             :                           PyLong_Type.tp_name);
    8495           0 :                         return -1;
    8496             :                 }
    8497             :         }
    8498           0 :         return 0;
    8499             : }
    8500             : 
    8501           0 : static PyObject *py_wbint_QuerySequenceNumber_get_result(PyObject *obj, void *closure)
    8502             : {
    8503           0 :         struct wbint_QuerySequenceNumber *object = (struct wbint_QuerySequenceNumber *)pytalloc_get_ptr(obj);
    8504           0 :         PyObject *py_result;
    8505           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    8506           0 :         return py_result;
    8507             : }
    8508             : 
    8509           0 : static int py_wbint_QuerySequenceNumber_set_result(PyObject *py_obj, PyObject *value, void *closure)
    8510             : {
    8511           0 :         struct wbint_QuerySequenceNumber *object = (struct wbint_QuerySequenceNumber *)pytalloc_get_ptr(py_obj);
    8512           0 :         if (value == NULL) {
    8513           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    8514           0 :                 return -1;
    8515             :         }
    8516           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    8517           0 :         return 0;
    8518             : }
    8519             : 
    8520             : static PyGetSetDef py_wbint_QuerySequenceNumber_getsetters[] = {
    8521             :         {
    8522             :                 .name = discard_const_p(char, "out_sequence"),
    8523             :                 .get = py_wbint_QuerySequenceNumber_out_get_sequence,
    8524             :                 .set = py_wbint_QuerySequenceNumber_out_set_sequence,
    8525             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8526             :         },
    8527             :         {
    8528             :                 .name = discard_const_p(char, "result"),
    8529             :                 .get = py_wbint_QuerySequenceNumber_get_result,
    8530             :                 .set = py_wbint_QuerySequenceNumber_set_result,
    8531             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    8532             :         },
    8533             :         { .name = NULL }
    8534             : };
    8535             : 
    8536           0 : static PyObject *py_wbint_QuerySequenceNumber_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8537             : {
    8538           0 :         PyObject *self = pytalloc_new(struct wbint_QuerySequenceNumber, type);
    8539           0 :         struct wbint_QuerySequenceNumber *_self = (struct wbint_QuerySequenceNumber *)pytalloc_get_ptr(self);
    8540           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    8541           0 :         _self->out.sequence = talloc_zero(mem_ctx, uint32_t);
    8542           0 :         return self;
    8543             : }
    8544             : 
    8545           0 : static PyObject *py_wbint_QuerySequenceNumber_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    8546             : {
    8547             : 
    8548             : 
    8549           0 :         return PyLong_FromLong(11);
    8550             : }
    8551             : 
    8552           0 : static PyObject *py_wbint_QuerySequenceNumber_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
    8553             : {
    8554           0 :         const struct ndr_interface_call *call = NULL;
    8555           0 :         struct wbint_QuerySequenceNumber *object = (struct wbint_QuerySequenceNumber *)pytalloc_get_ptr(py_obj);
    8556           0 :         PyObject *ret = NULL;
    8557           0 :         struct ndr_push *push = NULL;
    8558           0 :         DATA_BLOB blob;
    8559           0 :         enum ndr_err_code err;
    8560             : 
    8561           0 :         if (ndr_table_winbind.num_calls < 12) {
    8562           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_QuerySequenceNumber_ndr_pack");
    8563           0 :                 return NULL;
    8564             :         }
    8565           0 :         call = &ndr_table_winbind.calls[11];
    8566             : 
    8567           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    8568           0 :         if (push == NULL) {
    8569           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    8570           0 :                 return NULL;
    8571             :         }
    8572             : 
    8573           0 :         push->flags |= ndr_push_flags;
    8574             : 
    8575           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    8576           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    8577           0 :                 TALLOC_FREE(push);
    8578           0 :                 PyErr_SetNdrError(err);
    8579           0 :                 return NULL;
    8580             :         }
    8581           0 :         blob = ndr_push_blob(push);
    8582           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    8583           0 :         TALLOC_FREE(push);
    8584           0 :         return ret;
    8585             : }
    8586             : 
    8587           0 : static PyObject *py_wbint_QuerySequenceNumber_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    8588             : {
    8589           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    8590           0 :         PyObject *bigendian_obj = NULL;
    8591           0 :         PyObject *ndr64_obj = NULL;
    8592           0 :         libndr_flags ndr_push_flags = 0;
    8593             : 
    8594           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    8595             :                 discard_const_p(char *, kwnames),
    8596             :                 &bigendian_obj,
    8597             :                 &ndr64_obj)) {
    8598           0 :                 return NULL;
    8599             :         }
    8600             : 
    8601           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    8602           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    8603             :         }
    8604           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    8605           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    8606             :         }
    8607             : 
    8608           0 :         return py_wbint_QuerySequenceNumber_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    8609             : }
    8610             : 
    8611           0 : static PyObject *py_wbint_QuerySequenceNumber_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    8612             : {
    8613           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    8614           0 :         PyObject *bigendian_obj = NULL;
    8615           0 :         PyObject *ndr64_obj = NULL;
    8616           0 :         libndr_flags ndr_push_flags = 0;
    8617             : 
    8618           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    8619             :                 discard_const_p(char *, kwnames),
    8620             :                 &bigendian_obj,
    8621             :                 &ndr64_obj)) {
    8622           0 :                 return NULL;
    8623             :         }
    8624             : 
    8625           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    8626           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    8627             :         }
    8628           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    8629           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    8630             :         }
    8631             : 
    8632           0 :         return py_wbint_QuerySequenceNumber_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    8633             : }
    8634             : 
    8635           0 : static PyObject *py_wbint_QuerySequenceNumber_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
    8636             : {
    8637           0 :         const struct ndr_interface_call *call = NULL;
    8638           0 :         struct wbint_QuerySequenceNumber *object = (struct wbint_QuerySequenceNumber *)pytalloc_get_ptr(py_obj);
    8639           0 :         struct ndr_pull *pull = NULL;
    8640           0 :         enum ndr_err_code err;
    8641             : 
    8642           0 :         if (ndr_table_winbind.num_calls < 12) {
    8643           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_QuerySequenceNumber_ndr_unpack");
    8644           0 :                 return NULL;
    8645             :         }
    8646           0 :         call = &ndr_table_winbind.calls[11];
    8647             : 
    8648           0 :         pull = ndr_pull_init_blob(blob, object);
    8649           0 :         if (pull == NULL) {
    8650           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    8651           0 :                 return NULL;
    8652             :         }
    8653             : 
    8654           0 :         pull->flags |= ndr_pull_flags;
    8655             : 
    8656           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    8657           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    8658           0 :                 TALLOC_FREE(pull);
    8659           0 :                 PyErr_SetNdrError(err);
    8660           0 :                 return NULL;
    8661             :         }
    8662           0 :         if (!allow_remaining) {
    8663           0 :                 uint32_t highest_ofs;
    8664             : 
    8665           0 :                 if (pull->offset > pull->relative_highest_offset) {
    8666           0 :                         highest_ofs = pull->offset;
    8667             :                 } else {
    8668           0 :                         highest_ofs = pull->relative_highest_offset;
    8669             :                 }
    8670           0 :                 if (highest_ofs < pull->data_size) {
    8671           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    8672             :                                 "not all bytes consumed ofs[%u] size[%u]",
    8673             :                                 highest_ofs, pull->data_size);
    8674           0 :                         TALLOC_FREE(pull);
    8675           0 :                         PyErr_SetNdrError(err);
    8676           0 :                         return NULL;
    8677             :                 }
    8678             :         }
    8679             : 
    8680           0 :         TALLOC_FREE(pull);
    8681           0 :         Py_RETURN_NONE;
    8682             : }
    8683             : 
    8684           0 : static PyObject *py_wbint_QuerySequenceNumber_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    8685             : {
    8686           0 :         DATA_BLOB blob;
    8687           0 :         Py_ssize_t blob_length = 0;
    8688           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    8689           0 :         PyObject *bigendian_obj = NULL;
    8690           0 :         PyObject *ndr64_obj = NULL;
    8691           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    8692           0 :         PyObject *allow_remaining_obj = NULL;
    8693           0 :         bool allow_remaining = false;
    8694             : 
    8695           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    8696             :                 discard_const_p(char *, kwnames),
    8697             :                 &blob.data, &blob_length,
    8698             :                 &bigendian_obj,
    8699             :                 &ndr64_obj,
    8700             :                 &allow_remaining_obj)) {
    8701           0 :                 return NULL;
    8702             :         }
    8703           0 :         blob.length = blob_length;
    8704             : 
    8705           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    8706           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    8707             :         }
    8708           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    8709           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    8710             :         }
    8711             : 
    8712           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    8713           0 :                 allow_remaining = true;
    8714             :         }
    8715             : 
    8716           0 :         return py_wbint_QuerySequenceNumber_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    8717             : }
    8718             : 
    8719           0 : static PyObject *py_wbint_QuerySequenceNumber_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    8720             : {
    8721           0 :         DATA_BLOB blob;
    8722           0 :         Py_ssize_t blob_length = 0;
    8723           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    8724           0 :         PyObject *bigendian_obj = NULL;
    8725           0 :         PyObject *ndr64_obj = NULL;
    8726           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    8727           0 :         PyObject *allow_remaining_obj = NULL;
    8728           0 :         bool allow_remaining = false;
    8729             : 
    8730           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    8731             :                 discard_const_p(char *, kwnames),
    8732             :                 &blob.data, &blob_length,
    8733             :                 &bigendian_obj,
    8734             :                 &ndr64_obj,
    8735             :                 &allow_remaining_obj)) {
    8736           0 :                 return NULL;
    8737             :         }
    8738           0 :         blob.length = blob_length;
    8739             : 
    8740           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    8741           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    8742             :         }
    8743           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    8744           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    8745             :         }
    8746             : 
    8747           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    8748           0 :                 allow_remaining = true;
    8749             :         }
    8750             : 
    8751           0 :         return py_wbint_QuerySequenceNumber_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    8752             : }
    8753             : 
    8754           0 : static PyObject *py_wbint_QuerySequenceNumber_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
    8755             : {
    8756           0 :         const struct ndr_interface_call *call = NULL;
    8757           0 :         struct wbint_QuerySequenceNumber *object = (struct wbint_QuerySequenceNumber *)pytalloc_get_ptr(py_obj);
    8758           0 :         PyObject *ret;
    8759           0 :         char *retstr;
    8760             : 
    8761           0 :         if (ndr_table_winbind.num_calls < 12) {
    8762           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_QuerySequenceNumber_ndr_print");
    8763           0 :                 return NULL;
    8764             :         }
    8765           0 :         call = &ndr_table_winbind.calls[11];
    8766             : 
    8767           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    8768           0 :         ret = PyUnicode_FromString(retstr);
    8769           0 :         TALLOC_FREE(retstr);
    8770             : 
    8771           0 :         return ret;
    8772             : }
    8773             : 
    8774           0 : static PyObject *py_wbint_QuerySequenceNumber_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    8775             : {
    8776           0 :         return py_wbint_QuerySequenceNumber_ndr_print(py_obj, "wbint_QuerySequenceNumber_in", NDR_IN);
    8777             : }
    8778             : 
    8779           0 : static PyObject *py_wbint_QuerySequenceNumber_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    8780             : {
    8781           0 :         return py_wbint_QuerySequenceNumber_ndr_print(py_obj, "wbint_QuerySequenceNumber_out", NDR_OUT);
    8782             : }
    8783             : 
    8784             : static PyMethodDef py_wbint_QuerySequenceNumber_methods[] = {
    8785             :         { "opnum", (PyCFunction)py_wbint_QuerySequenceNumber_ndr_opnum, METH_NOARGS|METH_CLASS,
    8786             :                 "winbind.wbint_QuerySequenceNumber.opnum() -> 11 (0x0b) " },
    8787             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QuerySequenceNumber_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    8788             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    8789             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QuerySequenceNumber_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    8790             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    8791             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QuerySequenceNumber_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    8792             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    8793             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QuerySequenceNumber_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    8794             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    8795             :         { "__ndr_print_in__", (PyCFunction)py_wbint_QuerySequenceNumber_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    8796             :         { "__ndr_print_out__", (PyCFunction)py_wbint_QuerySequenceNumber_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    8797             :         { NULL, NULL, 0, NULL }
    8798             : };
    8799             : 
    8800             : 
    8801             : static PyTypeObject wbint_QuerySequenceNumber_Type = {
    8802             :         PyVarObject_HEAD_INIT(NULL, 0)
    8803             :         .tp_name = "winbind.wbint_QuerySequenceNumber",
    8804             :         .tp_getset = py_wbint_QuerySequenceNumber_getsetters,
    8805             :         .tp_methods = py_wbint_QuerySequenceNumber_methods,
    8806             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    8807             :         .tp_new = py_wbint_QuerySequenceNumber_new,
    8808             : };
    8809             : 
    8810           0 : static bool pack_py_wbint_QuerySequenceNumber_args_in(PyObject *args, PyObject *kwargs, struct wbint_QuerySequenceNumber *r)
    8811             : {
    8812           0 :         const char *kwnames[] = {
    8813             :                 NULL
    8814             :         };
    8815             : 
    8816           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":wbint_QuerySequenceNumber", discard_const_p(char *, kwnames))) {
    8817           0 :                 return false;
    8818             :         }
    8819             : 
    8820           0 :         return true;
    8821             : }
    8822             : 
    8823           0 : static PyObject *unpack_py_wbint_QuerySequenceNumber_args_out(struct wbint_QuerySequenceNumber *r)
    8824             : {
    8825           0 :         PyObject *result;
    8826           0 :         PyObject *py_sequence;
    8827           0 :         py_sequence = PyLong_FromUnsignedLongLong((uint32_t)*r->out.sequence);
    8828           0 :         result = py_sequence;
    8829           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    8830           0 :                 PyErr_SetNTSTATUS(r->out.result);
    8831           0 :                 return NULL;
    8832             :         }
    8833             : 
    8834           0 :         return result;
    8835             : }
    8836             : 
    8837             : 
    8838           0 : static PyObject *py_wbint_LookupGroupMembers_in_get_sid(PyObject *obj, void *closure)
    8839             : {
    8840           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(obj);
    8841           0 :         PyObject *py_sid;
    8842           0 :         if (object->in.sid == NULL) {
    8843           0 :                 Py_RETURN_NONE;
    8844             :         }
    8845           0 :         py_sid = pytalloc_reference_ex(dom_sid_Type, object->in.sid, object->in.sid);
    8846           0 :         return py_sid;
    8847             : }
    8848             : 
    8849           0 : static int py_wbint_LookupGroupMembers_in_set_sid(PyObject *py_obj, PyObject *value, void *closure)
    8850             : {
    8851           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(py_obj);
    8852           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sid));
    8853           0 :         if (value == NULL) {
    8854           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.sid");
    8855           0 :                 return -1;
    8856             :         }
    8857           0 :         object->in.sid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sid);
    8858           0 :         if (object->in.sid == NULL) {
    8859           0 :                 PyErr_NoMemory();
    8860           0 :                 return -1;
    8861             :         }
    8862           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    8863           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8864           0 :                 PyErr_NoMemory();
    8865           0 :                 return -1;
    8866             :         }
    8867           0 :         object->in.sid = (struct dom_sid *)pytalloc_get_ptr(value);
    8868           0 :         return 0;
    8869             : }
    8870             : 
    8871           0 : static PyObject *py_wbint_LookupGroupMembers_in_get_type(PyObject *obj, void *closure)
    8872             : {
    8873           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(obj);
    8874           0 :         PyObject *py_type;
    8875           0 :         py_type = PyLong_FromLong((uint16_t)object->in.type);
    8876           0 :         return py_type;
    8877             : }
    8878             : 
    8879           0 : static int py_wbint_LookupGroupMembers_in_set_type(PyObject *py_obj, PyObject *value, void *closure)
    8880             : {
    8881           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(py_obj);
    8882           0 :         if (value == NULL) {
    8883           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.type");
    8884           0 :                 return -1;
    8885             :         }
    8886             :         {
    8887           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.type));
    8888           0 :                 if (PyLong_Check(value)) {
    8889           0 :                         unsigned long long test_var;
    8890           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8891           0 :                         if (PyErr_Occurred() != NULL) {
    8892           0 :                                 return -1;
    8893             :                         }
    8894           0 :                         if (test_var > uint_max) {
    8895           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8896             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8897           0 :                                 return -1;
    8898             :                         }
    8899           0 :                         object->in.type = test_var;
    8900             :                 } else {
    8901           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8902             :                           PyLong_Type.tp_name);
    8903           0 :                         return -1;
    8904             :                 }
    8905             :         }
    8906           0 :         return 0;
    8907             : }
    8908             : 
    8909           0 : static PyObject *py_wbint_LookupGroupMembers_out_get_members(PyObject *obj, void *closure)
    8910             : {
    8911           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(obj);
    8912           0 :         PyObject *py_members;
    8913           0 :         if (object->out.members == NULL) {
    8914           0 :                 Py_RETURN_NONE;
    8915             :         }
    8916           0 :         py_members = pytalloc_reference_ex(&wbint_Principals_Type, object->out.members, object->out.members);
    8917           0 :         return py_members;
    8918             : }
    8919             : 
    8920           0 : static int py_wbint_LookupGroupMembers_out_set_members(PyObject *py_obj, PyObject *value, void *closure)
    8921             : {
    8922           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(py_obj);
    8923           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.members));
    8924           0 :         if (value == NULL) {
    8925           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.members");
    8926           0 :                 return -1;
    8927             :         }
    8928           0 :         object->out.members = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.members);
    8929           0 :         if (object->out.members == NULL) {
    8930           0 :                 PyErr_NoMemory();
    8931           0 :                 return -1;
    8932             :         }
    8933           0 :         PY_CHECK_TYPE(&wbint_Principals_Type, value, return -1;);
    8934           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8935           0 :                 PyErr_NoMemory();
    8936           0 :                 return -1;
    8937             :         }
    8938           0 :         object->out.members = (struct wbint_Principals *)pytalloc_get_ptr(value);
    8939           0 :         return 0;
    8940             : }
    8941             : 
    8942           0 : static PyObject *py_wbint_LookupGroupMembers_get_result(PyObject *obj, void *closure)
    8943             : {
    8944           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(obj);
    8945           0 :         PyObject *py_result;
    8946           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    8947           0 :         return py_result;
    8948             : }
    8949             : 
    8950           0 : static int py_wbint_LookupGroupMembers_set_result(PyObject *py_obj, PyObject *value, void *closure)
    8951             : {
    8952           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(py_obj);
    8953           0 :         if (value == NULL) {
    8954           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    8955           0 :                 return -1;
    8956             :         }
    8957           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    8958           0 :         return 0;
    8959             : }
    8960             : 
    8961             : static PyGetSetDef py_wbint_LookupGroupMembers_getsetters[] = {
    8962             :         {
    8963             :                 .name = discard_const_p(char, "in_sid"),
    8964             :                 .get = py_wbint_LookupGroupMembers_in_get_sid,
    8965             :                 .set = py_wbint_LookupGroupMembers_in_set_sid,
    8966             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
    8967             :         },
    8968             :         {
    8969             :                 .name = discard_const_p(char, "in_type"),
    8970             :                 .get = py_wbint_LookupGroupMembers_in_get_type,
    8971             :                 .set = py_wbint_LookupGroupMembers_in_set_type,
    8972             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_SidType")
    8973             :         },
    8974             :         {
    8975             :                 .name = discard_const_p(char, "out_members"),
    8976             :                 .get = py_wbint_LookupGroupMembers_out_get_members,
    8977             :                 .set = py_wbint_LookupGroupMembers_out_set_members,
    8978             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_Principals")
    8979             :         },
    8980             :         {
    8981             :                 .name = discard_const_p(char, "result"),
    8982             :                 .get = py_wbint_LookupGroupMembers_get_result,
    8983             :                 .set = py_wbint_LookupGroupMembers_set_result,
    8984             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    8985             :         },
    8986             :         { .name = NULL }
    8987             : };
    8988             : 
    8989           0 : static PyObject *py_wbint_LookupGroupMembers_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8990             : {
    8991           0 :         PyObject *self = pytalloc_new(struct wbint_LookupGroupMembers, type);
    8992           0 :         struct wbint_LookupGroupMembers *_self = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(self);
    8993           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    8994           0 :         _self->in.sid = talloc_zero(mem_ctx, struct dom_sid);
    8995           0 :         _self->out.members = talloc_zero(mem_ctx, struct wbint_Principals);
    8996           0 :         return self;
    8997             : }
    8998             : 
    8999           0 : static PyObject *py_wbint_LookupGroupMembers_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    9000             : {
    9001             : 
    9002             : 
    9003           0 :         return PyLong_FromLong(12);
    9004             : }
    9005             : 
    9006           0 : static PyObject *py_wbint_LookupGroupMembers_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
    9007             : {
    9008           0 :         const struct ndr_interface_call *call = NULL;
    9009           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(py_obj);
    9010           0 :         PyObject *ret = NULL;
    9011           0 :         struct ndr_push *push = NULL;
    9012           0 :         DATA_BLOB blob;
    9013           0 :         enum ndr_err_code err;
    9014             : 
    9015           0 :         if (ndr_table_winbind.num_calls < 13) {
    9016           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupGroupMembers_ndr_pack");
    9017           0 :                 return NULL;
    9018             :         }
    9019           0 :         call = &ndr_table_winbind.calls[12];
    9020             : 
    9021           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    9022           0 :         if (push == NULL) {
    9023           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    9024           0 :                 return NULL;
    9025             :         }
    9026             : 
    9027           0 :         push->flags |= ndr_push_flags;
    9028             : 
    9029           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    9030           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    9031           0 :                 TALLOC_FREE(push);
    9032           0 :                 PyErr_SetNdrError(err);
    9033           0 :                 return NULL;
    9034             :         }
    9035           0 :         blob = ndr_push_blob(push);
    9036           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    9037           0 :         TALLOC_FREE(push);
    9038           0 :         return ret;
    9039             : }
    9040             : 
    9041           0 : static PyObject *py_wbint_LookupGroupMembers_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9042             : {
    9043           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    9044           0 :         PyObject *bigendian_obj = NULL;
    9045           0 :         PyObject *ndr64_obj = NULL;
    9046           0 :         libndr_flags ndr_push_flags = 0;
    9047             : 
    9048           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    9049             :                 discard_const_p(char *, kwnames),
    9050             :                 &bigendian_obj,
    9051             :                 &ndr64_obj)) {
    9052           0 :                 return NULL;
    9053             :         }
    9054             : 
    9055           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9056           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    9057             :         }
    9058           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9059           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    9060             :         }
    9061             : 
    9062           0 :         return py_wbint_LookupGroupMembers_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    9063             : }
    9064             : 
    9065           0 : static PyObject *py_wbint_LookupGroupMembers_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9066             : {
    9067           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    9068           0 :         PyObject *bigendian_obj = NULL;
    9069           0 :         PyObject *ndr64_obj = NULL;
    9070           0 :         libndr_flags ndr_push_flags = 0;
    9071             : 
    9072           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    9073             :                 discard_const_p(char *, kwnames),
    9074             :                 &bigendian_obj,
    9075             :                 &ndr64_obj)) {
    9076           0 :                 return NULL;
    9077             :         }
    9078             : 
    9079           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9080           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    9081             :         }
    9082           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9083           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    9084             :         }
    9085             : 
    9086           0 :         return py_wbint_LookupGroupMembers_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    9087             : }
    9088             : 
    9089           0 : static PyObject *py_wbint_LookupGroupMembers_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
    9090             : {
    9091           0 :         const struct ndr_interface_call *call = NULL;
    9092           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(py_obj);
    9093           0 :         struct ndr_pull *pull = NULL;
    9094           0 :         enum ndr_err_code err;
    9095             : 
    9096           0 :         if (ndr_table_winbind.num_calls < 13) {
    9097           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupGroupMembers_ndr_unpack");
    9098           0 :                 return NULL;
    9099             :         }
    9100           0 :         call = &ndr_table_winbind.calls[12];
    9101             : 
    9102           0 :         pull = ndr_pull_init_blob(blob, object);
    9103           0 :         if (pull == NULL) {
    9104           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    9105           0 :                 return NULL;
    9106             :         }
    9107             : 
    9108           0 :         pull->flags |= ndr_pull_flags;
    9109             : 
    9110           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    9111           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    9112           0 :                 TALLOC_FREE(pull);
    9113           0 :                 PyErr_SetNdrError(err);
    9114           0 :                 return NULL;
    9115             :         }
    9116           0 :         if (!allow_remaining) {
    9117           0 :                 uint32_t highest_ofs;
    9118             : 
    9119           0 :                 if (pull->offset > pull->relative_highest_offset) {
    9120           0 :                         highest_ofs = pull->offset;
    9121             :                 } else {
    9122           0 :                         highest_ofs = pull->relative_highest_offset;
    9123             :                 }
    9124           0 :                 if (highest_ofs < pull->data_size) {
    9125           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    9126             :                                 "not all bytes consumed ofs[%u] size[%u]",
    9127             :                                 highest_ofs, pull->data_size);
    9128           0 :                         TALLOC_FREE(pull);
    9129           0 :                         PyErr_SetNdrError(err);
    9130           0 :                         return NULL;
    9131             :                 }
    9132             :         }
    9133             : 
    9134           0 :         TALLOC_FREE(pull);
    9135           0 :         Py_RETURN_NONE;
    9136             : }
    9137             : 
    9138           0 : static PyObject *py_wbint_LookupGroupMembers_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9139             : {
    9140           0 :         DATA_BLOB blob;
    9141           0 :         Py_ssize_t blob_length = 0;
    9142           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    9143           0 :         PyObject *bigendian_obj = NULL;
    9144           0 :         PyObject *ndr64_obj = NULL;
    9145           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    9146           0 :         PyObject *allow_remaining_obj = NULL;
    9147           0 :         bool allow_remaining = false;
    9148             : 
    9149           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    9150             :                 discard_const_p(char *, kwnames),
    9151             :                 &blob.data, &blob_length,
    9152             :                 &bigendian_obj,
    9153             :                 &ndr64_obj,
    9154             :                 &allow_remaining_obj)) {
    9155           0 :                 return NULL;
    9156             :         }
    9157           0 :         blob.length = blob_length;
    9158             : 
    9159           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9160           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    9161             :         }
    9162           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9163           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    9164             :         }
    9165             : 
    9166           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    9167           0 :                 allow_remaining = true;
    9168             :         }
    9169             : 
    9170           0 :         return py_wbint_LookupGroupMembers_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    9171             : }
    9172             : 
    9173           0 : static PyObject *py_wbint_LookupGroupMembers_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9174             : {
    9175           0 :         DATA_BLOB blob;
    9176           0 :         Py_ssize_t blob_length = 0;
    9177           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    9178           0 :         PyObject *bigendian_obj = NULL;
    9179           0 :         PyObject *ndr64_obj = NULL;
    9180           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    9181           0 :         PyObject *allow_remaining_obj = NULL;
    9182           0 :         bool allow_remaining = false;
    9183             : 
    9184           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    9185             :                 discard_const_p(char *, kwnames),
    9186             :                 &blob.data, &blob_length,
    9187             :                 &bigendian_obj,
    9188             :                 &ndr64_obj,
    9189             :                 &allow_remaining_obj)) {
    9190           0 :                 return NULL;
    9191             :         }
    9192           0 :         blob.length = blob_length;
    9193             : 
    9194           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9195           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    9196             :         }
    9197           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9198           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    9199             :         }
    9200             : 
    9201           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    9202           0 :                 allow_remaining = true;
    9203             :         }
    9204             : 
    9205           0 :         return py_wbint_LookupGroupMembers_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    9206             : }
    9207             : 
    9208           0 : static PyObject *py_wbint_LookupGroupMembers_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
    9209             : {
    9210           0 :         const struct ndr_interface_call *call = NULL;
    9211           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(py_obj);
    9212           0 :         PyObject *ret;
    9213           0 :         char *retstr;
    9214             : 
    9215           0 :         if (ndr_table_winbind.num_calls < 13) {
    9216           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupGroupMembers_ndr_print");
    9217           0 :                 return NULL;
    9218             :         }
    9219           0 :         call = &ndr_table_winbind.calls[12];
    9220             : 
    9221           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    9222           0 :         ret = PyUnicode_FromString(retstr);
    9223           0 :         TALLOC_FREE(retstr);
    9224             : 
    9225           0 :         return ret;
    9226             : }
    9227             : 
    9228           0 : static PyObject *py_wbint_LookupGroupMembers_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    9229             : {
    9230           0 :         return py_wbint_LookupGroupMembers_ndr_print(py_obj, "wbint_LookupGroupMembers_in", NDR_IN);
    9231             : }
    9232             : 
    9233           0 : static PyObject *py_wbint_LookupGroupMembers_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    9234             : {
    9235           0 :         return py_wbint_LookupGroupMembers_ndr_print(py_obj, "wbint_LookupGroupMembers_out", NDR_OUT);
    9236             : }
    9237             : 
    9238             : static PyMethodDef py_wbint_LookupGroupMembers_methods[] = {
    9239             :         { "opnum", (PyCFunction)py_wbint_LookupGroupMembers_ndr_opnum, METH_NOARGS|METH_CLASS,
    9240             :                 "winbind.wbint_LookupGroupMembers.opnum() -> 12 (0x0c) " },
    9241             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupGroupMembers_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    9242             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    9243             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupGroupMembers_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    9244             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    9245             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupGroupMembers_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    9246             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    9247             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupGroupMembers_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    9248             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    9249             :         { "__ndr_print_in__", (PyCFunction)py_wbint_LookupGroupMembers_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    9250             :         { "__ndr_print_out__", (PyCFunction)py_wbint_LookupGroupMembers_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    9251             :         { NULL, NULL, 0, NULL }
    9252             : };
    9253             : 
    9254             : 
    9255             : static PyTypeObject wbint_LookupGroupMembers_Type = {
    9256             :         PyVarObject_HEAD_INIT(NULL, 0)
    9257             :         .tp_name = "winbind.wbint_LookupGroupMembers",
    9258             :         .tp_getset = py_wbint_LookupGroupMembers_getsetters,
    9259             :         .tp_methods = py_wbint_LookupGroupMembers_methods,
    9260             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9261             :         .tp_new = py_wbint_LookupGroupMembers_new,
    9262             : };
    9263             : 
    9264           0 : static bool pack_py_wbint_LookupGroupMembers_args_in(PyObject *args, PyObject *kwargs, struct wbint_LookupGroupMembers *r)
    9265             : {
    9266           0 :         PyObject *py_sid;
    9267           0 :         PyObject *py_type;
    9268           0 :         const char *kwnames[] = {
    9269             :                 "sid", "type", NULL
    9270             :         };
    9271             : 
    9272           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:wbint_LookupGroupMembers", discard_const_p(char *, kwnames), &py_sid, &py_type)) {
    9273           0 :                 return false;
    9274             :         }
    9275             : 
    9276           0 :         if (py_sid == NULL) {
    9277           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.sid");
    9278           0 :                 return false;
    9279             :         }
    9280           0 :         r->in.sid = talloc_ptrtype(r, r->in.sid);
    9281           0 :         if (r->in.sid == NULL) {
    9282           0 :                 PyErr_NoMemory();
    9283           0 :                 return false;
    9284             :         }
    9285           0 :         PY_CHECK_TYPE(dom_sid_Type, py_sid, return false;);
    9286           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_sid)) == NULL) {
    9287           0 :                 PyErr_NoMemory();
    9288           0 :                 return false;
    9289             :         }
    9290           0 :         r->in.sid = (struct dom_sid *)pytalloc_get_ptr(py_sid);
    9291           0 :         if (py_type == NULL) {
    9292           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.type");
    9293           0 :                 return false;
    9294             :         }
    9295             :         {
    9296           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.type));
    9297           0 :                 if (PyLong_Check(py_type)) {
    9298           0 :                         unsigned long long test_var;
    9299           0 :                         test_var = PyLong_AsUnsignedLongLong(py_type);
    9300           0 :                         if (PyErr_Occurred() != NULL) {
    9301           0 :                                 return false;
    9302             :                         }
    9303           0 :                         if (test_var > uint_max) {
    9304           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9305             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9306           0 :                                 return false;
    9307             :                         }
    9308           0 :                         r->in.type = test_var;
    9309             :                 } else {
    9310           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9311             :                           PyLong_Type.tp_name);
    9312           0 :                         return false;
    9313             :                 }
    9314             :         }
    9315           0 :         return true;
    9316             : }
    9317             : 
    9318           0 : static PyObject *unpack_py_wbint_LookupGroupMembers_args_out(struct wbint_LookupGroupMembers *r)
    9319             : {
    9320           0 :         PyObject *result;
    9321           0 :         PyObject *py_members;
    9322           0 :         py_members = pytalloc_reference_ex(&wbint_Principals_Type, r->out.members, r->out.members);
    9323           0 :         result = py_members;
    9324           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    9325           0 :                 PyErr_SetNTSTATUS(r->out.result);
    9326           0 :                 return NULL;
    9327             :         }
    9328             : 
    9329           0 :         return result;
    9330             : }
    9331             : 
    9332             : 
    9333           0 : static PyObject *py_wbint_LookupAliasMembers_in_get_sid(PyObject *obj, void *closure)
    9334             : {
    9335           0 :         struct wbint_LookupAliasMembers *object = (struct wbint_LookupAliasMembers *)pytalloc_get_ptr(obj);
    9336           0 :         PyObject *py_sid;
    9337           0 :         if (object->in.sid == NULL) {
    9338           0 :                 Py_RETURN_NONE;
    9339             :         }
    9340           0 :         py_sid = pytalloc_reference_ex(dom_sid_Type, object->in.sid, object->in.sid);
    9341           0 :         return py_sid;
    9342             : }
    9343             : 
    9344           0 : static int py_wbint_LookupAliasMembers_in_set_sid(PyObject *py_obj, PyObject *value, void *closure)
    9345             : {
    9346           0 :         struct wbint_LookupAliasMembers *object = (struct wbint_LookupAliasMembers *)pytalloc_get_ptr(py_obj);
    9347           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sid));
    9348           0 :         if (value == NULL) {
    9349           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.sid");
    9350           0 :                 return -1;
    9351             :         }
    9352           0 :         object->in.sid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sid);
    9353           0 :         if (object->in.sid == NULL) {
    9354           0 :                 PyErr_NoMemory();
    9355           0 :                 return -1;
    9356             :         }
    9357           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    9358           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9359           0 :                 PyErr_NoMemory();
    9360           0 :                 return -1;
    9361             :         }
    9362           0 :         object->in.sid = (struct dom_sid *)pytalloc_get_ptr(value);
    9363           0 :         return 0;
    9364             : }
    9365             : 
    9366           0 : static PyObject *py_wbint_LookupAliasMembers_in_get_type(PyObject *obj, void *closure)
    9367             : {
    9368           0 :         struct wbint_LookupAliasMembers *object = (struct wbint_LookupAliasMembers *)pytalloc_get_ptr(obj);
    9369           0 :         PyObject *py_type;
    9370           0 :         py_type = PyLong_FromLong((uint16_t)object->in.type);
    9371           0 :         return py_type;
    9372             : }
    9373             : 
    9374           0 : static int py_wbint_LookupAliasMembers_in_set_type(PyObject *py_obj, PyObject *value, void *closure)
    9375             : {
    9376           0 :         struct wbint_LookupAliasMembers *object = (struct wbint_LookupAliasMembers *)pytalloc_get_ptr(py_obj);
    9377           0 :         if (value == NULL) {
    9378           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.type");
    9379           0 :                 return -1;
    9380             :         }
    9381             :         {
    9382           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.type));
    9383           0 :                 if (PyLong_Check(value)) {
    9384           0 :                         unsigned long long test_var;
    9385           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9386           0 :                         if (PyErr_Occurred() != NULL) {
    9387           0 :                                 return -1;
    9388             :                         }
    9389           0 :                         if (test_var > uint_max) {
    9390           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9391             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9392           0 :                                 return -1;
    9393             :                         }
    9394           0 :                         object->in.type = test_var;
    9395             :                 } else {
    9396           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9397             :                           PyLong_Type.tp_name);
    9398           0 :                         return -1;
    9399             :                 }
    9400             :         }
    9401           0 :         return 0;
    9402             : }
    9403             : 
    9404           0 : static PyObject *py_wbint_LookupAliasMembers_out_get_sids(PyObject *obj, void *closure)
    9405             : {
    9406           0 :         struct wbint_LookupAliasMembers *object = (struct wbint_LookupAliasMembers *)pytalloc_get_ptr(obj);
    9407           0 :         PyObject *py_sids;
    9408           0 :         if (object->out.sids == NULL) {
    9409           0 :                 Py_RETURN_NONE;
    9410             :         }
    9411           0 :         py_sids = pytalloc_reference_ex(&wbint_SidArray_Type, object->out.sids, object->out.sids);
    9412           0 :         return py_sids;
    9413             : }
    9414             : 
    9415           0 : static int py_wbint_LookupAliasMembers_out_set_sids(PyObject *py_obj, PyObject *value, void *closure)
    9416             : {
    9417           0 :         struct wbint_LookupAliasMembers *object = (struct wbint_LookupAliasMembers *)pytalloc_get_ptr(py_obj);
    9418           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sids));
    9419           0 :         if (value == NULL) {
    9420           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.sids");
    9421           0 :                 return -1;
    9422             :         }
    9423           0 :         object->out.sids = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sids);
    9424           0 :         if (object->out.sids == NULL) {
    9425           0 :                 PyErr_NoMemory();
    9426           0 :                 return -1;
    9427             :         }
    9428           0 :         PY_CHECK_TYPE(&wbint_SidArray_Type, value, return -1;);
    9429           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9430           0 :                 PyErr_NoMemory();
    9431           0 :                 return -1;
    9432             :         }
    9433           0 :         object->out.sids = (struct wbint_SidArray *)pytalloc_get_ptr(value);
    9434           0 :         return 0;
    9435             : }
    9436             : 
    9437           0 : static PyObject *py_wbint_LookupAliasMembers_get_result(PyObject *obj, void *closure)
    9438             : {
    9439           0 :         struct wbint_LookupAliasMembers *object = (struct wbint_LookupAliasMembers *)pytalloc_get_ptr(obj);
    9440           0 :         PyObject *py_result;
    9441           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    9442           0 :         return py_result;
    9443             : }
    9444             : 
    9445           0 : static int py_wbint_LookupAliasMembers_set_result(PyObject *py_obj, PyObject *value, void *closure)
    9446             : {
    9447           0 :         struct wbint_LookupAliasMembers *object = (struct wbint_LookupAliasMembers *)pytalloc_get_ptr(py_obj);
    9448           0 :         if (value == NULL) {
    9449           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    9450           0 :                 return -1;
    9451             :         }
    9452           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    9453           0 :         return 0;
    9454             : }
    9455             : 
    9456             : static PyGetSetDef py_wbint_LookupAliasMembers_getsetters[] = {
    9457             :         {
    9458             :                 .name = discard_const_p(char, "in_sid"),
    9459             :                 .get = py_wbint_LookupAliasMembers_in_get_sid,
    9460             :                 .set = py_wbint_LookupAliasMembers_in_set_sid,
    9461             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
    9462             :         },
    9463             :         {
    9464             :                 .name = discard_const_p(char, "in_type"),
    9465             :                 .get = py_wbint_LookupAliasMembers_in_get_type,
    9466             :                 .set = py_wbint_LookupAliasMembers_in_set_type,
    9467             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_SidType")
    9468             :         },
    9469             :         {
    9470             :                 .name = discard_const_p(char, "out_sids"),
    9471             :                 .get = py_wbint_LookupAliasMembers_out_get_sids,
    9472             :                 .set = py_wbint_LookupAliasMembers_out_set_sids,
    9473             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_SidArray")
    9474             :         },
    9475             :         {
    9476             :                 .name = discard_const_p(char, "result"),
    9477             :                 .get = py_wbint_LookupAliasMembers_get_result,
    9478             :                 .set = py_wbint_LookupAliasMembers_set_result,
    9479             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    9480             :         },
    9481             :         { .name = NULL }
    9482             : };
    9483             : 
    9484           0 : static PyObject *py_wbint_LookupAliasMembers_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9485             : {
    9486           0 :         PyObject *self = pytalloc_new(struct wbint_LookupAliasMembers, type);
    9487           0 :         struct wbint_LookupAliasMembers *_self = (struct wbint_LookupAliasMembers *)pytalloc_get_ptr(self);
    9488           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    9489           0 :         _self->in.sid = talloc_zero(mem_ctx, struct dom_sid);
    9490           0 :         _self->out.sids = talloc_zero(mem_ctx, struct wbint_SidArray);
    9491           0 :         return self;
    9492             : }
    9493             : 
    9494           0 : static PyObject *py_wbint_LookupAliasMembers_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    9495             : {
    9496             : 
    9497             : 
    9498           0 :         return PyLong_FromLong(13);
    9499             : }
    9500             : 
    9501           0 : static PyObject *py_wbint_LookupAliasMembers_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
    9502             : {
    9503           0 :         const struct ndr_interface_call *call = NULL;
    9504           0 :         struct wbint_LookupAliasMembers *object = (struct wbint_LookupAliasMembers *)pytalloc_get_ptr(py_obj);
    9505           0 :         PyObject *ret = NULL;
    9506           0 :         struct ndr_push *push = NULL;
    9507           0 :         DATA_BLOB blob;
    9508           0 :         enum ndr_err_code err;
    9509             : 
    9510           0 :         if (ndr_table_winbind.num_calls < 14) {
    9511           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupAliasMembers_ndr_pack");
    9512           0 :                 return NULL;
    9513             :         }
    9514           0 :         call = &ndr_table_winbind.calls[13];
    9515             : 
    9516           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    9517           0 :         if (push == NULL) {
    9518           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    9519           0 :                 return NULL;
    9520             :         }
    9521             : 
    9522           0 :         push->flags |= ndr_push_flags;
    9523             : 
    9524           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    9525           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    9526           0 :                 TALLOC_FREE(push);
    9527           0 :                 PyErr_SetNdrError(err);
    9528           0 :                 return NULL;
    9529             :         }
    9530           0 :         blob = ndr_push_blob(push);
    9531           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    9532           0 :         TALLOC_FREE(push);
    9533           0 :         return ret;
    9534             : }
    9535             : 
    9536           0 : static PyObject *py_wbint_LookupAliasMembers_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9537             : {
    9538           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    9539           0 :         PyObject *bigendian_obj = NULL;
    9540           0 :         PyObject *ndr64_obj = NULL;
    9541           0 :         libndr_flags ndr_push_flags = 0;
    9542             : 
    9543           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    9544             :                 discard_const_p(char *, kwnames),
    9545             :                 &bigendian_obj,
    9546             :                 &ndr64_obj)) {
    9547           0 :                 return NULL;
    9548             :         }
    9549             : 
    9550           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9551           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    9552             :         }
    9553           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9554           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    9555             :         }
    9556             : 
    9557           0 :         return py_wbint_LookupAliasMembers_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    9558             : }
    9559             : 
    9560           0 : static PyObject *py_wbint_LookupAliasMembers_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9561             : {
    9562           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    9563           0 :         PyObject *bigendian_obj = NULL;
    9564           0 :         PyObject *ndr64_obj = NULL;
    9565           0 :         libndr_flags ndr_push_flags = 0;
    9566             : 
    9567           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    9568             :                 discard_const_p(char *, kwnames),
    9569             :                 &bigendian_obj,
    9570             :                 &ndr64_obj)) {
    9571           0 :                 return NULL;
    9572             :         }
    9573             : 
    9574           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9575           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    9576             :         }
    9577           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9578           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    9579             :         }
    9580             : 
    9581           0 :         return py_wbint_LookupAliasMembers_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    9582             : }
    9583             : 
    9584           0 : static PyObject *py_wbint_LookupAliasMembers_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
    9585             : {
    9586           0 :         const struct ndr_interface_call *call = NULL;
    9587           0 :         struct wbint_LookupAliasMembers *object = (struct wbint_LookupAliasMembers *)pytalloc_get_ptr(py_obj);
    9588           0 :         struct ndr_pull *pull = NULL;
    9589           0 :         enum ndr_err_code err;
    9590             : 
    9591           0 :         if (ndr_table_winbind.num_calls < 14) {
    9592           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupAliasMembers_ndr_unpack");
    9593           0 :                 return NULL;
    9594             :         }
    9595           0 :         call = &ndr_table_winbind.calls[13];
    9596             : 
    9597           0 :         pull = ndr_pull_init_blob(blob, object);
    9598           0 :         if (pull == NULL) {
    9599           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    9600           0 :                 return NULL;
    9601             :         }
    9602             : 
    9603           0 :         pull->flags |= ndr_pull_flags;
    9604             : 
    9605           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    9606           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    9607           0 :                 TALLOC_FREE(pull);
    9608           0 :                 PyErr_SetNdrError(err);
    9609           0 :                 return NULL;
    9610             :         }
    9611           0 :         if (!allow_remaining) {
    9612           0 :                 uint32_t highest_ofs;
    9613             : 
    9614           0 :                 if (pull->offset > pull->relative_highest_offset) {
    9615           0 :                         highest_ofs = pull->offset;
    9616             :                 } else {
    9617           0 :                         highest_ofs = pull->relative_highest_offset;
    9618             :                 }
    9619           0 :                 if (highest_ofs < pull->data_size) {
    9620           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    9621             :                                 "not all bytes consumed ofs[%u] size[%u]",
    9622             :                                 highest_ofs, pull->data_size);
    9623           0 :                         TALLOC_FREE(pull);
    9624           0 :                         PyErr_SetNdrError(err);
    9625           0 :                         return NULL;
    9626             :                 }
    9627             :         }
    9628             : 
    9629           0 :         TALLOC_FREE(pull);
    9630           0 :         Py_RETURN_NONE;
    9631             : }
    9632             : 
    9633           0 : static PyObject *py_wbint_LookupAliasMembers_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9634             : {
    9635           0 :         DATA_BLOB blob;
    9636           0 :         Py_ssize_t blob_length = 0;
    9637           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    9638           0 :         PyObject *bigendian_obj = NULL;
    9639           0 :         PyObject *ndr64_obj = NULL;
    9640           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    9641           0 :         PyObject *allow_remaining_obj = NULL;
    9642           0 :         bool allow_remaining = false;
    9643             : 
    9644           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    9645             :                 discard_const_p(char *, kwnames),
    9646             :                 &blob.data, &blob_length,
    9647             :                 &bigendian_obj,
    9648             :                 &ndr64_obj,
    9649             :                 &allow_remaining_obj)) {
    9650           0 :                 return NULL;
    9651             :         }
    9652           0 :         blob.length = blob_length;
    9653             : 
    9654           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9655           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    9656             :         }
    9657           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9658           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    9659             :         }
    9660             : 
    9661           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    9662           0 :                 allow_remaining = true;
    9663             :         }
    9664             : 
    9665           0 :         return py_wbint_LookupAliasMembers_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    9666             : }
    9667             : 
    9668           0 : static PyObject *py_wbint_LookupAliasMembers_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9669             : {
    9670           0 :         DATA_BLOB blob;
    9671           0 :         Py_ssize_t blob_length = 0;
    9672           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    9673           0 :         PyObject *bigendian_obj = NULL;
    9674           0 :         PyObject *ndr64_obj = NULL;
    9675           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    9676           0 :         PyObject *allow_remaining_obj = NULL;
    9677           0 :         bool allow_remaining = false;
    9678             : 
    9679           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    9680             :                 discard_const_p(char *, kwnames),
    9681             :                 &blob.data, &blob_length,
    9682             :                 &bigendian_obj,
    9683             :                 &ndr64_obj,
    9684             :                 &allow_remaining_obj)) {
    9685           0 :                 return NULL;
    9686             :         }
    9687           0 :         blob.length = blob_length;
    9688             : 
    9689           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9690           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    9691             :         }
    9692           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9693           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    9694             :         }
    9695             : 
    9696           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    9697           0 :                 allow_remaining = true;
    9698             :         }
    9699             : 
    9700           0 :         return py_wbint_LookupAliasMembers_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    9701             : }
    9702             : 
    9703           0 : static PyObject *py_wbint_LookupAliasMembers_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
    9704             : {
    9705           0 :         const struct ndr_interface_call *call = NULL;
    9706           0 :         struct wbint_LookupAliasMembers *object = (struct wbint_LookupAliasMembers *)pytalloc_get_ptr(py_obj);
    9707           0 :         PyObject *ret;
    9708           0 :         char *retstr;
    9709             : 
    9710           0 :         if (ndr_table_winbind.num_calls < 14) {
    9711           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupAliasMembers_ndr_print");
    9712           0 :                 return NULL;
    9713             :         }
    9714           0 :         call = &ndr_table_winbind.calls[13];
    9715             : 
    9716           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    9717           0 :         ret = PyUnicode_FromString(retstr);
    9718           0 :         TALLOC_FREE(retstr);
    9719             : 
    9720           0 :         return ret;
    9721             : }
    9722             : 
    9723           0 : static PyObject *py_wbint_LookupAliasMembers_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    9724             : {
    9725           0 :         return py_wbint_LookupAliasMembers_ndr_print(py_obj, "wbint_LookupAliasMembers_in", NDR_IN);
    9726             : }
    9727             : 
    9728           0 : static PyObject *py_wbint_LookupAliasMembers_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    9729             : {
    9730           0 :         return py_wbint_LookupAliasMembers_ndr_print(py_obj, "wbint_LookupAliasMembers_out", NDR_OUT);
    9731             : }
    9732             : 
    9733             : static PyMethodDef py_wbint_LookupAliasMembers_methods[] = {
    9734             :         { "opnum", (PyCFunction)py_wbint_LookupAliasMembers_ndr_opnum, METH_NOARGS|METH_CLASS,
    9735             :                 "winbind.wbint_LookupAliasMembers.opnum() -> 13 (0x0d) " },
    9736             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupAliasMembers_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    9737             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    9738             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupAliasMembers_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    9739             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    9740             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupAliasMembers_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    9741             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    9742             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupAliasMembers_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    9743             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    9744             :         { "__ndr_print_in__", (PyCFunction)py_wbint_LookupAliasMembers_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    9745             :         { "__ndr_print_out__", (PyCFunction)py_wbint_LookupAliasMembers_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    9746             :         { NULL, NULL, 0, NULL }
    9747             : };
    9748             : 
    9749             : 
    9750             : static PyTypeObject wbint_LookupAliasMembers_Type = {
    9751             :         PyVarObject_HEAD_INIT(NULL, 0)
    9752             :         .tp_name = "winbind.wbint_LookupAliasMembers",
    9753             :         .tp_getset = py_wbint_LookupAliasMembers_getsetters,
    9754             :         .tp_methods = py_wbint_LookupAliasMembers_methods,
    9755             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9756             :         .tp_new = py_wbint_LookupAliasMembers_new,
    9757             : };
    9758             : 
    9759           0 : static bool pack_py_wbint_LookupAliasMembers_args_in(PyObject *args, PyObject *kwargs, struct wbint_LookupAliasMembers *r)
    9760             : {
    9761           0 :         PyObject *py_sid;
    9762           0 :         PyObject *py_type;
    9763           0 :         const char *kwnames[] = {
    9764             :                 "sid", "type", NULL
    9765             :         };
    9766             : 
    9767           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:wbint_LookupAliasMembers", discard_const_p(char *, kwnames), &py_sid, &py_type)) {
    9768           0 :                 return false;
    9769             :         }
    9770             : 
    9771           0 :         if (py_sid == NULL) {
    9772           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.sid");
    9773           0 :                 return false;
    9774             :         }
    9775           0 :         r->in.sid = talloc_ptrtype(r, r->in.sid);
    9776           0 :         if (r->in.sid == NULL) {
    9777           0 :                 PyErr_NoMemory();
    9778           0 :                 return false;
    9779             :         }
    9780           0 :         PY_CHECK_TYPE(dom_sid_Type, py_sid, return false;);
    9781           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_sid)) == NULL) {
    9782           0 :                 PyErr_NoMemory();
    9783           0 :                 return false;
    9784             :         }
    9785           0 :         r->in.sid = (struct dom_sid *)pytalloc_get_ptr(py_sid);
    9786           0 :         if (py_type == NULL) {
    9787           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.type");
    9788           0 :                 return false;
    9789             :         }
    9790             :         {
    9791           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.type));
    9792           0 :                 if (PyLong_Check(py_type)) {
    9793           0 :                         unsigned long long test_var;
    9794           0 :                         test_var = PyLong_AsUnsignedLongLong(py_type);
    9795           0 :                         if (PyErr_Occurred() != NULL) {
    9796           0 :                                 return false;
    9797             :                         }
    9798           0 :                         if (test_var > uint_max) {
    9799           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9800             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9801           0 :                                 return false;
    9802             :                         }
    9803           0 :                         r->in.type = test_var;
    9804             :                 } else {
    9805           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9806             :                           PyLong_Type.tp_name);
    9807           0 :                         return false;
    9808             :                 }
    9809             :         }
    9810           0 :         return true;
    9811             : }
    9812             : 
    9813           0 : static PyObject *unpack_py_wbint_LookupAliasMembers_args_out(struct wbint_LookupAliasMembers *r)
    9814             : {
    9815           0 :         PyObject *result;
    9816           0 :         PyObject *py_sids;
    9817           0 :         py_sids = pytalloc_reference_ex(&wbint_SidArray_Type, r->out.sids, r->out.sids);
    9818           0 :         result = py_sids;
    9819           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    9820           0 :                 PyErr_SetNTSTATUS(r->out.result);
    9821           0 :                 return NULL;
    9822             :         }
    9823             : 
    9824           0 :         return result;
    9825             : }
    9826             : 
    9827             : 
    9828           0 : static PyObject *py_wbint_QueryGroupList_out_get_groups(PyObject *obj, void *closure)
    9829             : {
    9830           0 :         struct wbint_QueryGroupList *object = (struct wbint_QueryGroupList *)pytalloc_get_ptr(obj);
    9831           0 :         PyObject *py_groups;
    9832           0 :         if (object->out.groups == NULL) {
    9833           0 :                 Py_RETURN_NONE;
    9834             :         }
    9835           0 :         py_groups = pytalloc_reference_ex(&wbint_Principals_Type, object->out.groups, object->out.groups);
    9836           0 :         return py_groups;
    9837             : }
    9838             : 
    9839           0 : static int py_wbint_QueryGroupList_out_set_groups(PyObject *py_obj, PyObject *value, void *closure)
    9840             : {
    9841           0 :         struct wbint_QueryGroupList *object = (struct wbint_QueryGroupList *)pytalloc_get_ptr(py_obj);
    9842           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.groups));
    9843           0 :         if (value == NULL) {
    9844           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.groups");
    9845           0 :                 return -1;
    9846             :         }
    9847           0 :         object->out.groups = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.groups);
    9848           0 :         if (object->out.groups == NULL) {
    9849           0 :                 PyErr_NoMemory();
    9850           0 :                 return -1;
    9851             :         }
    9852           0 :         PY_CHECK_TYPE(&wbint_Principals_Type, value, return -1;);
    9853           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9854           0 :                 PyErr_NoMemory();
    9855           0 :                 return -1;
    9856             :         }
    9857           0 :         object->out.groups = (struct wbint_Principals *)pytalloc_get_ptr(value);
    9858           0 :         return 0;
    9859             : }
    9860             : 
    9861           0 : static PyObject *py_wbint_QueryGroupList_get_result(PyObject *obj, void *closure)
    9862             : {
    9863           0 :         struct wbint_QueryGroupList *object = (struct wbint_QueryGroupList *)pytalloc_get_ptr(obj);
    9864           0 :         PyObject *py_result;
    9865           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    9866           0 :         return py_result;
    9867             : }
    9868             : 
    9869           0 : static int py_wbint_QueryGroupList_set_result(PyObject *py_obj, PyObject *value, void *closure)
    9870             : {
    9871           0 :         struct wbint_QueryGroupList *object = (struct wbint_QueryGroupList *)pytalloc_get_ptr(py_obj);
    9872           0 :         if (value == NULL) {
    9873           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    9874           0 :                 return -1;
    9875             :         }
    9876           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    9877           0 :         return 0;
    9878             : }
    9879             : 
    9880             : static PyGetSetDef py_wbint_QueryGroupList_getsetters[] = {
    9881             :         {
    9882             :                 .name = discard_const_p(char, "out_groups"),
    9883             :                 .get = py_wbint_QueryGroupList_out_get_groups,
    9884             :                 .set = py_wbint_QueryGroupList_out_set_groups,
    9885             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_Principals")
    9886             :         },
    9887             :         {
    9888             :                 .name = discard_const_p(char, "result"),
    9889             :                 .get = py_wbint_QueryGroupList_get_result,
    9890             :                 .set = py_wbint_QueryGroupList_set_result,
    9891             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    9892             :         },
    9893             :         { .name = NULL }
    9894             : };
    9895             : 
    9896           0 : static PyObject *py_wbint_QueryGroupList_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9897             : {
    9898           0 :         PyObject *self = pytalloc_new(struct wbint_QueryGroupList, type);
    9899           0 :         struct wbint_QueryGroupList *_self = (struct wbint_QueryGroupList *)pytalloc_get_ptr(self);
    9900           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    9901           0 :         _self->out.groups = talloc_zero(mem_ctx, struct wbint_Principals);
    9902           0 :         return self;
    9903             : }
    9904             : 
    9905           0 : static PyObject *py_wbint_QueryGroupList_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    9906             : {
    9907             : 
    9908             : 
    9909           0 :         return PyLong_FromLong(14);
    9910             : }
    9911             : 
    9912           0 : static PyObject *py_wbint_QueryGroupList_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
    9913             : {
    9914           0 :         const struct ndr_interface_call *call = NULL;
    9915           0 :         struct wbint_QueryGroupList *object = (struct wbint_QueryGroupList *)pytalloc_get_ptr(py_obj);
    9916           0 :         PyObject *ret = NULL;
    9917           0 :         struct ndr_push *push = NULL;
    9918           0 :         DATA_BLOB blob;
    9919           0 :         enum ndr_err_code err;
    9920             : 
    9921           0 :         if (ndr_table_winbind.num_calls < 15) {
    9922           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_QueryGroupList_ndr_pack");
    9923           0 :                 return NULL;
    9924             :         }
    9925           0 :         call = &ndr_table_winbind.calls[14];
    9926             : 
    9927           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    9928           0 :         if (push == NULL) {
    9929           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    9930           0 :                 return NULL;
    9931             :         }
    9932             : 
    9933           0 :         push->flags |= ndr_push_flags;
    9934             : 
    9935           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    9936           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    9937           0 :                 TALLOC_FREE(push);
    9938           0 :                 PyErr_SetNdrError(err);
    9939           0 :                 return NULL;
    9940             :         }
    9941           0 :         blob = ndr_push_blob(push);
    9942           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    9943           0 :         TALLOC_FREE(push);
    9944           0 :         return ret;
    9945             : }
    9946             : 
    9947           0 : static PyObject *py_wbint_QueryGroupList_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9948             : {
    9949           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    9950           0 :         PyObject *bigendian_obj = NULL;
    9951           0 :         PyObject *ndr64_obj = NULL;
    9952           0 :         libndr_flags ndr_push_flags = 0;
    9953             : 
    9954           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    9955             :                 discard_const_p(char *, kwnames),
    9956             :                 &bigendian_obj,
    9957             :                 &ndr64_obj)) {
    9958           0 :                 return NULL;
    9959             :         }
    9960             : 
    9961           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9962           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    9963             :         }
    9964           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9965           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    9966             :         }
    9967             : 
    9968           0 :         return py_wbint_QueryGroupList_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    9969             : }
    9970             : 
    9971           0 : static PyObject *py_wbint_QueryGroupList_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9972             : {
    9973           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    9974           0 :         PyObject *bigendian_obj = NULL;
    9975           0 :         PyObject *ndr64_obj = NULL;
    9976           0 :         libndr_flags ndr_push_flags = 0;
    9977             : 
    9978           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    9979             :                 discard_const_p(char *, kwnames),
    9980             :                 &bigendian_obj,
    9981             :                 &ndr64_obj)) {
    9982           0 :                 return NULL;
    9983             :         }
    9984             : 
    9985           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9986           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    9987             :         }
    9988           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9989           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    9990             :         }
    9991             : 
    9992           0 :         return py_wbint_QueryGroupList_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    9993             : }
    9994             : 
    9995           0 : static PyObject *py_wbint_QueryGroupList_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
    9996             : {
    9997           0 :         const struct ndr_interface_call *call = NULL;
    9998           0 :         struct wbint_QueryGroupList *object = (struct wbint_QueryGroupList *)pytalloc_get_ptr(py_obj);
    9999           0 :         struct ndr_pull *pull = NULL;
   10000           0 :         enum ndr_err_code err;
   10001             : 
   10002           0 :         if (ndr_table_winbind.num_calls < 15) {
   10003           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_QueryGroupList_ndr_unpack");
   10004           0 :                 return NULL;
   10005             :         }
   10006           0 :         call = &ndr_table_winbind.calls[14];
   10007             : 
   10008           0 :         pull = ndr_pull_init_blob(blob, object);
   10009           0 :         if (pull == NULL) {
   10010           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   10011           0 :                 return NULL;
   10012             :         }
   10013             : 
   10014           0 :         pull->flags |= ndr_pull_flags;
   10015             : 
   10016           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   10017           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10018           0 :                 TALLOC_FREE(pull);
   10019           0 :                 PyErr_SetNdrError(err);
   10020           0 :                 return NULL;
   10021             :         }
   10022           0 :         if (!allow_remaining) {
   10023           0 :                 uint32_t highest_ofs;
   10024             : 
   10025           0 :                 if (pull->offset > pull->relative_highest_offset) {
   10026           0 :                         highest_ofs = pull->offset;
   10027             :                 } else {
   10028           0 :                         highest_ofs = pull->relative_highest_offset;
   10029             :                 }
   10030           0 :                 if (highest_ofs < pull->data_size) {
   10031           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   10032             :                                 "not all bytes consumed ofs[%u] size[%u]",
   10033             :                                 highest_ofs, pull->data_size);
   10034           0 :                         TALLOC_FREE(pull);
   10035           0 :                         PyErr_SetNdrError(err);
   10036           0 :                         return NULL;
   10037             :                 }
   10038             :         }
   10039             : 
   10040           0 :         TALLOC_FREE(pull);
   10041           0 :         Py_RETURN_NONE;
   10042             : }
   10043             : 
   10044           0 : static PyObject *py_wbint_QueryGroupList_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   10045             : {
   10046           0 :         DATA_BLOB blob;
   10047           0 :         Py_ssize_t blob_length = 0;
   10048           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   10049           0 :         PyObject *bigendian_obj = NULL;
   10050           0 :         PyObject *ndr64_obj = NULL;
   10051           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   10052           0 :         PyObject *allow_remaining_obj = NULL;
   10053           0 :         bool allow_remaining = false;
   10054             : 
   10055           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   10056             :                 discard_const_p(char *, kwnames),
   10057             :                 &blob.data, &blob_length,
   10058             :                 &bigendian_obj,
   10059             :                 &ndr64_obj,
   10060             :                 &allow_remaining_obj)) {
   10061           0 :                 return NULL;
   10062             :         }
   10063           0 :         blob.length = blob_length;
   10064             : 
   10065           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   10066           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   10067             :         }
   10068           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   10069           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   10070             :         }
   10071             : 
   10072           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   10073           0 :                 allow_remaining = true;
   10074             :         }
   10075             : 
   10076           0 :         return py_wbint_QueryGroupList_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   10077             : }
   10078             : 
   10079           0 : static PyObject *py_wbint_QueryGroupList_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   10080             : {
   10081           0 :         DATA_BLOB blob;
   10082           0 :         Py_ssize_t blob_length = 0;
   10083           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   10084           0 :         PyObject *bigendian_obj = NULL;
   10085           0 :         PyObject *ndr64_obj = NULL;
   10086           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   10087           0 :         PyObject *allow_remaining_obj = NULL;
   10088           0 :         bool allow_remaining = false;
   10089             : 
   10090           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   10091             :                 discard_const_p(char *, kwnames),
   10092             :                 &blob.data, &blob_length,
   10093             :                 &bigendian_obj,
   10094             :                 &ndr64_obj,
   10095             :                 &allow_remaining_obj)) {
   10096           0 :                 return NULL;
   10097             :         }
   10098           0 :         blob.length = blob_length;
   10099             : 
   10100           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   10101           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   10102             :         }
   10103           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   10104           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   10105             :         }
   10106             : 
   10107           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   10108           0 :                 allow_remaining = true;
   10109             :         }
   10110             : 
   10111           0 :         return py_wbint_QueryGroupList_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   10112             : }
   10113             : 
   10114           0 : static PyObject *py_wbint_QueryGroupList_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   10115             : {
   10116           0 :         const struct ndr_interface_call *call = NULL;
   10117           0 :         struct wbint_QueryGroupList *object = (struct wbint_QueryGroupList *)pytalloc_get_ptr(py_obj);
   10118           0 :         PyObject *ret;
   10119           0 :         char *retstr;
   10120             : 
   10121           0 :         if (ndr_table_winbind.num_calls < 15) {
   10122           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_QueryGroupList_ndr_print");
   10123           0 :                 return NULL;
   10124             :         }
   10125           0 :         call = &ndr_table_winbind.calls[14];
   10126             : 
   10127           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   10128           0 :         ret = PyUnicode_FromString(retstr);
   10129           0 :         TALLOC_FREE(retstr);
   10130             : 
   10131           0 :         return ret;
   10132             : }
   10133             : 
   10134           0 : static PyObject *py_wbint_QueryGroupList_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   10135             : {
   10136           0 :         return py_wbint_QueryGroupList_ndr_print(py_obj, "wbint_QueryGroupList_in", NDR_IN);
   10137             : }
   10138             : 
   10139           0 : static PyObject *py_wbint_QueryGroupList_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   10140             : {
   10141           0 :         return py_wbint_QueryGroupList_ndr_print(py_obj, "wbint_QueryGroupList_out", NDR_OUT);
   10142             : }
   10143             : 
   10144             : static PyMethodDef py_wbint_QueryGroupList_methods[] = {
   10145             :         { "opnum", (PyCFunction)py_wbint_QueryGroupList_ndr_opnum, METH_NOARGS|METH_CLASS,
   10146             :                 "winbind.wbint_QueryGroupList.opnum() -> 14 (0x0e) " },
   10147             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QueryGroupList_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   10148             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   10149             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QueryGroupList_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   10150             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   10151             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QueryGroupList_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   10152             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   10153             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QueryGroupList_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   10154             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   10155             :         { "__ndr_print_in__", (PyCFunction)py_wbint_QueryGroupList_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   10156             :         { "__ndr_print_out__", (PyCFunction)py_wbint_QueryGroupList_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   10157             :         { NULL, NULL, 0, NULL }
   10158             : };
   10159             : 
   10160             : 
   10161             : static PyTypeObject wbint_QueryGroupList_Type = {
   10162             :         PyVarObject_HEAD_INIT(NULL, 0)
   10163             :         .tp_name = "winbind.wbint_QueryGroupList",
   10164             :         .tp_getset = py_wbint_QueryGroupList_getsetters,
   10165             :         .tp_methods = py_wbint_QueryGroupList_methods,
   10166             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10167             :         .tp_new = py_wbint_QueryGroupList_new,
   10168             : };
   10169             : 
   10170           0 : static bool pack_py_wbint_QueryGroupList_args_in(PyObject *args, PyObject *kwargs, struct wbint_QueryGroupList *r)
   10171             : {
   10172           0 :         const char *kwnames[] = {
   10173             :                 NULL
   10174             :         };
   10175             : 
   10176           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":wbint_QueryGroupList", discard_const_p(char *, kwnames))) {
   10177           0 :                 return false;
   10178             :         }
   10179             : 
   10180           0 :         return true;
   10181             : }
   10182             : 
   10183           0 : static PyObject *unpack_py_wbint_QueryGroupList_args_out(struct wbint_QueryGroupList *r)
   10184             : {
   10185           0 :         PyObject *result;
   10186           0 :         PyObject *py_groups;
   10187           0 :         py_groups = pytalloc_reference_ex(&wbint_Principals_Type, r->out.groups, r->out.groups);
   10188           0 :         result = py_groups;
   10189           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   10190           0 :                 PyErr_SetNTSTATUS(r->out.result);
   10191           0 :                 return NULL;
   10192             :         }
   10193             : 
   10194           0 :         return result;
   10195             : }
   10196             : 
   10197             : 
   10198           0 : static PyObject *py_wbint_QueryUserRidList_out_get_rids(PyObject *obj, void *closure)
   10199             : {
   10200           0 :         struct wbint_QueryUserRidList *object = (struct wbint_QueryUserRidList *)pytalloc_get_ptr(obj);
   10201           0 :         PyObject *py_rids;
   10202           0 :         if (object->out.rids == NULL) {
   10203           0 :                 Py_RETURN_NONE;
   10204             :         }
   10205           0 :         py_rids = pytalloc_reference_ex(&wbint_RidArray_Type, object->out.rids, object->out.rids);
   10206           0 :         return py_rids;
   10207             : }
   10208             : 
   10209           0 : static int py_wbint_QueryUserRidList_out_set_rids(PyObject *py_obj, PyObject *value, void *closure)
   10210             : {
   10211           0 :         struct wbint_QueryUserRidList *object = (struct wbint_QueryUserRidList *)pytalloc_get_ptr(py_obj);
   10212           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.rids));
   10213           0 :         if (value == NULL) {
   10214           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.rids");
   10215           0 :                 return -1;
   10216             :         }
   10217           0 :         object->out.rids = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.rids);
   10218           0 :         if (object->out.rids == NULL) {
   10219           0 :                 PyErr_NoMemory();
   10220           0 :                 return -1;
   10221             :         }
   10222           0 :         PY_CHECK_TYPE(&wbint_RidArray_Type, value, return -1;);
   10223           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10224           0 :                 PyErr_NoMemory();
   10225           0 :                 return -1;
   10226             :         }
   10227           0 :         object->out.rids = (struct wbint_RidArray *)pytalloc_get_ptr(value);
   10228           0 :         return 0;
   10229             : }
   10230             : 
   10231           0 : static PyObject *py_wbint_QueryUserRidList_get_result(PyObject *obj, void *closure)
   10232             : {
   10233           0 :         struct wbint_QueryUserRidList *object = (struct wbint_QueryUserRidList *)pytalloc_get_ptr(obj);
   10234           0 :         PyObject *py_result;
   10235           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   10236           0 :         return py_result;
   10237             : }
   10238             : 
   10239           0 : static int py_wbint_QueryUserRidList_set_result(PyObject *py_obj, PyObject *value, void *closure)
   10240             : {
   10241           0 :         struct wbint_QueryUserRidList *object = (struct wbint_QueryUserRidList *)pytalloc_get_ptr(py_obj);
   10242           0 :         if (value == NULL) {
   10243           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   10244           0 :                 return -1;
   10245             :         }
   10246           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   10247           0 :         return 0;
   10248             : }
   10249             : 
   10250             : static PyGetSetDef py_wbint_QueryUserRidList_getsetters[] = {
   10251             :         {
   10252             :                 .name = discard_const_p(char, "out_rids"),
   10253             :                 .get = py_wbint_QueryUserRidList_out_get_rids,
   10254             :                 .set = py_wbint_QueryUserRidList_out_set_rids,
   10255             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_RidArray")
   10256             :         },
   10257             :         {
   10258             :                 .name = discard_const_p(char, "result"),
   10259             :                 .get = py_wbint_QueryUserRidList_get_result,
   10260             :                 .set = py_wbint_QueryUserRidList_set_result,
   10261             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   10262             :         },
   10263             :         { .name = NULL }
   10264             : };
   10265             : 
   10266           0 : static PyObject *py_wbint_QueryUserRidList_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10267             : {
   10268           0 :         PyObject *self = pytalloc_new(struct wbint_QueryUserRidList, type);
   10269           0 :         struct wbint_QueryUserRidList *_self = (struct wbint_QueryUserRidList *)pytalloc_get_ptr(self);
   10270           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   10271           0 :         _self->out.rids = talloc_zero(mem_ctx, struct wbint_RidArray);
   10272           0 :         return self;
   10273             : }
   10274             : 
   10275           0 : static PyObject *py_wbint_QueryUserRidList_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   10276             : {
   10277             : 
   10278             : 
   10279           0 :         return PyLong_FromLong(15);
   10280             : }
   10281             : 
   10282           0 : static PyObject *py_wbint_QueryUserRidList_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   10283             : {
   10284           0 :         const struct ndr_interface_call *call = NULL;
   10285           0 :         struct wbint_QueryUserRidList *object = (struct wbint_QueryUserRidList *)pytalloc_get_ptr(py_obj);
   10286           0 :         PyObject *ret = NULL;
   10287           0 :         struct ndr_push *push = NULL;
   10288           0 :         DATA_BLOB blob;
   10289           0 :         enum ndr_err_code err;
   10290             : 
   10291           0 :         if (ndr_table_winbind.num_calls < 16) {
   10292           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_QueryUserRidList_ndr_pack");
   10293           0 :                 return NULL;
   10294             :         }
   10295           0 :         call = &ndr_table_winbind.calls[15];
   10296             : 
   10297           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   10298           0 :         if (push == NULL) {
   10299           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   10300           0 :                 return NULL;
   10301             :         }
   10302             : 
   10303           0 :         push->flags |= ndr_push_flags;
   10304             : 
   10305           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   10306           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10307           0 :                 TALLOC_FREE(push);
   10308           0 :                 PyErr_SetNdrError(err);
   10309           0 :                 return NULL;
   10310             :         }
   10311           0 :         blob = ndr_push_blob(push);
   10312           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   10313           0 :         TALLOC_FREE(push);
   10314           0 :         return ret;
   10315             : }
   10316             : 
   10317           0 : static PyObject *py_wbint_QueryUserRidList_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   10318             : {
   10319           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   10320           0 :         PyObject *bigendian_obj = NULL;
   10321           0 :         PyObject *ndr64_obj = NULL;
   10322           0 :         libndr_flags ndr_push_flags = 0;
   10323             : 
   10324           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   10325             :                 discard_const_p(char *, kwnames),
   10326             :                 &bigendian_obj,
   10327             :                 &ndr64_obj)) {
   10328           0 :                 return NULL;
   10329             :         }
   10330             : 
   10331           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   10332           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   10333             :         }
   10334           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   10335           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   10336             :         }
   10337             : 
   10338           0 :         return py_wbint_QueryUserRidList_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   10339             : }
   10340             : 
   10341           0 : static PyObject *py_wbint_QueryUserRidList_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   10342             : {
   10343           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   10344           0 :         PyObject *bigendian_obj = NULL;
   10345           0 :         PyObject *ndr64_obj = NULL;
   10346           0 :         libndr_flags ndr_push_flags = 0;
   10347             : 
   10348           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   10349             :                 discard_const_p(char *, kwnames),
   10350             :                 &bigendian_obj,
   10351             :                 &ndr64_obj)) {
   10352           0 :                 return NULL;
   10353             :         }
   10354             : 
   10355           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   10356           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   10357             :         }
   10358           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   10359           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   10360             :         }
   10361             : 
   10362           0 :         return py_wbint_QueryUserRidList_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   10363             : }
   10364             : 
   10365           0 : static PyObject *py_wbint_QueryUserRidList_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   10366             : {
   10367           0 :         const struct ndr_interface_call *call = NULL;
   10368           0 :         struct wbint_QueryUserRidList *object = (struct wbint_QueryUserRidList *)pytalloc_get_ptr(py_obj);
   10369           0 :         struct ndr_pull *pull = NULL;
   10370           0 :         enum ndr_err_code err;
   10371             : 
   10372           0 :         if (ndr_table_winbind.num_calls < 16) {
   10373           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_QueryUserRidList_ndr_unpack");
   10374           0 :                 return NULL;
   10375             :         }
   10376           0 :         call = &ndr_table_winbind.calls[15];
   10377             : 
   10378           0 :         pull = ndr_pull_init_blob(blob, object);
   10379           0 :         if (pull == NULL) {
   10380           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   10381           0 :                 return NULL;
   10382             :         }
   10383             : 
   10384           0 :         pull->flags |= ndr_pull_flags;
   10385             : 
   10386           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   10387           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10388           0 :                 TALLOC_FREE(pull);
   10389           0 :                 PyErr_SetNdrError(err);
   10390           0 :                 return NULL;
   10391             :         }
   10392           0 :         if (!allow_remaining) {
   10393           0 :                 uint32_t highest_ofs;
   10394             : 
   10395           0 :                 if (pull->offset > pull->relative_highest_offset) {
   10396           0 :                         highest_ofs = pull->offset;
   10397             :                 } else {
   10398           0 :                         highest_ofs = pull->relative_highest_offset;
   10399             :                 }
   10400           0 :                 if (highest_ofs < pull->data_size) {
   10401           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   10402             :                                 "not all bytes consumed ofs[%u] size[%u]",
   10403             :                                 highest_ofs, pull->data_size);
   10404           0 :                         TALLOC_FREE(pull);
   10405           0 :                         PyErr_SetNdrError(err);
   10406           0 :                         return NULL;
   10407             :                 }
   10408             :         }
   10409             : 
   10410           0 :         TALLOC_FREE(pull);
   10411           0 :         Py_RETURN_NONE;
   10412             : }
   10413             : 
   10414           0 : static PyObject *py_wbint_QueryUserRidList_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   10415             : {
   10416           0 :         DATA_BLOB blob;
   10417           0 :         Py_ssize_t blob_length = 0;
   10418           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   10419           0 :         PyObject *bigendian_obj = NULL;
   10420           0 :         PyObject *ndr64_obj = NULL;
   10421           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   10422           0 :         PyObject *allow_remaining_obj = NULL;
   10423           0 :         bool allow_remaining = false;
   10424             : 
   10425           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   10426             :                 discard_const_p(char *, kwnames),
   10427             :                 &blob.data, &blob_length,
   10428             :                 &bigendian_obj,
   10429             :                 &ndr64_obj,
   10430             :                 &allow_remaining_obj)) {
   10431           0 :                 return NULL;
   10432             :         }
   10433           0 :         blob.length = blob_length;
   10434             : 
   10435           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   10436           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   10437             :         }
   10438           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   10439           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   10440             :         }
   10441             : 
   10442           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   10443           0 :                 allow_remaining = true;
   10444             :         }
   10445             : 
   10446           0 :         return py_wbint_QueryUserRidList_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   10447             : }
   10448             : 
   10449           0 : static PyObject *py_wbint_QueryUserRidList_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   10450             : {
   10451           0 :         DATA_BLOB blob;
   10452           0 :         Py_ssize_t blob_length = 0;
   10453           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   10454           0 :         PyObject *bigendian_obj = NULL;
   10455           0 :         PyObject *ndr64_obj = NULL;
   10456           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   10457           0 :         PyObject *allow_remaining_obj = NULL;
   10458           0 :         bool allow_remaining = false;
   10459             : 
   10460           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   10461             :                 discard_const_p(char *, kwnames),
   10462             :                 &blob.data, &blob_length,
   10463             :                 &bigendian_obj,
   10464             :                 &ndr64_obj,
   10465             :                 &allow_remaining_obj)) {
   10466           0 :                 return NULL;
   10467             :         }
   10468           0 :         blob.length = blob_length;
   10469             : 
   10470           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   10471           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   10472             :         }
   10473           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   10474           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   10475             :         }
   10476             : 
   10477           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   10478           0 :                 allow_remaining = true;
   10479             :         }
   10480             : 
   10481           0 :         return py_wbint_QueryUserRidList_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   10482             : }
   10483             : 
   10484           0 : static PyObject *py_wbint_QueryUserRidList_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   10485             : {
   10486           0 :         const struct ndr_interface_call *call = NULL;
   10487           0 :         struct wbint_QueryUserRidList *object = (struct wbint_QueryUserRidList *)pytalloc_get_ptr(py_obj);
   10488           0 :         PyObject *ret;
   10489           0 :         char *retstr;
   10490             : 
   10491           0 :         if (ndr_table_winbind.num_calls < 16) {
   10492           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_QueryUserRidList_ndr_print");
   10493           0 :                 return NULL;
   10494             :         }
   10495           0 :         call = &ndr_table_winbind.calls[15];
   10496             : 
   10497           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   10498           0 :         ret = PyUnicode_FromString(retstr);
   10499           0 :         TALLOC_FREE(retstr);
   10500             : 
   10501           0 :         return ret;
   10502             : }
   10503             : 
   10504           0 : static PyObject *py_wbint_QueryUserRidList_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   10505             : {
   10506           0 :         return py_wbint_QueryUserRidList_ndr_print(py_obj, "wbint_QueryUserRidList_in", NDR_IN);
   10507             : }
   10508             : 
   10509           0 : static PyObject *py_wbint_QueryUserRidList_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   10510             : {
   10511           0 :         return py_wbint_QueryUserRidList_ndr_print(py_obj, "wbint_QueryUserRidList_out", NDR_OUT);
   10512             : }
   10513             : 
   10514             : static PyMethodDef py_wbint_QueryUserRidList_methods[] = {
   10515             :         { "opnum", (PyCFunction)py_wbint_QueryUserRidList_ndr_opnum, METH_NOARGS|METH_CLASS,
   10516             :                 "winbind.wbint_QueryUserRidList.opnum() -> 15 (0x0f) " },
   10517             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QueryUserRidList_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   10518             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   10519             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QueryUserRidList_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   10520             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   10521             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QueryUserRidList_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   10522             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   10523             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QueryUserRidList_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   10524             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   10525             :         { "__ndr_print_in__", (PyCFunction)py_wbint_QueryUserRidList_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   10526             :         { "__ndr_print_out__", (PyCFunction)py_wbint_QueryUserRidList_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   10527             :         { NULL, NULL, 0, NULL }
   10528             : };
   10529             : 
   10530             : 
   10531             : static PyTypeObject wbint_QueryUserRidList_Type = {
   10532             :         PyVarObject_HEAD_INIT(NULL, 0)
   10533             :         .tp_name = "winbind.wbint_QueryUserRidList",
   10534             :         .tp_getset = py_wbint_QueryUserRidList_getsetters,
   10535             :         .tp_methods = py_wbint_QueryUserRidList_methods,
   10536             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10537             :         .tp_new = py_wbint_QueryUserRidList_new,
   10538             : };
   10539             : 
   10540           0 : static bool pack_py_wbint_QueryUserRidList_args_in(PyObject *args, PyObject *kwargs, struct wbint_QueryUserRidList *r)
   10541             : {
   10542           0 :         const char *kwnames[] = {
   10543             :                 NULL
   10544             :         };
   10545             : 
   10546           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":wbint_QueryUserRidList", discard_const_p(char *, kwnames))) {
   10547           0 :                 return false;
   10548             :         }
   10549             : 
   10550           0 :         return true;
   10551             : }
   10552             : 
   10553           0 : static PyObject *unpack_py_wbint_QueryUserRidList_args_out(struct wbint_QueryUserRidList *r)
   10554             : {
   10555           0 :         PyObject *result;
   10556           0 :         PyObject *py_rids;
   10557           0 :         py_rids = pytalloc_reference_ex(&wbint_RidArray_Type, r->out.rids, r->out.rids);
   10558           0 :         result = py_rids;
   10559           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   10560           0 :                 PyErr_SetNTSTATUS(r->out.result);
   10561           0 :                 return NULL;
   10562             :         }
   10563             : 
   10564           0 :         return result;
   10565             : }
   10566             : 
   10567             : 
   10568           0 : static PyObject *py_wbint_DsGetDcName_in_get_domain_name(PyObject *obj, void *closure)
   10569             : {
   10570           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(obj);
   10571           0 :         PyObject *py_domain_name;
   10572           0 :         if (object->in.domain_name == NULL) {
   10573           0 :                 Py_RETURN_NONE;
   10574             :         }
   10575           0 :         if (object->in.domain_name == NULL) {
   10576           0 :                 py_domain_name = Py_None;
   10577           0 :                 Py_INCREF(py_domain_name);
   10578             :         } else {
   10579           0 :                 py_domain_name = PyUnicode_Decode(object->in.domain_name, strlen(object->in.domain_name), "utf-8", "ignore");
   10580             :         }
   10581           0 :         return py_domain_name;
   10582             : }
   10583             : 
   10584           0 : static int py_wbint_DsGetDcName_in_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   10585             : {
   10586           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(py_obj);
   10587           0 :         if (value == NULL) {
   10588           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_name");
   10589           0 :                 return -1;
   10590             :         }
   10591           0 :         object->in.domain_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.domain_name);
   10592           0 :         if (object->in.domain_name == NULL) {
   10593           0 :                 PyErr_NoMemory();
   10594           0 :                 return -1;
   10595             :         }
   10596             :         {
   10597           0 :                 const char *test_str;
   10598           0 :                 const char *talloc_str;
   10599           0 :                 PyObject *unicode = NULL;
   10600           0 :                 if (PyUnicode_Check(value)) {
   10601           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   10602           0 :                         if (unicode == NULL) {
   10603           0 :                                 PyErr_NoMemory();
   10604           0 :                                 return -1;
   10605             :                         }
   10606           0 :                         test_str = PyBytes_AS_STRING(unicode);
   10607           0 :                 } else if (PyBytes_Check(value)) {
   10608           0 :                         test_str = PyBytes_AS_STRING(value);
   10609             :                 } else {
   10610           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   10611           0 :                         return -1;
   10612             :                 }
   10613           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   10614           0 :                 if (unicode != NULL) {
   10615           0 :                         Py_DECREF(unicode);
   10616             :                 }
   10617           0 :                 if (talloc_str == NULL) {
   10618           0 :                         PyErr_NoMemory();
   10619           0 :                         return -1;
   10620             :                 }
   10621           0 :                 object->in.domain_name = talloc_str;
   10622             :         }
   10623           0 :         return 0;
   10624             : }
   10625             : 
   10626           0 : static PyObject *py_wbint_DsGetDcName_in_get_domain_guid(PyObject *obj, void *closure)
   10627             : {
   10628           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(obj);
   10629           0 :         PyObject *py_domain_guid;
   10630           0 :         if (object->in.domain_guid == NULL) {
   10631           0 :                 Py_RETURN_NONE;
   10632             :         }
   10633           0 :         if (object->in.domain_guid == NULL) {
   10634           0 :                 py_domain_guid = Py_None;
   10635           0 :                 Py_INCREF(py_domain_guid);
   10636             :         } else {
   10637           0 :                 py_domain_guid = pytalloc_reference_ex(GUID_Type, object->in.domain_guid, object->in.domain_guid);
   10638             :         }
   10639           0 :         return py_domain_guid;
   10640             : }
   10641             : 
   10642           0 : static int py_wbint_DsGetDcName_in_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
   10643             : {
   10644           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(py_obj);
   10645           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domain_guid));
   10646           0 :         if (value == NULL) {
   10647           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_guid");
   10648           0 :                 return -1;
   10649             :         }
   10650           0 :         if (value == Py_None) {
   10651           0 :                 object->in.domain_guid = NULL;
   10652             :         } else {
   10653           0 :                 object->in.domain_guid = NULL;
   10654           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
   10655           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10656           0 :                         PyErr_NoMemory();
   10657           0 :                         return -1;
   10658             :                 }
   10659           0 :                 object->in.domain_guid = (struct GUID *)pytalloc_get_ptr(value);
   10660             :         }
   10661           0 :         return 0;
   10662             : }
   10663             : 
   10664           0 : static PyObject *py_wbint_DsGetDcName_in_get_site_name(PyObject *obj, void *closure)
   10665             : {
   10666           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(obj);
   10667           0 :         PyObject *py_site_name;
   10668           0 :         if (object->in.site_name == NULL) {
   10669           0 :                 Py_RETURN_NONE;
   10670             :         }
   10671           0 :         if (object->in.site_name == NULL) {
   10672           0 :                 py_site_name = Py_None;
   10673           0 :                 Py_INCREF(py_site_name);
   10674             :         } else {
   10675           0 :                 if (object->in.site_name == NULL) {
   10676           0 :                         py_site_name = Py_None;
   10677           0 :                         Py_INCREF(py_site_name);
   10678             :                 } else {
   10679           0 :                         py_site_name = PyUnicode_Decode(object->in.site_name, strlen(object->in.site_name), "utf-8", "ignore");
   10680             :                 }
   10681             :         }
   10682           0 :         return py_site_name;
   10683             : }
   10684             : 
   10685           0 : static int py_wbint_DsGetDcName_in_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
   10686             : {
   10687           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(py_obj);
   10688           0 :         if (value == NULL) {
   10689           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.site_name");
   10690           0 :                 return -1;
   10691             :         }
   10692           0 :         if (value == Py_None) {
   10693           0 :                 object->in.site_name = NULL;
   10694             :         } else {
   10695           0 :                 object->in.site_name = NULL;
   10696             :                 {
   10697           0 :                         const char *test_str;
   10698           0 :                         const char *talloc_str;
   10699           0 :                         PyObject *unicode = NULL;
   10700           0 :                         if (PyUnicode_Check(value)) {
   10701           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   10702           0 :                                 if (unicode == NULL) {
   10703           0 :                                         PyErr_NoMemory();
   10704           0 :                                         return -1;
   10705             :                                 }
   10706           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   10707           0 :                         } else if (PyBytes_Check(value)) {
   10708           0 :                                 test_str = PyBytes_AS_STRING(value);
   10709             :                         } else {
   10710           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   10711           0 :                                 return -1;
   10712             :                         }
   10713           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   10714           0 :                         if (unicode != NULL) {
   10715           0 :                                 Py_DECREF(unicode);
   10716             :                         }
   10717           0 :                         if (talloc_str == NULL) {
   10718           0 :                                 PyErr_NoMemory();
   10719           0 :                                 return -1;
   10720             :                         }
   10721           0 :                         object->in.site_name = talloc_str;
   10722             :                 }
   10723             :         }
   10724           0 :         return 0;
   10725             : }
   10726             : 
   10727           0 : static PyObject *py_wbint_DsGetDcName_in_get_flags(PyObject *obj, void *closure)
   10728             : {
   10729           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(obj);
   10730           0 :         PyObject *py_flags;
   10731           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   10732           0 :         return py_flags;
   10733             : }
   10734             : 
   10735           0 : static int py_wbint_DsGetDcName_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   10736             : {
   10737           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(py_obj);
   10738           0 :         if (value == NULL) {
   10739           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   10740           0 :                 return -1;
   10741             :         }
   10742             :         {
   10743           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   10744           0 :                 if (PyLong_Check(value)) {
   10745           0 :                         unsigned long long test_var;
   10746           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10747           0 :                         if (PyErr_Occurred() != NULL) {
   10748           0 :                                 return -1;
   10749             :                         }
   10750           0 :                         if (test_var > uint_max) {
   10751           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10752             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10753           0 :                                 return -1;
   10754             :                         }
   10755           0 :                         object->in.flags = test_var;
   10756             :                 } else {
   10757           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10758             :                           PyLong_Type.tp_name);
   10759           0 :                         return -1;
   10760             :                 }
   10761             :         }
   10762           0 :         return 0;
   10763             : }
   10764             : 
   10765           0 : static PyObject *py_wbint_DsGetDcName_out_get_dc_info(PyObject *obj, void *closure)
   10766             : {
   10767           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(obj);
   10768           0 :         PyObject *py_dc_info;
   10769           0 :         if (object->out.dc_info == NULL) {
   10770           0 :                 Py_RETURN_NONE;
   10771             :         }
   10772           0 :         if (*object->out.dc_info == NULL) {
   10773           0 :                 py_dc_info = Py_None;
   10774           0 :                 Py_INCREF(py_dc_info);
   10775             :         } else {
   10776           0 :                 py_dc_info = pytalloc_reference_ex(netr_DsRGetDCNameInfo_Type, *object->out.dc_info, *object->out.dc_info);
   10777             :         }
   10778           0 :         return py_dc_info;
   10779             : }
   10780             : 
   10781           0 : static int py_wbint_DsGetDcName_out_set_dc_info(PyObject *py_obj, PyObject *value, void *closure)
   10782             : {
   10783           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(py_obj);
   10784           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dc_info));
   10785           0 :         if (value == NULL) {
   10786           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.dc_info");
   10787           0 :                 return -1;
   10788             :         }
   10789           0 :         object->out.dc_info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dc_info);
   10790           0 :         if (object->out.dc_info == NULL) {
   10791           0 :                 PyErr_NoMemory();
   10792           0 :                 return -1;
   10793             :         }
   10794           0 :         if (value == Py_None) {
   10795           0 :                 *object->out.dc_info = NULL;
   10796             :         } else {
   10797           0 :                 *object->out.dc_info = NULL;
   10798           0 :                 PY_CHECK_TYPE(netr_DsRGetDCNameInfo_Type, value, return -1;);
   10799           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10800           0 :                         PyErr_NoMemory();
   10801           0 :                         return -1;
   10802             :                 }
   10803           0 :                 *object->out.dc_info = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(value);
   10804             :         }
   10805           0 :         return 0;
   10806             : }
   10807             : 
   10808           0 : static PyObject *py_wbint_DsGetDcName_get_result(PyObject *obj, void *closure)
   10809             : {
   10810           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(obj);
   10811           0 :         PyObject *py_result;
   10812           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   10813           0 :         return py_result;
   10814             : }
   10815             : 
   10816           0 : static int py_wbint_DsGetDcName_set_result(PyObject *py_obj, PyObject *value, void *closure)
   10817             : {
   10818           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(py_obj);
   10819           0 :         if (value == NULL) {
   10820           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   10821           0 :                 return -1;
   10822             :         }
   10823           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   10824           0 :         return 0;
   10825             : }
   10826             : 
   10827             : static PyGetSetDef py_wbint_DsGetDcName_getsetters[] = {
   10828             :         {
   10829             :                 .name = discard_const_p(char, "in_domain_name"),
   10830             :                 .get = py_wbint_DsGetDcName_in_get_domain_name,
   10831             :                 .set = py_wbint_DsGetDcName_in_set_domain_name,
   10832             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   10833             :         },
   10834             :         {
   10835             :                 .name = discard_const_p(char, "in_domain_guid"),
   10836             :                 .get = py_wbint_DsGetDcName_in_get_domain_guid,
   10837             :                 .set = py_wbint_DsGetDcName_in_set_domain_guid,
   10838             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   10839             :         },
   10840             :         {
   10841             :                 .name = discard_const_p(char, "in_site_name"),
   10842             :                 .get = py_wbint_DsGetDcName_in_get_site_name,
   10843             :                 .set = py_wbint_DsGetDcName_in_set_site_name,
   10844             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   10845             :         },
   10846             :         {
   10847             :                 .name = discard_const_p(char, "in_flags"),
   10848             :                 .get = py_wbint_DsGetDcName_in_get_flags,
   10849             :                 .set = py_wbint_DsGetDcName_in_set_flags,
   10850             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10851             :         },
   10852             :         {
   10853             :                 .name = discard_const_p(char, "out_dc_info"),
   10854             :                 .get = py_wbint_DsGetDcName_out_get_dc_info,
   10855             :                 .set = py_wbint_DsGetDcName_out_set_dc_info,
   10856             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCNameInfo")
   10857             :         },
   10858             :         {
   10859             :                 .name = discard_const_p(char, "result"),
   10860             :                 .get = py_wbint_DsGetDcName_get_result,
   10861             :                 .set = py_wbint_DsGetDcName_set_result,
   10862             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   10863             :         },
   10864             :         { .name = NULL }
   10865             : };
   10866             : 
   10867           0 : static PyObject *py_wbint_DsGetDcName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10868             : {
   10869           0 :         PyObject *self = pytalloc_new(struct wbint_DsGetDcName, type);
   10870           0 :         struct wbint_DsGetDcName *_self = (struct wbint_DsGetDcName *)pytalloc_get_ptr(self);
   10871           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   10872             :         /* a pointer to a NULL pointer */
   10873           0 :         _self->out.dc_info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo *);
   10874           0 :         return self;
   10875             : }
   10876             : 
   10877           0 : static PyObject *py_wbint_DsGetDcName_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   10878             : {
   10879             : 
   10880             : 
   10881           0 :         return PyLong_FromLong(16);
   10882             : }
   10883             : 
   10884           0 : static PyObject *py_wbint_DsGetDcName_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   10885             : {
   10886           0 :         const struct ndr_interface_call *call = NULL;
   10887           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(py_obj);
   10888           0 :         PyObject *ret = NULL;
   10889           0 :         struct ndr_push *push = NULL;
   10890           0 :         DATA_BLOB blob;
   10891           0 :         enum ndr_err_code err;
   10892             : 
   10893           0 :         if (ndr_table_winbind.num_calls < 17) {
   10894           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_DsGetDcName_ndr_pack");
   10895           0 :                 return NULL;
   10896             :         }
   10897           0 :         call = &ndr_table_winbind.calls[16];
   10898             : 
   10899           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   10900           0 :         if (push == NULL) {
   10901           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   10902           0 :                 return NULL;
   10903             :         }
   10904             : 
   10905           0 :         push->flags |= ndr_push_flags;
   10906             : 
   10907           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   10908           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10909           0 :                 TALLOC_FREE(push);
   10910           0 :                 PyErr_SetNdrError(err);
   10911           0 :                 return NULL;
   10912             :         }
   10913           0 :         blob = ndr_push_blob(push);
   10914           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   10915           0 :         TALLOC_FREE(push);
   10916           0 :         return ret;
   10917             : }
   10918             : 
   10919           0 : static PyObject *py_wbint_DsGetDcName_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   10920             : {
   10921           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   10922           0 :         PyObject *bigendian_obj = NULL;
   10923           0 :         PyObject *ndr64_obj = NULL;
   10924           0 :         libndr_flags ndr_push_flags = 0;
   10925             : 
   10926           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   10927             :                 discard_const_p(char *, kwnames),
   10928             :                 &bigendian_obj,
   10929             :                 &ndr64_obj)) {
   10930           0 :                 return NULL;
   10931             :         }
   10932             : 
   10933           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   10934           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   10935             :         }
   10936           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   10937           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   10938             :         }
   10939             : 
   10940           0 :         return py_wbint_DsGetDcName_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   10941             : }
   10942             : 
   10943           0 : static PyObject *py_wbint_DsGetDcName_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   10944             : {
   10945           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   10946           0 :         PyObject *bigendian_obj = NULL;
   10947           0 :         PyObject *ndr64_obj = NULL;
   10948           0 :         libndr_flags ndr_push_flags = 0;
   10949             : 
   10950           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   10951             :                 discard_const_p(char *, kwnames),
   10952             :                 &bigendian_obj,
   10953             :                 &ndr64_obj)) {
   10954           0 :                 return NULL;
   10955             :         }
   10956             : 
   10957           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   10958           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   10959             :         }
   10960           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   10961           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   10962             :         }
   10963             : 
   10964           0 :         return py_wbint_DsGetDcName_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   10965             : }
   10966             : 
   10967           0 : static PyObject *py_wbint_DsGetDcName_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   10968             : {
   10969           0 :         const struct ndr_interface_call *call = NULL;
   10970           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(py_obj);
   10971           0 :         struct ndr_pull *pull = NULL;
   10972           0 :         enum ndr_err_code err;
   10973             : 
   10974           0 :         if (ndr_table_winbind.num_calls < 17) {
   10975           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_DsGetDcName_ndr_unpack");
   10976           0 :                 return NULL;
   10977             :         }
   10978           0 :         call = &ndr_table_winbind.calls[16];
   10979             : 
   10980           0 :         pull = ndr_pull_init_blob(blob, object);
   10981           0 :         if (pull == NULL) {
   10982           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   10983           0 :                 return NULL;
   10984             :         }
   10985             : 
   10986           0 :         pull->flags |= ndr_pull_flags;
   10987             : 
   10988           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   10989           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10990           0 :                 TALLOC_FREE(pull);
   10991           0 :                 PyErr_SetNdrError(err);
   10992           0 :                 return NULL;
   10993             :         }
   10994           0 :         if (!allow_remaining) {
   10995           0 :                 uint32_t highest_ofs;
   10996             : 
   10997           0 :                 if (pull->offset > pull->relative_highest_offset) {
   10998           0 :                         highest_ofs = pull->offset;
   10999             :                 } else {
   11000           0 :                         highest_ofs = pull->relative_highest_offset;
   11001             :                 }
   11002           0 :                 if (highest_ofs < pull->data_size) {
   11003           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   11004             :                                 "not all bytes consumed ofs[%u] size[%u]",
   11005             :                                 highest_ofs, pull->data_size);
   11006           0 :                         TALLOC_FREE(pull);
   11007           0 :                         PyErr_SetNdrError(err);
   11008           0 :                         return NULL;
   11009             :                 }
   11010             :         }
   11011             : 
   11012           0 :         TALLOC_FREE(pull);
   11013           0 :         Py_RETURN_NONE;
   11014             : }
   11015             : 
   11016           0 : static PyObject *py_wbint_DsGetDcName_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11017             : {
   11018           0 :         DATA_BLOB blob;
   11019           0 :         Py_ssize_t blob_length = 0;
   11020           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   11021           0 :         PyObject *bigendian_obj = NULL;
   11022           0 :         PyObject *ndr64_obj = NULL;
   11023           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   11024           0 :         PyObject *allow_remaining_obj = NULL;
   11025           0 :         bool allow_remaining = false;
   11026             : 
   11027           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   11028             :                 discard_const_p(char *, kwnames),
   11029             :                 &blob.data, &blob_length,
   11030             :                 &bigendian_obj,
   11031             :                 &ndr64_obj,
   11032             :                 &allow_remaining_obj)) {
   11033           0 :                 return NULL;
   11034             :         }
   11035           0 :         blob.length = blob_length;
   11036             : 
   11037           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   11038           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   11039             :         }
   11040           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   11041           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   11042             :         }
   11043             : 
   11044           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   11045           0 :                 allow_remaining = true;
   11046             :         }
   11047             : 
   11048           0 :         return py_wbint_DsGetDcName_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   11049             : }
   11050             : 
   11051           0 : static PyObject *py_wbint_DsGetDcName_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11052             : {
   11053           0 :         DATA_BLOB blob;
   11054           0 :         Py_ssize_t blob_length = 0;
   11055           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   11056           0 :         PyObject *bigendian_obj = NULL;
   11057           0 :         PyObject *ndr64_obj = NULL;
   11058           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   11059           0 :         PyObject *allow_remaining_obj = NULL;
   11060           0 :         bool allow_remaining = false;
   11061             : 
   11062           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   11063             :                 discard_const_p(char *, kwnames),
   11064             :                 &blob.data, &blob_length,
   11065             :                 &bigendian_obj,
   11066             :                 &ndr64_obj,
   11067             :                 &allow_remaining_obj)) {
   11068           0 :                 return NULL;
   11069             :         }
   11070           0 :         blob.length = blob_length;
   11071             : 
   11072           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   11073           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   11074             :         }
   11075           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   11076           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   11077             :         }
   11078             : 
   11079           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   11080           0 :                 allow_remaining = true;
   11081             :         }
   11082             : 
   11083           0 :         return py_wbint_DsGetDcName_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   11084             : }
   11085             : 
   11086           0 : static PyObject *py_wbint_DsGetDcName_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   11087             : {
   11088           0 :         const struct ndr_interface_call *call = NULL;
   11089           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(py_obj);
   11090           0 :         PyObject *ret;
   11091           0 :         char *retstr;
   11092             : 
   11093           0 :         if (ndr_table_winbind.num_calls < 17) {
   11094           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_DsGetDcName_ndr_print");
   11095           0 :                 return NULL;
   11096             :         }
   11097           0 :         call = &ndr_table_winbind.calls[16];
   11098             : 
   11099           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   11100           0 :         ret = PyUnicode_FromString(retstr);
   11101           0 :         TALLOC_FREE(retstr);
   11102             : 
   11103           0 :         return ret;
   11104             : }
   11105             : 
   11106           0 : static PyObject *py_wbint_DsGetDcName_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   11107             : {
   11108           0 :         return py_wbint_DsGetDcName_ndr_print(py_obj, "wbint_DsGetDcName_in", NDR_IN);
   11109             : }
   11110             : 
   11111           0 : static PyObject *py_wbint_DsGetDcName_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   11112             : {
   11113           0 :         return py_wbint_DsGetDcName_ndr_print(py_obj, "wbint_DsGetDcName_out", NDR_OUT);
   11114             : }
   11115             : 
   11116             : static PyMethodDef py_wbint_DsGetDcName_methods[] = {
   11117             :         { "opnum", (PyCFunction)py_wbint_DsGetDcName_ndr_opnum, METH_NOARGS|METH_CLASS,
   11118             :                 "winbind.wbint_DsGetDcName.opnum() -> 16 (0x10) " },
   11119             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_DsGetDcName_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   11120             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   11121             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_DsGetDcName_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   11122             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   11123             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_DsGetDcName_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   11124             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   11125             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_DsGetDcName_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   11126             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   11127             :         { "__ndr_print_in__", (PyCFunction)py_wbint_DsGetDcName_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   11128             :         { "__ndr_print_out__", (PyCFunction)py_wbint_DsGetDcName_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   11129             :         { NULL, NULL, 0, NULL }
   11130             : };
   11131             : 
   11132             : 
   11133             : static PyTypeObject wbint_DsGetDcName_Type = {
   11134             :         PyVarObject_HEAD_INIT(NULL, 0)
   11135             :         .tp_name = "winbind.wbint_DsGetDcName",
   11136             :         .tp_getset = py_wbint_DsGetDcName_getsetters,
   11137             :         .tp_methods = py_wbint_DsGetDcName_methods,
   11138             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11139             :         .tp_new = py_wbint_DsGetDcName_new,
   11140             : };
   11141             : 
   11142           0 : static bool pack_py_wbint_DsGetDcName_args_in(PyObject *args, PyObject *kwargs, struct wbint_DsGetDcName *r)
   11143             : {
   11144           0 :         PyObject *py_domain_name;
   11145           0 :         PyObject *py_domain_guid;
   11146           0 :         PyObject *py_site_name;
   11147           0 :         PyObject *py_flags;
   11148           0 :         const char *kwnames[] = {
   11149             :                 "domain_name", "domain_guid", "site_name", "flags", NULL
   11150             :         };
   11151             : 
   11152           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:wbint_DsGetDcName", discard_const_p(char *, kwnames), &py_domain_name, &py_domain_guid, &py_site_name, &py_flags)) {
   11153           0 :                 return false;
   11154             :         }
   11155             : 
   11156           0 :         if (py_domain_name == NULL) {
   11157           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_name");
   11158           0 :                 return false;
   11159             :         }
   11160           0 :         r->in.domain_name = talloc_ptrtype(r, r->in.domain_name);
   11161           0 :         if (r->in.domain_name == NULL) {
   11162           0 :                 PyErr_NoMemory();
   11163           0 :                 return false;
   11164             :         }
   11165             :         {
   11166           0 :                 const char *test_str;
   11167           0 :                 const char *talloc_str;
   11168           0 :                 PyObject *unicode = NULL;
   11169           0 :                 if (PyUnicode_Check(py_domain_name)) {
   11170           0 :                         unicode = PyUnicode_AsEncodedString(py_domain_name, "utf-8", "ignore");
   11171           0 :                         if (unicode == NULL) {
   11172           0 :                                 PyErr_NoMemory();
   11173           0 :                                 return false;
   11174             :                         }
   11175           0 :                         test_str = PyBytes_AS_STRING(unicode);
   11176           0 :                 } else if (PyBytes_Check(py_domain_name)) {
   11177           0 :                         test_str = PyBytes_AS_STRING(py_domain_name);
   11178             :                 } else {
   11179           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain_name)->tp_name);
   11180           0 :                         return false;
   11181             :                 }
   11182           0 :                 talloc_str = talloc_strdup(r, test_str);
   11183           0 :                 if (unicode != NULL) {
   11184           0 :                         Py_DECREF(unicode);
   11185             :                 }
   11186           0 :                 if (talloc_str == NULL) {
   11187           0 :                         PyErr_NoMemory();
   11188           0 :                         return false;
   11189             :                 }
   11190           0 :                 r->in.domain_name = talloc_str;
   11191             :         }
   11192           0 :         if (py_domain_guid == NULL) {
   11193           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_guid");
   11194           0 :                 return false;
   11195             :         }
   11196           0 :         if (py_domain_guid == Py_None) {
   11197           0 :                 r->in.domain_guid = NULL;
   11198             :         } else {
   11199           0 :                 r->in.domain_guid = NULL;
   11200           0 :                 PY_CHECK_TYPE(GUID_Type, py_domain_guid, return false;);
   11201           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_guid)) == NULL) {
   11202           0 :                         PyErr_NoMemory();
   11203           0 :                         return false;
   11204             :                 }
   11205           0 :                 r->in.domain_guid = (struct GUID *)pytalloc_get_ptr(py_domain_guid);
   11206             :         }
   11207           0 :         if (py_site_name == NULL) {
   11208           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.site_name");
   11209           0 :                 return false;
   11210             :         }
   11211           0 :         if (py_site_name == Py_None) {
   11212           0 :                 r->in.site_name = NULL;
   11213             :         } else {
   11214           0 :                 r->in.site_name = NULL;
   11215             :                 {
   11216           0 :                         const char *test_str;
   11217           0 :                         const char *talloc_str;
   11218           0 :                         PyObject *unicode = NULL;
   11219           0 :                         if (PyUnicode_Check(py_site_name)) {
   11220           0 :                                 unicode = PyUnicode_AsEncodedString(py_site_name, "utf-8", "ignore");
   11221           0 :                                 if (unicode == NULL) {
   11222           0 :                                         PyErr_NoMemory();
   11223           0 :                                         return false;
   11224             :                                 }
   11225           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   11226           0 :                         } else if (PyBytes_Check(py_site_name)) {
   11227           0 :                                 test_str = PyBytes_AS_STRING(py_site_name);
   11228             :                         } else {
   11229           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_site_name)->tp_name);
   11230           0 :                                 return false;
   11231             :                         }
   11232           0 :                         talloc_str = talloc_strdup(r, test_str);
   11233           0 :                         if (unicode != NULL) {
   11234           0 :                                 Py_DECREF(unicode);
   11235             :                         }
   11236           0 :                         if (talloc_str == NULL) {
   11237           0 :                                 PyErr_NoMemory();
   11238           0 :                                 return false;
   11239             :                         }
   11240           0 :                         r->in.site_name = talloc_str;
   11241             :                 }
   11242             :         }
   11243           0 :         if (py_flags == NULL) {
   11244           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   11245           0 :                 return false;
   11246             :         }
   11247             :         {
   11248           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   11249           0 :                 if (PyLong_Check(py_flags)) {
   11250           0 :                         unsigned long long test_var;
   11251           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   11252           0 :                         if (PyErr_Occurred() != NULL) {
   11253           0 :                                 return false;
   11254             :                         }
   11255           0 :                         if (test_var > uint_max) {
   11256           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11257             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11258           0 :                                 return false;
   11259             :                         }
   11260           0 :                         r->in.flags = test_var;
   11261             :                 } else {
   11262           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11263             :                           PyLong_Type.tp_name);
   11264           0 :                         return false;
   11265             :                 }
   11266             :         }
   11267           0 :         return true;
   11268             : }
   11269             : 
   11270           0 : static PyObject *unpack_py_wbint_DsGetDcName_args_out(struct wbint_DsGetDcName *r)
   11271             : {
   11272           0 :         PyObject *result;
   11273           0 :         PyObject *py_dc_info;
   11274           0 :         if (*r->out.dc_info == NULL) {
   11275           0 :                 py_dc_info = Py_None;
   11276           0 :                 Py_INCREF(py_dc_info);
   11277             :         } else {
   11278           0 :                 py_dc_info = pytalloc_reference_ex(netr_DsRGetDCNameInfo_Type, *r->out.dc_info, *r->out.dc_info);
   11279             :         }
   11280           0 :         result = py_dc_info;
   11281           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   11282           0 :                 PyErr_SetNTSTATUS(r->out.result);
   11283           0 :                 return NULL;
   11284             :         }
   11285             : 
   11286           0 :         return result;
   11287             : }
   11288             : 
   11289             : 
   11290           0 : static PyObject *py_wbint_LookupRids_in_get_domain_sid(PyObject *obj, void *closure)
   11291             : {
   11292           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(obj);
   11293           0 :         PyObject *py_domain_sid;
   11294           0 :         if (object->in.domain_sid == NULL) {
   11295           0 :                 Py_RETURN_NONE;
   11296             :         }
   11297           0 :         py_domain_sid = pytalloc_reference_ex(dom_sid_Type, object->in.domain_sid, object->in.domain_sid);
   11298           0 :         return py_domain_sid;
   11299             : }
   11300             : 
   11301           0 : static int py_wbint_LookupRids_in_set_domain_sid(PyObject *py_obj, PyObject *value, void *closure)
   11302             : {
   11303           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(py_obj);
   11304           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domain_sid));
   11305           0 :         if (value == NULL) {
   11306           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_sid");
   11307           0 :                 return -1;
   11308             :         }
   11309           0 :         object->in.domain_sid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.domain_sid);
   11310           0 :         if (object->in.domain_sid == NULL) {
   11311           0 :                 PyErr_NoMemory();
   11312           0 :                 return -1;
   11313             :         }
   11314           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
   11315           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11316           0 :                 PyErr_NoMemory();
   11317           0 :                 return -1;
   11318             :         }
   11319           0 :         object->in.domain_sid = (struct dom_sid *)pytalloc_get_ptr(value);
   11320           0 :         return 0;
   11321             : }
   11322             : 
   11323           0 : static PyObject *py_wbint_LookupRids_in_get_rids(PyObject *obj, void *closure)
   11324             : {
   11325           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(obj);
   11326           0 :         PyObject *py_rids;
   11327           0 :         if (object->in.rids == NULL) {
   11328           0 :                 Py_RETURN_NONE;
   11329             :         }
   11330           0 :         py_rids = pytalloc_reference_ex(&wbint_RidArray_Type, object->in.rids, object->in.rids);
   11331           0 :         return py_rids;
   11332             : }
   11333             : 
   11334           0 : static int py_wbint_LookupRids_in_set_rids(PyObject *py_obj, PyObject *value, void *closure)
   11335             : {
   11336           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(py_obj);
   11337           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.rids));
   11338           0 :         if (value == NULL) {
   11339           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.rids");
   11340           0 :                 return -1;
   11341             :         }
   11342           0 :         object->in.rids = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.rids);
   11343           0 :         if (object->in.rids == NULL) {
   11344           0 :                 PyErr_NoMemory();
   11345           0 :                 return -1;
   11346             :         }
   11347           0 :         PY_CHECK_TYPE(&wbint_RidArray_Type, value, return -1;);
   11348           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11349           0 :                 PyErr_NoMemory();
   11350           0 :                 return -1;
   11351             :         }
   11352           0 :         object->in.rids = (struct wbint_RidArray *)pytalloc_get_ptr(value);
   11353           0 :         return 0;
   11354             : }
   11355             : 
   11356           0 : static PyObject *py_wbint_LookupRids_out_get_domain_name(PyObject *obj, void *closure)
   11357             : {
   11358           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(obj);
   11359           0 :         PyObject *py_domain_name;
   11360           0 :         if (object->out.domain_name == NULL) {
   11361           0 :                 Py_RETURN_NONE;
   11362             :         }
   11363           0 :         if (*object->out.domain_name == NULL) {
   11364           0 :                 py_domain_name = Py_None;
   11365           0 :                 Py_INCREF(py_domain_name);
   11366             :         } else {
   11367           0 :                 if (*object->out.domain_name == NULL) {
   11368           0 :                         py_domain_name = Py_None;
   11369           0 :                         Py_INCREF(py_domain_name);
   11370             :                 } else {
   11371           0 :                         py_domain_name = PyUnicode_Decode(*object->out.domain_name, strlen(*object->out.domain_name), "utf-8", "ignore");
   11372             :                 }
   11373             :         }
   11374           0 :         return py_domain_name;
   11375             : }
   11376             : 
   11377           0 : static int py_wbint_LookupRids_out_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   11378             : {
   11379           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(py_obj);
   11380           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.domain_name));
   11381           0 :         if (value == NULL) {
   11382           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.domain_name");
   11383           0 :                 return -1;
   11384             :         }
   11385           0 :         object->out.domain_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.domain_name);
   11386           0 :         if (object->out.domain_name == NULL) {
   11387           0 :                 PyErr_NoMemory();
   11388           0 :                 return -1;
   11389             :         }
   11390           0 :         if (value == Py_None) {
   11391           0 :                 *object->out.domain_name = NULL;
   11392             :         } else {
   11393           0 :                 *object->out.domain_name = NULL;
   11394             :                 {
   11395           0 :                         const char *test_str;
   11396           0 :                         const char *talloc_str;
   11397           0 :                         PyObject *unicode = NULL;
   11398           0 :                         if (PyUnicode_Check(value)) {
   11399           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   11400           0 :                                 if (unicode == NULL) {
   11401           0 :                                         PyErr_NoMemory();
   11402           0 :                                         return -1;
   11403             :                                 }
   11404           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   11405           0 :                         } else if (PyBytes_Check(value)) {
   11406           0 :                                 test_str = PyBytes_AS_STRING(value);
   11407             :                         } else {
   11408           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   11409           0 :                                 return -1;
   11410             :                         }
   11411           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   11412           0 :                         if (unicode != NULL) {
   11413           0 :                                 Py_DECREF(unicode);
   11414             :                         }
   11415           0 :                         if (talloc_str == NULL) {
   11416           0 :                                 PyErr_NoMemory();
   11417           0 :                                 return -1;
   11418             :                         }
   11419           0 :                         *object->out.domain_name = talloc_str;
   11420             :                 }
   11421             :         }
   11422           0 :         return 0;
   11423             : }
   11424             : 
   11425           0 : static PyObject *py_wbint_LookupRids_out_get_names(PyObject *obj, void *closure)
   11426             : {
   11427           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(obj);
   11428           0 :         PyObject *py_names;
   11429           0 :         if (object->out.names == NULL) {
   11430           0 :                 Py_RETURN_NONE;
   11431             :         }
   11432           0 :         py_names = pytalloc_reference_ex(&wbint_Principals_Type, object->out.names, object->out.names);
   11433           0 :         return py_names;
   11434             : }
   11435             : 
   11436           0 : static int py_wbint_LookupRids_out_set_names(PyObject *py_obj, PyObject *value, void *closure)
   11437             : {
   11438           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(py_obj);
   11439           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.names));
   11440           0 :         if (value == NULL) {
   11441           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.names");
   11442           0 :                 return -1;
   11443             :         }
   11444           0 :         object->out.names = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.names);
   11445           0 :         if (object->out.names == NULL) {
   11446           0 :                 PyErr_NoMemory();
   11447           0 :                 return -1;
   11448             :         }
   11449           0 :         PY_CHECK_TYPE(&wbint_Principals_Type, value, return -1;);
   11450           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11451           0 :                 PyErr_NoMemory();
   11452           0 :                 return -1;
   11453             :         }
   11454           0 :         object->out.names = (struct wbint_Principals *)pytalloc_get_ptr(value);
   11455           0 :         return 0;
   11456             : }
   11457             : 
   11458           0 : static PyObject *py_wbint_LookupRids_get_result(PyObject *obj, void *closure)
   11459             : {
   11460           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(obj);
   11461           0 :         PyObject *py_result;
   11462           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   11463           0 :         return py_result;
   11464             : }
   11465             : 
   11466           0 : static int py_wbint_LookupRids_set_result(PyObject *py_obj, PyObject *value, void *closure)
   11467             : {
   11468           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(py_obj);
   11469           0 :         if (value == NULL) {
   11470           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   11471           0 :                 return -1;
   11472             :         }
   11473           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   11474           0 :         return 0;
   11475             : }
   11476             : 
   11477             : static PyGetSetDef py_wbint_LookupRids_getsetters[] = {
   11478             :         {
   11479             :                 .name = discard_const_p(char, "in_domain_sid"),
   11480             :                 .get = py_wbint_LookupRids_in_get_domain_sid,
   11481             :                 .set = py_wbint_LookupRids_in_set_domain_sid,
   11482             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
   11483             :         },
   11484             :         {
   11485             :                 .name = discard_const_p(char, "in_rids"),
   11486             :                 .get = py_wbint_LookupRids_in_get_rids,
   11487             :                 .set = py_wbint_LookupRids_in_set_rids,
   11488             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_RidArray")
   11489             :         },
   11490             :         {
   11491             :                 .name = discard_const_p(char, "out_domain_name"),
   11492             :                 .get = py_wbint_LookupRids_out_get_domain_name,
   11493             :                 .set = py_wbint_LookupRids_out_set_domain_name,
   11494             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   11495             :         },
   11496             :         {
   11497             :                 .name = discard_const_p(char, "out_names"),
   11498             :                 .get = py_wbint_LookupRids_out_get_names,
   11499             :                 .set = py_wbint_LookupRids_out_set_names,
   11500             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_Principals")
   11501             :         },
   11502             :         {
   11503             :                 .name = discard_const_p(char, "result"),
   11504             :                 .get = py_wbint_LookupRids_get_result,
   11505             :                 .set = py_wbint_LookupRids_set_result,
   11506             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   11507             :         },
   11508             :         { .name = NULL }
   11509             : };
   11510             : 
   11511           0 : static PyObject *py_wbint_LookupRids_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11512             : {
   11513           0 :         PyObject *self = pytalloc_new(struct wbint_LookupRids, type);
   11514           0 :         struct wbint_LookupRids *_self = (struct wbint_LookupRids *)pytalloc_get_ptr(self);
   11515           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   11516           0 :         _self->in.domain_sid = talloc_zero(mem_ctx, struct dom_sid);
   11517           0 :         _self->in.rids = talloc_zero(mem_ctx, struct wbint_RidArray);
   11518           0 :         _self->out.names = talloc_zero(mem_ctx, struct wbint_Principals);
   11519           0 :         return self;
   11520             : }
   11521             : 
   11522           0 : static PyObject *py_wbint_LookupRids_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   11523             : {
   11524             : 
   11525             : 
   11526           0 :         return PyLong_FromLong(17);
   11527             : }
   11528             : 
   11529           0 : static PyObject *py_wbint_LookupRids_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   11530             : {
   11531           0 :         const struct ndr_interface_call *call = NULL;
   11532           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(py_obj);
   11533           0 :         PyObject *ret = NULL;
   11534           0 :         struct ndr_push *push = NULL;
   11535           0 :         DATA_BLOB blob;
   11536           0 :         enum ndr_err_code err;
   11537             : 
   11538           0 :         if (ndr_table_winbind.num_calls < 18) {
   11539           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupRids_ndr_pack");
   11540           0 :                 return NULL;
   11541             :         }
   11542           0 :         call = &ndr_table_winbind.calls[17];
   11543             : 
   11544           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   11545           0 :         if (push == NULL) {
   11546           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   11547           0 :                 return NULL;
   11548             :         }
   11549             : 
   11550           0 :         push->flags |= ndr_push_flags;
   11551             : 
   11552           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   11553           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11554           0 :                 TALLOC_FREE(push);
   11555           0 :                 PyErr_SetNdrError(err);
   11556           0 :                 return NULL;
   11557             :         }
   11558           0 :         blob = ndr_push_blob(push);
   11559           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   11560           0 :         TALLOC_FREE(push);
   11561           0 :         return ret;
   11562             : }
   11563             : 
   11564           0 : static PyObject *py_wbint_LookupRids_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11565             : {
   11566           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   11567           0 :         PyObject *bigendian_obj = NULL;
   11568           0 :         PyObject *ndr64_obj = NULL;
   11569           0 :         libndr_flags ndr_push_flags = 0;
   11570             : 
   11571           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   11572             :                 discard_const_p(char *, kwnames),
   11573             :                 &bigendian_obj,
   11574             :                 &ndr64_obj)) {
   11575           0 :                 return NULL;
   11576             :         }
   11577             : 
   11578           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   11579           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   11580             :         }
   11581           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   11582           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   11583             :         }
   11584             : 
   11585           0 :         return py_wbint_LookupRids_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   11586             : }
   11587             : 
   11588           0 : static PyObject *py_wbint_LookupRids_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11589             : {
   11590           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   11591           0 :         PyObject *bigendian_obj = NULL;
   11592           0 :         PyObject *ndr64_obj = NULL;
   11593           0 :         libndr_flags ndr_push_flags = 0;
   11594             : 
   11595           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   11596             :                 discard_const_p(char *, kwnames),
   11597             :                 &bigendian_obj,
   11598             :                 &ndr64_obj)) {
   11599           0 :                 return NULL;
   11600             :         }
   11601             : 
   11602           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   11603           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   11604             :         }
   11605           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   11606           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   11607             :         }
   11608             : 
   11609           0 :         return py_wbint_LookupRids_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   11610             : }
   11611             : 
   11612           0 : static PyObject *py_wbint_LookupRids_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   11613             : {
   11614           0 :         const struct ndr_interface_call *call = NULL;
   11615           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(py_obj);
   11616           0 :         struct ndr_pull *pull = NULL;
   11617           0 :         enum ndr_err_code err;
   11618             : 
   11619           0 :         if (ndr_table_winbind.num_calls < 18) {
   11620           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupRids_ndr_unpack");
   11621           0 :                 return NULL;
   11622             :         }
   11623           0 :         call = &ndr_table_winbind.calls[17];
   11624             : 
   11625           0 :         pull = ndr_pull_init_blob(blob, object);
   11626           0 :         if (pull == NULL) {
   11627           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   11628           0 :                 return NULL;
   11629             :         }
   11630             : 
   11631           0 :         pull->flags |= ndr_pull_flags;
   11632             : 
   11633           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   11634           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11635           0 :                 TALLOC_FREE(pull);
   11636           0 :                 PyErr_SetNdrError(err);
   11637           0 :                 return NULL;
   11638             :         }
   11639           0 :         if (!allow_remaining) {
   11640           0 :                 uint32_t highest_ofs;
   11641             : 
   11642           0 :                 if (pull->offset > pull->relative_highest_offset) {
   11643           0 :                         highest_ofs = pull->offset;
   11644             :                 } else {
   11645           0 :                         highest_ofs = pull->relative_highest_offset;
   11646             :                 }
   11647           0 :                 if (highest_ofs < pull->data_size) {
   11648           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   11649             :                                 "not all bytes consumed ofs[%u] size[%u]",
   11650             :                                 highest_ofs, pull->data_size);
   11651           0 :                         TALLOC_FREE(pull);
   11652           0 :                         PyErr_SetNdrError(err);
   11653           0 :                         return NULL;
   11654             :                 }
   11655             :         }
   11656             : 
   11657           0 :         TALLOC_FREE(pull);
   11658           0 :         Py_RETURN_NONE;
   11659             : }
   11660             : 
   11661           0 : static PyObject *py_wbint_LookupRids_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11662             : {
   11663           0 :         DATA_BLOB blob;
   11664           0 :         Py_ssize_t blob_length = 0;
   11665           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   11666           0 :         PyObject *bigendian_obj = NULL;
   11667           0 :         PyObject *ndr64_obj = NULL;
   11668           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   11669           0 :         PyObject *allow_remaining_obj = NULL;
   11670           0 :         bool allow_remaining = false;
   11671             : 
   11672           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   11673             :                 discard_const_p(char *, kwnames),
   11674             :                 &blob.data, &blob_length,
   11675             :                 &bigendian_obj,
   11676             :                 &ndr64_obj,
   11677             :                 &allow_remaining_obj)) {
   11678           0 :                 return NULL;
   11679             :         }
   11680           0 :         blob.length = blob_length;
   11681             : 
   11682           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   11683           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   11684             :         }
   11685           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   11686           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   11687             :         }
   11688             : 
   11689           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   11690           0 :                 allow_remaining = true;
   11691             :         }
   11692             : 
   11693           0 :         return py_wbint_LookupRids_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   11694             : }
   11695             : 
   11696           0 : static PyObject *py_wbint_LookupRids_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11697             : {
   11698           0 :         DATA_BLOB blob;
   11699           0 :         Py_ssize_t blob_length = 0;
   11700           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   11701           0 :         PyObject *bigendian_obj = NULL;
   11702           0 :         PyObject *ndr64_obj = NULL;
   11703           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   11704           0 :         PyObject *allow_remaining_obj = NULL;
   11705           0 :         bool allow_remaining = false;
   11706             : 
   11707           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   11708             :                 discard_const_p(char *, kwnames),
   11709             :                 &blob.data, &blob_length,
   11710             :                 &bigendian_obj,
   11711             :                 &ndr64_obj,
   11712             :                 &allow_remaining_obj)) {
   11713           0 :                 return NULL;
   11714             :         }
   11715           0 :         blob.length = blob_length;
   11716             : 
   11717           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   11718           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   11719             :         }
   11720           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   11721           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   11722             :         }
   11723             : 
   11724           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   11725           0 :                 allow_remaining = true;
   11726             :         }
   11727             : 
   11728           0 :         return py_wbint_LookupRids_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   11729             : }
   11730             : 
   11731           0 : static PyObject *py_wbint_LookupRids_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   11732             : {
   11733           0 :         const struct ndr_interface_call *call = NULL;
   11734           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(py_obj);
   11735           0 :         PyObject *ret;
   11736           0 :         char *retstr;
   11737             : 
   11738           0 :         if (ndr_table_winbind.num_calls < 18) {
   11739           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupRids_ndr_print");
   11740           0 :                 return NULL;
   11741             :         }
   11742           0 :         call = &ndr_table_winbind.calls[17];
   11743             : 
   11744           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   11745           0 :         ret = PyUnicode_FromString(retstr);
   11746           0 :         TALLOC_FREE(retstr);
   11747             : 
   11748           0 :         return ret;
   11749             : }
   11750             : 
   11751           0 : static PyObject *py_wbint_LookupRids_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   11752             : {
   11753           0 :         return py_wbint_LookupRids_ndr_print(py_obj, "wbint_LookupRids_in", NDR_IN);
   11754             : }
   11755             : 
   11756           0 : static PyObject *py_wbint_LookupRids_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   11757             : {
   11758           0 :         return py_wbint_LookupRids_ndr_print(py_obj, "wbint_LookupRids_out", NDR_OUT);
   11759             : }
   11760             : 
   11761             : static PyMethodDef py_wbint_LookupRids_methods[] = {
   11762             :         { "opnum", (PyCFunction)py_wbint_LookupRids_ndr_opnum, METH_NOARGS|METH_CLASS,
   11763             :                 "winbind.wbint_LookupRids.opnum() -> 17 (0x11) " },
   11764             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupRids_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   11765             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   11766             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupRids_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   11767             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   11768             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupRids_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   11769             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   11770             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupRids_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   11771             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   11772             :         { "__ndr_print_in__", (PyCFunction)py_wbint_LookupRids_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   11773             :         { "__ndr_print_out__", (PyCFunction)py_wbint_LookupRids_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   11774             :         { NULL, NULL, 0, NULL }
   11775             : };
   11776             : 
   11777             : 
   11778             : static PyTypeObject wbint_LookupRids_Type = {
   11779             :         PyVarObject_HEAD_INIT(NULL, 0)
   11780             :         .tp_name = "winbind.wbint_LookupRids",
   11781             :         .tp_getset = py_wbint_LookupRids_getsetters,
   11782             :         .tp_methods = py_wbint_LookupRids_methods,
   11783             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11784             :         .tp_new = py_wbint_LookupRids_new,
   11785             : };
   11786             : 
   11787           0 : static bool pack_py_wbint_LookupRids_args_in(PyObject *args, PyObject *kwargs, struct wbint_LookupRids *r)
   11788             : {
   11789           0 :         PyObject *py_domain_sid;
   11790           0 :         PyObject *py_rids;
   11791           0 :         const char *kwnames[] = {
   11792             :                 "domain_sid", "rids", NULL
   11793             :         };
   11794             : 
   11795           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:wbint_LookupRids", discard_const_p(char *, kwnames), &py_domain_sid, &py_rids)) {
   11796           0 :                 return false;
   11797             :         }
   11798             : 
   11799           0 :         if (py_domain_sid == NULL) {
   11800           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_sid");
   11801           0 :                 return false;
   11802             :         }
   11803           0 :         r->in.domain_sid = talloc_ptrtype(r, r->in.domain_sid);
   11804           0 :         if (r->in.domain_sid == NULL) {
   11805           0 :                 PyErr_NoMemory();
   11806           0 :                 return false;
   11807             :         }
   11808           0 :         PY_CHECK_TYPE(dom_sid_Type, py_domain_sid, return false;);
   11809           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_sid)) == NULL) {
   11810           0 :                 PyErr_NoMemory();
   11811           0 :                 return false;
   11812             :         }
   11813           0 :         r->in.domain_sid = (struct dom_sid *)pytalloc_get_ptr(py_domain_sid);
   11814           0 :         if (py_rids == NULL) {
   11815           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.rids");
   11816           0 :                 return false;
   11817             :         }
   11818           0 :         r->in.rids = talloc_ptrtype(r, r->in.rids);
   11819           0 :         if (r->in.rids == NULL) {
   11820           0 :                 PyErr_NoMemory();
   11821           0 :                 return false;
   11822             :         }
   11823           0 :         PY_CHECK_TYPE(&wbint_RidArray_Type, py_rids, return false;);
   11824           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_rids)) == NULL) {
   11825           0 :                 PyErr_NoMemory();
   11826           0 :                 return false;
   11827             :         }
   11828           0 :         r->in.rids = (struct wbint_RidArray *)pytalloc_get_ptr(py_rids);
   11829           0 :         return true;
   11830             : }
   11831             : 
   11832           0 : static PyObject *unpack_py_wbint_LookupRids_args_out(struct wbint_LookupRids *r)
   11833             : {
   11834           0 :         PyObject *result;
   11835           0 :         PyObject *py_domain_name;
   11836           0 :         PyObject *py_names;
   11837           0 :         result = PyTuple_New(2);
   11838           0 :         if (*r->out.domain_name == NULL) {
   11839           0 :                 py_domain_name = Py_None;
   11840           0 :                 Py_INCREF(py_domain_name);
   11841             :         } else {
   11842           0 :                 if (*r->out.domain_name == NULL) {
   11843           0 :                         py_domain_name = Py_None;
   11844           0 :                         Py_INCREF(py_domain_name);
   11845             :                 } else {
   11846           0 :                         py_domain_name = PyUnicode_Decode(*r->out.domain_name, strlen(*r->out.domain_name), "utf-8", "ignore");
   11847             :                 }
   11848             :         }
   11849           0 :         PyTuple_SetItem(result, 0, py_domain_name);
   11850           0 :         py_names = pytalloc_reference_ex(&wbint_Principals_Type, r->out.names, r->out.names);
   11851           0 :         PyTuple_SetItem(result, 1, py_names);
   11852           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   11853           0 :                 PyErr_SetNTSTATUS(r->out.result);
   11854           0 :                 return NULL;
   11855             :         }
   11856             : 
   11857           0 :         return result;
   11858             : }
   11859             : 
   11860             : 
   11861           0 : static PyObject *py_wbint_CheckMachineAccount_get_result(PyObject *obj, void *closure)
   11862             : {
   11863           0 :         struct wbint_CheckMachineAccount *object = (struct wbint_CheckMachineAccount *)pytalloc_get_ptr(obj);
   11864           0 :         PyObject *py_result;
   11865           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   11866           0 :         return py_result;
   11867             : }
   11868             : 
   11869           0 : static int py_wbint_CheckMachineAccount_set_result(PyObject *py_obj, PyObject *value, void *closure)
   11870             : {
   11871           0 :         struct wbint_CheckMachineAccount *object = (struct wbint_CheckMachineAccount *)pytalloc_get_ptr(py_obj);
   11872           0 :         if (value == NULL) {
   11873           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   11874           0 :                 return -1;
   11875             :         }
   11876           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   11877           0 :         return 0;
   11878             : }
   11879             : 
   11880             : static PyGetSetDef py_wbint_CheckMachineAccount_getsetters[] = {
   11881             :         {
   11882             :                 .name = discard_const_p(char, "result"),
   11883             :                 .get = py_wbint_CheckMachineAccount_get_result,
   11884             :                 .set = py_wbint_CheckMachineAccount_set_result,
   11885             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   11886             :         },
   11887             :         { .name = NULL }
   11888             : };
   11889             : 
   11890           0 : static PyObject *py_wbint_CheckMachineAccount_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11891             : {
   11892           0 :         PyObject *self = pytalloc_new(struct wbint_CheckMachineAccount, type);
   11893           0 :         return self;
   11894             : }
   11895             : 
   11896           0 : static PyObject *py_wbint_CheckMachineAccount_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   11897             : {
   11898             : 
   11899             : 
   11900           0 :         return PyLong_FromLong(18);
   11901             : }
   11902             : 
   11903           0 : static PyObject *py_wbint_CheckMachineAccount_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   11904             : {
   11905           0 :         const struct ndr_interface_call *call = NULL;
   11906           0 :         struct wbint_CheckMachineAccount *object = (struct wbint_CheckMachineAccount *)pytalloc_get_ptr(py_obj);
   11907           0 :         PyObject *ret = NULL;
   11908           0 :         struct ndr_push *push = NULL;
   11909           0 :         DATA_BLOB blob;
   11910           0 :         enum ndr_err_code err;
   11911             : 
   11912           0 :         if (ndr_table_winbind.num_calls < 19) {
   11913           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_CheckMachineAccount_ndr_pack");
   11914           0 :                 return NULL;
   11915             :         }
   11916           0 :         call = &ndr_table_winbind.calls[18];
   11917             : 
   11918           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   11919           0 :         if (push == NULL) {
   11920           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   11921           0 :                 return NULL;
   11922             :         }
   11923             : 
   11924           0 :         push->flags |= ndr_push_flags;
   11925             : 
   11926           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   11927           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11928           0 :                 TALLOC_FREE(push);
   11929           0 :                 PyErr_SetNdrError(err);
   11930           0 :                 return NULL;
   11931             :         }
   11932           0 :         blob = ndr_push_blob(push);
   11933           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   11934           0 :         TALLOC_FREE(push);
   11935           0 :         return ret;
   11936             : }
   11937             : 
   11938           0 : static PyObject *py_wbint_CheckMachineAccount_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11939             : {
   11940           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   11941           0 :         PyObject *bigendian_obj = NULL;
   11942           0 :         PyObject *ndr64_obj = NULL;
   11943           0 :         libndr_flags ndr_push_flags = 0;
   11944             : 
   11945           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   11946             :                 discard_const_p(char *, kwnames),
   11947             :                 &bigendian_obj,
   11948             :                 &ndr64_obj)) {
   11949           0 :                 return NULL;
   11950             :         }
   11951             : 
   11952           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   11953           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   11954             :         }
   11955           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   11956           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   11957             :         }
   11958             : 
   11959           0 :         return py_wbint_CheckMachineAccount_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   11960             : }
   11961             : 
   11962           0 : static PyObject *py_wbint_CheckMachineAccount_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11963             : {
   11964           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   11965           0 :         PyObject *bigendian_obj = NULL;
   11966           0 :         PyObject *ndr64_obj = NULL;
   11967           0 :         libndr_flags ndr_push_flags = 0;
   11968             : 
   11969           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   11970             :                 discard_const_p(char *, kwnames),
   11971             :                 &bigendian_obj,
   11972             :                 &ndr64_obj)) {
   11973           0 :                 return NULL;
   11974             :         }
   11975             : 
   11976           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   11977           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   11978             :         }
   11979           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   11980           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   11981             :         }
   11982             : 
   11983           0 :         return py_wbint_CheckMachineAccount_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   11984             : }
   11985             : 
   11986           0 : static PyObject *py_wbint_CheckMachineAccount_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   11987             : {
   11988           0 :         const struct ndr_interface_call *call = NULL;
   11989           0 :         struct wbint_CheckMachineAccount *object = (struct wbint_CheckMachineAccount *)pytalloc_get_ptr(py_obj);
   11990           0 :         struct ndr_pull *pull = NULL;
   11991           0 :         enum ndr_err_code err;
   11992             : 
   11993           0 :         if (ndr_table_winbind.num_calls < 19) {
   11994           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_CheckMachineAccount_ndr_unpack");
   11995           0 :                 return NULL;
   11996             :         }
   11997           0 :         call = &ndr_table_winbind.calls[18];
   11998             : 
   11999           0 :         pull = ndr_pull_init_blob(blob, object);
   12000           0 :         if (pull == NULL) {
   12001           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   12002           0 :                 return NULL;
   12003             :         }
   12004             : 
   12005           0 :         pull->flags |= ndr_pull_flags;
   12006             : 
   12007           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   12008           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   12009           0 :                 TALLOC_FREE(pull);
   12010           0 :                 PyErr_SetNdrError(err);
   12011           0 :                 return NULL;
   12012             :         }
   12013           0 :         if (!allow_remaining) {
   12014           0 :                 uint32_t highest_ofs;
   12015             : 
   12016           0 :                 if (pull->offset > pull->relative_highest_offset) {
   12017           0 :                         highest_ofs = pull->offset;
   12018             :                 } else {
   12019           0 :                         highest_ofs = pull->relative_highest_offset;
   12020             :                 }
   12021           0 :                 if (highest_ofs < pull->data_size) {
   12022           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   12023             :                                 "not all bytes consumed ofs[%u] size[%u]",
   12024             :                                 highest_ofs, pull->data_size);
   12025           0 :                         TALLOC_FREE(pull);
   12026           0 :                         PyErr_SetNdrError(err);
   12027           0 :                         return NULL;
   12028             :                 }
   12029             :         }
   12030             : 
   12031           0 :         TALLOC_FREE(pull);
   12032           0 :         Py_RETURN_NONE;
   12033             : }
   12034             : 
   12035           0 : static PyObject *py_wbint_CheckMachineAccount_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   12036             : {
   12037           0 :         DATA_BLOB blob;
   12038           0 :         Py_ssize_t blob_length = 0;
   12039           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   12040           0 :         PyObject *bigendian_obj = NULL;
   12041           0 :         PyObject *ndr64_obj = NULL;
   12042           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   12043           0 :         PyObject *allow_remaining_obj = NULL;
   12044           0 :         bool allow_remaining = false;
   12045             : 
   12046           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   12047             :                 discard_const_p(char *, kwnames),
   12048             :                 &blob.data, &blob_length,
   12049             :                 &bigendian_obj,
   12050             :                 &ndr64_obj,
   12051             :                 &allow_remaining_obj)) {
   12052           0 :                 return NULL;
   12053             :         }
   12054           0 :         blob.length = blob_length;
   12055             : 
   12056           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   12057           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   12058             :         }
   12059           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   12060           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   12061             :         }
   12062             : 
   12063           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   12064           0 :                 allow_remaining = true;
   12065             :         }
   12066             : 
   12067           0 :         return py_wbint_CheckMachineAccount_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   12068             : }
   12069             : 
   12070           0 : static PyObject *py_wbint_CheckMachineAccount_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   12071             : {
   12072           0 :         DATA_BLOB blob;
   12073           0 :         Py_ssize_t blob_length = 0;
   12074           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   12075           0 :         PyObject *bigendian_obj = NULL;
   12076           0 :         PyObject *ndr64_obj = NULL;
   12077           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   12078           0 :         PyObject *allow_remaining_obj = NULL;
   12079           0 :         bool allow_remaining = false;
   12080             : 
   12081           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   12082             :                 discard_const_p(char *, kwnames),
   12083             :                 &blob.data, &blob_length,
   12084             :                 &bigendian_obj,
   12085             :                 &ndr64_obj,
   12086             :                 &allow_remaining_obj)) {
   12087           0 :                 return NULL;
   12088             :         }
   12089           0 :         blob.length = blob_length;
   12090             : 
   12091           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   12092           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   12093             :         }
   12094           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   12095           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   12096             :         }
   12097             : 
   12098           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   12099           0 :                 allow_remaining = true;
   12100             :         }
   12101             : 
   12102           0 :         return py_wbint_CheckMachineAccount_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   12103             : }
   12104             : 
   12105           0 : static PyObject *py_wbint_CheckMachineAccount_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   12106             : {
   12107           0 :         const struct ndr_interface_call *call = NULL;
   12108           0 :         struct wbint_CheckMachineAccount *object = (struct wbint_CheckMachineAccount *)pytalloc_get_ptr(py_obj);
   12109           0 :         PyObject *ret;
   12110           0 :         char *retstr;
   12111             : 
   12112           0 :         if (ndr_table_winbind.num_calls < 19) {
   12113           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_CheckMachineAccount_ndr_print");
   12114           0 :                 return NULL;
   12115             :         }
   12116           0 :         call = &ndr_table_winbind.calls[18];
   12117             : 
   12118           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   12119           0 :         ret = PyUnicode_FromString(retstr);
   12120           0 :         TALLOC_FREE(retstr);
   12121             : 
   12122           0 :         return ret;
   12123             : }
   12124             : 
   12125           0 : static PyObject *py_wbint_CheckMachineAccount_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   12126             : {
   12127           0 :         return py_wbint_CheckMachineAccount_ndr_print(py_obj, "wbint_CheckMachineAccount_in", NDR_IN);
   12128             : }
   12129             : 
   12130           0 : static PyObject *py_wbint_CheckMachineAccount_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   12131             : {
   12132           0 :         return py_wbint_CheckMachineAccount_ndr_print(py_obj, "wbint_CheckMachineAccount_out", NDR_OUT);
   12133             : }
   12134             : 
   12135             : static PyMethodDef py_wbint_CheckMachineAccount_methods[] = {
   12136             :         { "opnum", (PyCFunction)py_wbint_CheckMachineAccount_ndr_opnum, METH_NOARGS|METH_CLASS,
   12137             :                 "winbind.wbint_CheckMachineAccount.opnum() -> 18 (0x12) " },
   12138             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_CheckMachineAccount_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   12139             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   12140             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_CheckMachineAccount_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   12141             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   12142             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_CheckMachineAccount_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   12143             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   12144             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_CheckMachineAccount_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   12145             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   12146             :         { "__ndr_print_in__", (PyCFunction)py_wbint_CheckMachineAccount_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   12147             :         { "__ndr_print_out__", (PyCFunction)py_wbint_CheckMachineAccount_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   12148             :         { NULL, NULL, 0, NULL }
   12149             : };
   12150             : 
   12151             : 
   12152             : static PyTypeObject wbint_CheckMachineAccount_Type = {
   12153             :         PyVarObject_HEAD_INIT(NULL, 0)
   12154             :         .tp_name = "winbind.wbint_CheckMachineAccount",
   12155             :         .tp_getset = py_wbint_CheckMachineAccount_getsetters,
   12156             :         .tp_methods = py_wbint_CheckMachineAccount_methods,
   12157             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12158             :         .tp_new = py_wbint_CheckMachineAccount_new,
   12159             : };
   12160             : 
   12161           0 : static bool pack_py_wbint_CheckMachineAccount_args_in(PyObject *args, PyObject *kwargs, struct wbint_CheckMachineAccount *r)
   12162             : {
   12163           0 :         const char *kwnames[] = {
   12164             :                 NULL
   12165             :         };
   12166             : 
   12167           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":wbint_CheckMachineAccount", discard_const_p(char *, kwnames))) {
   12168           0 :                 return false;
   12169             :         }
   12170             : 
   12171           0 :         return true;
   12172             : }
   12173             : 
   12174           0 : static PyObject *unpack_py_wbint_CheckMachineAccount_args_out(struct wbint_CheckMachineAccount *r)
   12175             : {
   12176           0 :         PyObject *result;
   12177           0 :         result = Py_None;
   12178           0 :         Py_INCREF(result);
   12179           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   12180           0 :                 PyErr_SetNTSTATUS(r->out.result);
   12181           0 :                 return NULL;
   12182             :         }
   12183             : 
   12184           0 :         return result;
   12185             : }
   12186             : 
   12187             : 
   12188           0 : static PyObject *py_wbint_ChangeMachineAccount_in_get_dcname(PyObject *obj, void *closure)
   12189             : {
   12190           0 :         struct wbint_ChangeMachineAccount *object = (struct wbint_ChangeMachineAccount *)pytalloc_get_ptr(obj);
   12191           0 :         PyObject *py_dcname;
   12192           0 :         if (object->in.dcname == NULL) {
   12193           0 :                 Py_RETURN_NONE;
   12194             :         }
   12195           0 :         if (object->in.dcname == NULL) {
   12196           0 :                 py_dcname = Py_None;
   12197           0 :                 Py_INCREF(py_dcname);
   12198             :         } else {
   12199           0 :                 if (object->in.dcname == NULL) {
   12200           0 :                         py_dcname = Py_None;
   12201           0 :                         Py_INCREF(py_dcname);
   12202             :                 } else {
   12203           0 :                         py_dcname = PyUnicode_Decode(object->in.dcname, strlen(object->in.dcname), "utf-8", "ignore");
   12204             :                 }
   12205             :         }
   12206           0 :         return py_dcname;
   12207             : }
   12208             : 
   12209           0 : static int py_wbint_ChangeMachineAccount_in_set_dcname(PyObject *py_obj, PyObject *value, void *closure)
   12210             : {
   12211           0 :         struct wbint_ChangeMachineAccount *object = (struct wbint_ChangeMachineAccount *)pytalloc_get_ptr(py_obj);
   12212           0 :         if (value == NULL) {
   12213           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dcname");
   12214           0 :                 return -1;
   12215             :         }
   12216           0 :         if (value == Py_None) {
   12217           0 :                 object->in.dcname = NULL;
   12218             :         } else {
   12219           0 :                 object->in.dcname = NULL;
   12220             :                 {
   12221           0 :                         const char *test_str;
   12222           0 :                         const char *talloc_str;
   12223           0 :                         PyObject *unicode = NULL;
   12224           0 :                         if (PyUnicode_Check(value)) {
   12225           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   12226           0 :                                 if (unicode == NULL) {
   12227           0 :                                         PyErr_NoMemory();
   12228           0 :                                         return -1;
   12229             :                                 }
   12230           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   12231           0 :                         } else if (PyBytes_Check(value)) {
   12232           0 :                                 test_str = PyBytes_AS_STRING(value);
   12233             :                         } else {
   12234           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   12235           0 :                                 return -1;
   12236             :                         }
   12237           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   12238           0 :                         if (unicode != NULL) {
   12239           0 :                                 Py_DECREF(unicode);
   12240             :                         }
   12241           0 :                         if (talloc_str == NULL) {
   12242           0 :                                 PyErr_NoMemory();
   12243           0 :                                 return -1;
   12244             :                         }
   12245           0 :                         object->in.dcname = talloc_str;
   12246             :                 }
   12247             :         }
   12248           0 :         return 0;
   12249             : }
   12250             : 
   12251           0 : static PyObject *py_wbint_ChangeMachineAccount_get_result(PyObject *obj, void *closure)
   12252             : {
   12253           0 :         struct wbint_ChangeMachineAccount *object = (struct wbint_ChangeMachineAccount *)pytalloc_get_ptr(obj);
   12254           0 :         PyObject *py_result;
   12255           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   12256           0 :         return py_result;
   12257             : }
   12258             : 
   12259           0 : static int py_wbint_ChangeMachineAccount_set_result(PyObject *py_obj, PyObject *value, void *closure)
   12260             : {
   12261           0 :         struct wbint_ChangeMachineAccount *object = (struct wbint_ChangeMachineAccount *)pytalloc_get_ptr(py_obj);
   12262           0 :         if (value == NULL) {
   12263           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   12264           0 :                 return -1;
   12265             :         }
   12266           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   12267           0 :         return 0;
   12268             : }
   12269             : 
   12270             : static PyGetSetDef py_wbint_ChangeMachineAccount_getsetters[] = {
   12271             :         {
   12272             :                 .name = discard_const_p(char, "in_dcname"),
   12273             :                 .get = py_wbint_ChangeMachineAccount_in_get_dcname,
   12274             :                 .set = py_wbint_ChangeMachineAccount_in_set_dcname,
   12275             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   12276             :         },
   12277             :         {
   12278             :                 .name = discard_const_p(char, "result"),
   12279             :                 .get = py_wbint_ChangeMachineAccount_get_result,
   12280             :                 .set = py_wbint_ChangeMachineAccount_set_result,
   12281             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   12282             :         },
   12283             :         { .name = NULL }
   12284             : };
   12285             : 
   12286           0 : static PyObject *py_wbint_ChangeMachineAccount_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12287             : {
   12288           0 :         PyObject *self = pytalloc_new(struct wbint_ChangeMachineAccount, type);
   12289           0 :         return self;
   12290             : }
   12291             : 
   12292           0 : static PyObject *py_wbint_ChangeMachineAccount_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   12293             : {
   12294             : 
   12295             : 
   12296           0 :         return PyLong_FromLong(19);
   12297             : }
   12298             : 
   12299           0 : static PyObject *py_wbint_ChangeMachineAccount_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   12300             : {
   12301           0 :         const struct ndr_interface_call *call = NULL;
   12302           0 :         struct wbint_ChangeMachineAccount *object = (struct wbint_ChangeMachineAccount *)pytalloc_get_ptr(py_obj);
   12303           0 :         PyObject *ret = NULL;
   12304           0 :         struct ndr_push *push = NULL;
   12305           0 :         DATA_BLOB blob;
   12306           0 :         enum ndr_err_code err;
   12307             : 
   12308           0 :         if (ndr_table_winbind.num_calls < 20) {
   12309           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_ChangeMachineAccount_ndr_pack");
   12310           0 :                 return NULL;
   12311             :         }
   12312           0 :         call = &ndr_table_winbind.calls[19];
   12313             : 
   12314           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   12315           0 :         if (push == NULL) {
   12316           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   12317           0 :                 return NULL;
   12318             :         }
   12319             : 
   12320           0 :         push->flags |= ndr_push_flags;
   12321             : 
   12322           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   12323           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   12324           0 :                 TALLOC_FREE(push);
   12325           0 :                 PyErr_SetNdrError(err);
   12326           0 :                 return NULL;
   12327             :         }
   12328           0 :         blob = ndr_push_blob(push);
   12329           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   12330           0 :         TALLOC_FREE(push);
   12331           0 :         return ret;
   12332             : }
   12333             : 
   12334           0 : static PyObject *py_wbint_ChangeMachineAccount_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   12335             : {
   12336           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   12337           0 :         PyObject *bigendian_obj = NULL;
   12338           0 :         PyObject *ndr64_obj = NULL;
   12339           0 :         libndr_flags ndr_push_flags = 0;
   12340             : 
   12341           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   12342             :                 discard_const_p(char *, kwnames),
   12343             :                 &bigendian_obj,
   12344             :                 &ndr64_obj)) {
   12345           0 :                 return NULL;
   12346             :         }
   12347             : 
   12348           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   12349           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   12350             :         }
   12351           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   12352           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   12353             :         }
   12354             : 
   12355           0 :         return py_wbint_ChangeMachineAccount_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   12356             : }
   12357             : 
   12358           0 : static PyObject *py_wbint_ChangeMachineAccount_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   12359             : {
   12360           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   12361           0 :         PyObject *bigendian_obj = NULL;
   12362           0 :         PyObject *ndr64_obj = NULL;
   12363           0 :         libndr_flags ndr_push_flags = 0;
   12364             : 
   12365           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   12366             :                 discard_const_p(char *, kwnames),
   12367             :                 &bigendian_obj,
   12368             :                 &ndr64_obj)) {
   12369           0 :                 return NULL;
   12370             :         }
   12371             : 
   12372           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   12373           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   12374             :         }
   12375           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   12376           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   12377             :         }
   12378             : 
   12379           0 :         return py_wbint_ChangeMachineAccount_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   12380             : }
   12381             : 
   12382           0 : static PyObject *py_wbint_ChangeMachineAccount_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   12383             : {
   12384           0 :         const struct ndr_interface_call *call = NULL;
   12385           0 :         struct wbint_ChangeMachineAccount *object = (struct wbint_ChangeMachineAccount *)pytalloc_get_ptr(py_obj);
   12386           0 :         struct ndr_pull *pull = NULL;
   12387           0 :         enum ndr_err_code err;
   12388             : 
   12389           0 :         if (ndr_table_winbind.num_calls < 20) {
   12390           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_ChangeMachineAccount_ndr_unpack");
   12391           0 :                 return NULL;
   12392             :         }
   12393           0 :         call = &ndr_table_winbind.calls[19];
   12394             : 
   12395           0 :         pull = ndr_pull_init_blob(blob, object);
   12396           0 :         if (pull == NULL) {
   12397           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   12398           0 :                 return NULL;
   12399             :         }
   12400             : 
   12401           0 :         pull->flags |= ndr_pull_flags;
   12402             : 
   12403           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   12404           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   12405           0 :                 TALLOC_FREE(pull);
   12406           0 :                 PyErr_SetNdrError(err);
   12407           0 :                 return NULL;
   12408             :         }
   12409           0 :         if (!allow_remaining) {
   12410           0 :                 uint32_t highest_ofs;
   12411             : 
   12412           0 :                 if (pull->offset > pull->relative_highest_offset) {
   12413           0 :                         highest_ofs = pull->offset;
   12414             :                 } else {
   12415           0 :                         highest_ofs = pull->relative_highest_offset;
   12416             :                 }
   12417           0 :                 if (highest_ofs < pull->data_size) {
   12418           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   12419             :                                 "not all bytes consumed ofs[%u] size[%u]",
   12420             :                                 highest_ofs, pull->data_size);
   12421           0 :                         TALLOC_FREE(pull);
   12422           0 :                         PyErr_SetNdrError(err);
   12423           0 :                         return NULL;
   12424             :                 }
   12425             :         }
   12426             : 
   12427           0 :         TALLOC_FREE(pull);
   12428           0 :         Py_RETURN_NONE;
   12429             : }
   12430             : 
   12431           0 : static PyObject *py_wbint_ChangeMachineAccount_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   12432             : {
   12433           0 :         DATA_BLOB blob;
   12434           0 :         Py_ssize_t blob_length = 0;
   12435           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   12436           0 :         PyObject *bigendian_obj = NULL;
   12437           0 :         PyObject *ndr64_obj = NULL;
   12438           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   12439           0 :         PyObject *allow_remaining_obj = NULL;
   12440           0 :         bool allow_remaining = false;
   12441             : 
   12442           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   12443             :                 discard_const_p(char *, kwnames),
   12444             :                 &blob.data, &blob_length,
   12445             :                 &bigendian_obj,
   12446             :                 &ndr64_obj,
   12447             :                 &allow_remaining_obj)) {
   12448           0 :                 return NULL;
   12449             :         }
   12450           0 :         blob.length = blob_length;
   12451             : 
   12452           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   12453           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   12454             :         }
   12455           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   12456           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   12457             :         }
   12458             : 
   12459           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   12460           0 :                 allow_remaining = true;
   12461             :         }
   12462             : 
   12463           0 :         return py_wbint_ChangeMachineAccount_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   12464             : }
   12465             : 
   12466           0 : static PyObject *py_wbint_ChangeMachineAccount_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   12467             : {
   12468           0 :         DATA_BLOB blob;
   12469           0 :         Py_ssize_t blob_length = 0;
   12470           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   12471           0 :         PyObject *bigendian_obj = NULL;
   12472           0 :         PyObject *ndr64_obj = NULL;
   12473           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   12474           0 :         PyObject *allow_remaining_obj = NULL;
   12475           0 :         bool allow_remaining = false;
   12476             : 
   12477           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   12478             :                 discard_const_p(char *, kwnames),
   12479             :                 &blob.data, &blob_length,
   12480             :                 &bigendian_obj,
   12481             :                 &ndr64_obj,
   12482             :                 &allow_remaining_obj)) {
   12483           0 :                 return NULL;
   12484             :         }
   12485           0 :         blob.length = blob_length;
   12486             : 
   12487           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   12488           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   12489             :         }
   12490           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   12491           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   12492             :         }
   12493             : 
   12494           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   12495           0 :                 allow_remaining = true;
   12496             :         }
   12497             : 
   12498           0 :         return py_wbint_ChangeMachineAccount_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   12499             : }
   12500             : 
   12501           0 : static PyObject *py_wbint_ChangeMachineAccount_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   12502             : {
   12503           0 :         const struct ndr_interface_call *call = NULL;
   12504           0 :         struct wbint_ChangeMachineAccount *object = (struct wbint_ChangeMachineAccount *)pytalloc_get_ptr(py_obj);
   12505           0 :         PyObject *ret;
   12506           0 :         char *retstr;
   12507             : 
   12508           0 :         if (ndr_table_winbind.num_calls < 20) {
   12509           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_ChangeMachineAccount_ndr_print");
   12510           0 :                 return NULL;
   12511             :         }
   12512           0 :         call = &ndr_table_winbind.calls[19];
   12513             : 
   12514           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   12515           0 :         ret = PyUnicode_FromString(retstr);
   12516           0 :         TALLOC_FREE(retstr);
   12517             : 
   12518           0 :         return ret;
   12519             : }
   12520             : 
   12521           0 : static PyObject *py_wbint_ChangeMachineAccount_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   12522             : {
   12523           0 :         return py_wbint_ChangeMachineAccount_ndr_print(py_obj, "wbint_ChangeMachineAccount_in", NDR_IN);
   12524             : }
   12525             : 
   12526           0 : static PyObject *py_wbint_ChangeMachineAccount_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   12527             : {
   12528           0 :         return py_wbint_ChangeMachineAccount_ndr_print(py_obj, "wbint_ChangeMachineAccount_out", NDR_OUT);
   12529             : }
   12530             : 
   12531             : static PyMethodDef py_wbint_ChangeMachineAccount_methods[] = {
   12532             :         { "opnum", (PyCFunction)py_wbint_ChangeMachineAccount_ndr_opnum, METH_NOARGS|METH_CLASS,
   12533             :                 "winbind.wbint_ChangeMachineAccount.opnum() -> 19 (0x13) " },
   12534             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_ChangeMachineAccount_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   12535             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   12536             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_ChangeMachineAccount_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   12537             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   12538             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_ChangeMachineAccount_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   12539             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   12540             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_ChangeMachineAccount_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   12541             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   12542             :         { "__ndr_print_in__", (PyCFunction)py_wbint_ChangeMachineAccount_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   12543             :         { "__ndr_print_out__", (PyCFunction)py_wbint_ChangeMachineAccount_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   12544             :         { NULL, NULL, 0, NULL }
   12545             : };
   12546             : 
   12547             : 
   12548             : static PyTypeObject wbint_ChangeMachineAccount_Type = {
   12549             :         PyVarObject_HEAD_INIT(NULL, 0)
   12550             :         .tp_name = "winbind.wbint_ChangeMachineAccount",
   12551             :         .tp_getset = py_wbint_ChangeMachineAccount_getsetters,
   12552             :         .tp_methods = py_wbint_ChangeMachineAccount_methods,
   12553             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12554             :         .tp_new = py_wbint_ChangeMachineAccount_new,
   12555             : };
   12556             : 
   12557           0 : static bool pack_py_wbint_ChangeMachineAccount_args_in(PyObject *args, PyObject *kwargs, struct wbint_ChangeMachineAccount *r)
   12558             : {
   12559           0 :         PyObject *py_dcname;
   12560           0 :         const char *kwnames[] = {
   12561             :                 "dcname", NULL
   12562             :         };
   12563             : 
   12564           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:wbint_ChangeMachineAccount", discard_const_p(char *, kwnames), &py_dcname)) {
   12565           0 :                 return false;
   12566             :         }
   12567             : 
   12568           0 :         if (py_dcname == NULL) {
   12569           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dcname");
   12570           0 :                 return false;
   12571             :         }
   12572           0 :         if (py_dcname == Py_None) {
   12573           0 :                 r->in.dcname = NULL;
   12574             :         } else {
   12575           0 :                 r->in.dcname = NULL;
   12576             :                 {
   12577           0 :                         const char *test_str;
   12578           0 :                         const char *talloc_str;
   12579           0 :                         PyObject *unicode = NULL;
   12580           0 :                         if (PyUnicode_Check(py_dcname)) {
   12581           0 :                                 unicode = PyUnicode_AsEncodedString(py_dcname, "utf-8", "ignore");
   12582           0 :                                 if (unicode == NULL) {
   12583           0 :                                         PyErr_NoMemory();
   12584           0 :                                         return false;
   12585             :                                 }
   12586           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   12587           0 :                         } else if (PyBytes_Check(py_dcname)) {
   12588           0 :                                 test_str = PyBytes_AS_STRING(py_dcname);
   12589             :                         } else {
   12590           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dcname)->tp_name);
   12591           0 :                                 return false;
   12592             :                         }
   12593           0 :                         talloc_str = talloc_strdup(r, test_str);
   12594           0 :                         if (unicode != NULL) {
   12595           0 :                                 Py_DECREF(unicode);
   12596             :                         }
   12597           0 :                         if (talloc_str == NULL) {
   12598           0 :                                 PyErr_NoMemory();
   12599           0 :                                 return false;
   12600             :                         }
   12601           0 :                         r->in.dcname = talloc_str;
   12602             :                 }
   12603             :         }
   12604           0 :         return true;
   12605             : }
   12606             : 
   12607           0 : static PyObject *unpack_py_wbint_ChangeMachineAccount_args_out(struct wbint_ChangeMachineAccount *r)
   12608             : {
   12609           0 :         PyObject *result;
   12610           0 :         result = Py_None;
   12611           0 :         Py_INCREF(result);
   12612           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   12613           0 :                 PyErr_SetNTSTATUS(r->out.result);
   12614           0 :                 return NULL;
   12615             :         }
   12616             : 
   12617           0 :         return result;
   12618             : }
   12619             : 
   12620             : 
   12621           0 : static PyObject *py_wbint_PingDc_out_get_dcname(PyObject *obj, void *closure)
   12622             : {
   12623           0 :         struct wbint_PingDc *object = (struct wbint_PingDc *)pytalloc_get_ptr(obj);
   12624           0 :         PyObject *py_dcname;
   12625           0 :         if (object->out.dcname == NULL) {
   12626           0 :                 Py_RETURN_NONE;
   12627             :         }
   12628           0 :         if (*object->out.dcname == NULL) {
   12629           0 :                 py_dcname = Py_None;
   12630           0 :                 Py_INCREF(py_dcname);
   12631             :         } else {
   12632           0 :                 if (*object->out.dcname == NULL) {
   12633           0 :                         py_dcname = Py_None;
   12634           0 :                         Py_INCREF(py_dcname);
   12635             :                 } else {
   12636           0 :                         py_dcname = PyUnicode_Decode(*object->out.dcname, strlen(*object->out.dcname), "utf-8", "ignore");
   12637             :                 }
   12638             :         }
   12639           0 :         return py_dcname;
   12640             : }
   12641             : 
   12642           0 : static int py_wbint_PingDc_out_set_dcname(PyObject *py_obj, PyObject *value, void *closure)
   12643             : {
   12644           0 :         struct wbint_PingDc *object = (struct wbint_PingDc *)pytalloc_get_ptr(py_obj);
   12645           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dcname));
   12646           0 :         if (value == NULL) {
   12647           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.dcname");
   12648           0 :                 return -1;
   12649             :         }
   12650           0 :         object->out.dcname = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dcname);
   12651           0 :         if (object->out.dcname == NULL) {
   12652           0 :                 PyErr_NoMemory();
   12653           0 :                 return -1;
   12654             :         }
   12655           0 :         if (value == Py_None) {
   12656           0 :                 *object->out.dcname = NULL;
   12657             :         } else {
   12658           0 :                 *object->out.dcname = NULL;
   12659             :                 {
   12660           0 :                         const char *test_str;
   12661           0 :                         const char *talloc_str;
   12662           0 :                         PyObject *unicode = NULL;
   12663           0 :                         if (PyUnicode_Check(value)) {
   12664           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   12665           0 :                                 if (unicode == NULL) {
   12666           0 :                                         PyErr_NoMemory();
   12667           0 :                                         return -1;
   12668             :                                 }
   12669           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   12670           0 :                         } else if (PyBytes_Check(value)) {
   12671           0 :                                 test_str = PyBytes_AS_STRING(value);
   12672             :                         } else {
   12673           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   12674           0 :                                 return -1;
   12675             :                         }
   12676           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   12677           0 :                         if (unicode != NULL) {
   12678           0 :                                 Py_DECREF(unicode);
   12679             :                         }
   12680           0 :                         if (talloc_str == NULL) {
   12681           0 :                                 PyErr_NoMemory();
   12682           0 :                                 return -1;
   12683             :                         }
   12684           0 :                         *object->out.dcname = talloc_str;
   12685             :                 }
   12686             :         }
   12687           0 :         return 0;
   12688             : }
   12689             : 
   12690           0 : static PyObject *py_wbint_PingDc_get_result(PyObject *obj, void *closure)
   12691             : {
   12692           0 :         struct wbint_PingDc *object = (struct wbint_PingDc *)pytalloc_get_ptr(obj);
   12693           0 :         PyObject *py_result;
   12694           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   12695           0 :         return py_result;
   12696             : }
   12697             : 
   12698           0 : static int py_wbint_PingDc_set_result(PyObject *py_obj, PyObject *value, void *closure)
   12699             : {
   12700           0 :         struct wbint_PingDc *object = (struct wbint_PingDc *)pytalloc_get_ptr(py_obj);
   12701           0 :         if (value == NULL) {
   12702           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   12703           0 :                 return -1;
   12704             :         }
   12705           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   12706           0 :         return 0;
   12707             : }
   12708             : 
   12709             : static PyGetSetDef py_wbint_PingDc_getsetters[] = {
   12710             :         {
   12711             :                 .name = discard_const_p(char, "out_dcname"),
   12712             :                 .get = py_wbint_PingDc_out_get_dcname,
   12713             :                 .set = py_wbint_PingDc_out_set_dcname,
   12714             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   12715             :         },
   12716             :         {
   12717             :                 .name = discard_const_p(char, "result"),
   12718             :                 .get = py_wbint_PingDc_get_result,
   12719             :                 .set = py_wbint_PingDc_set_result,
   12720             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   12721             :         },
   12722             :         { .name = NULL }
   12723             : };
   12724             : 
   12725           0 : static PyObject *py_wbint_PingDc_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12726             : {
   12727           0 :         PyObject *self = pytalloc_new(struct wbint_PingDc, type);
   12728           0 :         return self;
   12729             : }
   12730             : 
   12731           0 : static PyObject *py_wbint_PingDc_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   12732             : {
   12733             : 
   12734             : 
   12735           0 :         return PyLong_FromLong(20);
   12736             : }
   12737             : 
   12738           0 : static PyObject *py_wbint_PingDc_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   12739             : {
   12740           0 :         const struct ndr_interface_call *call = NULL;
   12741           0 :         struct wbint_PingDc *object = (struct wbint_PingDc *)pytalloc_get_ptr(py_obj);
   12742           0 :         PyObject *ret = NULL;
   12743           0 :         struct ndr_push *push = NULL;
   12744           0 :         DATA_BLOB blob;
   12745           0 :         enum ndr_err_code err;
   12746             : 
   12747           0 :         if (ndr_table_winbind.num_calls < 21) {
   12748           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PingDc_ndr_pack");
   12749           0 :                 return NULL;
   12750             :         }
   12751           0 :         call = &ndr_table_winbind.calls[20];
   12752             : 
   12753           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   12754           0 :         if (push == NULL) {
   12755           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   12756           0 :                 return NULL;
   12757             :         }
   12758             : 
   12759           0 :         push->flags |= ndr_push_flags;
   12760             : 
   12761           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   12762           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   12763           0 :                 TALLOC_FREE(push);
   12764           0 :                 PyErr_SetNdrError(err);
   12765           0 :                 return NULL;
   12766             :         }
   12767           0 :         blob = ndr_push_blob(push);
   12768           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   12769           0 :         TALLOC_FREE(push);
   12770           0 :         return ret;
   12771             : }
   12772             : 
   12773           0 : static PyObject *py_wbint_PingDc_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   12774             : {
   12775           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   12776           0 :         PyObject *bigendian_obj = NULL;
   12777           0 :         PyObject *ndr64_obj = NULL;
   12778           0 :         libndr_flags ndr_push_flags = 0;
   12779             : 
   12780           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   12781             :                 discard_const_p(char *, kwnames),
   12782             :                 &bigendian_obj,
   12783             :                 &ndr64_obj)) {
   12784           0 :                 return NULL;
   12785             :         }
   12786             : 
   12787           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   12788           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   12789             :         }
   12790           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   12791           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   12792             :         }
   12793             : 
   12794           0 :         return py_wbint_PingDc_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   12795             : }
   12796             : 
   12797           0 : static PyObject *py_wbint_PingDc_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   12798             : {
   12799           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   12800           0 :         PyObject *bigendian_obj = NULL;
   12801           0 :         PyObject *ndr64_obj = NULL;
   12802           0 :         libndr_flags ndr_push_flags = 0;
   12803             : 
   12804           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   12805             :                 discard_const_p(char *, kwnames),
   12806             :                 &bigendian_obj,
   12807             :                 &ndr64_obj)) {
   12808           0 :                 return NULL;
   12809             :         }
   12810             : 
   12811           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   12812           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   12813             :         }
   12814           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   12815           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   12816             :         }
   12817             : 
   12818           0 :         return py_wbint_PingDc_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   12819             : }
   12820             : 
   12821           0 : static PyObject *py_wbint_PingDc_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   12822             : {
   12823           0 :         const struct ndr_interface_call *call = NULL;
   12824           0 :         struct wbint_PingDc *object = (struct wbint_PingDc *)pytalloc_get_ptr(py_obj);
   12825           0 :         struct ndr_pull *pull = NULL;
   12826           0 :         enum ndr_err_code err;
   12827             : 
   12828           0 :         if (ndr_table_winbind.num_calls < 21) {
   12829           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PingDc_ndr_unpack");
   12830           0 :                 return NULL;
   12831             :         }
   12832           0 :         call = &ndr_table_winbind.calls[20];
   12833             : 
   12834           0 :         pull = ndr_pull_init_blob(blob, object);
   12835           0 :         if (pull == NULL) {
   12836           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   12837           0 :                 return NULL;
   12838             :         }
   12839             : 
   12840           0 :         pull->flags |= ndr_pull_flags;
   12841             : 
   12842           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   12843           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   12844           0 :                 TALLOC_FREE(pull);
   12845           0 :                 PyErr_SetNdrError(err);
   12846           0 :                 return NULL;
   12847             :         }
   12848           0 :         if (!allow_remaining) {
   12849           0 :                 uint32_t highest_ofs;
   12850             : 
   12851           0 :                 if (pull->offset > pull->relative_highest_offset) {
   12852           0 :                         highest_ofs = pull->offset;
   12853             :                 } else {
   12854           0 :                         highest_ofs = pull->relative_highest_offset;
   12855             :                 }
   12856           0 :                 if (highest_ofs < pull->data_size) {
   12857           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   12858             :                                 "not all bytes consumed ofs[%u] size[%u]",
   12859             :                                 highest_ofs, pull->data_size);
   12860           0 :                         TALLOC_FREE(pull);
   12861           0 :                         PyErr_SetNdrError(err);
   12862           0 :                         return NULL;
   12863             :                 }
   12864             :         }
   12865             : 
   12866           0 :         TALLOC_FREE(pull);
   12867           0 :         Py_RETURN_NONE;
   12868             : }
   12869             : 
   12870           0 : static PyObject *py_wbint_PingDc_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   12871             : {
   12872           0 :         DATA_BLOB blob;
   12873           0 :         Py_ssize_t blob_length = 0;
   12874           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   12875           0 :         PyObject *bigendian_obj = NULL;
   12876           0 :         PyObject *ndr64_obj = NULL;
   12877           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   12878           0 :         PyObject *allow_remaining_obj = NULL;
   12879           0 :         bool allow_remaining = false;
   12880             : 
   12881           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   12882             :                 discard_const_p(char *, kwnames),
   12883             :                 &blob.data, &blob_length,
   12884             :                 &bigendian_obj,
   12885             :                 &ndr64_obj,
   12886             :                 &allow_remaining_obj)) {
   12887           0 :                 return NULL;
   12888             :         }
   12889           0 :         blob.length = blob_length;
   12890             : 
   12891           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   12892           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   12893             :         }
   12894           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   12895           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   12896             :         }
   12897             : 
   12898           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   12899           0 :                 allow_remaining = true;
   12900             :         }
   12901             : 
   12902           0 :         return py_wbint_PingDc_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   12903             : }
   12904             : 
   12905           0 : static PyObject *py_wbint_PingDc_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   12906             : {
   12907           0 :         DATA_BLOB blob;
   12908           0 :         Py_ssize_t blob_length = 0;
   12909           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   12910           0 :         PyObject *bigendian_obj = NULL;
   12911           0 :         PyObject *ndr64_obj = NULL;
   12912           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   12913           0 :         PyObject *allow_remaining_obj = NULL;
   12914           0 :         bool allow_remaining = false;
   12915             : 
   12916           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   12917             :                 discard_const_p(char *, kwnames),
   12918             :                 &blob.data, &blob_length,
   12919             :                 &bigendian_obj,
   12920             :                 &ndr64_obj,
   12921             :                 &allow_remaining_obj)) {
   12922           0 :                 return NULL;
   12923             :         }
   12924           0 :         blob.length = blob_length;
   12925             : 
   12926           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   12927           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   12928             :         }
   12929           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   12930           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   12931             :         }
   12932             : 
   12933           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   12934           0 :                 allow_remaining = true;
   12935             :         }
   12936             : 
   12937           0 :         return py_wbint_PingDc_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   12938             : }
   12939             : 
   12940           0 : static PyObject *py_wbint_PingDc_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   12941             : {
   12942           0 :         const struct ndr_interface_call *call = NULL;
   12943           0 :         struct wbint_PingDc *object = (struct wbint_PingDc *)pytalloc_get_ptr(py_obj);
   12944           0 :         PyObject *ret;
   12945           0 :         char *retstr;
   12946             : 
   12947           0 :         if (ndr_table_winbind.num_calls < 21) {
   12948           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PingDc_ndr_print");
   12949           0 :                 return NULL;
   12950             :         }
   12951           0 :         call = &ndr_table_winbind.calls[20];
   12952             : 
   12953           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   12954           0 :         ret = PyUnicode_FromString(retstr);
   12955           0 :         TALLOC_FREE(retstr);
   12956             : 
   12957           0 :         return ret;
   12958             : }
   12959             : 
   12960           0 : static PyObject *py_wbint_PingDc_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   12961             : {
   12962           0 :         return py_wbint_PingDc_ndr_print(py_obj, "wbint_PingDc_in", NDR_IN);
   12963             : }
   12964             : 
   12965           0 : static PyObject *py_wbint_PingDc_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   12966             : {
   12967           0 :         return py_wbint_PingDc_ndr_print(py_obj, "wbint_PingDc_out", NDR_OUT);
   12968             : }
   12969             : 
   12970             : static PyMethodDef py_wbint_PingDc_methods[] = {
   12971             :         { "opnum", (PyCFunction)py_wbint_PingDc_ndr_opnum, METH_NOARGS|METH_CLASS,
   12972             :                 "winbind.wbint_PingDc.opnum() -> 20 (0x14) " },
   12973             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PingDc_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   12974             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   12975             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PingDc_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   12976             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   12977             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PingDc_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   12978             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   12979             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PingDc_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   12980             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   12981             :         { "__ndr_print_in__", (PyCFunction)py_wbint_PingDc_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   12982             :         { "__ndr_print_out__", (PyCFunction)py_wbint_PingDc_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   12983             :         { NULL, NULL, 0, NULL }
   12984             : };
   12985             : 
   12986             : 
   12987             : static PyTypeObject wbint_PingDc_Type = {
   12988             :         PyVarObject_HEAD_INIT(NULL, 0)
   12989             :         .tp_name = "winbind.wbint_PingDc",
   12990             :         .tp_getset = py_wbint_PingDc_getsetters,
   12991             :         .tp_methods = py_wbint_PingDc_methods,
   12992             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12993             :         .tp_new = py_wbint_PingDc_new,
   12994             : };
   12995             : 
   12996           0 : static bool pack_py_wbint_PingDc_args_in(PyObject *args, PyObject *kwargs, struct wbint_PingDc *r)
   12997             : {
   12998           0 :         const char *kwnames[] = {
   12999             :                 NULL
   13000             :         };
   13001             : 
   13002           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":wbint_PingDc", discard_const_p(char *, kwnames))) {
   13003           0 :                 return false;
   13004             :         }
   13005             : 
   13006           0 :         return true;
   13007             : }
   13008             : 
   13009           0 : static PyObject *unpack_py_wbint_PingDc_args_out(struct wbint_PingDc *r)
   13010             : {
   13011           0 :         PyObject *result;
   13012           0 :         PyObject *py_dcname;
   13013           0 :         if (*r->out.dcname == NULL) {
   13014           0 :                 py_dcname = Py_None;
   13015           0 :                 Py_INCREF(py_dcname);
   13016             :         } else {
   13017           0 :                 if (*r->out.dcname == NULL) {
   13018           0 :                         py_dcname = Py_None;
   13019           0 :                         Py_INCREF(py_dcname);
   13020             :                 } else {
   13021           0 :                         py_dcname = PyUnicode_Decode(*r->out.dcname, strlen(*r->out.dcname), "utf-8", "ignore");
   13022             :                 }
   13023             :         }
   13024           0 :         result = py_dcname;
   13025           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   13026           0 :                 PyErr_SetNTSTATUS(r->out.result);
   13027           0 :                 return NULL;
   13028             :         }
   13029             : 
   13030           0 :         return result;
   13031             : }
   13032             : 
   13033             : 
   13034           0 : static PyObject *py_wbint_ListTrustedDomains_in_get_client_name(PyObject *obj, void *closure)
   13035             : {
   13036           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(obj);
   13037           0 :         PyObject *py_client_name;
   13038           0 :         if (object->in.client_name == NULL) {
   13039           0 :                 Py_RETURN_NONE;
   13040             :         }
   13041           0 :         if (object->in.client_name == NULL) {
   13042           0 :                 py_client_name = Py_None;
   13043           0 :                 Py_INCREF(py_client_name);
   13044             :         } else {
   13045           0 :                 py_client_name = PyUnicode_Decode(object->in.client_name, strlen(object->in.client_name), "utf-8", "ignore");
   13046             :         }
   13047           0 :         return py_client_name;
   13048             : }
   13049             : 
   13050           0 : static int py_wbint_ListTrustedDomains_in_set_client_name(PyObject *py_obj, PyObject *value, void *closure)
   13051             : {
   13052           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(py_obj);
   13053           0 :         if (value == NULL) {
   13054           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_name");
   13055           0 :                 return -1;
   13056             :         }
   13057           0 :         object->in.client_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.client_name);
   13058           0 :         if (object->in.client_name == NULL) {
   13059           0 :                 PyErr_NoMemory();
   13060           0 :                 return -1;
   13061             :         }
   13062             :         {
   13063           0 :                 const char *test_str;
   13064           0 :                 const char *talloc_str;
   13065           0 :                 PyObject *unicode = NULL;
   13066           0 :                 if (PyUnicode_Check(value)) {
   13067           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   13068           0 :                         if (unicode == NULL) {
   13069           0 :                                 PyErr_NoMemory();
   13070           0 :                                 return -1;
   13071             :                         }
   13072           0 :                         test_str = PyBytes_AS_STRING(unicode);
   13073           0 :                 } else if (PyBytes_Check(value)) {
   13074           0 :                         test_str = PyBytes_AS_STRING(value);
   13075             :                 } else {
   13076           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   13077           0 :                         return -1;
   13078             :                 }
   13079           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   13080           0 :                 if (unicode != NULL) {
   13081           0 :                         Py_DECREF(unicode);
   13082             :                 }
   13083           0 :                 if (talloc_str == NULL) {
   13084           0 :                         PyErr_NoMemory();
   13085           0 :                         return -1;
   13086             :                 }
   13087           0 :                 object->in.client_name = talloc_str;
   13088             :         }
   13089           0 :         return 0;
   13090             : }
   13091             : 
   13092           0 : static PyObject *py_wbint_ListTrustedDomains_in_get_client_pid(PyObject *obj, void *closure)
   13093             : {
   13094           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(obj);
   13095           0 :         PyObject *py_client_pid;
   13096           0 :         py_client_pid = PyLong_FromUnsignedLongLong(object->in.client_pid);
   13097           0 :         return py_client_pid;
   13098             : }
   13099             : 
   13100           0 : static int py_wbint_ListTrustedDomains_in_set_client_pid(PyObject *py_obj, PyObject *value, void *closure)
   13101             : {
   13102           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(py_obj);
   13103           0 :         if (value == NULL) {
   13104           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_pid");
   13105           0 :                 return -1;
   13106             :         }
   13107             :         {
   13108           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.client_pid));
   13109           0 :                 if (PyLong_Check(value)) {
   13110           0 :                         unsigned long long test_var;
   13111           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13112           0 :                         if (PyErr_Occurred() != NULL) {
   13113           0 :                                 return -1;
   13114             :                         }
   13115           0 :                         if (test_var > uint_max) {
   13116           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13117             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13118           0 :                                 return -1;
   13119             :                         }
   13120           0 :                         object->in.client_pid = test_var;
   13121             :                 } else {
   13122           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13123             :                           PyLong_Type.tp_name);
   13124           0 :                         return -1;
   13125             :                 }
   13126             :         }
   13127           0 :         return 0;
   13128             : }
   13129             : 
   13130           0 : static PyObject *py_wbint_ListTrustedDomains_out_get_domains(PyObject *obj, void *closure)
   13131             : {
   13132           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(obj);
   13133           0 :         PyObject *py_domains;
   13134           0 :         if (object->out.domains == NULL) {
   13135           0 :                 Py_RETURN_NONE;
   13136             :         }
   13137           0 :         py_domains = pytalloc_reference_ex(netr_DomainTrustList_Type, object->out.domains, object->out.domains);
   13138           0 :         return py_domains;
   13139             : }
   13140             : 
   13141           0 : static int py_wbint_ListTrustedDomains_out_set_domains(PyObject *py_obj, PyObject *value, void *closure)
   13142             : {
   13143           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(py_obj);
   13144           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.domains));
   13145           0 :         if (value == NULL) {
   13146           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.domains");
   13147           0 :                 return -1;
   13148             :         }
   13149           0 :         object->out.domains = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.domains);
   13150           0 :         if (object->out.domains == NULL) {
   13151           0 :                 PyErr_NoMemory();
   13152           0 :                 return -1;
   13153             :         }
   13154           0 :         PY_CHECK_TYPE(netr_DomainTrustList_Type, value, return -1;);
   13155           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13156           0 :                 PyErr_NoMemory();
   13157           0 :                 return -1;
   13158             :         }
   13159           0 :         object->out.domains = (struct netr_DomainTrustList *)pytalloc_get_ptr(value);
   13160           0 :         return 0;
   13161             : }
   13162             : 
   13163           0 : static PyObject *py_wbint_ListTrustedDomains_get_result(PyObject *obj, void *closure)
   13164             : {
   13165           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(obj);
   13166           0 :         PyObject *py_result;
   13167           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   13168           0 :         return py_result;
   13169             : }
   13170             : 
   13171           0 : static int py_wbint_ListTrustedDomains_set_result(PyObject *py_obj, PyObject *value, void *closure)
   13172             : {
   13173           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(py_obj);
   13174           0 :         if (value == NULL) {
   13175           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   13176           0 :                 return -1;
   13177             :         }
   13178           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   13179           0 :         return 0;
   13180             : }
   13181             : 
   13182             : static PyGetSetDef py_wbint_ListTrustedDomains_getsetters[] = {
   13183             :         {
   13184             :                 .name = discard_const_p(char, "in_client_name"),
   13185             :                 .get = py_wbint_ListTrustedDomains_in_get_client_name,
   13186             :                 .set = py_wbint_ListTrustedDomains_in_set_client_name,
   13187             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   13188             :         },
   13189             :         {
   13190             :                 .name = discard_const_p(char, "in_client_pid"),
   13191             :                 .get = py_wbint_ListTrustedDomains_in_get_client_pid,
   13192             :                 .set = py_wbint_ListTrustedDomains_in_set_client_pid,
   13193             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   13194             :         },
   13195             :         {
   13196             :                 .name = discard_const_p(char, "out_domains"),
   13197             :                 .get = py_wbint_ListTrustedDomains_out_get_domains,
   13198             :                 .set = py_wbint_ListTrustedDomains_out_set_domains,
   13199             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DomainTrustList")
   13200             :         },
   13201             :         {
   13202             :                 .name = discard_const_p(char, "result"),
   13203             :                 .get = py_wbint_ListTrustedDomains_get_result,
   13204             :                 .set = py_wbint_ListTrustedDomains_set_result,
   13205             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   13206             :         },
   13207             :         { .name = NULL }
   13208             : };
   13209             : 
   13210           0 : static PyObject *py_wbint_ListTrustedDomains_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13211             : {
   13212           0 :         PyObject *self = pytalloc_new(struct wbint_ListTrustedDomains, type);
   13213           0 :         struct wbint_ListTrustedDomains *_self = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(self);
   13214           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   13215           0 :         _self->out.domains = talloc_zero(mem_ctx, struct netr_DomainTrustList);
   13216           0 :         return self;
   13217             : }
   13218             : 
   13219           0 : static PyObject *py_wbint_ListTrustedDomains_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   13220             : {
   13221             : 
   13222             : 
   13223           0 :         return PyLong_FromLong(21);
   13224             : }
   13225             : 
   13226           0 : static PyObject *py_wbint_ListTrustedDomains_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   13227             : {
   13228           0 :         const struct ndr_interface_call *call = NULL;
   13229           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(py_obj);
   13230           0 :         PyObject *ret = NULL;
   13231           0 :         struct ndr_push *push = NULL;
   13232           0 :         DATA_BLOB blob;
   13233           0 :         enum ndr_err_code err;
   13234             : 
   13235           0 :         if (ndr_table_winbind.num_calls < 22) {
   13236           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_ListTrustedDomains_ndr_pack");
   13237           0 :                 return NULL;
   13238             :         }
   13239           0 :         call = &ndr_table_winbind.calls[21];
   13240             : 
   13241           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   13242           0 :         if (push == NULL) {
   13243           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   13244           0 :                 return NULL;
   13245             :         }
   13246             : 
   13247           0 :         push->flags |= ndr_push_flags;
   13248             : 
   13249           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   13250           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   13251           0 :                 TALLOC_FREE(push);
   13252           0 :                 PyErr_SetNdrError(err);
   13253           0 :                 return NULL;
   13254             :         }
   13255           0 :         blob = ndr_push_blob(push);
   13256           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   13257           0 :         TALLOC_FREE(push);
   13258           0 :         return ret;
   13259             : }
   13260             : 
   13261           0 : static PyObject *py_wbint_ListTrustedDomains_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   13262             : {
   13263           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   13264           0 :         PyObject *bigendian_obj = NULL;
   13265           0 :         PyObject *ndr64_obj = NULL;
   13266           0 :         libndr_flags ndr_push_flags = 0;
   13267             : 
   13268           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   13269             :                 discard_const_p(char *, kwnames),
   13270             :                 &bigendian_obj,
   13271             :                 &ndr64_obj)) {
   13272           0 :                 return NULL;
   13273             :         }
   13274             : 
   13275           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   13276           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   13277             :         }
   13278           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   13279           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   13280             :         }
   13281             : 
   13282           0 :         return py_wbint_ListTrustedDomains_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   13283             : }
   13284             : 
   13285           0 : static PyObject *py_wbint_ListTrustedDomains_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   13286             : {
   13287           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   13288           0 :         PyObject *bigendian_obj = NULL;
   13289           0 :         PyObject *ndr64_obj = NULL;
   13290           0 :         libndr_flags ndr_push_flags = 0;
   13291             : 
   13292           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   13293             :                 discard_const_p(char *, kwnames),
   13294             :                 &bigendian_obj,
   13295             :                 &ndr64_obj)) {
   13296           0 :                 return NULL;
   13297             :         }
   13298             : 
   13299           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   13300           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   13301             :         }
   13302           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   13303           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   13304             :         }
   13305             : 
   13306           0 :         return py_wbint_ListTrustedDomains_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   13307             : }
   13308             : 
   13309           0 : static PyObject *py_wbint_ListTrustedDomains_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   13310             : {
   13311           0 :         const struct ndr_interface_call *call = NULL;
   13312           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(py_obj);
   13313           0 :         struct ndr_pull *pull = NULL;
   13314           0 :         enum ndr_err_code err;
   13315             : 
   13316           0 :         if (ndr_table_winbind.num_calls < 22) {
   13317           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_ListTrustedDomains_ndr_unpack");
   13318           0 :                 return NULL;
   13319             :         }
   13320           0 :         call = &ndr_table_winbind.calls[21];
   13321             : 
   13322           0 :         pull = ndr_pull_init_blob(blob, object);
   13323           0 :         if (pull == NULL) {
   13324           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   13325           0 :                 return NULL;
   13326             :         }
   13327             : 
   13328           0 :         pull->flags |= ndr_pull_flags;
   13329             : 
   13330           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   13331           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   13332           0 :                 TALLOC_FREE(pull);
   13333           0 :                 PyErr_SetNdrError(err);
   13334           0 :                 return NULL;
   13335             :         }
   13336           0 :         if (!allow_remaining) {
   13337           0 :                 uint32_t highest_ofs;
   13338             : 
   13339           0 :                 if (pull->offset > pull->relative_highest_offset) {
   13340           0 :                         highest_ofs = pull->offset;
   13341             :                 } else {
   13342           0 :                         highest_ofs = pull->relative_highest_offset;
   13343             :                 }
   13344           0 :                 if (highest_ofs < pull->data_size) {
   13345           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   13346             :                                 "not all bytes consumed ofs[%u] size[%u]",
   13347             :                                 highest_ofs, pull->data_size);
   13348           0 :                         TALLOC_FREE(pull);
   13349           0 :                         PyErr_SetNdrError(err);
   13350           0 :                         return NULL;
   13351             :                 }
   13352             :         }
   13353             : 
   13354           0 :         TALLOC_FREE(pull);
   13355           0 :         Py_RETURN_NONE;
   13356             : }
   13357             : 
   13358           0 : static PyObject *py_wbint_ListTrustedDomains_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   13359             : {
   13360           0 :         DATA_BLOB blob;
   13361           0 :         Py_ssize_t blob_length = 0;
   13362           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   13363           0 :         PyObject *bigendian_obj = NULL;
   13364           0 :         PyObject *ndr64_obj = NULL;
   13365           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   13366           0 :         PyObject *allow_remaining_obj = NULL;
   13367           0 :         bool allow_remaining = false;
   13368             : 
   13369           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   13370             :                 discard_const_p(char *, kwnames),
   13371             :                 &blob.data, &blob_length,
   13372             :                 &bigendian_obj,
   13373             :                 &ndr64_obj,
   13374             :                 &allow_remaining_obj)) {
   13375           0 :                 return NULL;
   13376             :         }
   13377           0 :         blob.length = blob_length;
   13378             : 
   13379           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   13380           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   13381             :         }
   13382           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   13383           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   13384             :         }
   13385             : 
   13386           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   13387           0 :                 allow_remaining = true;
   13388             :         }
   13389             : 
   13390           0 :         return py_wbint_ListTrustedDomains_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   13391             : }
   13392             : 
   13393           0 : static PyObject *py_wbint_ListTrustedDomains_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   13394             : {
   13395           0 :         DATA_BLOB blob;
   13396           0 :         Py_ssize_t blob_length = 0;
   13397           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   13398           0 :         PyObject *bigendian_obj = NULL;
   13399           0 :         PyObject *ndr64_obj = NULL;
   13400           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   13401           0 :         PyObject *allow_remaining_obj = NULL;
   13402           0 :         bool allow_remaining = false;
   13403             : 
   13404           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   13405             :                 discard_const_p(char *, kwnames),
   13406             :                 &blob.data, &blob_length,
   13407             :                 &bigendian_obj,
   13408             :                 &ndr64_obj,
   13409             :                 &allow_remaining_obj)) {
   13410           0 :                 return NULL;
   13411             :         }
   13412           0 :         blob.length = blob_length;
   13413             : 
   13414           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   13415           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   13416             :         }
   13417           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   13418           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   13419             :         }
   13420             : 
   13421           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   13422           0 :                 allow_remaining = true;
   13423             :         }
   13424             : 
   13425           0 :         return py_wbint_ListTrustedDomains_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   13426             : }
   13427             : 
   13428           0 : static PyObject *py_wbint_ListTrustedDomains_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   13429             : {
   13430           0 :         const struct ndr_interface_call *call = NULL;
   13431           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(py_obj);
   13432           0 :         PyObject *ret;
   13433           0 :         char *retstr;
   13434             : 
   13435           0 :         if (ndr_table_winbind.num_calls < 22) {
   13436           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_ListTrustedDomains_ndr_print");
   13437           0 :                 return NULL;
   13438             :         }
   13439           0 :         call = &ndr_table_winbind.calls[21];
   13440             : 
   13441           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   13442           0 :         ret = PyUnicode_FromString(retstr);
   13443           0 :         TALLOC_FREE(retstr);
   13444             : 
   13445           0 :         return ret;
   13446             : }
   13447             : 
   13448           0 : static PyObject *py_wbint_ListTrustedDomains_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   13449             : {
   13450           0 :         return py_wbint_ListTrustedDomains_ndr_print(py_obj, "wbint_ListTrustedDomains_in", NDR_IN);
   13451             : }
   13452             : 
   13453           0 : static PyObject *py_wbint_ListTrustedDomains_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   13454             : {
   13455           0 :         return py_wbint_ListTrustedDomains_ndr_print(py_obj, "wbint_ListTrustedDomains_out", NDR_OUT);
   13456             : }
   13457             : 
   13458             : static PyMethodDef py_wbint_ListTrustedDomains_methods[] = {
   13459             :         { "opnum", (PyCFunction)py_wbint_ListTrustedDomains_ndr_opnum, METH_NOARGS|METH_CLASS,
   13460             :                 "winbind.wbint_ListTrustedDomains.opnum() -> 21 (0x15) " },
   13461             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_ListTrustedDomains_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   13462             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   13463             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_ListTrustedDomains_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   13464             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   13465             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_ListTrustedDomains_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   13466             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   13467             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_ListTrustedDomains_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   13468             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   13469             :         { "__ndr_print_in__", (PyCFunction)py_wbint_ListTrustedDomains_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   13470             :         { "__ndr_print_out__", (PyCFunction)py_wbint_ListTrustedDomains_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   13471             :         { NULL, NULL, 0, NULL }
   13472             : };
   13473             : 
   13474             : 
   13475             : static PyTypeObject wbint_ListTrustedDomains_Type = {
   13476             :         PyVarObject_HEAD_INIT(NULL, 0)
   13477             :         .tp_name = "winbind.wbint_ListTrustedDomains",
   13478             :         .tp_getset = py_wbint_ListTrustedDomains_getsetters,
   13479             :         .tp_methods = py_wbint_ListTrustedDomains_methods,
   13480             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   13481             :         .tp_new = py_wbint_ListTrustedDomains_new,
   13482             : };
   13483             : 
   13484           0 : static bool pack_py_wbint_ListTrustedDomains_args_in(PyObject *args, PyObject *kwargs, struct wbint_ListTrustedDomains *r)
   13485             : {
   13486           0 :         PyObject *py_client_name;
   13487           0 :         PyObject *py_client_pid;
   13488           0 :         const char *kwnames[] = {
   13489             :                 "client_name", "client_pid", NULL
   13490             :         };
   13491             : 
   13492           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:wbint_ListTrustedDomains", discard_const_p(char *, kwnames), &py_client_name, &py_client_pid)) {
   13493           0 :                 return false;
   13494             :         }
   13495             : 
   13496           0 :         if (py_client_name == NULL) {
   13497           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_name");
   13498           0 :                 return false;
   13499             :         }
   13500           0 :         r->in.client_name = talloc_ptrtype(r, r->in.client_name);
   13501           0 :         if (r->in.client_name == NULL) {
   13502           0 :                 PyErr_NoMemory();
   13503           0 :                 return false;
   13504             :         }
   13505             :         {
   13506           0 :                 const char *test_str;
   13507           0 :                 const char *talloc_str;
   13508           0 :                 PyObject *unicode = NULL;
   13509           0 :                 if (PyUnicode_Check(py_client_name)) {
   13510           0 :                         unicode = PyUnicode_AsEncodedString(py_client_name, "utf-8", "ignore");
   13511           0 :                         if (unicode == NULL) {
   13512           0 :                                 PyErr_NoMemory();
   13513           0 :                                 return false;
   13514             :                         }
   13515           0 :                         test_str = PyBytes_AS_STRING(unicode);
   13516           0 :                 } else if (PyBytes_Check(py_client_name)) {
   13517           0 :                         test_str = PyBytes_AS_STRING(py_client_name);
   13518             :                 } else {
   13519           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client_name)->tp_name);
   13520           0 :                         return false;
   13521             :                 }
   13522           0 :                 talloc_str = talloc_strdup(r, test_str);
   13523           0 :                 if (unicode != NULL) {
   13524           0 :                         Py_DECREF(unicode);
   13525             :                 }
   13526           0 :                 if (talloc_str == NULL) {
   13527           0 :                         PyErr_NoMemory();
   13528           0 :                         return false;
   13529             :                 }
   13530           0 :                 r->in.client_name = talloc_str;
   13531             :         }
   13532           0 :         if (py_client_pid == NULL) {
   13533           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_pid");
   13534           0 :                 return false;
   13535             :         }
   13536             :         {
   13537           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.client_pid));
   13538           0 :                 if (PyLong_Check(py_client_pid)) {
   13539           0 :                         unsigned long long test_var;
   13540           0 :                         test_var = PyLong_AsUnsignedLongLong(py_client_pid);
   13541           0 :                         if (PyErr_Occurred() != NULL) {
   13542           0 :                                 return false;
   13543             :                         }
   13544           0 :                         if (test_var > uint_max) {
   13545           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13546             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13547           0 :                                 return false;
   13548             :                         }
   13549           0 :                         r->in.client_pid = test_var;
   13550             :                 } else {
   13551           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13552             :                           PyLong_Type.tp_name);
   13553           0 :                         return false;
   13554             :                 }
   13555             :         }
   13556           0 :         return true;
   13557             : }
   13558             : 
   13559           0 : static PyObject *unpack_py_wbint_ListTrustedDomains_args_out(struct wbint_ListTrustedDomains *r)
   13560             : {
   13561           0 :         PyObject *result;
   13562           0 :         PyObject *py_domains;
   13563           0 :         py_domains = pytalloc_reference_ex(netr_DomainTrustList_Type, r->out.domains, r->out.domains);
   13564           0 :         result = py_domains;
   13565           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   13566           0 :                 PyErr_SetNTSTATUS(r->out.result);
   13567           0 :                 return NULL;
   13568             :         }
   13569             : 
   13570           0 :         return result;
   13571             : }
   13572             : 
   13573             : 
   13574           0 : static PyObject *py_wbint_PamAuth_in_get_client_name(PyObject *obj, void *closure)
   13575             : {
   13576           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(obj);
   13577           0 :         PyObject *py_client_name;
   13578           0 :         if (object->in.client_name == NULL) {
   13579           0 :                 Py_RETURN_NONE;
   13580             :         }
   13581           0 :         if (object->in.client_name == NULL) {
   13582           0 :                 py_client_name = Py_None;
   13583           0 :                 Py_INCREF(py_client_name);
   13584             :         } else {
   13585           0 :                 py_client_name = PyUnicode_Decode(object->in.client_name, strlen(object->in.client_name), "utf-8", "ignore");
   13586             :         }
   13587           0 :         return py_client_name;
   13588             : }
   13589             : 
   13590           0 : static int py_wbint_PamAuth_in_set_client_name(PyObject *py_obj, PyObject *value, void *closure)
   13591             : {
   13592           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(py_obj);
   13593           0 :         if (value == NULL) {
   13594           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_name");
   13595           0 :                 return -1;
   13596             :         }
   13597           0 :         object->in.client_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.client_name);
   13598           0 :         if (object->in.client_name == NULL) {
   13599           0 :                 PyErr_NoMemory();
   13600           0 :                 return -1;
   13601             :         }
   13602             :         {
   13603           0 :                 const char *test_str;
   13604           0 :                 const char *talloc_str;
   13605           0 :                 PyObject *unicode = NULL;
   13606           0 :                 if (PyUnicode_Check(value)) {
   13607           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   13608           0 :                         if (unicode == NULL) {
   13609           0 :                                 PyErr_NoMemory();
   13610           0 :                                 return -1;
   13611             :                         }
   13612           0 :                         test_str = PyBytes_AS_STRING(unicode);
   13613           0 :                 } else if (PyBytes_Check(value)) {
   13614           0 :                         test_str = PyBytes_AS_STRING(value);
   13615             :                 } else {
   13616           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   13617           0 :                         return -1;
   13618             :                 }
   13619           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   13620           0 :                 if (unicode != NULL) {
   13621           0 :                         Py_DECREF(unicode);
   13622             :                 }
   13623           0 :                 if (talloc_str == NULL) {
   13624           0 :                         PyErr_NoMemory();
   13625           0 :                         return -1;
   13626             :                 }
   13627           0 :                 object->in.client_name = talloc_str;
   13628             :         }
   13629           0 :         return 0;
   13630             : }
   13631             : 
   13632           0 : static PyObject *py_wbint_PamAuth_in_get_client_pid(PyObject *obj, void *closure)
   13633             : {
   13634           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(obj);
   13635           0 :         PyObject *py_client_pid;
   13636           0 :         py_client_pid = PyLong_FromUnsignedLongLong(object->in.client_pid);
   13637           0 :         return py_client_pid;
   13638             : }
   13639             : 
   13640           0 : static int py_wbint_PamAuth_in_set_client_pid(PyObject *py_obj, PyObject *value, void *closure)
   13641             : {
   13642           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(py_obj);
   13643           0 :         if (value == NULL) {
   13644           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_pid");
   13645           0 :                 return -1;
   13646             :         }
   13647             :         {
   13648           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.client_pid));
   13649           0 :                 if (PyLong_Check(value)) {
   13650           0 :                         unsigned long long test_var;
   13651           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13652           0 :                         if (PyErr_Occurred() != NULL) {
   13653           0 :                                 return -1;
   13654             :                         }
   13655           0 :                         if (test_var > uint_max) {
   13656           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13657             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13658           0 :                                 return -1;
   13659             :                         }
   13660           0 :                         object->in.client_pid = test_var;
   13661             :                 } else {
   13662           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13663             :                           PyLong_Type.tp_name);
   13664           0 :                         return -1;
   13665             :                 }
   13666             :         }
   13667           0 :         return 0;
   13668             : }
   13669             : 
   13670           0 : static PyObject *py_wbint_PamAuth_in_get_flags(PyObject *obj, void *closure)
   13671             : {
   13672           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(obj);
   13673           0 :         PyObject *py_flags;
   13674           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   13675           0 :         return py_flags;
   13676             : }
   13677             : 
   13678           0 : static int py_wbint_PamAuth_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   13679             : {
   13680           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(py_obj);
   13681           0 :         if (value == NULL) {
   13682           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   13683           0 :                 return -1;
   13684             :         }
   13685             :         {
   13686           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   13687           0 :                 if (PyLong_Check(value)) {
   13688           0 :                         unsigned long long test_var;
   13689           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13690           0 :                         if (PyErr_Occurred() != NULL) {
   13691           0 :                                 return -1;
   13692             :                         }
   13693           0 :                         if (test_var > uint_max) {
   13694           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13695             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13696           0 :                                 return -1;
   13697             :                         }
   13698           0 :                         object->in.flags = test_var;
   13699             :                 } else {
   13700           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13701             :                           PyLong_Type.tp_name);
   13702           0 :                         return -1;
   13703             :                 }
   13704             :         }
   13705           0 :         return 0;
   13706             : }
   13707             : 
   13708           0 : static PyObject *py_wbint_PamAuth_in_get_info(PyObject *obj, void *closure)
   13709             : {
   13710           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(obj);
   13711           0 :         PyObject *py_info;
   13712           0 :         if (object->in.info == NULL) {
   13713           0 :                 Py_RETURN_NONE;
   13714             :         }
   13715           0 :         py_info = pytalloc_reference_ex(&wbint_AuthUserInfo_Type, object->in.info, object->in.info);
   13716           0 :         return py_info;
   13717             : }
   13718             : 
   13719           0 : static int py_wbint_PamAuth_in_set_info(PyObject *py_obj, PyObject *value, void *closure)
   13720             : {
   13721           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(py_obj);
   13722           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info));
   13723           0 :         if (value == NULL) {
   13724           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.info");
   13725           0 :                 return -1;
   13726             :         }
   13727           0 :         object->in.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info);
   13728           0 :         if (object->in.info == NULL) {
   13729           0 :                 PyErr_NoMemory();
   13730           0 :                 return -1;
   13731             :         }
   13732           0 :         PY_CHECK_TYPE(&wbint_AuthUserInfo_Type, value, return -1;);
   13733           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13734           0 :                 PyErr_NoMemory();
   13735           0 :                 return -1;
   13736             :         }
   13737           0 :         object->in.info = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(value);
   13738           0 :         return 0;
   13739             : }
   13740             : 
   13741           0 : static PyObject *py_wbint_PamAuth_in_get_require_membership_of_sid(PyObject *obj, void *closure)
   13742             : {
   13743           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(obj);
   13744           0 :         PyObject *py_require_membership_of_sid;
   13745           0 :         if (object->in.require_membership_of_sid == NULL) {
   13746           0 :                 Py_RETURN_NONE;
   13747             :         }
   13748           0 :         py_require_membership_of_sid = pytalloc_reference_ex(&wbint_SidArray_Type, object->in.require_membership_of_sid, object->in.require_membership_of_sid);
   13749           0 :         return py_require_membership_of_sid;
   13750             : }
   13751             : 
   13752           0 : static int py_wbint_PamAuth_in_set_require_membership_of_sid(PyObject *py_obj, PyObject *value, void *closure)
   13753             : {
   13754           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(py_obj);
   13755           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.require_membership_of_sid));
   13756           0 :         if (value == NULL) {
   13757           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.require_membership_of_sid");
   13758           0 :                 return -1;
   13759             :         }
   13760           0 :         object->in.require_membership_of_sid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.require_membership_of_sid);
   13761           0 :         if (object->in.require_membership_of_sid == NULL) {
   13762           0 :                 PyErr_NoMemory();
   13763           0 :                 return -1;
   13764             :         }
   13765           0 :         PY_CHECK_TYPE(&wbint_SidArray_Type, value, return -1;);
   13766           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13767           0 :                 PyErr_NoMemory();
   13768           0 :                 return -1;
   13769             :         }
   13770           0 :         object->in.require_membership_of_sid = (struct wbint_SidArray *)pytalloc_get_ptr(value);
   13771           0 :         return 0;
   13772             : }
   13773             : 
   13774           0 : static PyObject *py_wbint_PamAuth_out_get_validation(PyObject *obj, void *closure)
   13775             : {
   13776           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(obj);
   13777           0 :         PyObject *py_validation;
   13778           0 :         if (object->out.validation == NULL) {
   13779           0 :                 Py_RETURN_NONE;
   13780             :         }
   13781           0 :         py_validation = pytalloc_reference_ex(&wbint_Validation_Type, object->out.validation, object->out.validation);
   13782           0 :         return py_validation;
   13783             : }
   13784             : 
   13785           0 : static int py_wbint_PamAuth_out_set_validation(PyObject *py_obj, PyObject *value, void *closure)
   13786             : {
   13787           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(py_obj);
   13788           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.validation));
   13789           0 :         if (value == NULL) {
   13790           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.validation");
   13791           0 :                 return -1;
   13792             :         }
   13793           0 :         object->out.validation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.validation);
   13794           0 :         if (object->out.validation == NULL) {
   13795           0 :                 PyErr_NoMemory();
   13796           0 :                 return -1;
   13797             :         }
   13798           0 :         PY_CHECK_TYPE(&wbint_Validation_Type, value, return -1;);
   13799           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13800           0 :                 PyErr_NoMemory();
   13801           0 :                 return -1;
   13802             :         }
   13803           0 :         object->out.validation = (struct wbint_Validation *)pytalloc_get_ptr(value);
   13804           0 :         return 0;
   13805             : }
   13806             : 
   13807           0 : static PyObject *py_wbint_PamAuth_get_result(PyObject *obj, void *closure)
   13808             : {
   13809           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(obj);
   13810           0 :         PyObject *py_result;
   13811           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   13812           0 :         return py_result;
   13813             : }
   13814             : 
   13815           0 : static int py_wbint_PamAuth_set_result(PyObject *py_obj, PyObject *value, void *closure)
   13816             : {
   13817           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(py_obj);
   13818           0 :         if (value == NULL) {
   13819           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   13820           0 :                 return -1;
   13821             :         }
   13822           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   13823           0 :         return 0;
   13824             : }
   13825             : 
   13826             : static PyGetSetDef py_wbint_PamAuth_getsetters[] = {
   13827             :         {
   13828             :                 .name = discard_const_p(char, "in_client_name"),
   13829             :                 .get = py_wbint_PamAuth_in_get_client_name,
   13830             :                 .set = py_wbint_PamAuth_in_set_client_name,
   13831             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   13832             :         },
   13833             :         {
   13834             :                 .name = discard_const_p(char, "in_client_pid"),
   13835             :                 .get = py_wbint_PamAuth_in_get_client_pid,
   13836             :                 .set = py_wbint_PamAuth_in_set_client_pid,
   13837             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   13838             :         },
   13839             :         {
   13840             :                 .name = discard_const_p(char, "in_flags"),
   13841             :                 .get = py_wbint_PamAuth_in_get_flags,
   13842             :                 .set = py_wbint_PamAuth_in_set_flags,
   13843             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13844             :         },
   13845             :         {
   13846             :                 .name = discard_const_p(char, "in_info"),
   13847             :                 .get = py_wbint_PamAuth_in_get_info,
   13848             :                 .set = py_wbint_PamAuth_in_set_info,
   13849             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_AuthUserInfo")
   13850             :         },
   13851             :         {
   13852             :                 .name = discard_const_p(char, "in_require_membership_of_sid"),
   13853             :                 .get = py_wbint_PamAuth_in_get_require_membership_of_sid,
   13854             :                 .set = py_wbint_PamAuth_in_set_require_membership_of_sid,
   13855             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_SidArray")
   13856             :         },
   13857             :         {
   13858             :                 .name = discard_const_p(char, "out_validation"),
   13859             :                 .get = py_wbint_PamAuth_out_get_validation,
   13860             :                 .set = py_wbint_PamAuth_out_set_validation,
   13861             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_Validation")
   13862             :         },
   13863             :         {
   13864             :                 .name = discard_const_p(char, "result"),
   13865             :                 .get = py_wbint_PamAuth_get_result,
   13866             :                 .set = py_wbint_PamAuth_set_result,
   13867             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   13868             :         },
   13869             :         { .name = NULL }
   13870             : };
   13871             : 
   13872           0 : static PyObject *py_wbint_PamAuth_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13873             : {
   13874           0 :         PyObject *self = pytalloc_new(struct wbint_PamAuth, type);
   13875           0 :         struct wbint_PamAuth *_self = (struct wbint_PamAuth *)pytalloc_get_ptr(self);
   13876           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   13877           0 :         _self->in.info = talloc_zero(mem_ctx, struct wbint_AuthUserInfo);
   13878           0 :         _self->in.require_membership_of_sid = talloc_zero(mem_ctx, struct wbint_SidArray);
   13879           0 :         _self->out.validation = talloc_zero(mem_ctx, struct wbint_Validation);
   13880           0 :         return self;
   13881             : }
   13882             : 
   13883           0 : static PyObject *py_wbint_PamAuth_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   13884             : {
   13885             : 
   13886             : 
   13887           0 :         return PyLong_FromLong(22);
   13888             : }
   13889             : 
   13890           0 : static PyObject *py_wbint_PamAuth_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   13891             : {
   13892           0 :         const struct ndr_interface_call *call = NULL;
   13893           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(py_obj);
   13894           0 :         PyObject *ret = NULL;
   13895           0 :         struct ndr_push *push = NULL;
   13896           0 :         DATA_BLOB blob;
   13897           0 :         enum ndr_err_code err;
   13898             : 
   13899           0 :         if (ndr_table_winbind.num_calls < 23) {
   13900           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuth_ndr_pack");
   13901           0 :                 return NULL;
   13902             :         }
   13903           0 :         call = &ndr_table_winbind.calls[22];
   13904             : 
   13905           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   13906           0 :         if (push == NULL) {
   13907           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   13908           0 :                 return NULL;
   13909             :         }
   13910             : 
   13911           0 :         push->flags |= ndr_push_flags;
   13912             : 
   13913           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   13914           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   13915           0 :                 TALLOC_FREE(push);
   13916           0 :                 PyErr_SetNdrError(err);
   13917           0 :                 return NULL;
   13918             :         }
   13919           0 :         blob = ndr_push_blob(push);
   13920           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   13921           0 :         TALLOC_FREE(push);
   13922           0 :         return ret;
   13923             : }
   13924             : 
   13925           0 : static PyObject *py_wbint_PamAuth_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   13926             : {
   13927           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   13928           0 :         PyObject *bigendian_obj = NULL;
   13929           0 :         PyObject *ndr64_obj = NULL;
   13930           0 :         libndr_flags ndr_push_flags = 0;
   13931             : 
   13932           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   13933             :                 discard_const_p(char *, kwnames),
   13934             :                 &bigendian_obj,
   13935             :                 &ndr64_obj)) {
   13936           0 :                 return NULL;
   13937             :         }
   13938             : 
   13939           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   13940           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   13941             :         }
   13942           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   13943           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   13944             :         }
   13945             : 
   13946           0 :         return py_wbint_PamAuth_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   13947             : }
   13948             : 
   13949           0 : static PyObject *py_wbint_PamAuth_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   13950             : {
   13951           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   13952           0 :         PyObject *bigendian_obj = NULL;
   13953           0 :         PyObject *ndr64_obj = NULL;
   13954           0 :         libndr_flags ndr_push_flags = 0;
   13955             : 
   13956           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   13957             :                 discard_const_p(char *, kwnames),
   13958             :                 &bigendian_obj,
   13959             :                 &ndr64_obj)) {
   13960           0 :                 return NULL;
   13961             :         }
   13962             : 
   13963           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   13964           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   13965             :         }
   13966           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   13967           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   13968             :         }
   13969             : 
   13970           0 :         return py_wbint_PamAuth_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   13971             : }
   13972             : 
   13973           0 : static PyObject *py_wbint_PamAuth_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   13974             : {
   13975           0 :         const struct ndr_interface_call *call = NULL;
   13976           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(py_obj);
   13977           0 :         struct ndr_pull *pull = NULL;
   13978           0 :         enum ndr_err_code err;
   13979             : 
   13980           0 :         if (ndr_table_winbind.num_calls < 23) {
   13981           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuth_ndr_unpack");
   13982           0 :                 return NULL;
   13983             :         }
   13984           0 :         call = &ndr_table_winbind.calls[22];
   13985             : 
   13986           0 :         pull = ndr_pull_init_blob(blob, object);
   13987           0 :         if (pull == NULL) {
   13988           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   13989           0 :                 return NULL;
   13990             :         }
   13991             : 
   13992           0 :         pull->flags |= ndr_pull_flags;
   13993             : 
   13994           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   13995           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   13996           0 :                 TALLOC_FREE(pull);
   13997           0 :                 PyErr_SetNdrError(err);
   13998           0 :                 return NULL;
   13999             :         }
   14000           0 :         if (!allow_remaining) {
   14001           0 :                 uint32_t highest_ofs;
   14002             : 
   14003           0 :                 if (pull->offset > pull->relative_highest_offset) {
   14004           0 :                         highest_ofs = pull->offset;
   14005             :                 } else {
   14006           0 :                         highest_ofs = pull->relative_highest_offset;
   14007             :                 }
   14008           0 :                 if (highest_ofs < pull->data_size) {
   14009           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   14010             :                                 "not all bytes consumed ofs[%u] size[%u]",
   14011             :                                 highest_ofs, pull->data_size);
   14012           0 :                         TALLOC_FREE(pull);
   14013           0 :                         PyErr_SetNdrError(err);
   14014           0 :                         return NULL;
   14015             :                 }
   14016             :         }
   14017             : 
   14018           0 :         TALLOC_FREE(pull);
   14019           0 :         Py_RETURN_NONE;
   14020             : }
   14021             : 
   14022           0 : static PyObject *py_wbint_PamAuth_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   14023             : {
   14024           0 :         DATA_BLOB blob;
   14025           0 :         Py_ssize_t blob_length = 0;
   14026           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   14027           0 :         PyObject *bigendian_obj = NULL;
   14028           0 :         PyObject *ndr64_obj = NULL;
   14029           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   14030           0 :         PyObject *allow_remaining_obj = NULL;
   14031           0 :         bool allow_remaining = false;
   14032             : 
   14033           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   14034             :                 discard_const_p(char *, kwnames),
   14035             :                 &blob.data, &blob_length,
   14036             :                 &bigendian_obj,
   14037             :                 &ndr64_obj,
   14038             :                 &allow_remaining_obj)) {
   14039           0 :                 return NULL;
   14040             :         }
   14041           0 :         blob.length = blob_length;
   14042             : 
   14043           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   14044           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   14045             :         }
   14046           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   14047           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   14048             :         }
   14049             : 
   14050           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   14051           0 :                 allow_remaining = true;
   14052             :         }
   14053             : 
   14054           0 :         return py_wbint_PamAuth_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   14055             : }
   14056             : 
   14057           0 : static PyObject *py_wbint_PamAuth_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   14058             : {
   14059           0 :         DATA_BLOB blob;
   14060           0 :         Py_ssize_t blob_length = 0;
   14061           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   14062           0 :         PyObject *bigendian_obj = NULL;
   14063           0 :         PyObject *ndr64_obj = NULL;
   14064           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   14065           0 :         PyObject *allow_remaining_obj = NULL;
   14066           0 :         bool allow_remaining = false;
   14067             : 
   14068           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   14069             :                 discard_const_p(char *, kwnames),
   14070             :                 &blob.data, &blob_length,
   14071             :                 &bigendian_obj,
   14072             :                 &ndr64_obj,
   14073             :                 &allow_remaining_obj)) {
   14074           0 :                 return NULL;
   14075             :         }
   14076           0 :         blob.length = blob_length;
   14077             : 
   14078           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   14079           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   14080             :         }
   14081           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   14082           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   14083             :         }
   14084             : 
   14085           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   14086           0 :                 allow_remaining = true;
   14087             :         }
   14088             : 
   14089           0 :         return py_wbint_PamAuth_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   14090             : }
   14091             : 
   14092           0 : static PyObject *py_wbint_PamAuth_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   14093             : {
   14094           0 :         const struct ndr_interface_call *call = NULL;
   14095           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(py_obj);
   14096           0 :         PyObject *ret;
   14097           0 :         char *retstr;
   14098             : 
   14099           0 :         if (ndr_table_winbind.num_calls < 23) {
   14100           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuth_ndr_print");
   14101           0 :                 return NULL;
   14102             :         }
   14103           0 :         call = &ndr_table_winbind.calls[22];
   14104             : 
   14105           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   14106           0 :         ret = PyUnicode_FromString(retstr);
   14107           0 :         TALLOC_FREE(retstr);
   14108             : 
   14109           0 :         return ret;
   14110             : }
   14111             : 
   14112           0 : static PyObject *py_wbint_PamAuth_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   14113             : {
   14114           0 :         return py_wbint_PamAuth_ndr_print(py_obj, "wbint_PamAuth_in", NDR_IN);
   14115             : }
   14116             : 
   14117           0 : static PyObject *py_wbint_PamAuth_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   14118             : {
   14119           0 :         return py_wbint_PamAuth_ndr_print(py_obj, "wbint_PamAuth_out", NDR_OUT);
   14120             : }
   14121             : 
   14122             : static PyMethodDef py_wbint_PamAuth_methods[] = {
   14123             :         { "opnum", (PyCFunction)py_wbint_PamAuth_ndr_opnum, METH_NOARGS|METH_CLASS,
   14124             :                 "winbind.wbint_PamAuth.opnum() -> 22 (0x16) " },
   14125             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuth_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   14126             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   14127             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuth_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   14128             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   14129             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuth_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   14130             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   14131             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuth_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   14132             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   14133             :         { "__ndr_print_in__", (PyCFunction)py_wbint_PamAuth_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   14134             :         { "__ndr_print_out__", (PyCFunction)py_wbint_PamAuth_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   14135             :         { NULL, NULL, 0, NULL }
   14136             : };
   14137             : 
   14138             : 
   14139             : static PyTypeObject wbint_PamAuth_Type = {
   14140             :         PyVarObject_HEAD_INIT(NULL, 0)
   14141             :         .tp_name = "winbind.wbint_PamAuth",
   14142             :         .tp_getset = py_wbint_PamAuth_getsetters,
   14143             :         .tp_methods = py_wbint_PamAuth_methods,
   14144             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   14145             :         .tp_new = py_wbint_PamAuth_new,
   14146             : };
   14147             : 
   14148           0 : static bool pack_py_wbint_PamAuth_args_in(PyObject *args, PyObject *kwargs, struct wbint_PamAuth *r)
   14149             : {
   14150           0 :         PyObject *py_client_name;
   14151           0 :         PyObject *py_client_pid;
   14152           0 :         PyObject *py_flags;
   14153           0 :         PyObject *py_info;
   14154           0 :         PyObject *py_require_membership_of_sid;
   14155           0 :         const char *kwnames[] = {
   14156             :                 "client_name", "client_pid", "flags", "info", "require_membership_of_sid", NULL
   14157             :         };
   14158             : 
   14159           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:wbint_PamAuth", discard_const_p(char *, kwnames), &py_client_name, &py_client_pid, &py_flags, &py_info, &py_require_membership_of_sid)) {
   14160           0 :                 return false;
   14161             :         }
   14162             : 
   14163           0 :         if (py_client_name == NULL) {
   14164           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_name");
   14165           0 :                 return false;
   14166             :         }
   14167           0 :         r->in.client_name = talloc_ptrtype(r, r->in.client_name);
   14168           0 :         if (r->in.client_name == NULL) {
   14169           0 :                 PyErr_NoMemory();
   14170           0 :                 return false;
   14171             :         }
   14172             :         {
   14173           0 :                 const char *test_str;
   14174           0 :                 const char *talloc_str;
   14175           0 :                 PyObject *unicode = NULL;
   14176           0 :                 if (PyUnicode_Check(py_client_name)) {
   14177           0 :                         unicode = PyUnicode_AsEncodedString(py_client_name, "utf-8", "ignore");
   14178           0 :                         if (unicode == NULL) {
   14179           0 :                                 PyErr_NoMemory();
   14180           0 :                                 return false;
   14181             :                         }
   14182           0 :                         test_str = PyBytes_AS_STRING(unicode);
   14183           0 :                 } else if (PyBytes_Check(py_client_name)) {
   14184           0 :                         test_str = PyBytes_AS_STRING(py_client_name);
   14185             :                 } else {
   14186           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client_name)->tp_name);
   14187           0 :                         return false;
   14188             :                 }
   14189           0 :                 talloc_str = talloc_strdup(r, test_str);
   14190           0 :                 if (unicode != NULL) {
   14191           0 :                         Py_DECREF(unicode);
   14192             :                 }
   14193           0 :                 if (talloc_str == NULL) {
   14194           0 :                         PyErr_NoMemory();
   14195           0 :                         return false;
   14196             :                 }
   14197           0 :                 r->in.client_name = talloc_str;
   14198             :         }
   14199           0 :         if (py_client_pid == NULL) {
   14200           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_pid");
   14201           0 :                 return false;
   14202             :         }
   14203             :         {
   14204           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.client_pid));
   14205           0 :                 if (PyLong_Check(py_client_pid)) {
   14206           0 :                         unsigned long long test_var;
   14207           0 :                         test_var = PyLong_AsUnsignedLongLong(py_client_pid);
   14208           0 :                         if (PyErr_Occurred() != NULL) {
   14209           0 :                                 return false;
   14210             :                         }
   14211           0 :                         if (test_var > uint_max) {
   14212           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14213             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14214           0 :                                 return false;
   14215             :                         }
   14216           0 :                         r->in.client_pid = test_var;
   14217             :                 } else {
   14218           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14219             :                           PyLong_Type.tp_name);
   14220           0 :                         return false;
   14221             :                 }
   14222             :         }
   14223           0 :         if (py_flags == NULL) {
   14224           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   14225           0 :                 return false;
   14226             :         }
   14227             :         {
   14228           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   14229           0 :                 if (PyLong_Check(py_flags)) {
   14230           0 :                         unsigned long long test_var;
   14231           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   14232           0 :                         if (PyErr_Occurred() != NULL) {
   14233           0 :                                 return false;
   14234             :                         }
   14235           0 :                         if (test_var > uint_max) {
   14236           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14237             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14238           0 :                                 return false;
   14239             :                         }
   14240           0 :                         r->in.flags = test_var;
   14241             :                 } else {
   14242           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14243             :                           PyLong_Type.tp_name);
   14244           0 :                         return false;
   14245             :                 }
   14246             :         }
   14247           0 :         if (py_info == NULL) {
   14248           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info");
   14249           0 :                 return false;
   14250             :         }
   14251           0 :         r->in.info = talloc_ptrtype(r, r->in.info);
   14252           0 :         if (r->in.info == NULL) {
   14253           0 :                 PyErr_NoMemory();
   14254           0 :                 return false;
   14255             :         }
   14256           0 :         PY_CHECK_TYPE(&wbint_AuthUserInfo_Type, py_info, return false;);
   14257           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info)) == NULL) {
   14258           0 :                 PyErr_NoMemory();
   14259           0 :                 return false;
   14260             :         }
   14261           0 :         r->in.info = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(py_info);
   14262           0 :         if (py_require_membership_of_sid == NULL) {
   14263           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.require_membership_of_sid");
   14264           0 :                 return false;
   14265             :         }
   14266           0 :         r->in.require_membership_of_sid = talloc_ptrtype(r, r->in.require_membership_of_sid);
   14267           0 :         if (r->in.require_membership_of_sid == NULL) {
   14268           0 :                 PyErr_NoMemory();
   14269           0 :                 return false;
   14270             :         }
   14271           0 :         PY_CHECK_TYPE(&wbint_SidArray_Type, py_require_membership_of_sid, return false;);
   14272           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_require_membership_of_sid)) == NULL) {
   14273           0 :                 PyErr_NoMemory();
   14274           0 :                 return false;
   14275             :         }
   14276           0 :         r->in.require_membership_of_sid = (struct wbint_SidArray *)pytalloc_get_ptr(py_require_membership_of_sid);
   14277           0 :         return true;
   14278             : }
   14279             : 
   14280           0 : static PyObject *unpack_py_wbint_PamAuth_args_out(struct wbint_PamAuth *r)
   14281             : {
   14282           0 :         PyObject *result;
   14283           0 :         PyObject *py_validation;
   14284           0 :         py_validation = pytalloc_reference_ex(&wbint_Validation_Type, r->out.validation, r->out.validation);
   14285           0 :         result = py_validation;
   14286           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   14287           0 :                 PyErr_SetNTSTATUS(r->out.result);
   14288           0 :                 return NULL;
   14289             :         }
   14290             : 
   14291           0 :         return result;
   14292             : }
   14293             : 
   14294             : 
   14295           0 : static PyObject *py_wbint_PamAuthCrap_in_get_client_name(PyObject *obj, void *closure)
   14296             : {
   14297           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14298           0 :         PyObject *py_client_name;
   14299           0 :         if (object->in.client_name == NULL) {
   14300           0 :                 Py_RETURN_NONE;
   14301             :         }
   14302           0 :         if (object->in.client_name == NULL) {
   14303           0 :                 py_client_name = Py_None;
   14304           0 :                 Py_INCREF(py_client_name);
   14305             :         } else {
   14306           0 :                 py_client_name = PyUnicode_Decode(object->in.client_name, strlen(object->in.client_name), "utf-8", "ignore");
   14307             :         }
   14308           0 :         return py_client_name;
   14309             : }
   14310             : 
   14311           0 : static int py_wbint_PamAuthCrap_in_set_client_name(PyObject *py_obj, PyObject *value, void *closure)
   14312             : {
   14313           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14314           0 :         if (value == NULL) {
   14315           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_name");
   14316           0 :                 return -1;
   14317             :         }
   14318           0 :         object->in.client_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.client_name);
   14319           0 :         if (object->in.client_name == NULL) {
   14320           0 :                 PyErr_NoMemory();
   14321           0 :                 return -1;
   14322             :         }
   14323             :         {
   14324           0 :                 const char *test_str;
   14325           0 :                 const char *talloc_str;
   14326           0 :                 PyObject *unicode = NULL;
   14327           0 :                 if (PyUnicode_Check(value)) {
   14328           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   14329           0 :                         if (unicode == NULL) {
   14330           0 :                                 PyErr_NoMemory();
   14331           0 :                                 return -1;
   14332             :                         }
   14333           0 :                         test_str = PyBytes_AS_STRING(unicode);
   14334           0 :                 } else if (PyBytes_Check(value)) {
   14335           0 :                         test_str = PyBytes_AS_STRING(value);
   14336             :                 } else {
   14337           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   14338           0 :                         return -1;
   14339             :                 }
   14340           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   14341           0 :                 if (unicode != NULL) {
   14342           0 :                         Py_DECREF(unicode);
   14343             :                 }
   14344           0 :                 if (talloc_str == NULL) {
   14345           0 :                         PyErr_NoMemory();
   14346           0 :                         return -1;
   14347             :                 }
   14348           0 :                 object->in.client_name = talloc_str;
   14349             :         }
   14350           0 :         return 0;
   14351             : }
   14352             : 
   14353           0 : static PyObject *py_wbint_PamAuthCrap_in_get_client_pid(PyObject *obj, void *closure)
   14354             : {
   14355           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14356           0 :         PyObject *py_client_pid;
   14357           0 :         py_client_pid = PyLong_FromUnsignedLongLong(object->in.client_pid);
   14358           0 :         return py_client_pid;
   14359             : }
   14360             : 
   14361           0 : static int py_wbint_PamAuthCrap_in_set_client_pid(PyObject *py_obj, PyObject *value, void *closure)
   14362             : {
   14363           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14364           0 :         if (value == NULL) {
   14365           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_pid");
   14366           0 :                 return -1;
   14367             :         }
   14368             :         {
   14369           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.client_pid));
   14370           0 :                 if (PyLong_Check(value)) {
   14371           0 :                         unsigned long long test_var;
   14372           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14373           0 :                         if (PyErr_Occurred() != NULL) {
   14374           0 :                                 return -1;
   14375             :                         }
   14376           0 :                         if (test_var > uint_max) {
   14377           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14378             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14379           0 :                                 return -1;
   14380             :                         }
   14381           0 :                         object->in.client_pid = test_var;
   14382             :                 } else {
   14383           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14384             :                           PyLong_Type.tp_name);
   14385           0 :                         return -1;
   14386             :                 }
   14387             :         }
   14388           0 :         return 0;
   14389             : }
   14390             : 
   14391           0 : static PyObject *py_wbint_PamAuthCrap_in_get_flags(PyObject *obj, void *closure)
   14392             : {
   14393           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14394           0 :         PyObject *py_flags;
   14395           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   14396           0 :         return py_flags;
   14397             : }
   14398             : 
   14399           0 : static int py_wbint_PamAuthCrap_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   14400             : {
   14401           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14402           0 :         if (value == NULL) {
   14403           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   14404           0 :                 return -1;
   14405             :         }
   14406             :         {
   14407           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   14408           0 :                 if (PyLong_Check(value)) {
   14409           0 :                         unsigned long long test_var;
   14410           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14411           0 :                         if (PyErr_Occurred() != NULL) {
   14412           0 :                                 return -1;
   14413             :                         }
   14414           0 :                         if (test_var > uint_max) {
   14415           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14416             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14417           0 :                                 return -1;
   14418             :                         }
   14419           0 :                         object->in.flags = test_var;
   14420             :                 } else {
   14421           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14422             :                           PyLong_Type.tp_name);
   14423           0 :                         return -1;
   14424             :                 }
   14425             :         }
   14426           0 :         return 0;
   14427             : }
   14428             : 
   14429           0 : static PyObject *py_wbint_PamAuthCrap_in_get_user(PyObject *obj, void *closure)
   14430             : {
   14431           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14432           0 :         PyObject *py_user;
   14433           0 :         if (object->in.user == NULL) {
   14434           0 :                 Py_RETURN_NONE;
   14435             :         }
   14436           0 :         if (object->in.user == NULL) {
   14437           0 :                 py_user = Py_None;
   14438           0 :                 Py_INCREF(py_user);
   14439             :         } else {
   14440           0 :                 py_user = PyUnicode_Decode(object->in.user, strlen(object->in.user), "utf-8", "ignore");
   14441             :         }
   14442           0 :         return py_user;
   14443             : }
   14444             : 
   14445           0 : static int py_wbint_PamAuthCrap_in_set_user(PyObject *py_obj, PyObject *value, void *closure)
   14446             : {
   14447           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14448           0 :         if (value == NULL) {
   14449           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.user");
   14450           0 :                 return -1;
   14451             :         }
   14452           0 :         object->in.user = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.user);
   14453           0 :         if (object->in.user == NULL) {
   14454           0 :                 PyErr_NoMemory();
   14455           0 :                 return -1;
   14456             :         }
   14457             :         {
   14458           0 :                 const char *test_str;
   14459           0 :                 const char *talloc_str;
   14460           0 :                 PyObject *unicode = NULL;
   14461           0 :                 if (PyUnicode_Check(value)) {
   14462           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   14463           0 :                         if (unicode == NULL) {
   14464           0 :                                 PyErr_NoMemory();
   14465           0 :                                 return -1;
   14466             :                         }
   14467           0 :                         test_str = PyBytes_AS_STRING(unicode);
   14468           0 :                 } else if (PyBytes_Check(value)) {
   14469           0 :                         test_str = PyBytes_AS_STRING(value);
   14470             :                 } else {
   14471           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   14472           0 :                         return -1;
   14473             :                 }
   14474           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   14475           0 :                 if (unicode != NULL) {
   14476           0 :                         Py_DECREF(unicode);
   14477             :                 }
   14478           0 :                 if (talloc_str == NULL) {
   14479           0 :                         PyErr_NoMemory();
   14480           0 :                         return -1;
   14481             :                 }
   14482           0 :                 object->in.user = talloc_str;
   14483             :         }
   14484           0 :         return 0;
   14485             : }
   14486             : 
   14487           0 : static PyObject *py_wbint_PamAuthCrap_in_get_domain(PyObject *obj, void *closure)
   14488             : {
   14489           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14490           0 :         PyObject *py_domain;
   14491           0 :         if (object->in.domain == NULL) {
   14492           0 :                 Py_RETURN_NONE;
   14493             :         }
   14494           0 :         if (object->in.domain == NULL) {
   14495           0 :                 py_domain = Py_None;
   14496           0 :                 Py_INCREF(py_domain);
   14497             :         } else {
   14498           0 :                 py_domain = PyUnicode_Decode(object->in.domain, strlen(object->in.domain), "utf-8", "ignore");
   14499             :         }
   14500           0 :         return py_domain;
   14501             : }
   14502             : 
   14503           0 : static int py_wbint_PamAuthCrap_in_set_domain(PyObject *py_obj, PyObject *value, void *closure)
   14504             : {
   14505           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14506           0 :         if (value == NULL) {
   14507           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain");
   14508           0 :                 return -1;
   14509             :         }
   14510           0 :         object->in.domain = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.domain);
   14511           0 :         if (object->in.domain == NULL) {
   14512           0 :                 PyErr_NoMemory();
   14513           0 :                 return -1;
   14514             :         }
   14515             :         {
   14516           0 :                 const char *test_str;
   14517           0 :                 const char *talloc_str;
   14518           0 :                 PyObject *unicode = NULL;
   14519           0 :                 if (PyUnicode_Check(value)) {
   14520           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   14521           0 :                         if (unicode == NULL) {
   14522           0 :                                 PyErr_NoMemory();
   14523           0 :                                 return -1;
   14524             :                         }
   14525           0 :                         test_str = PyBytes_AS_STRING(unicode);
   14526           0 :                 } else if (PyBytes_Check(value)) {
   14527           0 :                         test_str = PyBytes_AS_STRING(value);
   14528             :                 } else {
   14529           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   14530           0 :                         return -1;
   14531             :                 }
   14532           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   14533           0 :                 if (unicode != NULL) {
   14534           0 :                         Py_DECREF(unicode);
   14535             :                 }
   14536           0 :                 if (talloc_str == NULL) {
   14537           0 :                         PyErr_NoMemory();
   14538           0 :                         return -1;
   14539             :                 }
   14540           0 :                 object->in.domain = talloc_str;
   14541             :         }
   14542           0 :         return 0;
   14543             : }
   14544             : 
   14545           0 : static PyObject *py_wbint_PamAuthCrap_in_get_workstation(PyObject *obj, void *closure)
   14546             : {
   14547           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14548           0 :         PyObject *py_workstation;
   14549           0 :         if (object->in.workstation == NULL) {
   14550           0 :                 Py_RETURN_NONE;
   14551             :         }
   14552           0 :         if (object->in.workstation == NULL) {
   14553           0 :                 py_workstation = Py_None;
   14554           0 :                 Py_INCREF(py_workstation);
   14555             :         } else {
   14556           0 :                 py_workstation = PyUnicode_Decode(object->in.workstation, strlen(object->in.workstation), "utf-8", "ignore");
   14557             :         }
   14558           0 :         return py_workstation;
   14559             : }
   14560             : 
   14561           0 : static int py_wbint_PamAuthCrap_in_set_workstation(PyObject *py_obj, PyObject *value, void *closure)
   14562             : {
   14563           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14564           0 :         if (value == NULL) {
   14565           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.workstation");
   14566           0 :                 return -1;
   14567             :         }
   14568           0 :         object->in.workstation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.workstation);
   14569           0 :         if (object->in.workstation == NULL) {
   14570           0 :                 PyErr_NoMemory();
   14571           0 :                 return -1;
   14572             :         }
   14573             :         {
   14574           0 :                 const char *test_str;
   14575           0 :                 const char *talloc_str;
   14576           0 :                 PyObject *unicode = NULL;
   14577           0 :                 if (PyUnicode_Check(value)) {
   14578           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   14579           0 :                         if (unicode == NULL) {
   14580           0 :                                 PyErr_NoMemory();
   14581           0 :                                 return -1;
   14582             :                         }
   14583           0 :                         test_str = PyBytes_AS_STRING(unicode);
   14584           0 :                 } else if (PyBytes_Check(value)) {
   14585           0 :                         test_str = PyBytes_AS_STRING(value);
   14586             :                 } else {
   14587           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   14588           0 :                         return -1;
   14589             :                 }
   14590           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   14591           0 :                 if (unicode != NULL) {
   14592           0 :                         Py_DECREF(unicode);
   14593             :                 }
   14594           0 :                 if (talloc_str == NULL) {
   14595           0 :                         PyErr_NoMemory();
   14596           0 :                         return -1;
   14597             :                 }
   14598           0 :                 object->in.workstation = talloc_str;
   14599             :         }
   14600           0 :         return 0;
   14601             : }
   14602             : 
   14603           0 : static PyObject *py_wbint_PamAuthCrap_in_get_lm_resp(PyObject *obj, void *closure)
   14604             : {
   14605           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14606           0 :         PyObject *py_lm_resp;
   14607           0 :         py_lm_resp = PyBytes_FromStringAndSize((char *)(object->in.lm_resp).data, (object->in.lm_resp).length);
   14608           0 :         return py_lm_resp;
   14609             : }
   14610             : 
   14611           0 : static int py_wbint_PamAuthCrap_in_set_lm_resp(PyObject *py_obj, PyObject *value, void *closure)
   14612             : {
   14613           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14614           0 :         if (value == NULL) {
   14615           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.lm_resp");
   14616           0 :                 return -1;
   14617             :         }
   14618           0 :         object->in.lm_resp = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   14619           0 :         return 0;
   14620             : }
   14621             : 
   14622           0 : static PyObject *py_wbint_PamAuthCrap_in_get_nt_resp(PyObject *obj, void *closure)
   14623             : {
   14624           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14625           0 :         PyObject *py_nt_resp;
   14626           0 :         py_nt_resp = PyBytes_FromStringAndSize((char *)(object->in.nt_resp).data, (object->in.nt_resp).length);
   14627           0 :         return py_nt_resp;
   14628             : }
   14629             : 
   14630           0 : static int py_wbint_PamAuthCrap_in_set_nt_resp(PyObject *py_obj, PyObject *value, void *closure)
   14631             : {
   14632           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14633           0 :         if (value == NULL) {
   14634           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.nt_resp");
   14635           0 :                 return -1;
   14636             :         }
   14637           0 :         object->in.nt_resp = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   14638           0 :         return 0;
   14639             : }
   14640             : 
   14641           0 : static PyObject *py_wbint_PamAuthCrap_in_get_chal(PyObject *obj, void *closure)
   14642             : {
   14643           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14644           0 :         PyObject *py_chal;
   14645           0 :         py_chal = PyBytes_FromStringAndSize((char *)(object->in.chal).data, (object->in.chal).length);
   14646           0 :         return py_chal;
   14647             : }
   14648             : 
   14649           0 : static int py_wbint_PamAuthCrap_in_set_chal(PyObject *py_obj, PyObject *value, void *closure)
   14650             : {
   14651           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14652           0 :         if (value == NULL) {
   14653           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.chal");
   14654           0 :                 return -1;
   14655             :         }
   14656           0 :         object->in.chal = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   14657           0 :         return 0;
   14658             : }
   14659             : 
   14660           0 : static PyObject *py_wbint_PamAuthCrap_in_get_logon_parameters(PyObject *obj, void *closure)
   14661             : {
   14662           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14663           0 :         PyObject *py_logon_parameters;
   14664           0 :         py_logon_parameters = PyLong_FromUnsignedLongLong((uint32_t)object->in.logon_parameters);
   14665           0 :         return py_logon_parameters;
   14666             : }
   14667             : 
   14668           0 : static int py_wbint_PamAuthCrap_in_set_logon_parameters(PyObject *py_obj, PyObject *value, void *closure)
   14669             : {
   14670           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14671           0 :         if (value == NULL) {
   14672           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_parameters");
   14673           0 :                 return -1;
   14674             :         }
   14675             :         {
   14676           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.logon_parameters));
   14677           0 :                 if (PyLong_Check(value)) {
   14678           0 :                         unsigned long long test_var;
   14679           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14680           0 :                         if (PyErr_Occurred() != NULL) {
   14681           0 :                                 return -1;
   14682             :                         }
   14683           0 :                         if (test_var > uint_max) {
   14684           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14685             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14686           0 :                                 return -1;
   14687             :                         }
   14688           0 :                         object->in.logon_parameters = test_var;
   14689             :                 } else {
   14690           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14691             :                           PyLong_Type.tp_name);
   14692           0 :                         return -1;
   14693             :                 }
   14694             :         }
   14695           0 :         return 0;
   14696             : }
   14697             : 
   14698           0 : static PyObject *py_wbint_PamAuthCrap_in_get_require_membership_of_sid(PyObject *obj, void *closure)
   14699             : {
   14700           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14701           0 :         PyObject *py_require_membership_of_sid;
   14702           0 :         if (object->in.require_membership_of_sid == NULL) {
   14703           0 :                 Py_RETURN_NONE;
   14704             :         }
   14705           0 :         py_require_membership_of_sid = pytalloc_reference_ex(&wbint_SidArray_Type, object->in.require_membership_of_sid, object->in.require_membership_of_sid);
   14706           0 :         return py_require_membership_of_sid;
   14707             : }
   14708             : 
   14709           0 : static int py_wbint_PamAuthCrap_in_set_require_membership_of_sid(PyObject *py_obj, PyObject *value, void *closure)
   14710             : {
   14711           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14712           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.require_membership_of_sid));
   14713           0 :         if (value == NULL) {
   14714           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.require_membership_of_sid");
   14715           0 :                 return -1;
   14716             :         }
   14717           0 :         object->in.require_membership_of_sid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.require_membership_of_sid);
   14718           0 :         if (object->in.require_membership_of_sid == NULL) {
   14719           0 :                 PyErr_NoMemory();
   14720           0 :                 return -1;
   14721             :         }
   14722           0 :         PY_CHECK_TYPE(&wbint_SidArray_Type, value, return -1;);
   14723           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14724           0 :                 PyErr_NoMemory();
   14725           0 :                 return -1;
   14726             :         }
   14727           0 :         object->in.require_membership_of_sid = (struct wbint_SidArray *)pytalloc_get_ptr(value);
   14728           0 :         return 0;
   14729             : }
   14730             : 
   14731           0 : static PyObject *py_wbint_PamAuthCrap_out_get_authoritative(PyObject *obj, void *closure)
   14732             : {
   14733           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14734           0 :         PyObject *py_authoritative;
   14735           0 :         if (object->out.authoritative == NULL) {
   14736           0 :                 Py_RETURN_NONE;
   14737             :         }
   14738           0 :         py_authoritative = PyLong_FromLong((uint16_t)*object->out.authoritative);
   14739           0 :         return py_authoritative;
   14740             : }
   14741             : 
   14742           0 : static int py_wbint_PamAuthCrap_out_set_authoritative(PyObject *py_obj, PyObject *value, void *closure)
   14743             : {
   14744           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14745           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.authoritative));
   14746           0 :         if (value == NULL) {
   14747           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.authoritative");
   14748           0 :                 return -1;
   14749             :         }
   14750           0 :         object->out.authoritative = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.authoritative);
   14751           0 :         if (object->out.authoritative == NULL) {
   14752           0 :                 PyErr_NoMemory();
   14753           0 :                 return -1;
   14754             :         }
   14755             :         {
   14756           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.authoritative));
   14757           0 :                 if (PyLong_Check(value)) {
   14758           0 :                         unsigned long long test_var;
   14759           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14760           0 :                         if (PyErr_Occurred() != NULL) {
   14761           0 :                                 return -1;
   14762             :                         }
   14763           0 :                         if (test_var > uint_max) {
   14764           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14765             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14766           0 :                                 return -1;
   14767             :                         }
   14768           0 :                         *object->out.authoritative = test_var;
   14769             :                 } else {
   14770           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14771             :                           PyLong_Type.tp_name);
   14772           0 :                         return -1;
   14773             :                 }
   14774             :         }
   14775           0 :         return 0;
   14776             : }
   14777             : 
   14778           0 : static PyObject *py_wbint_PamAuthCrap_out_get_validation(PyObject *obj, void *closure)
   14779             : {
   14780           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14781           0 :         PyObject *py_validation;
   14782           0 :         if (object->out.validation == NULL) {
   14783           0 :                 Py_RETURN_NONE;
   14784             :         }
   14785           0 :         py_validation = pytalloc_reference_ex(&wbint_PamAuthCrapValidation_Type, object->out.validation, object->out.validation);
   14786           0 :         return py_validation;
   14787             : }
   14788             : 
   14789           0 : static int py_wbint_PamAuthCrap_out_set_validation(PyObject *py_obj, PyObject *value, void *closure)
   14790             : {
   14791           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14792           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.validation));
   14793           0 :         if (value == NULL) {
   14794           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.validation");
   14795           0 :                 return -1;
   14796             :         }
   14797           0 :         object->out.validation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.validation);
   14798           0 :         if (object->out.validation == NULL) {
   14799           0 :                 PyErr_NoMemory();
   14800           0 :                 return -1;
   14801             :         }
   14802           0 :         PY_CHECK_TYPE(&wbint_PamAuthCrapValidation_Type, value, return -1;);
   14803           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14804           0 :                 PyErr_NoMemory();
   14805           0 :                 return -1;
   14806             :         }
   14807           0 :         object->out.validation = (struct wbint_PamAuthCrapValidation *)pytalloc_get_ptr(value);
   14808           0 :         return 0;
   14809             : }
   14810             : 
   14811           0 : static PyObject *py_wbint_PamAuthCrap_get_result(PyObject *obj, void *closure)
   14812             : {
   14813           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14814           0 :         PyObject *py_result;
   14815           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   14816           0 :         return py_result;
   14817             : }
   14818             : 
   14819           0 : static int py_wbint_PamAuthCrap_set_result(PyObject *py_obj, PyObject *value, void *closure)
   14820             : {
   14821           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14822           0 :         if (value == NULL) {
   14823           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   14824           0 :                 return -1;
   14825             :         }
   14826           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   14827           0 :         return 0;
   14828             : }
   14829             : 
   14830             : static PyGetSetDef py_wbint_PamAuthCrap_getsetters[] = {
   14831             :         {
   14832             :                 .name = discard_const_p(char, "in_client_name"),
   14833             :                 .get = py_wbint_PamAuthCrap_in_get_client_name,
   14834             :                 .set = py_wbint_PamAuthCrap_in_set_client_name,
   14835             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   14836             :         },
   14837             :         {
   14838             :                 .name = discard_const_p(char, "in_client_pid"),
   14839             :                 .get = py_wbint_PamAuthCrap_in_get_client_pid,
   14840             :                 .set = py_wbint_PamAuthCrap_in_set_client_pid,
   14841             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   14842             :         },
   14843             :         {
   14844             :                 .name = discard_const_p(char, "in_flags"),
   14845             :                 .get = py_wbint_PamAuthCrap_in_get_flags,
   14846             :                 .set = py_wbint_PamAuthCrap_in_set_flags,
   14847             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14848             :         },
   14849             :         {
   14850             :                 .name = discard_const_p(char, "in_user"),
   14851             :                 .get = py_wbint_PamAuthCrap_in_get_user,
   14852             :                 .set = py_wbint_PamAuthCrap_in_set_user,
   14853             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   14854             :         },
   14855             :         {
   14856             :                 .name = discard_const_p(char, "in_domain"),
   14857             :                 .get = py_wbint_PamAuthCrap_in_get_domain,
   14858             :                 .set = py_wbint_PamAuthCrap_in_set_domain,
   14859             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   14860             :         },
   14861             :         {
   14862             :                 .name = discard_const_p(char, "in_workstation"),
   14863             :                 .get = py_wbint_PamAuthCrap_in_get_workstation,
   14864             :                 .set = py_wbint_PamAuthCrap_in_set_workstation,
   14865             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   14866             :         },
   14867             :         {
   14868             :                 .name = discard_const_p(char, "in_lm_resp"),
   14869             :                 .get = py_wbint_PamAuthCrap_in_get_lm_resp,
   14870             :                 .set = py_wbint_PamAuthCrap_in_set_lm_resp,
   14871             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   14872             :         },
   14873             :         {
   14874             :                 .name = discard_const_p(char, "in_nt_resp"),
   14875             :                 .get = py_wbint_PamAuthCrap_in_get_nt_resp,
   14876             :                 .set = py_wbint_PamAuthCrap_in_set_nt_resp,
   14877             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   14878             :         },
   14879             :         {
   14880             :                 .name = discard_const_p(char, "in_chal"),
   14881             :                 .get = py_wbint_PamAuthCrap_in_get_chal,
   14882             :                 .set = py_wbint_PamAuthCrap_in_set_chal,
   14883             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   14884             :         },
   14885             :         {
   14886             :                 .name = discard_const_p(char, "in_logon_parameters"),
   14887             :                 .get = py_wbint_PamAuthCrap_in_get_logon_parameters,
   14888             :                 .set = py_wbint_PamAuthCrap_in_set_logon_parameters,
   14889             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14890             :         },
   14891             :         {
   14892             :                 .name = discard_const_p(char, "in_require_membership_of_sid"),
   14893             :                 .get = py_wbint_PamAuthCrap_in_get_require_membership_of_sid,
   14894             :                 .set = py_wbint_PamAuthCrap_in_set_require_membership_of_sid,
   14895             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_SidArray")
   14896             :         },
   14897             :         {
   14898             :                 .name = discard_const_p(char, "out_authoritative"),
   14899             :                 .get = py_wbint_PamAuthCrap_out_get_authoritative,
   14900             :                 .set = py_wbint_PamAuthCrap_out_set_authoritative,
   14901             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   14902             :         },
   14903             :         {
   14904             :                 .name = discard_const_p(char, "out_validation"),
   14905             :                 .get = py_wbint_PamAuthCrap_out_get_validation,
   14906             :                 .set = py_wbint_PamAuthCrap_out_set_validation,
   14907             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_PamAuthCrapValidation")
   14908             :         },
   14909             :         {
   14910             :                 .name = discard_const_p(char, "result"),
   14911             :                 .get = py_wbint_PamAuthCrap_get_result,
   14912             :                 .set = py_wbint_PamAuthCrap_set_result,
   14913             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   14914             :         },
   14915             :         { .name = NULL }
   14916             : };
   14917             : 
   14918           0 : static PyObject *py_wbint_PamAuthCrap_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14919             : {
   14920           0 :         PyObject *self = pytalloc_new(struct wbint_PamAuthCrap, type);
   14921           0 :         struct wbint_PamAuthCrap *_self = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(self);
   14922           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   14923           0 :         _self->in.require_membership_of_sid = talloc_zero(mem_ctx, struct wbint_SidArray);
   14924           0 :         _self->out.authoritative = talloc_zero(mem_ctx, uint8_t);
   14925           0 :         _self->out.validation = talloc_zero(mem_ctx, struct wbint_PamAuthCrapValidation);
   14926           0 :         return self;
   14927             : }
   14928             : 
   14929           0 : static PyObject *py_wbint_PamAuthCrap_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   14930             : {
   14931             : 
   14932             : 
   14933           0 :         return PyLong_FromLong(23);
   14934             : }
   14935             : 
   14936           0 : static PyObject *py_wbint_PamAuthCrap_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   14937             : {
   14938           0 :         const struct ndr_interface_call *call = NULL;
   14939           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14940           0 :         PyObject *ret = NULL;
   14941           0 :         struct ndr_push *push = NULL;
   14942           0 :         DATA_BLOB blob;
   14943           0 :         enum ndr_err_code err;
   14944             : 
   14945           0 :         if (ndr_table_winbind.num_calls < 24) {
   14946           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuthCrap_ndr_pack");
   14947           0 :                 return NULL;
   14948             :         }
   14949           0 :         call = &ndr_table_winbind.calls[23];
   14950             : 
   14951           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   14952           0 :         if (push == NULL) {
   14953           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   14954           0 :                 return NULL;
   14955             :         }
   14956             : 
   14957           0 :         push->flags |= ndr_push_flags;
   14958             : 
   14959           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   14960           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   14961           0 :                 TALLOC_FREE(push);
   14962           0 :                 PyErr_SetNdrError(err);
   14963           0 :                 return NULL;
   14964             :         }
   14965           0 :         blob = ndr_push_blob(push);
   14966           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   14967           0 :         TALLOC_FREE(push);
   14968           0 :         return ret;
   14969             : }
   14970             : 
   14971           0 : static PyObject *py_wbint_PamAuthCrap_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   14972             : {
   14973           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   14974           0 :         PyObject *bigendian_obj = NULL;
   14975           0 :         PyObject *ndr64_obj = NULL;
   14976           0 :         libndr_flags ndr_push_flags = 0;
   14977             : 
   14978           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   14979             :                 discard_const_p(char *, kwnames),
   14980             :                 &bigendian_obj,
   14981             :                 &ndr64_obj)) {
   14982           0 :                 return NULL;
   14983             :         }
   14984             : 
   14985           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   14986           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   14987             :         }
   14988           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   14989           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   14990             :         }
   14991             : 
   14992           0 :         return py_wbint_PamAuthCrap_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   14993             : }
   14994             : 
   14995           0 : static PyObject *py_wbint_PamAuthCrap_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   14996             : {
   14997           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   14998           0 :         PyObject *bigendian_obj = NULL;
   14999           0 :         PyObject *ndr64_obj = NULL;
   15000           0 :         libndr_flags ndr_push_flags = 0;
   15001             : 
   15002           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   15003             :                 discard_const_p(char *, kwnames),
   15004             :                 &bigendian_obj,
   15005             :                 &ndr64_obj)) {
   15006           0 :                 return NULL;
   15007             :         }
   15008             : 
   15009           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   15010           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   15011             :         }
   15012           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   15013           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   15014             :         }
   15015             : 
   15016           0 :         return py_wbint_PamAuthCrap_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   15017             : }
   15018             : 
   15019           0 : static PyObject *py_wbint_PamAuthCrap_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   15020             : {
   15021           0 :         const struct ndr_interface_call *call = NULL;
   15022           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   15023           0 :         struct ndr_pull *pull = NULL;
   15024           0 :         enum ndr_err_code err;
   15025             : 
   15026           0 :         if (ndr_table_winbind.num_calls < 24) {
   15027           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuthCrap_ndr_unpack");
   15028           0 :                 return NULL;
   15029             :         }
   15030           0 :         call = &ndr_table_winbind.calls[23];
   15031             : 
   15032           0 :         pull = ndr_pull_init_blob(blob, object);
   15033           0 :         if (pull == NULL) {
   15034           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   15035           0 :                 return NULL;
   15036             :         }
   15037             : 
   15038           0 :         pull->flags |= ndr_pull_flags;
   15039             : 
   15040           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   15041           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   15042           0 :                 TALLOC_FREE(pull);
   15043           0 :                 PyErr_SetNdrError(err);
   15044           0 :                 return NULL;
   15045             :         }
   15046           0 :         if (!allow_remaining) {
   15047           0 :                 uint32_t highest_ofs;
   15048             : 
   15049           0 :                 if (pull->offset > pull->relative_highest_offset) {
   15050           0 :                         highest_ofs = pull->offset;
   15051             :                 } else {
   15052           0 :                         highest_ofs = pull->relative_highest_offset;
   15053             :                 }
   15054           0 :                 if (highest_ofs < pull->data_size) {
   15055           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   15056             :                                 "not all bytes consumed ofs[%u] size[%u]",
   15057             :                                 highest_ofs, pull->data_size);
   15058           0 :                         TALLOC_FREE(pull);
   15059           0 :                         PyErr_SetNdrError(err);
   15060           0 :                         return NULL;
   15061             :                 }
   15062             :         }
   15063             : 
   15064           0 :         TALLOC_FREE(pull);
   15065           0 :         Py_RETURN_NONE;
   15066             : }
   15067             : 
   15068           0 : static PyObject *py_wbint_PamAuthCrap_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   15069             : {
   15070           0 :         DATA_BLOB blob;
   15071           0 :         Py_ssize_t blob_length = 0;
   15072           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   15073           0 :         PyObject *bigendian_obj = NULL;
   15074           0 :         PyObject *ndr64_obj = NULL;
   15075           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   15076           0 :         PyObject *allow_remaining_obj = NULL;
   15077           0 :         bool allow_remaining = false;
   15078             : 
   15079           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   15080             :                 discard_const_p(char *, kwnames),
   15081             :                 &blob.data, &blob_length,
   15082             :                 &bigendian_obj,
   15083             :                 &ndr64_obj,
   15084             :                 &allow_remaining_obj)) {
   15085           0 :                 return NULL;
   15086             :         }
   15087           0 :         blob.length = blob_length;
   15088             : 
   15089           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   15090           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   15091             :         }
   15092           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   15093           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   15094             :         }
   15095             : 
   15096           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   15097           0 :                 allow_remaining = true;
   15098             :         }
   15099             : 
   15100           0 :         return py_wbint_PamAuthCrap_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   15101             : }
   15102             : 
   15103           0 : static PyObject *py_wbint_PamAuthCrap_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   15104             : {
   15105           0 :         DATA_BLOB blob;
   15106           0 :         Py_ssize_t blob_length = 0;
   15107           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   15108           0 :         PyObject *bigendian_obj = NULL;
   15109           0 :         PyObject *ndr64_obj = NULL;
   15110           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   15111           0 :         PyObject *allow_remaining_obj = NULL;
   15112           0 :         bool allow_remaining = false;
   15113             : 
   15114           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   15115             :                 discard_const_p(char *, kwnames),
   15116             :                 &blob.data, &blob_length,
   15117             :                 &bigendian_obj,
   15118             :                 &ndr64_obj,
   15119             :                 &allow_remaining_obj)) {
   15120           0 :                 return NULL;
   15121             :         }
   15122           0 :         blob.length = blob_length;
   15123             : 
   15124           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   15125           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   15126             :         }
   15127           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   15128           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   15129             :         }
   15130             : 
   15131           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   15132           0 :                 allow_remaining = true;
   15133             :         }
   15134             : 
   15135           0 :         return py_wbint_PamAuthCrap_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   15136             : }
   15137             : 
   15138           0 : static PyObject *py_wbint_PamAuthCrap_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   15139             : {
   15140           0 :         const struct ndr_interface_call *call = NULL;
   15141           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   15142           0 :         PyObject *ret;
   15143           0 :         char *retstr;
   15144             : 
   15145           0 :         if (ndr_table_winbind.num_calls < 24) {
   15146           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuthCrap_ndr_print");
   15147           0 :                 return NULL;
   15148             :         }
   15149           0 :         call = &ndr_table_winbind.calls[23];
   15150             : 
   15151           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   15152           0 :         ret = PyUnicode_FromString(retstr);
   15153           0 :         TALLOC_FREE(retstr);
   15154             : 
   15155           0 :         return ret;
   15156             : }
   15157             : 
   15158           0 : static PyObject *py_wbint_PamAuthCrap_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   15159             : {
   15160           0 :         return py_wbint_PamAuthCrap_ndr_print(py_obj, "wbint_PamAuthCrap_in", NDR_IN);
   15161             : }
   15162             : 
   15163           0 : static PyObject *py_wbint_PamAuthCrap_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   15164             : {
   15165           0 :         return py_wbint_PamAuthCrap_ndr_print(py_obj, "wbint_PamAuthCrap_out", NDR_OUT);
   15166             : }
   15167             : 
   15168             : static PyMethodDef py_wbint_PamAuthCrap_methods[] = {
   15169             :         { "opnum", (PyCFunction)py_wbint_PamAuthCrap_ndr_opnum, METH_NOARGS|METH_CLASS,
   15170             :                 "winbind.wbint_PamAuthCrap.opnum() -> 23 (0x17) " },
   15171             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthCrap_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   15172             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   15173             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthCrap_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   15174             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   15175             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthCrap_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   15176             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   15177             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthCrap_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   15178             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   15179             :         { "__ndr_print_in__", (PyCFunction)py_wbint_PamAuthCrap_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   15180             :         { "__ndr_print_out__", (PyCFunction)py_wbint_PamAuthCrap_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   15181             :         { NULL, NULL, 0, NULL }
   15182             : };
   15183             : 
   15184             : 
   15185             : static PyTypeObject wbint_PamAuthCrap_Type = {
   15186             :         PyVarObject_HEAD_INIT(NULL, 0)
   15187             :         .tp_name = "winbind.wbint_PamAuthCrap",
   15188             :         .tp_getset = py_wbint_PamAuthCrap_getsetters,
   15189             :         .tp_methods = py_wbint_PamAuthCrap_methods,
   15190             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   15191             :         .tp_new = py_wbint_PamAuthCrap_new,
   15192             : };
   15193             : 
   15194           0 : static bool pack_py_wbint_PamAuthCrap_args_in(PyObject *args, PyObject *kwargs, struct wbint_PamAuthCrap *r)
   15195             : {
   15196           0 :         PyObject *py_client_name;
   15197           0 :         PyObject *py_client_pid;
   15198           0 :         PyObject *py_flags;
   15199           0 :         PyObject *py_user;
   15200           0 :         PyObject *py_domain;
   15201           0 :         PyObject *py_workstation;
   15202           0 :         PyObject *py_lm_resp;
   15203           0 :         PyObject *py_nt_resp;
   15204           0 :         PyObject *py_chal;
   15205           0 :         PyObject *py_logon_parameters;
   15206           0 :         PyObject *py_require_membership_of_sid;
   15207           0 :         const char *kwnames[] = {
   15208             :                 "client_name", "client_pid", "flags", "user", "domain", "workstation", "lm_resp", "nt_resp", "chal", "logon_parameters", "require_membership_of_sid", NULL
   15209             :         };
   15210             : 
   15211           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOOOO:wbint_PamAuthCrap", discard_const_p(char *, kwnames), &py_client_name, &py_client_pid, &py_flags, &py_user, &py_domain, &py_workstation, &py_lm_resp, &py_nt_resp, &py_chal, &py_logon_parameters, &py_require_membership_of_sid)) {
   15212           0 :                 return false;
   15213             :         }
   15214             : 
   15215           0 :         if (py_client_name == NULL) {
   15216           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_name");
   15217           0 :                 return false;
   15218             :         }
   15219           0 :         r->in.client_name = talloc_ptrtype(r, r->in.client_name);
   15220           0 :         if (r->in.client_name == NULL) {
   15221           0 :                 PyErr_NoMemory();
   15222           0 :                 return false;
   15223             :         }
   15224             :         {
   15225           0 :                 const char *test_str;
   15226           0 :                 const char *talloc_str;
   15227           0 :                 PyObject *unicode = NULL;
   15228           0 :                 if (PyUnicode_Check(py_client_name)) {
   15229           0 :                         unicode = PyUnicode_AsEncodedString(py_client_name, "utf-8", "ignore");
   15230           0 :                         if (unicode == NULL) {
   15231           0 :                                 PyErr_NoMemory();
   15232           0 :                                 return false;
   15233             :                         }
   15234           0 :                         test_str = PyBytes_AS_STRING(unicode);
   15235           0 :                 } else if (PyBytes_Check(py_client_name)) {
   15236           0 :                         test_str = PyBytes_AS_STRING(py_client_name);
   15237             :                 } else {
   15238           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client_name)->tp_name);
   15239           0 :                         return false;
   15240             :                 }
   15241           0 :                 talloc_str = talloc_strdup(r, test_str);
   15242           0 :                 if (unicode != NULL) {
   15243           0 :                         Py_DECREF(unicode);
   15244             :                 }
   15245           0 :                 if (talloc_str == NULL) {
   15246           0 :                         PyErr_NoMemory();
   15247           0 :                         return false;
   15248             :                 }
   15249           0 :                 r->in.client_name = talloc_str;
   15250             :         }
   15251           0 :         if (py_client_pid == NULL) {
   15252           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_pid");
   15253           0 :                 return false;
   15254             :         }
   15255             :         {
   15256           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.client_pid));
   15257           0 :                 if (PyLong_Check(py_client_pid)) {
   15258           0 :                         unsigned long long test_var;
   15259           0 :                         test_var = PyLong_AsUnsignedLongLong(py_client_pid);
   15260           0 :                         if (PyErr_Occurred() != NULL) {
   15261           0 :                                 return false;
   15262             :                         }
   15263           0 :                         if (test_var > uint_max) {
   15264           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15265             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15266           0 :                                 return false;
   15267             :                         }
   15268           0 :                         r->in.client_pid = test_var;
   15269             :                 } else {
   15270           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15271             :                           PyLong_Type.tp_name);
   15272           0 :                         return false;
   15273             :                 }
   15274             :         }
   15275           0 :         if (py_flags == NULL) {
   15276           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   15277           0 :                 return false;
   15278             :         }
   15279             :         {
   15280           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   15281           0 :                 if (PyLong_Check(py_flags)) {
   15282           0 :                         unsigned long long test_var;
   15283           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   15284           0 :                         if (PyErr_Occurred() != NULL) {
   15285           0 :                                 return false;
   15286             :                         }
   15287           0 :                         if (test_var > uint_max) {
   15288           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15289             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15290           0 :                                 return false;
   15291             :                         }
   15292           0 :                         r->in.flags = test_var;
   15293             :                 } else {
   15294           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15295             :                           PyLong_Type.tp_name);
   15296           0 :                         return false;
   15297             :                 }
   15298             :         }
   15299           0 :         if (py_user == NULL) {
   15300           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.user");
   15301           0 :                 return false;
   15302             :         }
   15303           0 :         r->in.user = talloc_ptrtype(r, r->in.user);
   15304           0 :         if (r->in.user == NULL) {
   15305           0 :                 PyErr_NoMemory();
   15306           0 :                 return false;
   15307             :         }
   15308             :         {
   15309           0 :                 const char *test_str;
   15310           0 :                 const char *talloc_str;
   15311           0 :                 PyObject *unicode = NULL;
   15312           0 :                 if (PyUnicode_Check(py_user)) {
   15313           0 :                         unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
   15314           0 :                         if (unicode == NULL) {
   15315           0 :                                 PyErr_NoMemory();
   15316           0 :                                 return false;
   15317             :                         }
   15318           0 :                         test_str = PyBytes_AS_STRING(unicode);
   15319           0 :                 } else if (PyBytes_Check(py_user)) {
   15320           0 :                         test_str = PyBytes_AS_STRING(py_user);
   15321             :                 } else {
   15322           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
   15323           0 :                         return false;
   15324             :                 }
   15325           0 :                 talloc_str = talloc_strdup(r, test_str);
   15326           0 :                 if (unicode != NULL) {
   15327           0 :                         Py_DECREF(unicode);
   15328             :                 }
   15329           0 :                 if (talloc_str == NULL) {
   15330           0 :                         PyErr_NoMemory();
   15331           0 :                         return false;
   15332             :                 }
   15333           0 :                 r->in.user = talloc_str;
   15334             :         }
   15335           0 :         if (py_domain == NULL) {
   15336           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain");
   15337           0 :                 return false;
   15338             :         }
   15339           0 :         r->in.domain = talloc_ptrtype(r, r->in.domain);
   15340           0 :         if (r->in.domain == NULL) {
   15341           0 :                 PyErr_NoMemory();
   15342           0 :                 return false;
   15343             :         }
   15344             :         {
   15345           0 :                 const char *test_str;
   15346           0 :                 const char *talloc_str;
   15347           0 :                 PyObject *unicode = NULL;
   15348           0 :                 if (PyUnicode_Check(py_domain)) {
   15349           0 :                         unicode = PyUnicode_AsEncodedString(py_domain, "utf-8", "ignore");
   15350           0 :                         if (unicode == NULL) {
   15351           0 :                                 PyErr_NoMemory();
   15352           0 :                                 return false;
   15353             :                         }
   15354           0 :                         test_str = PyBytes_AS_STRING(unicode);
   15355           0 :                 } else if (PyBytes_Check(py_domain)) {
   15356           0 :                         test_str = PyBytes_AS_STRING(py_domain);
   15357             :                 } else {
   15358           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain)->tp_name);
   15359           0 :                         return false;
   15360             :                 }
   15361           0 :                 talloc_str = talloc_strdup(r, test_str);
   15362           0 :                 if (unicode != NULL) {
   15363           0 :                         Py_DECREF(unicode);
   15364             :                 }
   15365           0 :                 if (talloc_str == NULL) {
   15366           0 :                         PyErr_NoMemory();
   15367           0 :                         return false;
   15368             :                 }
   15369           0 :                 r->in.domain = talloc_str;
   15370             :         }
   15371           0 :         if (py_workstation == NULL) {
   15372           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.workstation");
   15373           0 :                 return false;
   15374             :         }
   15375           0 :         r->in.workstation = talloc_ptrtype(r, r->in.workstation);
   15376           0 :         if (r->in.workstation == NULL) {
   15377           0 :                 PyErr_NoMemory();
   15378           0 :                 return false;
   15379             :         }
   15380             :         {
   15381           0 :                 const char *test_str;
   15382           0 :                 const char *talloc_str;
   15383           0 :                 PyObject *unicode = NULL;
   15384           0 :                 if (PyUnicode_Check(py_workstation)) {
   15385           0 :                         unicode = PyUnicode_AsEncodedString(py_workstation, "utf-8", "ignore");
   15386           0 :                         if (unicode == NULL) {
   15387           0 :                                 PyErr_NoMemory();
   15388           0 :                                 return false;
   15389             :                         }
   15390           0 :                         test_str = PyBytes_AS_STRING(unicode);
   15391           0 :                 } else if (PyBytes_Check(py_workstation)) {
   15392           0 :                         test_str = PyBytes_AS_STRING(py_workstation);
   15393             :                 } else {
   15394           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_workstation)->tp_name);
   15395           0 :                         return false;
   15396             :                 }
   15397           0 :                 talloc_str = talloc_strdup(r, test_str);
   15398           0 :                 if (unicode != NULL) {
   15399           0 :                         Py_DECREF(unicode);
   15400             :                 }
   15401           0 :                 if (talloc_str == NULL) {
   15402           0 :                         PyErr_NoMemory();
   15403           0 :                         return false;
   15404             :                 }
   15405           0 :                 r->in.workstation = talloc_str;
   15406             :         }
   15407           0 :         if (py_lm_resp == NULL) {
   15408           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.lm_resp");
   15409           0 :                 return false;
   15410             :         }
   15411           0 :         r->in.lm_resp = data_blob_talloc(r, PyBytes_AS_STRING(py_lm_resp), PyBytes_GET_SIZE(py_lm_resp));
   15412           0 :         if (py_nt_resp == NULL) {
   15413           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.nt_resp");
   15414           0 :                 return false;
   15415             :         }
   15416           0 :         r->in.nt_resp = data_blob_talloc(r, PyBytes_AS_STRING(py_nt_resp), PyBytes_GET_SIZE(py_nt_resp));
   15417           0 :         if (py_chal == NULL) {
   15418           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.chal");
   15419           0 :                 return false;
   15420             :         }
   15421           0 :         r->in.chal = data_blob_talloc(r, PyBytes_AS_STRING(py_chal), PyBytes_GET_SIZE(py_chal));
   15422           0 :         if (py_logon_parameters == NULL) {
   15423           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_parameters");
   15424           0 :                 return false;
   15425             :         }
   15426             :         {
   15427           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.logon_parameters));
   15428           0 :                 if (PyLong_Check(py_logon_parameters)) {
   15429           0 :                         unsigned long long test_var;
   15430           0 :                         test_var = PyLong_AsUnsignedLongLong(py_logon_parameters);
   15431           0 :                         if (PyErr_Occurred() != NULL) {
   15432           0 :                                 return false;
   15433             :                         }
   15434           0 :                         if (test_var > uint_max) {
   15435           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15436             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15437           0 :                                 return false;
   15438             :                         }
   15439           0 :                         r->in.logon_parameters = test_var;
   15440             :                 } else {
   15441           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15442             :                           PyLong_Type.tp_name);
   15443           0 :                         return false;
   15444             :                 }
   15445             :         }
   15446           0 :         if (py_require_membership_of_sid == NULL) {
   15447           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.require_membership_of_sid");
   15448           0 :                 return false;
   15449             :         }
   15450           0 :         r->in.require_membership_of_sid = talloc_ptrtype(r, r->in.require_membership_of_sid);
   15451           0 :         if (r->in.require_membership_of_sid == NULL) {
   15452           0 :                 PyErr_NoMemory();
   15453           0 :                 return false;
   15454             :         }
   15455           0 :         PY_CHECK_TYPE(&wbint_SidArray_Type, py_require_membership_of_sid, return false;);
   15456           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_require_membership_of_sid)) == NULL) {
   15457           0 :                 PyErr_NoMemory();
   15458           0 :                 return false;
   15459             :         }
   15460           0 :         r->in.require_membership_of_sid = (struct wbint_SidArray *)pytalloc_get_ptr(py_require_membership_of_sid);
   15461           0 :         return true;
   15462             : }
   15463             : 
   15464           0 : static PyObject *unpack_py_wbint_PamAuthCrap_args_out(struct wbint_PamAuthCrap *r)
   15465             : {
   15466           0 :         PyObject *result;
   15467           0 :         PyObject *py_authoritative;
   15468           0 :         PyObject *py_validation;
   15469           0 :         result = PyTuple_New(2);
   15470           0 :         py_authoritative = PyLong_FromLong((uint16_t)*r->out.authoritative);
   15471           0 :         PyTuple_SetItem(result, 0, py_authoritative);
   15472           0 :         py_validation = pytalloc_reference_ex(&wbint_PamAuthCrapValidation_Type, r->out.validation, r->out.validation);
   15473           0 :         PyTuple_SetItem(result, 1, py_validation);
   15474           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   15475           0 :                 PyErr_SetNTSTATUS(r->out.result);
   15476           0 :                 return NULL;
   15477             :         }
   15478             : 
   15479           0 :         return result;
   15480             : }
   15481             : 
   15482             : 
   15483           0 : static PyObject *py_wbint_PamLogOff_in_get_client_name(PyObject *obj, void *closure)
   15484             : {
   15485           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(obj);
   15486           0 :         PyObject *py_client_name;
   15487           0 :         if (object->in.client_name == NULL) {
   15488           0 :                 Py_RETURN_NONE;
   15489             :         }
   15490           0 :         if (object->in.client_name == NULL) {
   15491           0 :                 py_client_name = Py_None;
   15492           0 :                 Py_INCREF(py_client_name);
   15493             :         } else {
   15494           0 :                 py_client_name = PyUnicode_Decode(object->in.client_name, strlen(object->in.client_name), "utf-8", "ignore");
   15495             :         }
   15496           0 :         return py_client_name;
   15497             : }
   15498             : 
   15499           0 : static int py_wbint_PamLogOff_in_set_client_name(PyObject *py_obj, PyObject *value, void *closure)
   15500             : {
   15501           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(py_obj);
   15502           0 :         if (value == NULL) {
   15503           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_name");
   15504           0 :                 return -1;
   15505             :         }
   15506           0 :         object->in.client_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.client_name);
   15507           0 :         if (object->in.client_name == NULL) {
   15508           0 :                 PyErr_NoMemory();
   15509           0 :                 return -1;
   15510             :         }
   15511             :         {
   15512           0 :                 const char *test_str;
   15513           0 :                 const char *talloc_str;
   15514           0 :                 PyObject *unicode = NULL;
   15515           0 :                 if (PyUnicode_Check(value)) {
   15516           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   15517           0 :                         if (unicode == NULL) {
   15518           0 :                                 PyErr_NoMemory();
   15519           0 :                                 return -1;
   15520             :                         }
   15521           0 :                         test_str = PyBytes_AS_STRING(unicode);
   15522           0 :                 } else if (PyBytes_Check(value)) {
   15523           0 :                         test_str = PyBytes_AS_STRING(value);
   15524             :                 } else {
   15525           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   15526           0 :                         return -1;
   15527             :                 }
   15528           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   15529           0 :                 if (unicode != NULL) {
   15530           0 :                         Py_DECREF(unicode);
   15531             :                 }
   15532           0 :                 if (talloc_str == NULL) {
   15533           0 :                         PyErr_NoMemory();
   15534           0 :                         return -1;
   15535             :                 }
   15536           0 :                 object->in.client_name = talloc_str;
   15537             :         }
   15538           0 :         return 0;
   15539             : }
   15540             : 
   15541           0 : static PyObject *py_wbint_PamLogOff_in_get_client_pid(PyObject *obj, void *closure)
   15542             : {
   15543           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(obj);
   15544           0 :         PyObject *py_client_pid;
   15545           0 :         py_client_pid = PyLong_FromUnsignedLongLong(object->in.client_pid);
   15546           0 :         return py_client_pid;
   15547             : }
   15548             : 
   15549           0 : static int py_wbint_PamLogOff_in_set_client_pid(PyObject *py_obj, PyObject *value, void *closure)
   15550             : {
   15551           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(py_obj);
   15552           0 :         if (value == NULL) {
   15553           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_pid");
   15554           0 :                 return -1;
   15555             :         }
   15556             :         {
   15557           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.client_pid));
   15558           0 :                 if (PyLong_Check(value)) {
   15559           0 :                         unsigned long long test_var;
   15560           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15561           0 :                         if (PyErr_Occurred() != NULL) {
   15562           0 :                                 return -1;
   15563             :                         }
   15564           0 :                         if (test_var > uint_max) {
   15565           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15566             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15567           0 :                                 return -1;
   15568             :                         }
   15569           0 :                         object->in.client_pid = test_var;
   15570             :                 } else {
   15571           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15572             :                           PyLong_Type.tp_name);
   15573           0 :                         return -1;
   15574             :                 }
   15575             :         }
   15576           0 :         return 0;
   15577             : }
   15578             : 
   15579           0 : static PyObject *py_wbint_PamLogOff_in_get_flags(PyObject *obj, void *closure)
   15580             : {
   15581           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(obj);
   15582           0 :         PyObject *py_flags;
   15583           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   15584           0 :         return py_flags;
   15585             : }
   15586             : 
   15587           0 : static int py_wbint_PamLogOff_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   15588             : {
   15589           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(py_obj);
   15590           0 :         if (value == NULL) {
   15591           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   15592           0 :                 return -1;
   15593             :         }
   15594             :         {
   15595           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   15596           0 :                 if (PyLong_Check(value)) {
   15597           0 :                         unsigned long long test_var;
   15598           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15599           0 :                         if (PyErr_Occurred() != NULL) {
   15600           0 :                                 return -1;
   15601             :                         }
   15602           0 :                         if (test_var > uint_max) {
   15603           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15604             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15605           0 :                                 return -1;
   15606             :                         }
   15607           0 :                         object->in.flags = test_var;
   15608             :                 } else {
   15609           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15610             :                           PyLong_Type.tp_name);
   15611           0 :                         return -1;
   15612             :                 }
   15613             :         }
   15614           0 :         return 0;
   15615             : }
   15616             : 
   15617           0 : static PyObject *py_wbint_PamLogOff_in_get_user(PyObject *obj, void *closure)
   15618             : {
   15619           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(obj);
   15620           0 :         PyObject *py_user;
   15621           0 :         if (object->in.user == NULL) {
   15622           0 :                 Py_RETURN_NONE;
   15623             :         }
   15624           0 :         if (object->in.user == NULL) {
   15625           0 :                 py_user = Py_None;
   15626           0 :                 Py_INCREF(py_user);
   15627             :         } else {
   15628           0 :                 py_user = PyUnicode_Decode(object->in.user, strlen(object->in.user), "utf-8", "ignore");
   15629             :         }
   15630           0 :         return py_user;
   15631             : }
   15632             : 
   15633           0 : static int py_wbint_PamLogOff_in_set_user(PyObject *py_obj, PyObject *value, void *closure)
   15634             : {
   15635           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(py_obj);
   15636           0 :         if (value == NULL) {
   15637           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.user");
   15638           0 :                 return -1;
   15639             :         }
   15640           0 :         object->in.user = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.user);
   15641           0 :         if (object->in.user == NULL) {
   15642           0 :                 PyErr_NoMemory();
   15643           0 :                 return -1;
   15644             :         }
   15645             :         {
   15646           0 :                 const char *test_str;
   15647           0 :                 const char *talloc_str;
   15648           0 :                 PyObject *unicode = NULL;
   15649           0 :                 if (PyUnicode_Check(value)) {
   15650           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   15651           0 :                         if (unicode == NULL) {
   15652           0 :                                 PyErr_NoMemory();
   15653           0 :                                 return -1;
   15654             :                         }
   15655           0 :                         test_str = PyBytes_AS_STRING(unicode);
   15656           0 :                 } else if (PyBytes_Check(value)) {
   15657           0 :                         test_str = PyBytes_AS_STRING(value);
   15658             :                 } else {
   15659           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   15660           0 :                         return -1;
   15661             :                 }
   15662           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   15663           0 :                 if (unicode != NULL) {
   15664           0 :                         Py_DECREF(unicode);
   15665             :                 }
   15666           0 :                 if (talloc_str == NULL) {
   15667           0 :                         PyErr_NoMemory();
   15668           0 :                         return -1;
   15669             :                 }
   15670           0 :                 object->in.user = talloc_str;
   15671             :         }
   15672           0 :         return 0;
   15673             : }
   15674             : 
   15675           0 : static PyObject *py_wbint_PamLogOff_in_get_krb5ccname(PyObject *obj, void *closure)
   15676             : {
   15677           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(obj);
   15678           0 :         PyObject *py_krb5ccname;
   15679           0 :         if (object->in.krb5ccname == NULL) {
   15680           0 :                 Py_RETURN_NONE;
   15681             :         }
   15682           0 :         if (object->in.krb5ccname == NULL) {
   15683           0 :                 py_krb5ccname = Py_None;
   15684           0 :                 Py_INCREF(py_krb5ccname);
   15685             :         } else {
   15686           0 :                 py_krb5ccname = PyUnicode_Decode(object->in.krb5ccname, strlen(object->in.krb5ccname), "utf-8", "ignore");
   15687             :         }
   15688           0 :         return py_krb5ccname;
   15689             : }
   15690             : 
   15691           0 : static int py_wbint_PamLogOff_in_set_krb5ccname(PyObject *py_obj, PyObject *value, void *closure)
   15692             : {
   15693           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(py_obj);
   15694           0 :         if (value == NULL) {
   15695           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.krb5ccname");
   15696           0 :                 return -1;
   15697             :         }
   15698           0 :         object->in.krb5ccname = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.krb5ccname);
   15699           0 :         if (object->in.krb5ccname == NULL) {
   15700           0 :                 PyErr_NoMemory();
   15701           0 :                 return -1;
   15702             :         }
   15703             :         {
   15704           0 :                 const char *test_str;
   15705           0 :                 const char *talloc_str;
   15706           0 :                 PyObject *unicode = NULL;
   15707           0 :                 if (PyUnicode_Check(value)) {
   15708           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   15709           0 :                         if (unicode == NULL) {
   15710           0 :                                 PyErr_NoMemory();
   15711           0 :                                 return -1;
   15712             :                         }
   15713           0 :                         test_str = PyBytes_AS_STRING(unicode);
   15714           0 :                 } else if (PyBytes_Check(value)) {
   15715           0 :                         test_str = PyBytes_AS_STRING(value);
   15716             :                 } else {
   15717           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   15718           0 :                         return -1;
   15719             :                 }
   15720           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   15721           0 :                 if (unicode != NULL) {
   15722           0 :                         Py_DECREF(unicode);
   15723             :                 }
   15724           0 :                 if (talloc_str == NULL) {
   15725           0 :                         PyErr_NoMemory();
   15726           0 :                         return -1;
   15727             :                 }
   15728           0 :                 object->in.krb5ccname = talloc_str;
   15729             :         }
   15730           0 :         return 0;
   15731             : }
   15732             : 
   15733           0 : static PyObject *py_wbint_PamLogOff_in_get_uid(PyObject *obj, void *closure)
   15734             : {
   15735           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(obj);
   15736           0 :         PyObject *py_uid;
   15737           0 :         py_uid = PyLong_FromUnsignedLongLong(object->in.uid);
   15738           0 :         return py_uid;
   15739             : }
   15740             : 
   15741           0 : static int py_wbint_PamLogOff_in_set_uid(PyObject *py_obj, PyObject *value, void *closure)
   15742             : {
   15743           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(py_obj);
   15744           0 :         if (value == NULL) {
   15745           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.uid");
   15746           0 :                 return -1;
   15747             :         }
   15748             :         {
   15749           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.uid));
   15750           0 :                 if (PyLong_Check(value)) {
   15751           0 :                         unsigned long long test_var;
   15752           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15753           0 :                         if (PyErr_Occurred() != NULL) {
   15754           0 :                                 return -1;
   15755             :                         }
   15756           0 :                         if (test_var > uint_max) {
   15757           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15758             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15759           0 :                                 return -1;
   15760             :                         }
   15761           0 :                         object->in.uid = test_var;
   15762             :                 } else {
   15763           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15764             :                           PyLong_Type.tp_name);
   15765           0 :                         return -1;
   15766             :                 }
   15767             :         }
   15768           0 :         return 0;
   15769             : }
   15770             : 
   15771           0 : static PyObject *py_wbint_PamLogOff_get_result(PyObject *obj, void *closure)
   15772             : {
   15773           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(obj);
   15774           0 :         PyObject *py_result;
   15775           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   15776           0 :         return py_result;
   15777             : }
   15778             : 
   15779           0 : static int py_wbint_PamLogOff_set_result(PyObject *py_obj, PyObject *value, void *closure)
   15780             : {
   15781           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(py_obj);
   15782           0 :         if (value == NULL) {
   15783           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   15784           0 :                 return -1;
   15785             :         }
   15786           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   15787           0 :         return 0;
   15788             : }
   15789             : 
   15790             : static PyGetSetDef py_wbint_PamLogOff_getsetters[] = {
   15791             :         {
   15792             :                 .name = discard_const_p(char, "in_client_name"),
   15793             :                 .get = py_wbint_PamLogOff_in_get_client_name,
   15794             :                 .set = py_wbint_PamLogOff_in_set_client_name,
   15795             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   15796             :         },
   15797             :         {
   15798             :                 .name = discard_const_p(char, "in_client_pid"),
   15799             :                 .get = py_wbint_PamLogOff_in_get_client_pid,
   15800             :                 .set = py_wbint_PamLogOff_in_set_client_pid,
   15801             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   15802             :         },
   15803             :         {
   15804             :                 .name = discard_const_p(char, "in_flags"),
   15805             :                 .get = py_wbint_PamLogOff_in_get_flags,
   15806             :                 .set = py_wbint_PamLogOff_in_set_flags,
   15807             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15808             :         },
   15809             :         {
   15810             :                 .name = discard_const_p(char, "in_user"),
   15811             :                 .get = py_wbint_PamLogOff_in_get_user,
   15812             :                 .set = py_wbint_PamLogOff_in_set_user,
   15813             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   15814             :         },
   15815             :         {
   15816             :                 .name = discard_const_p(char, "in_krb5ccname"),
   15817             :                 .get = py_wbint_PamLogOff_in_get_krb5ccname,
   15818             :                 .set = py_wbint_PamLogOff_in_set_krb5ccname,
   15819             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   15820             :         },
   15821             :         {
   15822             :                 .name = discard_const_p(char, "in_uid"),
   15823             :                 .get = py_wbint_PamLogOff_in_get_uid,
   15824             :                 .set = py_wbint_PamLogOff_in_set_uid,
   15825             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   15826             :         },
   15827             :         {
   15828             :                 .name = discard_const_p(char, "result"),
   15829             :                 .get = py_wbint_PamLogOff_get_result,
   15830             :                 .set = py_wbint_PamLogOff_set_result,
   15831             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   15832             :         },
   15833             :         { .name = NULL }
   15834             : };
   15835             : 
   15836           0 : static PyObject *py_wbint_PamLogOff_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15837             : {
   15838           0 :         PyObject *self = pytalloc_new(struct wbint_PamLogOff, type);
   15839           0 :         return self;
   15840             : }
   15841             : 
   15842           0 : static PyObject *py_wbint_PamLogOff_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   15843             : {
   15844             : 
   15845             : 
   15846           0 :         return PyLong_FromLong(24);
   15847             : }
   15848             : 
   15849           0 : static PyObject *py_wbint_PamLogOff_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   15850             : {
   15851           0 :         const struct ndr_interface_call *call = NULL;
   15852           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(py_obj);
   15853           0 :         PyObject *ret = NULL;
   15854           0 :         struct ndr_push *push = NULL;
   15855           0 :         DATA_BLOB blob;
   15856           0 :         enum ndr_err_code err;
   15857             : 
   15858           0 :         if (ndr_table_winbind.num_calls < 25) {
   15859           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamLogOff_ndr_pack");
   15860           0 :                 return NULL;
   15861             :         }
   15862           0 :         call = &ndr_table_winbind.calls[24];
   15863             : 
   15864           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   15865           0 :         if (push == NULL) {
   15866           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   15867           0 :                 return NULL;
   15868             :         }
   15869             : 
   15870           0 :         push->flags |= ndr_push_flags;
   15871             : 
   15872           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   15873           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   15874           0 :                 TALLOC_FREE(push);
   15875           0 :                 PyErr_SetNdrError(err);
   15876           0 :                 return NULL;
   15877             :         }
   15878           0 :         blob = ndr_push_blob(push);
   15879           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   15880           0 :         TALLOC_FREE(push);
   15881           0 :         return ret;
   15882             : }
   15883             : 
   15884           0 : static PyObject *py_wbint_PamLogOff_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   15885             : {
   15886           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   15887           0 :         PyObject *bigendian_obj = NULL;
   15888           0 :         PyObject *ndr64_obj = NULL;
   15889           0 :         libndr_flags ndr_push_flags = 0;
   15890             : 
   15891           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   15892             :                 discard_const_p(char *, kwnames),
   15893             :                 &bigendian_obj,
   15894             :                 &ndr64_obj)) {
   15895           0 :                 return NULL;
   15896             :         }
   15897             : 
   15898           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   15899           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   15900             :         }
   15901           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   15902           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   15903             :         }
   15904             : 
   15905           0 :         return py_wbint_PamLogOff_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   15906             : }
   15907             : 
   15908           0 : static PyObject *py_wbint_PamLogOff_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   15909             : {
   15910           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   15911           0 :         PyObject *bigendian_obj = NULL;
   15912           0 :         PyObject *ndr64_obj = NULL;
   15913           0 :         libndr_flags ndr_push_flags = 0;
   15914             : 
   15915           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   15916             :                 discard_const_p(char *, kwnames),
   15917             :                 &bigendian_obj,
   15918             :                 &ndr64_obj)) {
   15919           0 :                 return NULL;
   15920             :         }
   15921             : 
   15922           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   15923           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   15924             :         }
   15925           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   15926           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   15927             :         }
   15928             : 
   15929           0 :         return py_wbint_PamLogOff_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   15930             : }
   15931             : 
   15932           0 : static PyObject *py_wbint_PamLogOff_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   15933             : {
   15934           0 :         const struct ndr_interface_call *call = NULL;
   15935           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(py_obj);
   15936           0 :         struct ndr_pull *pull = NULL;
   15937           0 :         enum ndr_err_code err;
   15938             : 
   15939           0 :         if (ndr_table_winbind.num_calls < 25) {
   15940           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamLogOff_ndr_unpack");
   15941           0 :                 return NULL;
   15942             :         }
   15943           0 :         call = &ndr_table_winbind.calls[24];
   15944             : 
   15945           0 :         pull = ndr_pull_init_blob(blob, object);
   15946           0 :         if (pull == NULL) {
   15947           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   15948           0 :                 return NULL;
   15949             :         }
   15950             : 
   15951           0 :         pull->flags |= ndr_pull_flags;
   15952             : 
   15953           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   15954           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   15955           0 :                 TALLOC_FREE(pull);
   15956           0 :                 PyErr_SetNdrError(err);
   15957           0 :                 return NULL;
   15958             :         }
   15959           0 :         if (!allow_remaining) {
   15960           0 :                 uint32_t highest_ofs;
   15961             : 
   15962           0 :                 if (pull->offset > pull->relative_highest_offset) {
   15963           0 :                         highest_ofs = pull->offset;
   15964             :                 } else {
   15965           0 :                         highest_ofs = pull->relative_highest_offset;
   15966             :                 }
   15967           0 :                 if (highest_ofs < pull->data_size) {
   15968           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   15969             :                                 "not all bytes consumed ofs[%u] size[%u]",
   15970             :                                 highest_ofs, pull->data_size);
   15971           0 :                         TALLOC_FREE(pull);
   15972           0 :                         PyErr_SetNdrError(err);
   15973           0 :                         return NULL;
   15974             :                 }
   15975             :         }
   15976             : 
   15977           0 :         TALLOC_FREE(pull);
   15978           0 :         Py_RETURN_NONE;
   15979             : }
   15980             : 
   15981           0 : static PyObject *py_wbint_PamLogOff_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   15982             : {
   15983           0 :         DATA_BLOB blob;
   15984           0 :         Py_ssize_t blob_length = 0;
   15985           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   15986           0 :         PyObject *bigendian_obj = NULL;
   15987           0 :         PyObject *ndr64_obj = NULL;
   15988           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   15989           0 :         PyObject *allow_remaining_obj = NULL;
   15990           0 :         bool allow_remaining = false;
   15991             : 
   15992           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   15993             :                 discard_const_p(char *, kwnames),
   15994             :                 &blob.data, &blob_length,
   15995             :                 &bigendian_obj,
   15996             :                 &ndr64_obj,
   15997             :                 &allow_remaining_obj)) {
   15998           0 :                 return NULL;
   15999             :         }
   16000           0 :         blob.length = blob_length;
   16001             : 
   16002           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   16003           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   16004             :         }
   16005           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   16006           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   16007             :         }
   16008             : 
   16009           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   16010           0 :                 allow_remaining = true;
   16011             :         }
   16012             : 
   16013           0 :         return py_wbint_PamLogOff_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   16014             : }
   16015             : 
   16016           0 : static PyObject *py_wbint_PamLogOff_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   16017             : {
   16018           0 :         DATA_BLOB blob;
   16019           0 :         Py_ssize_t blob_length = 0;
   16020           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   16021           0 :         PyObject *bigendian_obj = NULL;
   16022           0 :         PyObject *ndr64_obj = NULL;
   16023           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   16024           0 :         PyObject *allow_remaining_obj = NULL;
   16025           0 :         bool allow_remaining = false;
   16026             : 
   16027           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   16028             :                 discard_const_p(char *, kwnames),
   16029             :                 &blob.data, &blob_length,
   16030             :                 &bigendian_obj,
   16031             :                 &ndr64_obj,
   16032             :                 &allow_remaining_obj)) {
   16033           0 :                 return NULL;
   16034             :         }
   16035           0 :         blob.length = blob_length;
   16036             : 
   16037           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   16038           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   16039             :         }
   16040           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   16041           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   16042             :         }
   16043             : 
   16044           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   16045           0 :                 allow_remaining = true;
   16046             :         }
   16047             : 
   16048           0 :         return py_wbint_PamLogOff_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   16049             : }
   16050             : 
   16051           0 : static PyObject *py_wbint_PamLogOff_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   16052             : {
   16053           0 :         const struct ndr_interface_call *call = NULL;
   16054           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(py_obj);
   16055           0 :         PyObject *ret;
   16056           0 :         char *retstr;
   16057             : 
   16058           0 :         if (ndr_table_winbind.num_calls < 25) {
   16059           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamLogOff_ndr_print");
   16060           0 :                 return NULL;
   16061             :         }
   16062           0 :         call = &ndr_table_winbind.calls[24];
   16063             : 
   16064           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   16065           0 :         ret = PyUnicode_FromString(retstr);
   16066           0 :         TALLOC_FREE(retstr);
   16067             : 
   16068           0 :         return ret;
   16069             : }
   16070             : 
   16071           0 : static PyObject *py_wbint_PamLogOff_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   16072             : {
   16073           0 :         return py_wbint_PamLogOff_ndr_print(py_obj, "wbint_PamLogOff_in", NDR_IN);
   16074             : }
   16075             : 
   16076           0 : static PyObject *py_wbint_PamLogOff_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   16077             : {
   16078           0 :         return py_wbint_PamLogOff_ndr_print(py_obj, "wbint_PamLogOff_out", NDR_OUT);
   16079             : }
   16080             : 
   16081             : static PyMethodDef py_wbint_PamLogOff_methods[] = {
   16082             :         { "opnum", (PyCFunction)py_wbint_PamLogOff_ndr_opnum, METH_NOARGS|METH_CLASS,
   16083             :                 "winbind.wbint_PamLogOff.opnum() -> 24 (0x18) " },
   16084             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamLogOff_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   16085             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   16086             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamLogOff_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   16087             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   16088             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamLogOff_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   16089             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   16090             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamLogOff_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   16091             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   16092             :         { "__ndr_print_in__", (PyCFunction)py_wbint_PamLogOff_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   16093             :         { "__ndr_print_out__", (PyCFunction)py_wbint_PamLogOff_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   16094             :         { NULL, NULL, 0, NULL }
   16095             : };
   16096             : 
   16097             : 
   16098             : static PyTypeObject wbint_PamLogOff_Type = {
   16099             :         PyVarObject_HEAD_INIT(NULL, 0)
   16100             :         .tp_name = "winbind.wbint_PamLogOff",
   16101             :         .tp_getset = py_wbint_PamLogOff_getsetters,
   16102             :         .tp_methods = py_wbint_PamLogOff_methods,
   16103             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16104             :         .tp_new = py_wbint_PamLogOff_new,
   16105             : };
   16106             : 
   16107           0 : static bool pack_py_wbint_PamLogOff_args_in(PyObject *args, PyObject *kwargs, struct wbint_PamLogOff *r)
   16108             : {
   16109           0 :         PyObject *py_client_name;
   16110           0 :         PyObject *py_client_pid;
   16111           0 :         PyObject *py_flags;
   16112           0 :         PyObject *py_user;
   16113           0 :         PyObject *py_krb5ccname;
   16114           0 :         PyObject *py_uid;
   16115           0 :         const char *kwnames[] = {
   16116             :                 "client_name", "client_pid", "flags", "user", "krb5ccname", "uid", NULL
   16117             :         };
   16118             : 
   16119           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:wbint_PamLogOff", discard_const_p(char *, kwnames), &py_client_name, &py_client_pid, &py_flags, &py_user, &py_krb5ccname, &py_uid)) {
   16120           0 :                 return false;
   16121             :         }
   16122             : 
   16123           0 :         if (py_client_name == NULL) {
   16124           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_name");
   16125           0 :                 return false;
   16126             :         }
   16127           0 :         r->in.client_name = talloc_ptrtype(r, r->in.client_name);
   16128           0 :         if (r->in.client_name == NULL) {
   16129           0 :                 PyErr_NoMemory();
   16130           0 :                 return false;
   16131             :         }
   16132             :         {
   16133           0 :                 const char *test_str;
   16134           0 :                 const char *talloc_str;
   16135           0 :                 PyObject *unicode = NULL;
   16136           0 :                 if (PyUnicode_Check(py_client_name)) {
   16137           0 :                         unicode = PyUnicode_AsEncodedString(py_client_name, "utf-8", "ignore");
   16138           0 :                         if (unicode == NULL) {
   16139           0 :                                 PyErr_NoMemory();
   16140           0 :                                 return false;
   16141             :                         }
   16142           0 :                         test_str = PyBytes_AS_STRING(unicode);
   16143           0 :                 } else if (PyBytes_Check(py_client_name)) {
   16144           0 :                         test_str = PyBytes_AS_STRING(py_client_name);
   16145             :                 } else {
   16146           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client_name)->tp_name);
   16147           0 :                         return false;
   16148             :                 }
   16149           0 :                 talloc_str = talloc_strdup(r, test_str);
   16150           0 :                 if (unicode != NULL) {
   16151           0 :                         Py_DECREF(unicode);
   16152             :                 }
   16153           0 :                 if (talloc_str == NULL) {
   16154           0 :                         PyErr_NoMemory();
   16155           0 :                         return false;
   16156             :                 }
   16157           0 :                 r->in.client_name = talloc_str;
   16158             :         }
   16159           0 :         if (py_client_pid == NULL) {
   16160           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_pid");
   16161           0 :                 return false;
   16162             :         }
   16163             :         {
   16164           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.client_pid));
   16165           0 :                 if (PyLong_Check(py_client_pid)) {
   16166           0 :                         unsigned long long test_var;
   16167           0 :                         test_var = PyLong_AsUnsignedLongLong(py_client_pid);
   16168           0 :                         if (PyErr_Occurred() != NULL) {
   16169           0 :                                 return false;
   16170             :                         }
   16171           0 :                         if (test_var > uint_max) {
   16172           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16173             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16174           0 :                                 return false;
   16175             :                         }
   16176           0 :                         r->in.client_pid = test_var;
   16177             :                 } else {
   16178           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16179             :                           PyLong_Type.tp_name);
   16180           0 :                         return false;
   16181             :                 }
   16182             :         }
   16183           0 :         if (py_flags == NULL) {
   16184           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   16185           0 :                 return false;
   16186             :         }
   16187             :         {
   16188           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   16189           0 :                 if (PyLong_Check(py_flags)) {
   16190           0 :                         unsigned long long test_var;
   16191           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   16192           0 :                         if (PyErr_Occurred() != NULL) {
   16193           0 :                                 return false;
   16194             :                         }
   16195           0 :                         if (test_var > uint_max) {
   16196           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16197             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16198           0 :                                 return false;
   16199             :                         }
   16200           0 :                         r->in.flags = test_var;
   16201             :                 } else {
   16202           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16203             :                           PyLong_Type.tp_name);
   16204           0 :                         return false;
   16205             :                 }
   16206             :         }
   16207           0 :         if (py_user == NULL) {
   16208           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.user");
   16209           0 :                 return false;
   16210             :         }
   16211           0 :         r->in.user = talloc_ptrtype(r, r->in.user);
   16212           0 :         if (r->in.user == NULL) {
   16213           0 :                 PyErr_NoMemory();
   16214           0 :                 return false;
   16215             :         }
   16216             :         {
   16217           0 :                 const char *test_str;
   16218           0 :                 const char *talloc_str;
   16219           0 :                 PyObject *unicode = NULL;
   16220           0 :                 if (PyUnicode_Check(py_user)) {
   16221           0 :                         unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
   16222           0 :                         if (unicode == NULL) {
   16223           0 :                                 PyErr_NoMemory();
   16224           0 :                                 return false;
   16225             :                         }
   16226           0 :                         test_str = PyBytes_AS_STRING(unicode);
   16227           0 :                 } else if (PyBytes_Check(py_user)) {
   16228           0 :                         test_str = PyBytes_AS_STRING(py_user);
   16229             :                 } else {
   16230           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
   16231           0 :                         return false;
   16232             :                 }
   16233           0 :                 talloc_str = talloc_strdup(r, test_str);
   16234           0 :                 if (unicode != NULL) {
   16235           0 :                         Py_DECREF(unicode);
   16236             :                 }
   16237           0 :                 if (talloc_str == NULL) {
   16238           0 :                         PyErr_NoMemory();
   16239           0 :                         return false;
   16240             :                 }
   16241           0 :                 r->in.user = talloc_str;
   16242             :         }
   16243           0 :         if (py_krb5ccname == NULL) {
   16244           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.krb5ccname");
   16245           0 :                 return false;
   16246             :         }
   16247           0 :         r->in.krb5ccname = talloc_ptrtype(r, r->in.krb5ccname);
   16248           0 :         if (r->in.krb5ccname == NULL) {
   16249           0 :                 PyErr_NoMemory();
   16250           0 :                 return false;
   16251             :         }
   16252             :         {
   16253           0 :                 const char *test_str;
   16254           0 :                 const char *talloc_str;
   16255           0 :                 PyObject *unicode = NULL;
   16256           0 :                 if (PyUnicode_Check(py_krb5ccname)) {
   16257           0 :                         unicode = PyUnicode_AsEncodedString(py_krb5ccname, "utf-8", "ignore");
   16258           0 :                         if (unicode == NULL) {
   16259           0 :                                 PyErr_NoMemory();
   16260           0 :                                 return false;
   16261             :                         }
   16262           0 :                         test_str = PyBytes_AS_STRING(unicode);
   16263           0 :                 } else if (PyBytes_Check(py_krb5ccname)) {
   16264           0 :                         test_str = PyBytes_AS_STRING(py_krb5ccname);
   16265             :                 } else {
   16266           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_krb5ccname)->tp_name);
   16267           0 :                         return false;
   16268             :                 }
   16269           0 :                 talloc_str = talloc_strdup(r, test_str);
   16270           0 :                 if (unicode != NULL) {
   16271           0 :                         Py_DECREF(unicode);
   16272             :                 }
   16273           0 :                 if (talloc_str == NULL) {
   16274           0 :                         PyErr_NoMemory();
   16275           0 :                         return false;
   16276             :                 }
   16277           0 :                 r->in.krb5ccname = talloc_str;
   16278             :         }
   16279           0 :         if (py_uid == NULL) {
   16280           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.uid");
   16281           0 :                 return false;
   16282             :         }
   16283             :         {
   16284           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.uid));
   16285           0 :                 if (PyLong_Check(py_uid)) {
   16286           0 :                         unsigned long long test_var;
   16287           0 :                         test_var = PyLong_AsUnsignedLongLong(py_uid);
   16288           0 :                         if (PyErr_Occurred() != NULL) {
   16289           0 :                                 return false;
   16290             :                         }
   16291           0 :                         if (test_var > uint_max) {
   16292           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16293             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16294           0 :                                 return false;
   16295             :                         }
   16296           0 :                         r->in.uid = test_var;
   16297             :                 } else {
   16298           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16299             :                           PyLong_Type.tp_name);
   16300           0 :                         return false;
   16301             :                 }
   16302             :         }
   16303           0 :         return true;
   16304             : }
   16305             : 
   16306           0 : static PyObject *unpack_py_wbint_PamLogOff_args_out(struct wbint_PamLogOff *r)
   16307             : {
   16308           0 :         PyObject *result;
   16309           0 :         result = Py_None;
   16310           0 :         Py_INCREF(result);
   16311           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   16312           0 :                 PyErr_SetNTSTATUS(r->out.result);
   16313           0 :                 return NULL;
   16314             :         }
   16315             : 
   16316           0 :         return result;
   16317             : }
   16318             : 
   16319             : 
   16320           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_in_get_client_name(PyObject *obj, void *closure)
   16321             : {
   16322           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(obj);
   16323           0 :         PyObject *py_client_name;
   16324           0 :         if (object->in.client_name == NULL) {
   16325           0 :                 Py_RETURN_NONE;
   16326             :         }
   16327           0 :         if (object->in.client_name == NULL) {
   16328           0 :                 py_client_name = Py_None;
   16329           0 :                 Py_INCREF(py_client_name);
   16330             :         } else {
   16331           0 :                 py_client_name = PyUnicode_Decode(object->in.client_name, strlen(object->in.client_name), "utf-8", "ignore");
   16332             :         }
   16333           0 :         return py_client_name;
   16334             : }
   16335             : 
   16336           0 : static int py_wbint_PamAuthCrapChangePassword_in_set_client_name(PyObject *py_obj, PyObject *value, void *closure)
   16337             : {
   16338           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   16339           0 :         if (value == NULL) {
   16340           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_name");
   16341           0 :                 return -1;
   16342             :         }
   16343           0 :         object->in.client_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.client_name);
   16344           0 :         if (object->in.client_name == NULL) {
   16345           0 :                 PyErr_NoMemory();
   16346           0 :                 return -1;
   16347             :         }
   16348             :         {
   16349           0 :                 const char *test_str;
   16350           0 :                 const char *talloc_str;
   16351           0 :                 PyObject *unicode = NULL;
   16352           0 :                 if (PyUnicode_Check(value)) {
   16353           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   16354           0 :                         if (unicode == NULL) {
   16355           0 :                                 PyErr_NoMemory();
   16356           0 :                                 return -1;
   16357             :                         }
   16358           0 :                         test_str = PyBytes_AS_STRING(unicode);
   16359           0 :                 } else if (PyBytes_Check(value)) {
   16360           0 :                         test_str = PyBytes_AS_STRING(value);
   16361             :                 } else {
   16362           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   16363           0 :                         return -1;
   16364             :                 }
   16365           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   16366           0 :                 if (unicode != NULL) {
   16367           0 :                         Py_DECREF(unicode);
   16368             :                 }
   16369           0 :                 if (talloc_str == NULL) {
   16370           0 :                         PyErr_NoMemory();
   16371           0 :                         return -1;
   16372             :                 }
   16373           0 :                 object->in.client_name = talloc_str;
   16374             :         }
   16375           0 :         return 0;
   16376             : }
   16377             : 
   16378           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_in_get_client_pid(PyObject *obj, void *closure)
   16379             : {
   16380           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(obj);
   16381           0 :         PyObject *py_client_pid;
   16382           0 :         py_client_pid = PyLong_FromUnsignedLongLong(object->in.client_pid);
   16383           0 :         return py_client_pid;
   16384             : }
   16385             : 
   16386           0 : static int py_wbint_PamAuthCrapChangePassword_in_set_client_pid(PyObject *py_obj, PyObject *value, void *closure)
   16387             : {
   16388           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   16389           0 :         if (value == NULL) {
   16390           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_pid");
   16391           0 :                 return -1;
   16392             :         }
   16393             :         {
   16394           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.client_pid));
   16395           0 :                 if (PyLong_Check(value)) {
   16396           0 :                         unsigned long long test_var;
   16397           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16398           0 :                         if (PyErr_Occurred() != NULL) {
   16399           0 :                                 return -1;
   16400             :                         }
   16401           0 :                         if (test_var > uint_max) {
   16402           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16403             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16404           0 :                                 return -1;
   16405             :                         }
   16406           0 :                         object->in.client_pid = test_var;
   16407             :                 } else {
   16408           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16409             :                           PyLong_Type.tp_name);
   16410           0 :                         return -1;
   16411             :                 }
   16412             :         }
   16413           0 :         return 0;
   16414             : }
   16415             : 
   16416           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_in_get_user(PyObject *obj, void *closure)
   16417             : {
   16418           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(obj);
   16419           0 :         PyObject *py_user;
   16420           0 :         if (object->in.user == NULL) {
   16421           0 :                 Py_RETURN_NONE;
   16422             :         }
   16423           0 :         if (object->in.user == NULL) {
   16424           0 :                 py_user = Py_None;
   16425           0 :                 Py_INCREF(py_user);
   16426             :         } else {
   16427           0 :                 py_user = PyUnicode_Decode(object->in.user, strlen(object->in.user), "utf-8", "ignore");
   16428             :         }
   16429           0 :         return py_user;
   16430             : }
   16431             : 
   16432           0 : static int py_wbint_PamAuthCrapChangePassword_in_set_user(PyObject *py_obj, PyObject *value, void *closure)
   16433             : {
   16434           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   16435           0 :         if (value == NULL) {
   16436           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.user");
   16437           0 :                 return -1;
   16438             :         }
   16439           0 :         object->in.user = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.user);
   16440           0 :         if (object->in.user == NULL) {
   16441           0 :                 PyErr_NoMemory();
   16442           0 :                 return -1;
   16443             :         }
   16444             :         {
   16445           0 :                 const char *test_str;
   16446           0 :                 const char *talloc_str;
   16447           0 :                 PyObject *unicode = NULL;
   16448           0 :                 if (PyUnicode_Check(value)) {
   16449           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   16450           0 :                         if (unicode == NULL) {
   16451           0 :                                 PyErr_NoMemory();
   16452           0 :                                 return -1;
   16453             :                         }
   16454           0 :                         test_str = PyBytes_AS_STRING(unicode);
   16455           0 :                 } else if (PyBytes_Check(value)) {
   16456           0 :                         test_str = PyBytes_AS_STRING(value);
   16457             :                 } else {
   16458           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   16459           0 :                         return -1;
   16460             :                 }
   16461           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   16462           0 :                 if (unicode != NULL) {
   16463           0 :                         Py_DECREF(unicode);
   16464             :                 }
   16465           0 :                 if (talloc_str == NULL) {
   16466           0 :                         PyErr_NoMemory();
   16467           0 :                         return -1;
   16468             :                 }
   16469           0 :                 object->in.user = talloc_str;
   16470             :         }
   16471           0 :         return 0;
   16472             : }
   16473             : 
   16474           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_in_get_domain(PyObject *obj, void *closure)
   16475             : {
   16476           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(obj);
   16477           0 :         PyObject *py_domain;
   16478           0 :         if (object->in.domain == NULL) {
   16479           0 :                 Py_RETURN_NONE;
   16480             :         }
   16481           0 :         if (object->in.domain == NULL) {
   16482           0 :                 py_domain = Py_None;
   16483           0 :                 Py_INCREF(py_domain);
   16484             :         } else {
   16485           0 :                 py_domain = PyUnicode_Decode(object->in.domain, strlen(object->in.domain), "utf-8", "ignore");
   16486             :         }
   16487           0 :         return py_domain;
   16488             : }
   16489             : 
   16490           0 : static int py_wbint_PamAuthCrapChangePassword_in_set_domain(PyObject *py_obj, PyObject *value, void *closure)
   16491             : {
   16492           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   16493           0 :         if (value == NULL) {
   16494           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain");
   16495           0 :                 return -1;
   16496             :         }
   16497           0 :         object->in.domain = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.domain);
   16498           0 :         if (object->in.domain == NULL) {
   16499           0 :                 PyErr_NoMemory();
   16500           0 :                 return -1;
   16501             :         }
   16502             :         {
   16503           0 :                 const char *test_str;
   16504           0 :                 const char *talloc_str;
   16505           0 :                 PyObject *unicode = NULL;
   16506           0 :                 if (PyUnicode_Check(value)) {
   16507           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   16508           0 :                         if (unicode == NULL) {
   16509           0 :                                 PyErr_NoMemory();
   16510           0 :                                 return -1;
   16511             :                         }
   16512           0 :                         test_str = PyBytes_AS_STRING(unicode);
   16513           0 :                 } else if (PyBytes_Check(value)) {
   16514           0 :                         test_str = PyBytes_AS_STRING(value);
   16515             :                 } else {
   16516           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   16517           0 :                         return -1;
   16518             :                 }
   16519           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   16520           0 :                 if (unicode != NULL) {
   16521           0 :                         Py_DECREF(unicode);
   16522             :                 }
   16523           0 :                 if (talloc_str == NULL) {
   16524           0 :                         PyErr_NoMemory();
   16525           0 :                         return -1;
   16526             :                 }
   16527           0 :                 object->in.domain = talloc_str;
   16528             :         }
   16529           0 :         return 0;
   16530             : }
   16531             : 
   16532           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_in_get_new_nt_pswd(PyObject *obj, void *closure)
   16533             : {
   16534           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(obj);
   16535           0 :         PyObject *py_new_nt_pswd;
   16536           0 :         py_new_nt_pswd = PyBytes_FromStringAndSize((char *)(object->in.new_nt_pswd).data, (object->in.new_nt_pswd).length);
   16537           0 :         return py_new_nt_pswd;
   16538             : }
   16539             : 
   16540           0 : static int py_wbint_PamAuthCrapChangePassword_in_set_new_nt_pswd(PyObject *py_obj, PyObject *value, void *closure)
   16541             : {
   16542           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   16543           0 :         if (value == NULL) {
   16544           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.new_nt_pswd");
   16545           0 :                 return -1;
   16546             :         }
   16547           0 :         object->in.new_nt_pswd = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   16548           0 :         return 0;
   16549             : }
   16550             : 
   16551           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_in_get_old_nt_hash_enc(PyObject *obj, void *closure)
   16552             : {
   16553           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(obj);
   16554           0 :         PyObject *py_old_nt_hash_enc;
   16555           0 :         py_old_nt_hash_enc = PyBytes_FromStringAndSize((char *)(object->in.old_nt_hash_enc).data, (object->in.old_nt_hash_enc).length);
   16556           0 :         return py_old_nt_hash_enc;
   16557             : }
   16558             : 
   16559           0 : static int py_wbint_PamAuthCrapChangePassword_in_set_old_nt_hash_enc(PyObject *py_obj, PyObject *value, void *closure)
   16560             : {
   16561           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   16562           0 :         if (value == NULL) {
   16563           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.old_nt_hash_enc");
   16564           0 :                 return -1;
   16565             :         }
   16566           0 :         object->in.old_nt_hash_enc = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   16567           0 :         return 0;
   16568             : }
   16569             : 
   16570           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_in_get_new_lm_pswd(PyObject *obj, void *closure)
   16571             : {
   16572           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(obj);
   16573           0 :         PyObject *py_new_lm_pswd;
   16574           0 :         py_new_lm_pswd = PyBytes_FromStringAndSize((char *)(object->in.new_lm_pswd).data, (object->in.new_lm_pswd).length);
   16575           0 :         return py_new_lm_pswd;
   16576             : }
   16577             : 
   16578           0 : static int py_wbint_PamAuthCrapChangePassword_in_set_new_lm_pswd(PyObject *py_obj, PyObject *value, void *closure)
   16579             : {
   16580           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   16581           0 :         if (value == NULL) {
   16582           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.new_lm_pswd");
   16583           0 :                 return -1;
   16584             :         }
   16585           0 :         object->in.new_lm_pswd = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   16586           0 :         return 0;
   16587             : }
   16588             : 
   16589           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_in_get_old_lm_hash_enc(PyObject *obj, void *closure)
   16590             : {
   16591           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(obj);
   16592           0 :         PyObject *py_old_lm_hash_enc;
   16593           0 :         py_old_lm_hash_enc = PyBytes_FromStringAndSize((char *)(object->in.old_lm_hash_enc).data, (object->in.old_lm_hash_enc).length);
   16594           0 :         return py_old_lm_hash_enc;
   16595             : }
   16596             : 
   16597           0 : static int py_wbint_PamAuthCrapChangePassword_in_set_old_lm_hash_enc(PyObject *py_obj, PyObject *value, void *closure)
   16598             : {
   16599           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   16600           0 :         if (value == NULL) {
   16601           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.old_lm_hash_enc");
   16602           0 :                 return -1;
   16603             :         }
   16604           0 :         object->in.old_lm_hash_enc = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   16605           0 :         return 0;
   16606             : }
   16607             : 
   16608           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_get_result(PyObject *obj, void *closure)
   16609             : {
   16610           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(obj);
   16611           0 :         PyObject *py_result;
   16612           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   16613           0 :         return py_result;
   16614             : }
   16615             : 
   16616           0 : static int py_wbint_PamAuthCrapChangePassword_set_result(PyObject *py_obj, PyObject *value, void *closure)
   16617             : {
   16618           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   16619           0 :         if (value == NULL) {
   16620           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   16621           0 :                 return -1;
   16622             :         }
   16623           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   16624           0 :         return 0;
   16625             : }
   16626             : 
   16627             : static PyGetSetDef py_wbint_PamAuthCrapChangePassword_getsetters[] = {
   16628             :         {
   16629             :                 .name = discard_const_p(char, "in_client_name"),
   16630             :                 .get = py_wbint_PamAuthCrapChangePassword_in_get_client_name,
   16631             :                 .set = py_wbint_PamAuthCrapChangePassword_in_set_client_name,
   16632             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   16633             :         },
   16634             :         {
   16635             :                 .name = discard_const_p(char, "in_client_pid"),
   16636             :                 .get = py_wbint_PamAuthCrapChangePassword_in_get_client_pid,
   16637             :                 .set = py_wbint_PamAuthCrapChangePassword_in_set_client_pid,
   16638             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   16639             :         },
   16640             :         {
   16641             :                 .name = discard_const_p(char, "in_user"),
   16642             :                 .get = py_wbint_PamAuthCrapChangePassword_in_get_user,
   16643             :                 .set = py_wbint_PamAuthCrapChangePassword_in_set_user,
   16644             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   16645             :         },
   16646             :         {
   16647             :                 .name = discard_const_p(char, "in_domain"),
   16648             :                 .get = py_wbint_PamAuthCrapChangePassword_in_get_domain,
   16649             :                 .set = py_wbint_PamAuthCrapChangePassword_in_set_domain,
   16650             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   16651             :         },
   16652             :         {
   16653             :                 .name = discard_const_p(char, "in_new_nt_pswd"),
   16654             :                 .get = py_wbint_PamAuthCrapChangePassword_in_get_new_nt_pswd,
   16655             :                 .set = py_wbint_PamAuthCrapChangePassword_in_set_new_nt_pswd,
   16656             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   16657             :         },
   16658             :         {
   16659             :                 .name = discard_const_p(char, "in_old_nt_hash_enc"),
   16660             :                 .get = py_wbint_PamAuthCrapChangePassword_in_get_old_nt_hash_enc,
   16661             :                 .set = py_wbint_PamAuthCrapChangePassword_in_set_old_nt_hash_enc,
   16662             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   16663             :         },
   16664             :         {
   16665             :                 .name = discard_const_p(char, "in_new_lm_pswd"),
   16666             :                 .get = py_wbint_PamAuthCrapChangePassword_in_get_new_lm_pswd,
   16667             :                 .set = py_wbint_PamAuthCrapChangePassword_in_set_new_lm_pswd,
   16668             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   16669             :         },
   16670             :         {
   16671             :                 .name = discard_const_p(char, "in_old_lm_hash_enc"),
   16672             :                 .get = py_wbint_PamAuthCrapChangePassword_in_get_old_lm_hash_enc,
   16673             :                 .set = py_wbint_PamAuthCrapChangePassword_in_set_old_lm_hash_enc,
   16674             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   16675             :         },
   16676             :         {
   16677             :                 .name = discard_const_p(char, "result"),
   16678             :                 .get = py_wbint_PamAuthCrapChangePassword_get_result,
   16679             :                 .set = py_wbint_PamAuthCrapChangePassword_set_result,
   16680             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   16681             :         },
   16682             :         { .name = NULL }
   16683             : };
   16684             : 
   16685           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16686             : {
   16687           0 :         PyObject *self = pytalloc_new(struct wbint_PamAuthCrapChangePassword, type);
   16688           0 :         return self;
   16689             : }
   16690             : 
   16691           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   16692             : {
   16693             : 
   16694             : 
   16695           0 :         return PyLong_FromLong(25);
   16696             : }
   16697             : 
   16698           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   16699             : {
   16700           0 :         const struct ndr_interface_call *call = NULL;
   16701           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   16702           0 :         PyObject *ret = NULL;
   16703           0 :         struct ndr_push *push = NULL;
   16704           0 :         DATA_BLOB blob;
   16705           0 :         enum ndr_err_code err;
   16706             : 
   16707           0 :         if (ndr_table_winbind.num_calls < 26) {
   16708           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuthCrapChangePassword_ndr_pack");
   16709           0 :                 return NULL;
   16710             :         }
   16711           0 :         call = &ndr_table_winbind.calls[25];
   16712             : 
   16713           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   16714           0 :         if (push == NULL) {
   16715           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   16716           0 :                 return NULL;
   16717             :         }
   16718             : 
   16719           0 :         push->flags |= ndr_push_flags;
   16720             : 
   16721           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   16722           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   16723           0 :                 TALLOC_FREE(push);
   16724           0 :                 PyErr_SetNdrError(err);
   16725           0 :                 return NULL;
   16726             :         }
   16727           0 :         blob = ndr_push_blob(push);
   16728           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   16729           0 :         TALLOC_FREE(push);
   16730           0 :         return ret;
   16731             : }
   16732             : 
   16733           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   16734             : {
   16735           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   16736           0 :         PyObject *bigendian_obj = NULL;
   16737           0 :         PyObject *ndr64_obj = NULL;
   16738           0 :         libndr_flags ndr_push_flags = 0;
   16739             : 
   16740           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   16741             :                 discard_const_p(char *, kwnames),
   16742             :                 &bigendian_obj,
   16743             :                 &ndr64_obj)) {
   16744           0 :                 return NULL;
   16745             :         }
   16746             : 
   16747           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   16748           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   16749             :         }
   16750           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   16751           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   16752             :         }
   16753             : 
   16754           0 :         return py_wbint_PamAuthCrapChangePassword_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   16755             : }
   16756             : 
   16757           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   16758             : {
   16759           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   16760           0 :         PyObject *bigendian_obj = NULL;
   16761           0 :         PyObject *ndr64_obj = NULL;
   16762           0 :         libndr_flags ndr_push_flags = 0;
   16763             : 
   16764           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   16765             :                 discard_const_p(char *, kwnames),
   16766             :                 &bigendian_obj,
   16767             :                 &ndr64_obj)) {
   16768           0 :                 return NULL;
   16769             :         }
   16770             : 
   16771           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   16772           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   16773             :         }
   16774           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   16775           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   16776             :         }
   16777             : 
   16778           0 :         return py_wbint_PamAuthCrapChangePassword_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   16779             : }
   16780             : 
   16781           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   16782             : {
   16783           0 :         const struct ndr_interface_call *call = NULL;
   16784           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   16785           0 :         struct ndr_pull *pull = NULL;
   16786           0 :         enum ndr_err_code err;
   16787             : 
   16788           0 :         if (ndr_table_winbind.num_calls < 26) {
   16789           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuthCrapChangePassword_ndr_unpack");
   16790           0 :                 return NULL;
   16791             :         }
   16792           0 :         call = &ndr_table_winbind.calls[25];
   16793             : 
   16794           0 :         pull = ndr_pull_init_blob(blob, object);
   16795           0 :         if (pull == NULL) {
   16796           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   16797           0 :                 return NULL;
   16798             :         }
   16799             : 
   16800           0 :         pull->flags |= ndr_pull_flags;
   16801             : 
   16802           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   16803           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   16804           0 :                 TALLOC_FREE(pull);
   16805           0 :                 PyErr_SetNdrError(err);
   16806           0 :                 return NULL;
   16807             :         }
   16808           0 :         if (!allow_remaining) {
   16809           0 :                 uint32_t highest_ofs;
   16810             : 
   16811           0 :                 if (pull->offset > pull->relative_highest_offset) {
   16812           0 :                         highest_ofs = pull->offset;
   16813             :                 } else {
   16814           0 :                         highest_ofs = pull->relative_highest_offset;
   16815             :                 }
   16816           0 :                 if (highest_ofs < pull->data_size) {
   16817           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   16818             :                                 "not all bytes consumed ofs[%u] size[%u]",
   16819             :                                 highest_ofs, pull->data_size);
   16820           0 :                         TALLOC_FREE(pull);
   16821           0 :                         PyErr_SetNdrError(err);
   16822           0 :                         return NULL;
   16823             :                 }
   16824             :         }
   16825             : 
   16826           0 :         TALLOC_FREE(pull);
   16827           0 :         Py_RETURN_NONE;
   16828             : }
   16829             : 
   16830           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   16831             : {
   16832           0 :         DATA_BLOB blob;
   16833           0 :         Py_ssize_t blob_length = 0;
   16834           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   16835           0 :         PyObject *bigendian_obj = NULL;
   16836           0 :         PyObject *ndr64_obj = NULL;
   16837           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   16838           0 :         PyObject *allow_remaining_obj = NULL;
   16839           0 :         bool allow_remaining = false;
   16840             : 
   16841           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   16842             :                 discard_const_p(char *, kwnames),
   16843             :                 &blob.data, &blob_length,
   16844             :                 &bigendian_obj,
   16845             :                 &ndr64_obj,
   16846             :                 &allow_remaining_obj)) {
   16847           0 :                 return NULL;
   16848             :         }
   16849           0 :         blob.length = blob_length;
   16850             : 
   16851           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   16852           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   16853             :         }
   16854           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   16855           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   16856             :         }
   16857             : 
   16858           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   16859           0 :                 allow_remaining = true;
   16860             :         }
   16861             : 
   16862           0 :         return py_wbint_PamAuthCrapChangePassword_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   16863             : }
   16864             : 
   16865           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   16866             : {
   16867           0 :         DATA_BLOB blob;
   16868           0 :         Py_ssize_t blob_length = 0;
   16869           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   16870           0 :         PyObject *bigendian_obj = NULL;
   16871           0 :         PyObject *ndr64_obj = NULL;
   16872           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   16873           0 :         PyObject *allow_remaining_obj = NULL;
   16874           0 :         bool allow_remaining = false;
   16875             : 
   16876           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   16877             :                 discard_const_p(char *, kwnames),
   16878             :                 &blob.data, &blob_length,
   16879             :                 &bigendian_obj,
   16880             :                 &ndr64_obj,
   16881             :                 &allow_remaining_obj)) {
   16882           0 :                 return NULL;
   16883             :         }
   16884           0 :         blob.length = blob_length;
   16885             : 
   16886           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   16887           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   16888             :         }
   16889           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   16890           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   16891             :         }
   16892             : 
   16893           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   16894           0 :                 allow_remaining = true;
   16895             :         }
   16896             : 
   16897           0 :         return py_wbint_PamAuthCrapChangePassword_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   16898             : }
   16899             : 
   16900           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   16901             : {
   16902           0 :         const struct ndr_interface_call *call = NULL;
   16903           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   16904           0 :         PyObject *ret;
   16905           0 :         char *retstr;
   16906             : 
   16907           0 :         if (ndr_table_winbind.num_calls < 26) {
   16908           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuthCrapChangePassword_ndr_print");
   16909           0 :                 return NULL;
   16910             :         }
   16911           0 :         call = &ndr_table_winbind.calls[25];
   16912             : 
   16913           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   16914           0 :         ret = PyUnicode_FromString(retstr);
   16915           0 :         TALLOC_FREE(retstr);
   16916             : 
   16917           0 :         return ret;
   16918             : }
   16919             : 
   16920           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   16921             : {
   16922           0 :         return py_wbint_PamAuthCrapChangePassword_ndr_print(py_obj, "wbint_PamAuthCrapChangePassword_in", NDR_IN);
   16923             : }
   16924             : 
   16925           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   16926             : {
   16927           0 :         return py_wbint_PamAuthCrapChangePassword_ndr_print(py_obj, "wbint_PamAuthCrapChangePassword_out", NDR_OUT);
   16928             : }
   16929             : 
   16930             : static PyMethodDef py_wbint_PamAuthCrapChangePassword_methods[] = {
   16931             :         { "opnum", (PyCFunction)py_wbint_PamAuthCrapChangePassword_ndr_opnum, METH_NOARGS|METH_CLASS,
   16932             :                 "winbind.wbint_PamAuthCrapChangePassword.opnum() -> 25 (0x19) " },
   16933             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthCrapChangePassword_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   16934             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   16935             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthCrapChangePassword_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   16936             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   16937             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthCrapChangePassword_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   16938             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   16939             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthCrapChangePassword_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   16940             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   16941             :         { "__ndr_print_in__", (PyCFunction)py_wbint_PamAuthCrapChangePassword_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   16942             :         { "__ndr_print_out__", (PyCFunction)py_wbint_PamAuthCrapChangePassword_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   16943             :         { NULL, NULL, 0, NULL }
   16944             : };
   16945             : 
   16946             : 
   16947             : static PyTypeObject wbint_PamAuthCrapChangePassword_Type = {
   16948             :         PyVarObject_HEAD_INIT(NULL, 0)
   16949             :         .tp_name = "winbind.wbint_PamAuthCrapChangePassword",
   16950             :         .tp_getset = py_wbint_PamAuthCrapChangePassword_getsetters,
   16951             :         .tp_methods = py_wbint_PamAuthCrapChangePassword_methods,
   16952             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16953             :         .tp_new = py_wbint_PamAuthCrapChangePassword_new,
   16954             : };
   16955             : 
   16956           0 : static bool pack_py_wbint_PamAuthCrapChangePassword_args_in(PyObject *args, PyObject *kwargs, struct wbint_PamAuthCrapChangePassword *r)
   16957             : {
   16958           0 :         PyObject *py_client_name;
   16959           0 :         PyObject *py_client_pid;
   16960           0 :         PyObject *py_user;
   16961           0 :         PyObject *py_domain;
   16962           0 :         PyObject *py_new_nt_pswd;
   16963           0 :         PyObject *py_old_nt_hash_enc;
   16964           0 :         PyObject *py_new_lm_pswd;
   16965           0 :         PyObject *py_old_lm_hash_enc;
   16966           0 :         const char *kwnames[] = {
   16967             :                 "client_name", "client_pid", "user", "domain", "new_nt_pswd", "old_nt_hash_enc", "new_lm_pswd", "old_lm_hash_enc", NULL
   16968             :         };
   16969             : 
   16970           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:wbint_PamAuthCrapChangePassword", discard_const_p(char *, kwnames), &py_client_name, &py_client_pid, &py_user, &py_domain, &py_new_nt_pswd, &py_old_nt_hash_enc, &py_new_lm_pswd, &py_old_lm_hash_enc)) {
   16971           0 :                 return false;
   16972             :         }
   16973             : 
   16974           0 :         if (py_client_name == NULL) {
   16975           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_name");
   16976           0 :                 return false;
   16977             :         }
   16978           0 :         r->in.client_name = talloc_ptrtype(r, r->in.client_name);
   16979           0 :         if (r->in.client_name == NULL) {
   16980           0 :                 PyErr_NoMemory();
   16981           0 :                 return false;
   16982             :         }
   16983             :         {
   16984           0 :                 const char *test_str;
   16985           0 :                 const char *talloc_str;
   16986           0 :                 PyObject *unicode = NULL;
   16987           0 :                 if (PyUnicode_Check(py_client_name)) {
   16988           0 :                         unicode = PyUnicode_AsEncodedString(py_client_name, "utf-8", "ignore");
   16989           0 :                         if (unicode == NULL) {
   16990           0 :                                 PyErr_NoMemory();
   16991           0 :                                 return false;
   16992             :                         }
   16993           0 :                         test_str = PyBytes_AS_STRING(unicode);
   16994           0 :                 } else if (PyBytes_Check(py_client_name)) {
   16995           0 :                         test_str = PyBytes_AS_STRING(py_client_name);
   16996             :                 } else {
   16997           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client_name)->tp_name);
   16998           0 :                         return false;
   16999             :                 }
   17000           0 :                 talloc_str = talloc_strdup(r, test_str);
   17001           0 :                 if (unicode != NULL) {
   17002           0 :                         Py_DECREF(unicode);
   17003             :                 }
   17004           0 :                 if (talloc_str == NULL) {
   17005           0 :                         PyErr_NoMemory();
   17006           0 :                         return false;
   17007             :                 }
   17008           0 :                 r->in.client_name = talloc_str;
   17009             :         }
   17010           0 :         if (py_client_pid == NULL) {
   17011           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_pid");
   17012           0 :                 return false;
   17013             :         }
   17014             :         {
   17015           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.client_pid));
   17016           0 :                 if (PyLong_Check(py_client_pid)) {
   17017           0 :                         unsigned long long test_var;
   17018           0 :                         test_var = PyLong_AsUnsignedLongLong(py_client_pid);
   17019           0 :                         if (PyErr_Occurred() != NULL) {
   17020           0 :                                 return false;
   17021             :                         }
   17022           0 :                         if (test_var > uint_max) {
   17023           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17024             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17025           0 :                                 return false;
   17026             :                         }
   17027           0 :                         r->in.client_pid = test_var;
   17028             :                 } else {
   17029           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17030             :                           PyLong_Type.tp_name);
   17031           0 :                         return false;
   17032             :                 }
   17033             :         }
   17034           0 :         if (py_user == NULL) {
   17035           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.user");
   17036           0 :                 return false;
   17037             :         }
   17038           0 :         r->in.user = talloc_ptrtype(r, r->in.user);
   17039           0 :         if (r->in.user == NULL) {
   17040           0 :                 PyErr_NoMemory();
   17041           0 :                 return false;
   17042             :         }
   17043             :         {
   17044           0 :                 const char *test_str;
   17045           0 :                 const char *talloc_str;
   17046           0 :                 PyObject *unicode = NULL;
   17047           0 :                 if (PyUnicode_Check(py_user)) {
   17048           0 :                         unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
   17049           0 :                         if (unicode == NULL) {
   17050           0 :                                 PyErr_NoMemory();
   17051           0 :                                 return false;
   17052             :                         }
   17053           0 :                         test_str = PyBytes_AS_STRING(unicode);
   17054           0 :                 } else if (PyBytes_Check(py_user)) {
   17055           0 :                         test_str = PyBytes_AS_STRING(py_user);
   17056             :                 } else {
   17057           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
   17058           0 :                         return false;
   17059             :                 }
   17060           0 :                 talloc_str = talloc_strdup(r, test_str);
   17061           0 :                 if (unicode != NULL) {
   17062           0 :                         Py_DECREF(unicode);
   17063             :                 }
   17064           0 :                 if (talloc_str == NULL) {
   17065           0 :                         PyErr_NoMemory();
   17066           0 :                         return false;
   17067             :                 }
   17068           0 :                 r->in.user = talloc_str;
   17069             :         }
   17070           0 :         if (py_domain == NULL) {
   17071           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain");
   17072           0 :                 return false;
   17073             :         }
   17074           0 :         r->in.domain = talloc_ptrtype(r, r->in.domain);
   17075           0 :         if (r->in.domain == NULL) {
   17076           0 :                 PyErr_NoMemory();
   17077           0 :                 return false;
   17078             :         }
   17079             :         {
   17080           0 :                 const char *test_str;
   17081           0 :                 const char *talloc_str;
   17082           0 :                 PyObject *unicode = NULL;
   17083           0 :                 if (PyUnicode_Check(py_domain)) {
   17084           0 :                         unicode = PyUnicode_AsEncodedString(py_domain, "utf-8", "ignore");
   17085           0 :                         if (unicode == NULL) {
   17086           0 :                                 PyErr_NoMemory();
   17087           0 :                                 return false;
   17088             :                         }
   17089           0 :                         test_str = PyBytes_AS_STRING(unicode);
   17090           0 :                 } else if (PyBytes_Check(py_domain)) {
   17091           0 :                         test_str = PyBytes_AS_STRING(py_domain);
   17092             :                 } else {
   17093           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain)->tp_name);
   17094           0 :                         return false;
   17095             :                 }
   17096           0 :                 talloc_str = talloc_strdup(r, test_str);
   17097           0 :                 if (unicode != NULL) {
   17098           0 :                         Py_DECREF(unicode);
   17099             :                 }
   17100           0 :                 if (talloc_str == NULL) {
   17101           0 :                         PyErr_NoMemory();
   17102           0 :                         return false;
   17103             :                 }
   17104           0 :                 r->in.domain = talloc_str;
   17105             :         }
   17106           0 :         if (py_new_nt_pswd == NULL) {
   17107           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.new_nt_pswd");
   17108           0 :                 return false;
   17109             :         }
   17110           0 :         r->in.new_nt_pswd = data_blob_talloc(r, PyBytes_AS_STRING(py_new_nt_pswd), PyBytes_GET_SIZE(py_new_nt_pswd));
   17111           0 :         if (py_old_nt_hash_enc == NULL) {
   17112           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.old_nt_hash_enc");
   17113           0 :                 return false;
   17114             :         }
   17115           0 :         r->in.old_nt_hash_enc = data_blob_talloc(r, PyBytes_AS_STRING(py_old_nt_hash_enc), PyBytes_GET_SIZE(py_old_nt_hash_enc));
   17116           0 :         if (py_new_lm_pswd == NULL) {
   17117           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.new_lm_pswd");
   17118           0 :                 return false;
   17119             :         }
   17120           0 :         r->in.new_lm_pswd = data_blob_talloc(r, PyBytes_AS_STRING(py_new_lm_pswd), PyBytes_GET_SIZE(py_new_lm_pswd));
   17121           0 :         if (py_old_lm_hash_enc == NULL) {
   17122           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.old_lm_hash_enc");
   17123           0 :                 return false;
   17124             :         }
   17125           0 :         r->in.old_lm_hash_enc = data_blob_talloc(r, PyBytes_AS_STRING(py_old_lm_hash_enc), PyBytes_GET_SIZE(py_old_lm_hash_enc));
   17126           0 :         return true;
   17127             : }
   17128             : 
   17129           0 : static PyObject *unpack_py_wbint_PamAuthCrapChangePassword_args_out(struct wbint_PamAuthCrapChangePassword *r)
   17130             : {
   17131           0 :         PyObject *result;
   17132           0 :         result = Py_None;
   17133           0 :         Py_INCREF(result);
   17134           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   17135           0 :                 PyErr_SetNTSTATUS(r->out.result);
   17136           0 :                 return NULL;
   17137             :         }
   17138             : 
   17139           0 :         return result;
   17140             : }
   17141             : 
   17142             : 
   17143           0 : static PyObject *py_wbint_PamAuthChangePassword_in_get_client_name(PyObject *obj, void *closure)
   17144             : {
   17145           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(obj);
   17146           0 :         PyObject *py_client_name;
   17147           0 :         if (object->in.client_name == NULL) {
   17148           0 :                 Py_RETURN_NONE;
   17149             :         }
   17150           0 :         if (object->in.client_name == NULL) {
   17151           0 :                 py_client_name = Py_None;
   17152           0 :                 Py_INCREF(py_client_name);
   17153             :         } else {
   17154           0 :                 py_client_name = PyUnicode_Decode(object->in.client_name, strlen(object->in.client_name), "utf-8", "ignore");
   17155             :         }
   17156           0 :         return py_client_name;
   17157             : }
   17158             : 
   17159           0 : static int py_wbint_PamAuthChangePassword_in_set_client_name(PyObject *py_obj, PyObject *value, void *closure)
   17160             : {
   17161           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   17162           0 :         if (value == NULL) {
   17163           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_name");
   17164           0 :                 return -1;
   17165             :         }
   17166           0 :         object->in.client_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.client_name);
   17167           0 :         if (object->in.client_name == NULL) {
   17168           0 :                 PyErr_NoMemory();
   17169           0 :                 return -1;
   17170             :         }
   17171             :         {
   17172           0 :                 const char *test_str;
   17173           0 :                 const char *talloc_str;
   17174           0 :                 PyObject *unicode = NULL;
   17175           0 :                 if (PyUnicode_Check(value)) {
   17176           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   17177           0 :                         if (unicode == NULL) {
   17178           0 :                                 PyErr_NoMemory();
   17179           0 :                                 return -1;
   17180             :                         }
   17181           0 :                         test_str = PyBytes_AS_STRING(unicode);
   17182           0 :                 } else if (PyBytes_Check(value)) {
   17183           0 :                         test_str = PyBytes_AS_STRING(value);
   17184             :                 } else {
   17185           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   17186           0 :                         return -1;
   17187             :                 }
   17188           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   17189           0 :                 if (unicode != NULL) {
   17190           0 :                         Py_DECREF(unicode);
   17191             :                 }
   17192           0 :                 if (talloc_str == NULL) {
   17193           0 :                         PyErr_NoMemory();
   17194           0 :                         return -1;
   17195             :                 }
   17196           0 :                 object->in.client_name = talloc_str;
   17197             :         }
   17198           0 :         return 0;
   17199             : }
   17200             : 
   17201           0 : static PyObject *py_wbint_PamAuthChangePassword_in_get_client_pid(PyObject *obj, void *closure)
   17202             : {
   17203           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(obj);
   17204           0 :         PyObject *py_client_pid;
   17205           0 :         py_client_pid = PyLong_FromUnsignedLongLong(object->in.client_pid);
   17206           0 :         return py_client_pid;
   17207             : }
   17208             : 
   17209           0 : static int py_wbint_PamAuthChangePassword_in_set_client_pid(PyObject *py_obj, PyObject *value, void *closure)
   17210             : {
   17211           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   17212           0 :         if (value == NULL) {
   17213           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_pid");
   17214           0 :                 return -1;
   17215             :         }
   17216             :         {
   17217           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.client_pid));
   17218           0 :                 if (PyLong_Check(value)) {
   17219           0 :                         unsigned long long test_var;
   17220           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17221           0 :                         if (PyErr_Occurred() != NULL) {
   17222           0 :                                 return -1;
   17223             :                         }
   17224           0 :                         if (test_var > uint_max) {
   17225           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17226             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17227           0 :                                 return -1;
   17228             :                         }
   17229           0 :                         object->in.client_pid = test_var;
   17230             :                 } else {
   17231           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17232             :                           PyLong_Type.tp_name);
   17233           0 :                         return -1;
   17234             :                 }
   17235             :         }
   17236           0 :         return 0;
   17237             : }
   17238             : 
   17239           0 : static PyObject *py_wbint_PamAuthChangePassword_in_get_flags(PyObject *obj, void *closure)
   17240             : {
   17241           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(obj);
   17242           0 :         PyObject *py_flags;
   17243           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   17244           0 :         return py_flags;
   17245             : }
   17246             : 
   17247           0 : static int py_wbint_PamAuthChangePassword_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   17248             : {
   17249           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   17250           0 :         if (value == NULL) {
   17251           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   17252           0 :                 return -1;
   17253             :         }
   17254             :         {
   17255           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   17256           0 :                 if (PyLong_Check(value)) {
   17257           0 :                         unsigned long long test_var;
   17258           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17259           0 :                         if (PyErr_Occurred() != NULL) {
   17260           0 :                                 return -1;
   17261             :                         }
   17262           0 :                         if (test_var > uint_max) {
   17263           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17264             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17265           0 :                                 return -1;
   17266             :                         }
   17267           0 :                         object->in.flags = test_var;
   17268             :                 } else {
   17269           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17270             :                           PyLong_Type.tp_name);
   17271           0 :                         return -1;
   17272             :                 }
   17273             :         }
   17274           0 :         return 0;
   17275             : }
   17276             : 
   17277           0 : static PyObject *py_wbint_PamAuthChangePassword_in_get_user(PyObject *obj, void *closure)
   17278             : {
   17279           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(obj);
   17280           0 :         PyObject *py_user;
   17281           0 :         if (object->in.user == NULL) {
   17282           0 :                 Py_RETURN_NONE;
   17283             :         }
   17284           0 :         if (object->in.user == NULL) {
   17285           0 :                 py_user = Py_None;
   17286           0 :                 Py_INCREF(py_user);
   17287             :         } else {
   17288           0 :                 py_user = PyUnicode_Decode(object->in.user, strlen(object->in.user), "utf-8", "ignore");
   17289             :         }
   17290           0 :         return py_user;
   17291             : }
   17292             : 
   17293           0 : static int py_wbint_PamAuthChangePassword_in_set_user(PyObject *py_obj, PyObject *value, void *closure)
   17294             : {
   17295           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   17296           0 :         if (value == NULL) {
   17297           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.user");
   17298           0 :                 return -1;
   17299             :         }
   17300           0 :         object->in.user = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.user);
   17301           0 :         if (object->in.user == NULL) {
   17302           0 :                 PyErr_NoMemory();
   17303           0 :                 return -1;
   17304             :         }
   17305             :         {
   17306           0 :                 const char *test_str;
   17307           0 :                 const char *talloc_str;
   17308           0 :                 PyObject *unicode = NULL;
   17309           0 :                 if (PyUnicode_Check(value)) {
   17310           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   17311           0 :                         if (unicode == NULL) {
   17312           0 :                                 PyErr_NoMemory();
   17313           0 :                                 return -1;
   17314             :                         }
   17315           0 :                         test_str = PyBytes_AS_STRING(unicode);
   17316           0 :                 } else if (PyBytes_Check(value)) {
   17317           0 :                         test_str = PyBytes_AS_STRING(value);
   17318             :                 } else {
   17319           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   17320           0 :                         return -1;
   17321             :                 }
   17322           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   17323           0 :                 if (unicode != NULL) {
   17324           0 :                         Py_DECREF(unicode);
   17325             :                 }
   17326           0 :                 if (talloc_str == NULL) {
   17327           0 :                         PyErr_NoMemory();
   17328           0 :                         return -1;
   17329             :                 }
   17330           0 :                 object->in.user = talloc_str;
   17331             :         }
   17332           0 :         return 0;
   17333             : }
   17334             : 
   17335           0 : static PyObject *py_wbint_PamAuthChangePassword_in_get_old_password(PyObject *obj, void *closure)
   17336             : {
   17337           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(obj);
   17338           0 :         PyObject *py_old_password;
   17339           0 :         if (object->in.old_password == NULL) {
   17340           0 :                 Py_RETURN_NONE;
   17341             :         }
   17342           0 :         if (object->in.old_password == NULL) {
   17343           0 :                 py_old_password = Py_None;
   17344           0 :                 Py_INCREF(py_old_password);
   17345             :         } else {
   17346           0 :                 py_old_password = PyUnicode_Decode(object->in.old_password, strlen(object->in.old_password), "utf-8", "ignore");
   17347             :         }
   17348           0 :         return py_old_password;
   17349             : }
   17350             : 
   17351           0 : static int py_wbint_PamAuthChangePassword_in_set_old_password(PyObject *py_obj, PyObject *value, void *closure)
   17352             : {
   17353           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   17354           0 :         if (value == NULL) {
   17355           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.old_password");
   17356           0 :                 return -1;
   17357             :         }
   17358           0 :         object->in.old_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.old_password);
   17359           0 :         if (object->in.old_password == NULL) {
   17360           0 :                 PyErr_NoMemory();
   17361           0 :                 return -1;
   17362             :         }
   17363             :         {
   17364           0 :                 const char *test_str;
   17365           0 :                 const char *talloc_str;
   17366           0 :                 PyObject *unicode = NULL;
   17367           0 :                 if (PyUnicode_Check(value)) {
   17368           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   17369           0 :                         if (unicode == NULL) {
   17370           0 :                                 PyErr_NoMemory();
   17371           0 :                                 return -1;
   17372             :                         }
   17373           0 :                         test_str = PyBytes_AS_STRING(unicode);
   17374           0 :                 } else if (PyBytes_Check(value)) {
   17375           0 :                         test_str = PyBytes_AS_STRING(value);
   17376             :                 } else {
   17377           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   17378           0 :                         return -1;
   17379             :                 }
   17380           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   17381           0 :                 if (unicode != NULL) {
   17382           0 :                         Py_DECREF(unicode);
   17383             :                 }
   17384           0 :                 if (talloc_str == NULL) {
   17385           0 :                         PyErr_NoMemory();
   17386           0 :                         return -1;
   17387             :                 }
   17388           0 :                 object->in.old_password = talloc_str;
   17389             :         }
   17390           0 :         return 0;
   17391             : }
   17392             : 
   17393           0 : static PyObject *py_wbint_PamAuthChangePassword_in_get_new_password(PyObject *obj, void *closure)
   17394             : {
   17395           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(obj);
   17396           0 :         PyObject *py_new_password;
   17397           0 :         if (object->in.new_password == NULL) {
   17398           0 :                 Py_RETURN_NONE;
   17399             :         }
   17400           0 :         if (object->in.new_password == NULL) {
   17401           0 :                 py_new_password = Py_None;
   17402           0 :                 Py_INCREF(py_new_password);
   17403             :         } else {
   17404           0 :                 py_new_password = PyUnicode_Decode(object->in.new_password, strlen(object->in.new_password), "utf-8", "ignore");
   17405             :         }
   17406           0 :         return py_new_password;
   17407             : }
   17408             : 
   17409           0 : static int py_wbint_PamAuthChangePassword_in_set_new_password(PyObject *py_obj, PyObject *value, void *closure)
   17410             : {
   17411           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   17412           0 :         if (value == NULL) {
   17413           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.new_password");
   17414           0 :                 return -1;
   17415             :         }
   17416           0 :         object->in.new_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.new_password);
   17417           0 :         if (object->in.new_password == NULL) {
   17418           0 :                 PyErr_NoMemory();
   17419           0 :                 return -1;
   17420             :         }
   17421             :         {
   17422           0 :                 const char *test_str;
   17423           0 :                 const char *talloc_str;
   17424           0 :                 PyObject *unicode = NULL;
   17425           0 :                 if (PyUnicode_Check(value)) {
   17426           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   17427           0 :                         if (unicode == NULL) {
   17428           0 :                                 PyErr_NoMemory();
   17429           0 :                                 return -1;
   17430             :                         }
   17431           0 :                         test_str = PyBytes_AS_STRING(unicode);
   17432           0 :                 } else if (PyBytes_Check(value)) {
   17433           0 :                         test_str = PyBytes_AS_STRING(value);
   17434             :                 } else {
   17435           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   17436           0 :                         return -1;
   17437             :                 }
   17438           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   17439           0 :                 if (unicode != NULL) {
   17440           0 :                         Py_DECREF(unicode);
   17441             :                 }
   17442           0 :                 if (talloc_str == NULL) {
   17443           0 :                         PyErr_NoMemory();
   17444           0 :                         return -1;
   17445             :                 }
   17446           0 :                 object->in.new_password = talloc_str;
   17447             :         }
   17448           0 :         return 0;
   17449             : }
   17450             : 
   17451           0 : static PyObject *py_wbint_PamAuthChangePassword_out_get_dominfo(PyObject *obj, void *closure)
   17452             : {
   17453           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(obj);
   17454           0 :         PyObject *py_dominfo;
   17455           0 :         if (object->out.dominfo == NULL) {
   17456           0 :                 Py_RETURN_NONE;
   17457             :         }
   17458           0 :         if (*object->out.dominfo == NULL) {
   17459           0 :                 py_dominfo = Py_None;
   17460           0 :                 Py_INCREF(py_dominfo);
   17461             :         } else {
   17462           0 :                 py_dominfo = pytalloc_reference_ex(samr_DomInfo1_Type, *object->out.dominfo, *object->out.dominfo);
   17463             :         }
   17464           0 :         return py_dominfo;
   17465             : }
   17466             : 
   17467           0 : static int py_wbint_PamAuthChangePassword_out_set_dominfo(PyObject *py_obj, PyObject *value, void *closure)
   17468             : {
   17469           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   17470           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dominfo));
   17471           0 :         if (value == NULL) {
   17472           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.dominfo");
   17473           0 :                 return -1;
   17474             :         }
   17475           0 :         object->out.dominfo = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dominfo);
   17476           0 :         if (object->out.dominfo == NULL) {
   17477           0 :                 PyErr_NoMemory();
   17478           0 :                 return -1;
   17479             :         }
   17480           0 :         if (value == Py_None) {
   17481           0 :                 *object->out.dominfo = NULL;
   17482             :         } else {
   17483           0 :                 *object->out.dominfo = NULL;
   17484           0 :                 PY_CHECK_TYPE(samr_DomInfo1_Type, value, return -1;);
   17485           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   17486           0 :                         PyErr_NoMemory();
   17487           0 :                         return -1;
   17488             :                 }
   17489           0 :                 *object->out.dominfo = (struct samr_DomInfo1 *)pytalloc_get_ptr(value);
   17490             :         }
   17491           0 :         return 0;
   17492             : }
   17493             : 
   17494           0 : static PyObject *py_wbint_PamAuthChangePassword_out_get_reject_reason(PyObject *obj, void *closure)
   17495             : {
   17496           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(obj);
   17497           0 :         PyObject *py_reject_reason;
   17498           0 :         if (object->out.reject_reason == NULL) {
   17499           0 :                 Py_RETURN_NONE;
   17500             :         }
   17501           0 :         py_reject_reason = PyLong_FromUnsignedLongLong((uint32_t)*object->out.reject_reason);
   17502           0 :         return py_reject_reason;
   17503             : }
   17504             : 
   17505           0 : static int py_wbint_PamAuthChangePassword_out_set_reject_reason(PyObject *py_obj, PyObject *value, void *closure)
   17506             : {
   17507           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   17508           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.reject_reason));
   17509           0 :         if (value == NULL) {
   17510           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.reject_reason");
   17511           0 :                 return -1;
   17512             :         }
   17513           0 :         object->out.reject_reason = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.reject_reason);
   17514           0 :         if (object->out.reject_reason == NULL) {
   17515           0 :                 PyErr_NoMemory();
   17516           0 :                 return -1;
   17517             :         }
   17518             :         {
   17519           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.reject_reason));
   17520           0 :                 if (PyLong_Check(value)) {
   17521           0 :                         unsigned long long test_var;
   17522           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17523           0 :                         if (PyErr_Occurred() != NULL) {
   17524           0 :                                 return -1;
   17525             :                         }
   17526           0 :                         if (test_var > uint_max) {
   17527           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17528             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17529           0 :                                 return -1;
   17530             :                         }
   17531           0 :                         *object->out.reject_reason = test_var;
   17532             :                 } else {
   17533           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17534             :                           PyLong_Type.tp_name);
   17535           0 :                         return -1;
   17536             :                 }
   17537             :         }
   17538           0 :         return 0;
   17539             : }
   17540             : 
   17541           0 : static PyObject *py_wbint_PamAuthChangePassword_get_result(PyObject *obj, void *closure)
   17542             : {
   17543           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(obj);
   17544           0 :         PyObject *py_result;
   17545           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   17546           0 :         return py_result;
   17547             : }
   17548             : 
   17549           0 : static int py_wbint_PamAuthChangePassword_set_result(PyObject *py_obj, PyObject *value, void *closure)
   17550             : {
   17551           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   17552           0 :         if (value == NULL) {
   17553           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   17554           0 :                 return -1;
   17555             :         }
   17556           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   17557           0 :         return 0;
   17558             : }
   17559             : 
   17560             : static PyGetSetDef py_wbint_PamAuthChangePassword_getsetters[] = {
   17561             :         {
   17562             :                 .name = discard_const_p(char, "in_client_name"),
   17563             :                 .get = py_wbint_PamAuthChangePassword_in_get_client_name,
   17564             :                 .set = py_wbint_PamAuthChangePassword_in_set_client_name,
   17565             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   17566             :         },
   17567             :         {
   17568             :                 .name = discard_const_p(char, "in_client_pid"),
   17569             :                 .get = py_wbint_PamAuthChangePassword_in_get_client_pid,
   17570             :                 .set = py_wbint_PamAuthChangePassword_in_set_client_pid,
   17571             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   17572             :         },
   17573             :         {
   17574             :                 .name = discard_const_p(char, "in_flags"),
   17575             :                 .get = py_wbint_PamAuthChangePassword_in_get_flags,
   17576             :                 .set = py_wbint_PamAuthChangePassword_in_set_flags,
   17577             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17578             :         },
   17579             :         {
   17580             :                 .name = discard_const_p(char, "in_user"),
   17581             :                 .get = py_wbint_PamAuthChangePassword_in_get_user,
   17582             :                 .set = py_wbint_PamAuthChangePassword_in_set_user,
   17583             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   17584             :         },
   17585             :         {
   17586             :                 .name = discard_const_p(char, "in_old_password"),
   17587             :                 .get = py_wbint_PamAuthChangePassword_in_get_old_password,
   17588             :                 .set = py_wbint_PamAuthChangePassword_in_set_old_password,
   17589             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   17590             :         },
   17591             :         {
   17592             :                 .name = discard_const_p(char, "in_new_password"),
   17593             :                 .get = py_wbint_PamAuthChangePassword_in_get_new_password,
   17594             :                 .set = py_wbint_PamAuthChangePassword_in_set_new_password,
   17595             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   17596             :         },
   17597             :         {
   17598             :                 .name = discard_const_p(char, "out_dominfo"),
   17599             :                 .get = py_wbint_PamAuthChangePassword_out_get_dominfo,
   17600             :                 .set = py_wbint_PamAuthChangePassword_out_set_dominfo,
   17601             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_DomInfo1")
   17602             :         },
   17603             :         {
   17604             :                 .name = discard_const_p(char, "out_reject_reason"),
   17605             :                 .get = py_wbint_PamAuthChangePassword_out_get_reject_reason,
   17606             :                 .set = py_wbint_PamAuthChangePassword_out_set_reject_reason,
   17607             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samPwdChangeReason")
   17608             :         },
   17609             :         {
   17610             :                 .name = discard_const_p(char, "result"),
   17611             :                 .get = py_wbint_PamAuthChangePassword_get_result,
   17612             :                 .set = py_wbint_PamAuthChangePassword_set_result,
   17613             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   17614             :         },
   17615             :         { .name = NULL }
   17616             : };
   17617             : 
   17618           0 : static PyObject *py_wbint_PamAuthChangePassword_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17619             : {
   17620           0 :         PyObject *self = pytalloc_new(struct wbint_PamAuthChangePassword, type);
   17621           0 :         struct wbint_PamAuthChangePassword *_self = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(self);
   17622           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   17623             :         /* a pointer to a NULL pointer */
   17624           0 :         _self->out.dominfo = talloc_zero(mem_ctx, struct samr_DomInfo1 *);
   17625           0 :         _self->out.reject_reason = talloc_zero(mem_ctx, enum samPwdChangeReason);
   17626           0 :         return self;
   17627             : }
   17628             : 
   17629           0 : static PyObject *py_wbint_PamAuthChangePassword_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   17630             : {
   17631             : 
   17632             : 
   17633           0 :         return PyLong_FromLong(26);
   17634             : }
   17635             : 
   17636           0 : static PyObject *py_wbint_PamAuthChangePassword_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   17637             : {
   17638           0 :         const struct ndr_interface_call *call = NULL;
   17639           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   17640           0 :         PyObject *ret = NULL;
   17641           0 :         struct ndr_push *push = NULL;
   17642           0 :         DATA_BLOB blob;
   17643           0 :         enum ndr_err_code err;
   17644             : 
   17645           0 :         if (ndr_table_winbind.num_calls < 27) {
   17646           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuthChangePassword_ndr_pack");
   17647           0 :                 return NULL;
   17648             :         }
   17649           0 :         call = &ndr_table_winbind.calls[26];
   17650             : 
   17651           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   17652           0 :         if (push == NULL) {
   17653           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   17654           0 :                 return NULL;
   17655             :         }
   17656             : 
   17657           0 :         push->flags |= ndr_push_flags;
   17658             : 
   17659           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   17660           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   17661           0 :                 TALLOC_FREE(push);
   17662           0 :                 PyErr_SetNdrError(err);
   17663           0 :                 return NULL;
   17664             :         }
   17665           0 :         blob = ndr_push_blob(push);
   17666           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   17667           0 :         TALLOC_FREE(push);
   17668           0 :         return ret;
   17669             : }
   17670             : 
   17671           0 : static PyObject *py_wbint_PamAuthChangePassword_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   17672             : {
   17673           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   17674           0 :         PyObject *bigendian_obj = NULL;
   17675           0 :         PyObject *ndr64_obj = NULL;
   17676           0 :         libndr_flags ndr_push_flags = 0;
   17677             : 
   17678           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   17679             :                 discard_const_p(char *, kwnames),
   17680             :                 &bigendian_obj,
   17681             :                 &ndr64_obj)) {
   17682           0 :                 return NULL;
   17683             :         }
   17684             : 
   17685           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   17686           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   17687             :         }
   17688           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   17689           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   17690             :         }
   17691             : 
   17692           0 :         return py_wbint_PamAuthChangePassword_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   17693             : }
   17694             : 
   17695           0 : static PyObject *py_wbint_PamAuthChangePassword_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   17696             : {
   17697           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   17698           0 :         PyObject *bigendian_obj = NULL;
   17699           0 :         PyObject *ndr64_obj = NULL;
   17700           0 :         libndr_flags ndr_push_flags = 0;
   17701             : 
   17702           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   17703             :                 discard_const_p(char *, kwnames),
   17704             :                 &bigendian_obj,
   17705             :                 &ndr64_obj)) {
   17706           0 :                 return NULL;
   17707             :         }
   17708             : 
   17709           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   17710           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   17711             :         }
   17712           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   17713           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   17714             :         }
   17715             : 
   17716           0 :         return py_wbint_PamAuthChangePassword_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   17717             : }
   17718             : 
   17719           0 : static PyObject *py_wbint_PamAuthChangePassword_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   17720             : {
   17721           0 :         const struct ndr_interface_call *call = NULL;
   17722           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   17723           0 :         struct ndr_pull *pull = NULL;
   17724           0 :         enum ndr_err_code err;
   17725             : 
   17726           0 :         if (ndr_table_winbind.num_calls < 27) {
   17727           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuthChangePassword_ndr_unpack");
   17728           0 :                 return NULL;
   17729             :         }
   17730           0 :         call = &ndr_table_winbind.calls[26];
   17731             : 
   17732           0 :         pull = ndr_pull_init_blob(blob, object);
   17733           0 :         if (pull == NULL) {
   17734           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   17735           0 :                 return NULL;
   17736             :         }
   17737             : 
   17738           0 :         pull->flags |= ndr_pull_flags;
   17739             : 
   17740           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   17741           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   17742           0 :                 TALLOC_FREE(pull);
   17743           0 :                 PyErr_SetNdrError(err);
   17744           0 :                 return NULL;
   17745             :         }
   17746           0 :         if (!allow_remaining) {
   17747           0 :                 uint32_t highest_ofs;
   17748             : 
   17749           0 :                 if (pull->offset > pull->relative_highest_offset) {
   17750           0 :                         highest_ofs = pull->offset;
   17751             :                 } else {
   17752           0 :                         highest_ofs = pull->relative_highest_offset;
   17753             :                 }
   17754           0 :                 if (highest_ofs < pull->data_size) {
   17755           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   17756             :                                 "not all bytes consumed ofs[%u] size[%u]",
   17757             :                                 highest_ofs, pull->data_size);
   17758           0 :                         TALLOC_FREE(pull);
   17759           0 :                         PyErr_SetNdrError(err);
   17760           0 :                         return NULL;
   17761             :                 }
   17762             :         }
   17763             : 
   17764           0 :         TALLOC_FREE(pull);
   17765           0 :         Py_RETURN_NONE;
   17766             : }
   17767             : 
   17768           0 : static PyObject *py_wbint_PamAuthChangePassword_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   17769             : {
   17770           0 :         DATA_BLOB blob;
   17771           0 :         Py_ssize_t blob_length = 0;
   17772           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   17773           0 :         PyObject *bigendian_obj = NULL;
   17774           0 :         PyObject *ndr64_obj = NULL;
   17775           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   17776           0 :         PyObject *allow_remaining_obj = NULL;
   17777           0 :         bool allow_remaining = false;
   17778             : 
   17779           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   17780             :                 discard_const_p(char *, kwnames),
   17781             :                 &blob.data, &blob_length,
   17782             :                 &bigendian_obj,
   17783             :                 &ndr64_obj,
   17784             :                 &allow_remaining_obj)) {
   17785           0 :                 return NULL;
   17786             :         }
   17787           0 :         blob.length = blob_length;
   17788             : 
   17789           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   17790           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   17791             :         }
   17792           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   17793           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   17794             :         }
   17795             : 
   17796           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   17797           0 :                 allow_remaining = true;
   17798             :         }
   17799             : 
   17800           0 :         return py_wbint_PamAuthChangePassword_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   17801             : }
   17802             : 
   17803           0 : static PyObject *py_wbint_PamAuthChangePassword_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   17804             : {
   17805           0 :         DATA_BLOB blob;
   17806           0 :         Py_ssize_t blob_length = 0;
   17807           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   17808           0 :         PyObject *bigendian_obj = NULL;
   17809           0 :         PyObject *ndr64_obj = NULL;
   17810           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   17811           0 :         PyObject *allow_remaining_obj = NULL;
   17812           0 :         bool allow_remaining = false;
   17813             : 
   17814           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   17815             :                 discard_const_p(char *, kwnames),
   17816             :                 &blob.data, &blob_length,
   17817             :                 &bigendian_obj,
   17818             :                 &ndr64_obj,
   17819             :                 &allow_remaining_obj)) {
   17820           0 :                 return NULL;
   17821             :         }
   17822           0 :         blob.length = blob_length;
   17823             : 
   17824           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   17825           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   17826             :         }
   17827           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   17828           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   17829             :         }
   17830             : 
   17831           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   17832           0 :                 allow_remaining = true;
   17833             :         }
   17834             : 
   17835           0 :         return py_wbint_PamAuthChangePassword_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   17836             : }
   17837             : 
   17838           0 : static PyObject *py_wbint_PamAuthChangePassword_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   17839             : {
   17840           0 :         const struct ndr_interface_call *call = NULL;
   17841           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   17842           0 :         PyObject *ret;
   17843           0 :         char *retstr;
   17844             : 
   17845           0 :         if (ndr_table_winbind.num_calls < 27) {
   17846           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuthChangePassword_ndr_print");
   17847           0 :                 return NULL;
   17848             :         }
   17849           0 :         call = &ndr_table_winbind.calls[26];
   17850             : 
   17851           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   17852           0 :         ret = PyUnicode_FromString(retstr);
   17853           0 :         TALLOC_FREE(retstr);
   17854             : 
   17855           0 :         return ret;
   17856             : }
   17857             : 
   17858           0 : static PyObject *py_wbint_PamAuthChangePassword_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   17859             : {
   17860           0 :         return py_wbint_PamAuthChangePassword_ndr_print(py_obj, "wbint_PamAuthChangePassword_in", NDR_IN);
   17861             : }
   17862             : 
   17863           0 : static PyObject *py_wbint_PamAuthChangePassword_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   17864             : {
   17865           0 :         return py_wbint_PamAuthChangePassword_ndr_print(py_obj, "wbint_PamAuthChangePassword_out", NDR_OUT);
   17866             : }
   17867             : 
   17868             : static PyMethodDef py_wbint_PamAuthChangePassword_methods[] = {
   17869             :         { "opnum", (PyCFunction)py_wbint_PamAuthChangePassword_ndr_opnum, METH_NOARGS|METH_CLASS,
   17870             :                 "winbind.wbint_PamAuthChangePassword.opnum() -> 26 (0x1a) " },
   17871             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthChangePassword_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   17872             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   17873             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthChangePassword_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   17874             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   17875             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthChangePassword_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   17876             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   17877             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthChangePassword_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   17878             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   17879             :         { "__ndr_print_in__", (PyCFunction)py_wbint_PamAuthChangePassword_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   17880             :         { "__ndr_print_out__", (PyCFunction)py_wbint_PamAuthChangePassword_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   17881             :         { NULL, NULL, 0, NULL }
   17882             : };
   17883             : 
   17884             : 
   17885             : static PyTypeObject wbint_PamAuthChangePassword_Type = {
   17886             :         PyVarObject_HEAD_INIT(NULL, 0)
   17887             :         .tp_name = "winbind.wbint_PamAuthChangePassword",
   17888             :         .tp_getset = py_wbint_PamAuthChangePassword_getsetters,
   17889             :         .tp_methods = py_wbint_PamAuthChangePassword_methods,
   17890             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17891             :         .tp_new = py_wbint_PamAuthChangePassword_new,
   17892             : };
   17893             : 
   17894           0 : static bool pack_py_wbint_PamAuthChangePassword_args_in(PyObject *args, PyObject *kwargs, struct wbint_PamAuthChangePassword *r)
   17895             : {
   17896           0 :         PyObject *py_client_name;
   17897           0 :         PyObject *py_client_pid;
   17898           0 :         PyObject *py_flags;
   17899           0 :         PyObject *py_user;
   17900           0 :         PyObject *py_old_password;
   17901           0 :         PyObject *py_new_password;
   17902           0 :         const char *kwnames[] = {
   17903             :                 "client_name", "client_pid", "flags", "user", "old_password", "new_password", NULL
   17904             :         };
   17905             : 
   17906           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:wbint_PamAuthChangePassword", discard_const_p(char *, kwnames), &py_client_name, &py_client_pid, &py_flags, &py_user, &py_old_password, &py_new_password)) {
   17907           0 :                 return false;
   17908             :         }
   17909             : 
   17910           0 :         if (py_client_name == NULL) {
   17911           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_name");
   17912           0 :                 return false;
   17913             :         }
   17914           0 :         r->in.client_name = talloc_ptrtype(r, r->in.client_name);
   17915           0 :         if (r->in.client_name == NULL) {
   17916           0 :                 PyErr_NoMemory();
   17917           0 :                 return false;
   17918             :         }
   17919             :         {
   17920           0 :                 const char *test_str;
   17921           0 :                 const char *talloc_str;
   17922           0 :                 PyObject *unicode = NULL;
   17923           0 :                 if (PyUnicode_Check(py_client_name)) {
   17924           0 :                         unicode = PyUnicode_AsEncodedString(py_client_name, "utf-8", "ignore");
   17925           0 :                         if (unicode == NULL) {
   17926           0 :                                 PyErr_NoMemory();
   17927           0 :                                 return false;
   17928             :                         }
   17929           0 :                         test_str = PyBytes_AS_STRING(unicode);
   17930           0 :                 } else if (PyBytes_Check(py_client_name)) {
   17931           0 :                         test_str = PyBytes_AS_STRING(py_client_name);
   17932             :                 } else {
   17933           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client_name)->tp_name);
   17934           0 :                         return false;
   17935             :                 }
   17936           0 :                 talloc_str = talloc_strdup(r, test_str);
   17937           0 :                 if (unicode != NULL) {
   17938           0 :                         Py_DECREF(unicode);
   17939             :                 }
   17940           0 :                 if (talloc_str == NULL) {
   17941           0 :                         PyErr_NoMemory();
   17942           0 :                         return false;
   17943             :                 }
   17944           0 :                 r->in.client_name = talloc_str;
   17945             :         }
   17946           0 :         if (py_client_pid == NULL) {
   17947           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_pid");
   17948           0 :                 return false;
   17949             :         }
   17950             :         {
   17951           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.client_pid));
   17952           0 :                 if (PyLong_Check(py_client_pid)) {
   17953           0 :                         unsigned long long test_var;
   17954           0 :                         test_var = PyLong_AsUnsignedLongLong(py_client_pid);
   17955           0 :                         if (PyErr_Occurred() != NULL) {
   17956           0 :                                 return false;
   17957             :                         }
   17958           0 :                         if (test_var > uint_max) {
   17959           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17960             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17961           0 :                                 return false;
   17962             :                         }
   17963           0 :                         r->in.client_pid = test_var;
   17964             :                 } else {
   17965           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17966             :                           PyLong_Type.tp_name);
   17967           0 :                         return false;
   17968             :                 }
   17969             :         }
   17970           0 :         if (py_flags == NULL) {
   17971           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   17972           0 :                 return false;
   17973             :         }
   17974             :         {
   17975           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   17976           0 :                 if (PyLong_Check(py_flags)) {
   17977           0 :                         unsigned long long test_var;
   17978           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   17979           0 :                         if (PyErr_Occurred() != NULL) {
   17980           0 :                                 return false;
   17981             :                         }
   17982           0 :                         if (test_var > uint_max) {
   17983           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17984             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17985           0 :                                 return false;
   17986             :                         }
   17987           0 :                         r->in.flags = test_var;
   17988             :                 } else {
   17989           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17990             :                           PyLong_Type.tp_name);
   17991           0 :                         return false;
   17992             :                 }
   17993             :         }
   17994           0 :         if (py_user == NULL) {
   17995           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.user");
   17996           0 :                 return false;
   17997             :         }
   17998           0 :         r->in.user = talloc_ptrtype(r, r->in.user);
   17999           0 :         if (r->in.user == NULL) {
   18000           0 :                 PyErr_NoMemory();
   18001           0 :                 return false;
   18002             :         }
   18003             :         {
   18004           0 :                 const char *test_str;
   18005           0 :                 const char *talloc_str;
   18006           0 :                 PyObject *unicode = NULL;
   18007           0 :                 if (PyUnicode_Check(py_user)) {
   18008           0 :                         unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
   18009           0 :                         if (unicode == NULL) {
   18010           0 :                                 PyErr_NoMemory();
   18011           0 :                                 return false;
   18012             :                         }
   18013           0 :                         test_str = PyBytes_AS_STRING(unicode);
   18014           0 :                 } else if (PyBytes_Check(py_user)) {
   18015           0 :                         test_str = PyBytes_AS_STRING(py_user);
   18016             :                 } else {
   18017           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
   18018           0 :                         return false;
   18019             :                 }
   18020           0 :                 talloc_str = talloc_strdup(r, test_str);
   18021           0 :                 if (unicode != NULL) {
   18022           0 :                         Py_DECREF(unicode);
   18023             :                 }
   18024           0 :                 if (talloc_str == NULL) {
   18025           0 :                         PyErr_NoMemory();
   18026           0 :                         return false;
   18027             :                 }
   18028           0 :                 r->in.user = talloc_str;
   18029             :         }
   18030           0 :         if (py_old_password == NULL) {
   18031           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.old_password");
   18032           0 :                 return false;
   18033             :         }
   18034           0 :         r->in.old_password = talloc_ptrtype(r, r->in.old_password);
   18035           0 :         if (r->in.old_password == NULL) {
   18036           0 :                 PyErr_NoMemory();
   18037           0 :                 return false;
   18038             :         }
   18039             :         {
   18040           0 :                 const char *test_str;
   18041           0 :                 const char *talloc_str;
   18042           0 :                 PyObject *unicode = NULL;
   18043           0 :                 if (PyUnicode_Check(py_old_password)) {
   18044           0 :                         unicode = PyUnicode_AsEncodedString(py_old_password, "utf-8", "ignore");
   18045           0 :                         if (unicode == NULL) {
   18046           0 :                                 PyErr_NoMemory();
   18047           0 :                                 return false;
   18048             :                         }
   18049           0 :                         test_str = PyBytes_AS_STRING(unicode);
   18050           0 :                 } else if (PyBytes_Check(py_old_password)) {
   18051           0 :                         test_str = PyBytes_AS_STRING(py_old_password);
   18052             :                 } else {
   18053           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_old_password)->tp_name);
   18054           0 :                         return false;
   18055             :                 }
   18056           0 :                 talloc_str = talloc_strdup(r, test_str);
   18057           0 :                 if (unicode != NULL) {
   18058           0 :                         Py_DECREF(unicode);
   18059             :                 }
   18060           0 :                 if (talloc_str == NULL) {
   18061           0 :                         PyErr_NoMemory();
   18062           0 :                         return false;
   18063             :                 }
   18064           0 :                 r->in.old_password = talloc_str;
   18065             :         }
   18066           0 :         if (py_new_password == NULL) {
   18067           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.new_password");
   18068           0 :                 return false;
   18069             :         }
   18070           0 :         r->in.new_password = talloc_ptrtype(r, r->in.new_password);
   18071           0 :         if (r->in.new_password == NULL) {
   18072           0 :                 PyErr_NoMemory();
   18073           0 :                 return false;
   18074             :         }
   18075             :         {
   18076           0 :                 const char *test_str;
   18077           0 :                 const char *talloc_str;
   18078           0 :                 PyObject *unicode = NULL;
   18079           0 :                 if (PyUnicode_Check(py_new_password)) {
   18080           0 :                         unicode = PyUnicode_AsEncodedString(py_new_password, "utf-8", "ignore");
   18081           0 :                         if (unicode == NULL) {
   18082           0 :                                 PyErr_NoMemory();
   18083           0 :                                 return false;
   18084             :                         }
   18085           0 :                         test_str = PyBytes_AS_STRING(unicode);
   18086           0 :                 } else if (PyBytes_Check(py_new_password)) {
   18087           0 :                         test_str = PyBytes_AS_STRING(py_new_password);
   18088             :                 } else {
   18089           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_new_password)->tp_name);
   18090           0 :                         return false;
   18091             :                 }
   18092           0 :                 talloc_str = talloc_strdup(r, test_str);
   18093           0 :                 if (unicode != NULL) {
   18094           0 :                         Py_DECREF(unicode);
   18095             :                 }
   18096           0 :                 if (talloc_str == NULL) {
   18097           0 :                         PyErr_NoMemory();
   18098           0 :                         return false;
   18099             :                 }
   18100           0 :                 r->in.new_password = talloc_str;
   18101             :         }
   18102           0 :         return true;
   18103             : }
   18104             : 
   18105           0 : static PyObject *unpack_py_wbint_PamAuthChangePassword_args_out(struct wbint_PamAuthChangePassword *r)
   18106             : {
   18107           0 :         PyObject *result;
   18108           0 :         PyObject *py_dominfo;
   18109           0 :         PyObject *py_reject_reason;
   18110           0 :         result = PyTuple_New(2);
   18111           0 :         if (*r->out.dominfo == NULL) {
   18112           0 :                 py_dominfo = Py_None;
   18113           0 :                 Py_INCREF(py_dominfo);
   18114             :         } else {
   18115           0 :                 py_dominfo = pytalloc_reference_ex(samr_DomInfo1_Type, *r->out.dominfo, *r->out.dominfo);
   18116             :         }
   18117           0 :         PyTuple_SetItem(result, 0, py_dominfo);
   18118           0 :         py_reject_reason = PyLong_FromUnsignedLongLong((uint32_t)*r->out.reject_reason);
   18119           0 :         PyTuple_SetItem(result, 1, py_reject_reason);
   18120           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   18121           0 :                 PyErr_SetNTSTATUS(r->out.result);
   18122           0 :                 return NULL;
   18123             :         }
   18124             : 
   18125           0 :         return result;
   18126             : }
   18127             : 
   18128             : 
   18129           0 : static PyObject *py_wbint_InitConnection_in_get_dcname(PyObject *obj, void *closure)
   18130             : {
   18131           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(obj);
   18132           0 :         PyObject *py_dcname;
   18133           0 :         if (object->in.dcname == NULL) {
   18134           0 :                 Py_RETURN_NONE;
   18135             :         }
   18136           0 :         if (object->in.dcname == NULL) {
   18137           0 :                 py_dcname = Py_None;
   18138           0 :                 Py_INCREF(py_dcname);
   18139             :         } else {
   18140           0 :                 py_dcname = PyUnicode_Decode(object->in.dcname, strlen(object->in.dcname), "utf-8", "ignore");
   18141             :         }
   18142           0 :         return py_dcname;
   18143             : }
   18144             : 
   18145           0 : static int py_wbint_InitConnection_in_set_dcname(PyObject *py_obj, PyObject *value, void *closure)
   18146             : {
   18147           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(py_obj);
   18148           0 :         if (value == NULL) {
   18149           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dcname");
   18150           0 :                 return -1;
   18151             :         }
   18152           0 :         object->in.dcname = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.dcname);
   18153           0 :         if (object->in.dcname == NULL) {
   18154           0 :                 PyErr_NoMemory();
   18155           0 :                 return -1;
   18156             :         }
   18157             :         {
   18158           0 :                 const char *test_str;
   18159           0 :                 const char *talloc_str;
   18160           0 :                 PyObject *unicode = NULL;
   18161           0 :                 if (PyUnicode_Check(value)) {
   18162           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   18163           0 :                         if (unicode == NULL) {
   18164           0 :                                 PyErr_NoMemory();
   18165           0 :                                 return -1;
   18166             :                         }
   18167           0 :                         test_str = PyBytes_AS_STRING(unicode);
   18168           0 :                 } else if (PyBytes_Check(value)) {
   18169           0 :                         test_str = PyBytes_AS_STRING(value);
   18170             :                 } else {
   18171           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   18172           0 :                         return -1;
   18173             :                 }
   18174           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   18175           0 :                 if (unicode != NULL) {
   18176           0 :                         Py_DECREF(unicode);
   18177             :                 }
   18178           0 :                 if (talloc_str == NULL) {
   18179           0 :                         PyErr_NoMemory();
   18180           0 :                         return -1;
   18181             :                 }
   18182           0 :                 object->in.dcname = talloc_str;
   18183             :         }
   18184           0 :         return 0;
   18185             : }
   18186             : 
   18187           0 : static PyObject *py_wbint_InitConnection_out_get_name(PyObject *obj, void *closure)
   18188             : {
   18189           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(obj);
   18190           0 :         PyObject *py_name;
   18191           0 :         if (object->out.name == NULL) {
   18192           0 :                 Py_RETURN_NONE;
   18193             :         }
   18194           0 :         if (*object->out.name == NULL) {
   18195           0 :                 py_name = Py_None;
   18196           0 :                 Py_INCREF(py_name);
   18197             :         } else {
   18198           0 :                 if (*object->out.name == NULL) {
   18199           0 :                         py_name = Py_None;
   18200           0 :                         Py_INCREF(py_name);
   18201             :                 } else {
   18202           0 :                         py_name = PyUnicode_Decode(*object->out.name, strlen(*object->out.name), "utf-8", "ignore");
   18203             :                 }
   18204             :         }
   18205           0 :         return py_name;
   18206             : }
   18207             : 
   18208           0 : static int py_wbint_InitConnection_out_set_name(PyObject *py_obj, PyObject *value, void *closure)
   18209             : {
   18210           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(py_obj);
   18211           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.name));
   18212           0 :         if (value == NULL) {
   18213           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.name");
   18214           0 :                 return -1;
   18215             :         }
   18216           0 :         object->out.name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.name);
   18217           0 :         if (object->out.name == NULL) {
   18218           0 :                 PyErr_NoMemory();
   18219           0 :                 return -1;
   18220             :         }
   18221           0 :         if (value == Py_None) {
   18222           0 :                 *object->out.name = NULL;
   18223             :         } else {
   18224           0 :                 *object->out.name = NULL;
   18225             :                 {
   18226           0 :                         const char *test_str;
   18227           0 :                         const char *talloc_str;
   18228           0 :                         PyObject *unicode = NULL;
   18229           0 :                         if (PyUnicode_Check(value)) {
   18230           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   18231           0 :                                 if (unicode == NULL) {
   18232           0 :                                         PyErr_NoMemory();
   18233           0 :                                         return -1;
   18234             :                                 }
   18235           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   18236           0 :                         } else if (PyBytes_Check(value)) {
   18237           0 :                                 test_str = PyBytes_AS_STRING(value);
   18238             :                         } else {
   18239           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   18240           0 :                                 return -1;
   18241             :                         }
   18242           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   18243           0 :                         if (unicode != NULL) {
   18244           0 :                                 Py_DECREF(unicode);
   18245             :                         }
   18246           0 :                         if (talloc_str == NULL) {
   18247           0 :                                 PyErr_NoMemory();
   18248           0 :                                 return -1;
   18249             :                         }
   18250           0 :                         *object->out.name = talloc_str;
   18251             :                 }
   18252             :         }
   18253           0 :         return 0;
   18254             : }
   18255             : 
   18256           0 : static PyObject *py_wbint_InitConnection_out_get_alt_name(PyObject *obj, void *closure)
   18257             : {
   18258           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(obj);
   18259           0 :         PyObject *py_alt_name;
   18260           0 :         if (object->out.alt_name == NULL) {
   18261           0 :                 Py_RETURN_NONE;
   18262             :         }
   18263           0 :         if (*object->out.alt_name == NULL) {
   18264           0 :                 py_alt_name = Py_None;
   18265           0 :                 Py_INCREF(py_alt_name);
   18266             :         } else {
   18267           0 :                 if (*object->out.alt_name == NULL) {
   18268           0 :                         py_alt_name = Py_None;
   18269           0 :                         Py_INCREF(py_alt_name);
   18270             :                 } else {
   18271           0 :                         py_alt_name = PyUnicode_Decode(*object->out.alt_name, strlen(*object->out.alt_name), "utf-8", "ignore");
   18272             :                 }
   18273             :         }
   18274           0 :         return py_alt_name;
   18275             : }
   18276             : 
   18277           0 : static int py_wbint_InitConnection_out_set_alt_name(PyObject *py_obj, PyObject *value, void *closure)
   18278             : {
   18279           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(py_obj);
   18280           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.alt_name));
   18281           0 :         if (value == NULL) {
   18282           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.alt_name");
   18283           0 :                 return -1;
   18284             :         }
   18285           0 :         object->out.alt_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.alt_name);
   18286           0 :         if (object->out.alt_name == NULL) {
   18287           0 :                 PyErr_NoMemory();
   18288           0 :                 return -1;
   18289             :         }
   18290           0 :         if (value == Py_None) {
   18291           0 :                 *object->out.alt_name = NULL;
   18292             :         } else {
   18293           0 :                 *object->out.alt_name = NULL;
   18294             :                 {
   18295           0 :                         const char *test_str;
   18296           0 :                         const char *talloc_str;
   18297           0 :                         PyObject *unicode = NULL;
   18298           0 :                         if (PyUnicode_Check(value)) {
   18299           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   18300           0 :                                 if (unicode == NULL) {
   18301           0 :                                         PyErr_NoMemory();
   18302           0 :                                         return -1;
   18303             :                                 }
   18304           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   18305           0 :                         } else if (PyBytes_Check(value)) {
   18306           0 :                                 test_str = PyBytes_AS_STRING(value);
   18307             :                         } else {
   18308           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   18309           0 :                                 return -1;
   18310             :                         }
   18311           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   18312           0 :                         if (unicode != NULL) {
   18313           0 :                                 Py_DECREF(unicode);
   18314             :                         }
   18315           0 :                         if (talloc_str == NULL) {
   18316           0 :                                 PyErr_NoMemory();
   18317           0 :                                 return -1;
   18318             :                         }
   18319           0 :                         *object->out.alt_name = talloc_str;
   18320             :                 }
   18321             :         }
   18322           0 :         return 0;
   18323             : }
   18324             : 
   18325           0 : static PyObject *py_wbint_InitConnection_out_get_sid(PyObject *obj, void *closure)
   18326             : {
   18327           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(obj);
   18328           0 :         PyObject *py_sid;
   18329           0 :         if (object->out.sid == NULL) {
   18330           0 :                 Py_RETURN_NONE;
   18331             :         }
   18332           0 :         py_sid = pytalloc_reference_ex(dom_sid_Type, object->out.sid, object->out.sid);
   18333           0 :         return py_sid;
   18334             : }
   18335             : 
   18336           0 : static int py_wbint_InitConnection_out_set_sid(PyObject *py_obj, PyObject *value, void *closure)
   18337             : {
   18338           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(py_obj);
   18339           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sid));
   18340           0 :         if (value == NULL) {
   18341           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.sid");
   18342           0 :                 return -1;
   18343             :         }
   18344           0 :         object->out.sid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sid);
   18345           0 :         if (object->out.sid == NULL) {
   18346           0 :                 PyErr_NoMemory();
   18347           0 :                 return -1;
   18348             :         }
   18349           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
   18350           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   18351           0 :                 PyErr_NoMemory();
   18352           0 :                 return -1;
   18353             :         }
   18354           0 :         object->out.sid = (struct dom_sid *)pytalloc_get_ptr(value);
   18355           0 :         return 0;
   18356             : }
   18357             : 
   18358           0 : static PyObject *py_wbint_InitConnection_out_get_flags(PyObject *obj, void *closure)
   18359             : {
   18360           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(obj);
   18361           0 :         PyObject *py_flags;
   18362           0 :         if (object->out.flags == NULL) {
   18363           0 :                 Py_RETURN_NONE;
   18364             :         }
   18365           0 :         py_flags = PyLong_FromLong((uint16_t)*object->out.flags);
   18366           0 :         return py_flags;
   18367             : }
   18368             : 
   18369           0 : static int py_wbint_InitConnection_out_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   18370             : {
   18371           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(py_obj);
   18372           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.flags));
   18373           0 :         if (value == NULL) {
   18374           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.flags");
   18375           0 :                 return -1;
   18376             :         }
   18377           0 :         object->out.flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.flags);
   18378           0 :         if (object->out.flags == NULL) {
   18379           0 :                 PyErr_NoMemory();
   18380           0 :                 return -1;
   18381             :         }
   18382             :         {
   18383           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.flags));
   18384           0 :                 if (PyLong_Check(value)) {
   18385           0 :                         unsigned long long test_var;
   18386           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18387           0 :                         if (PyErr_Occurred() != NULL) {
   18388           0 :                                 return -1;
   18389             :                         }
   18390           0 :                         if (test_var > uint_max) {
   18391           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18392             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18393           0 :                                 return -1;
   18394             :                         }
   18395           0 :                         *object->out.flags = test_var;
   18396             :                 } else {
   18397           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18398             :                           PyLong_Type.tp_name);
   18399           0 :                         return -1;
   18400             :                 }
   18401             :         }
   18402           0 :         return 0;
   18403             : }
   18404             : 
   18405           0 : static PyObject *py_wbint_InitConnection_get_result(PyObject *obj, void *closure)
   18406             : {
   18407           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(obj);
   18408           0 :         PyObject *py_result;
   18409           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   18410           0 :         return py_result;
   18411             : }
   18412             : 
   18413           0 : static int py_wbint_InitConnection_set_result(PyObject *py_obj, PyObject *value, void *closure)
   18414             : {
   18415           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(py_obj);
   18416           0 :         if (value == NULL) {
   18417           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   18418           0 :                 return -1;
   18419             :         }
   18420           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   18421           0 :         return 0;
   18422             : }
   18423             : 
   18424             : static PyGetSetDef py_wbint_InitConnection_getsetters[] = {
   18425             :         {
   18426             :                 .name = discard_const_p(char, "in_dcname"),
   18427             :                 .get = py_wbint_InitConnection_in_get_dcname,
   18428             :                 .set = py_wbint_InitConnection_in_set_dcname,
   18429             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   18430             :         },
   18431             :         {
   18432             :                 .name = discard_const_p(char, "out_name"),
   18433             :                 .get = py_wbint_InitConnection_out_get_name,
   18434             :                 .set = py_wbint_InitConnection_out_set_name,
   18435             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   18436             :         },
   18437             :         {
   18438             :                 .name = discard_const_p(char, "out_alt_name"),
   18439             :                 .get = py_wbint_InitConnection_out_get_alt_name,
   18440             :                 .set = py_wbint_InitConnection_out_set_alt_name,
   18441             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   18442             :         },
   18443             :         {
   18444             :                 .name = discard_const_p(char, "out_sid"),
   18445             :                 .get = py_wbint_InitConnection_out_get_sid,
   18446             :                 .set = py_wbint_InitConnection_out_set_sid,
   18447             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
   18448             :         },
   18449             :         {
   18450             :                 .name = discard_const_p(char, "out_flags"),
   18451             :                 .get = py_wbint_InitConnection_out_get_flags,
   18452             :                 .set = py_wbint_InitConnection_out_set_flags,
   18453             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DomainInfoFlags")
   18454             :         },
   18455             :         {
   18456             :                 .name = discard_const_p(char, "result"),
   18457             :                 .get = py_wbint_InitConnection_get_result,
   18458             :                 .set = py_wbint_InitConnection_set_result,
   18459             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   18460             :         },
   18461             :         { .name = NULL }
   18462             : };
   18463             : 
   18464           0 : static PyObject *py_wbint_InitConnection_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18465             : {
   18466           0 :         PyObject *self = pytalloc_new(struct wbint_InitConnection, type);
   18467           0 :         struct wbint_InitConnection *_self = (struct wbint_InitConnection *)pytalloc_get_ptr(self);
   18468           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   18469           0 :         _self->out.sid = talloc_zero(mem_ctx, struct dom_sid);
   18470           0 :         _self->out.flags = talloc_zero(mem_ctx, enum DomainInfoFlags);
   18471           0 :         return self;
   18472             : }
   18473             : 
   18474           0 : static PyObject *py_wbint_InitConnection_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   18475             : {
   18476             : 
   18477             : 
   18478           0 :         return PyLong_FromLong(27);
   18479             : }
   18480             : 
   18481           0 : static PyObject *py_wbint_InitConnection_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   18482             : {
   18483           0 :         const struct ndr_interface_call *call = NULL;
   18484           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(py_obj);
   18485           0 :         PyObject *ret = NULL;
   18486           0 :         struct ndr_push *push = NULL;
   18487           0 :         DATA_BLOB blob;
   18488           0 :         enum ndr_err_code err;
   18489             : 
   18490           0 :         if (ndr_table_winbind.num_calls < 28) {
   18491           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_InitConnection_ndr_pack");
   18492           0 :                 return NULL;
   18493             :         }
   18494           0 :         call = &ndr_table_winbind.calls[27];
   18495             : 
   18496           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   18497           0 :         if (push == NULL) {
   18498           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   18499           0 :                 return NULL;
   18500             :         }
   18501             : 
   18502           0 :         push->flags |= ndr_push_flags;
   18503             : 
   18504           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   18505           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   18506           0 :                 TALLOC_FREE(push);
   18507           0 :                 PyErr_SetNdrError(err);
   18508           0 :                 return NULL;
   18509             :         }
   18510           0 :         blob = ndr_push_blob(push);
   18511           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   18512           0 :         TALLOC_FREE(push);
   18513           0 :         return ret;
   18514             : }
   18515             : 
   18516           0 : static PyObject *py_wbint_InitConnection_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   18517             : {
   18518           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   18519           0 :         PyObject *bigendian_obj = NULL;
   18520           0 :         PyObject *ndr64_obj = NULL;
   18521           0 :         libndr_flags ndr_push_flags = 0;
   18522             : 
   18523           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   18524             :                 discard_const_p(char *, kwnames),
   18525             :                 &bigendian_obj,
   18526             :                 &ndr64_obj)) {
   18527           0 :                 return NULL;
   18528             :         }
   18529             : 
   18530           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   18531           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   18532             :         }
   18533           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   18534           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   18535             :         }
   18536             : 
   18537           0 :         return py_wbint_InitConnection_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   18538             : }
   18539             : 
   18540           0 : static PyObject *py_wbint_InitConnection_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   18541             : {
   18542           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   18543           0 :         PyObject *bigendian_obj = NULL;
   18544           0 :         PyObject *ndr64_obj = NULL;
   18545           0 :         libndr_flags ndr_push_flags = 0;
   18546             : 
   18547           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   18548             :                 discard_const_p(char *, kwnames),
   18549             :                 &bigendian_obj,
   18550             :                 &ndr64_obj)) {
   18551           0 :                 return NULL;
   18552             :         }
   18553             : 
   18554           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   18555           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   18556             :         }
   18557           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   18558           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   18559             :         }
   18560             : 
   18561           0 :         return py_wbint_InitConnection_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   18562             : }
   18563             : 
   18564           0 : static PyObject *py_wbint_InitConnection_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   18565             : {
   18566           0 :         const struct ndr_interface_call *call = NULL;
   18567           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(py_obj);
   18568           0 :         struct ndr_pull *pull = NULL;
   18569           0 :         enum ndr_err_code err;
   18570             : 
   18571           0 :         if (ndr_table_winbind.num_calls < 28) {
   18572           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_InitConnection_ndr_unpack");
   18573           0 :                 return NULL;
   18574             :         }
   18575           0 :         call = &ndr_table_winbind.calls[27];
   18576             : 
   18577           0 :         pull = ndr_pull_init_blob(blob, object);
   18578           0 :         if (pull == NULL) {
   18579           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   18580           0 :                 return NULL;
   18581             :         }
   18582             : 
   18583           0 :         pull->flags |= ndr_pull_flags;
   18584             : 
   18585           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   18586           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   18587           0 :                 TALLOC_FREE(pull);
   18588           0 :                 PyErr_SetNdrError(err);
   18589           0 :                 return NULL;
   18590             :         }
   18591           0 :         if (!allow_remaining) {
   18592           0 :                 uint32_t highest_ofs;
   18593             : 
   18594           0 :                 if (pull->offset > pull->relative_highest_offset) {
   18595           0 :                         highest_ofs = pull->offset;
   18596             :                 } else {
   18597           0 :                         highest_ofs = pull->relative_highest_offset;
   18598             :                 }
   18599           0 :                 if (highest_ofs < pull->data_size) {
   18600           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   18601             :                                 "not all bytes consumed ofs[%u] size[%u]",
   18602             :                                 highest_ofs, pull->data_size);
   18603           0 :                         TALLOC_FREE(pull);
   18604           0 :                         PyErr_SetNdrError(err);
   18605           0 :                         return NULL;
   18606             :                 }
   18607             :         }
   18608             : 
   18609           0 :         TALLOC_FREE(pull);
   18610           0 :         Py_RETURN_NONE;
   18611             : }
   18612             : 
   18613           0 : static PyObject *py_wbint_InitConnection_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   18614             : {
   18615           0 :         DATA_BLOB blob;
   18616           0 :         Py_ssize_t blob_length = 0;
   18617           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   18618           0 :         PyObject *bigendian_obj = NULL;
   18619           0 :         PyObject *ndr64_obj = NULL;
   18620           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   18621           0 :         PyObject *allow_remaining_obj = NULL;
   18622           0 :         bool allow_remaining = false;
   18623             : 
   18624           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   18625             :                 discard_const_p(char *, kwnames),
   18626             :                 &blob.data, &blob_length,
   18627             :                 &bigendian_obj,
   18628             :                 &ndr64_obj,
   18629             :                 &allow_remaining_obj)) {
   18630           0 :                 return NULL;
   18631             :         }
   18632           0 :         blob.length = blob_length;
   18633             : 
   18634           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   18635           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   18636             :         }
   18637           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   18638           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   18639             :         }
   18640             : 
   18641           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   18642           0 :                 allow_remaining = true;
   18643             :         }
   18644             : 
   18645           0 :         return py_wbint_InitConnection_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   18646             : }
   18647             : 
   18648           0 : static PyObject *py_wbint_InitConnection_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   18649             : {
   18650           0 :         DATA_BLOB blob;
   18651           0 :         Py_ssize_t blob_length = 0;
   18652           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   18653           0 :         PyObject *bigendian_obj = NULL;
   18654           0 :         PyObject *ndr64_obj = NULL;
   18655           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   18656           0 :         PyObject *allow_remaining_obj = NULL;
   18657           0 :         bool allow_remaining = false;
   18658             : 
   18659           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   18660             :                 discard_const_p(char *, kwnames),
   18661             :                 &blob.data, &blob_length,
   18662             :                 &bigendian_obj,
   18663             :                 &ndr64_obj,
   18664             :                 &allow_remaining_obj)) {
   18665           0 :                 return NULL;
   18666             :         }
   18667           0 :         blob.length = blob_length;
   18668             : 
   18669           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   18670           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   18671             :         }
   18672           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   18673           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   18674             :         }
   18675             : 
   18676           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   18677           0 :                 allow_remaining = true;
   18678             :         }
   18679             : 
   18680           0 :         return py_wbint_InitConnection_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   18681             : }
   18682             : 
   18683           0 : static PyObject *py_wbint_InitConnection_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   18684             : {
   18685           0 :         const struct ndr_interface_call *call = NULL;
   18686           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(py_obj);
   18687           0 :         PyObject *ret;
   18688           0 :         char *retstr;
   18689             : 
   18690           0 :         if (ndr_table_winbind.num_calls < 28) {
   18691           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_InitConnection_ndr_print");
   18692           0 :                 return NULL;
   18693             :         }
   18694           0 :         call = &ndr_table_winbind.calls[27];
   18695             : 
   18696           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   18697           0 :         ret = PyUnicode_FromString(retstr);
   18698           0 :         TALLOC_FREE(retstr);
   18699             : 
   18700           0 :         return ret;
   18701             : }
   18702             : 
   18703           0 : static PyObject *py_wbint_InitConnection_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   18704             : {
   18705           0 :         return py_wbint_InitConnection_ndr_print(py_obj, "wbint_InitConnection_in", NDR_IN);
   18706             : }
   18707             : 
   18708           0 : static PyObject *py_wbint_InitConnection_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   18709             : {
   18710           0 :         return py_wbint_InitConnection_ndr_print(py_obj, "wbint_InitConnection_out", NDR_OUT);
   18711             : }
   18712             : 
   18713             : static PyMethodDef py_wbint_InitConnection_methods[] = {
   18714             :         { "opnum", (PyCFunction)py_wbint_InitConnection_ndr_opnum, METH_NOARGS|METH_CLASS,
   18715             :                 "winbind.wbint_InitConnection.opnum() -> 27 (0x1b) " },
   18716             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_InitConnection_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   18717             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   18718             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_InitConnection_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   18719             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   18720             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_InitConnection_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   18721             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   18722             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_InitConnection_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   18723             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   18724             :         { "__ndr_print_in__", (PyCFunction)py_wbint_InitConnection_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   18725             :         { "__ndr_print_out__", (PyCFunction)py_wbint_InitConnection_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   18726             :         { NULL, NULL, 0, NULL }
   18727             : };
   18728             : 
   18729             : 
   18730             : static PyTypeObject wbint_InitConnection_Type = {
   18731             :         PyVarObject_HEAD_INIT(NULL, 0)
   18732             :         .tp_name = "winbind.wbint_InitConnection",
   18733             :         .tp_getset = py_wbint_InitConnection_getsetters,
   18734             :         .tp_methods = py_wbint_InitConnection_methods,
   18735             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   18736             :         .tp_new = py_wbint_InitConnection_new,
   18737             : };
   18738             : 
   18739           0 : static bool pack_py_wbint_InitConnection_args_in(PyObject *args, PyObject *kwargs, struct wbint_InitConnection *r)
   18740             : {
   18741           0 :         PyObject *py_dcname;
   18742           0 :         const char *kwnames[] = {
   18743             :                 "dcname", NULL
   18744             :         };
   18745             : 
   18746           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:wbint_InitConnection", discard_const_p(char *, kwnames), &py_dcname)) {
   18747           0 :                 return false;
   18748             :         }
   18749             : 
   18750           0 :         if (py_dcname == NULL) {
   18751           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dcname");
   18752           0 :                 return false;
   18753             :         }
   18754           0 :         r->in.dcname = talloc_ptrtype(r, r->in.dcname);
   18755           0 :         if (r->in.dcname == NULL) {
   18756           0 :                 PyErr_NoMemory();
   18757           0 :                 return false;
   18758             :         }
   18759             :         {
   18760           0 :                 const char *test_str;
   18761           0 :                 const char *talloc_str;
   18762           0 :                 PyObject *unicode = NULL;
   18763           0 :                 if (PyUnicode_Check(py_dcname)) {
   18764           0 :                         unicode = PyUnicode_AsEncodedString(py_dcname, "utf-8", "ignore");
   18765           0 :                         if (unicode == NULL) {
   18766           0 :                                 PyErr_NoMemory();
   18767           0 :                                 return false;
   18768             :                         }
   18769           0 :                         test_str = PyBytes_AS_STRING(unicode);
   18770           0 :                 } else if (PyBytes_Check(py_dcname)) {
   18771           0 :                         test_str = PyBytes_AS_STRING(py_dcname);
   18772             :                 } else {
   18773           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dcname)->tp_name);
   18774           0 :                         return false;
   18775             :                 }
   18776           0 :                 talloc_str = talloc_strdup(r, test_str);
   18777           0 :                 if (unicode != NULL) {
   18778           0 :                         Py_DECREF(unicode);
   18779             :                 }
   18780           0 :                 if (talloc_str == NULL) {
   18781           0 :                         PyErr_NoMemory();
   18782           0 :                         return false;
   18783             :                 }
   18784           0 :                 r->in.dcname = talloc_str;
   18785             :         }
   18786           0 :         return true;
   18787             : }
   18788             : 
   18789           0 : static PyObject *unpack_py_wbint_InitConnection_args_out(struct wbint_InitConnection *r)
   18790             : {
   18791           0 :         PyObject *result;
   18792           0 :         PyObject *py_name;
   18793           0 :         PyObject *py_alt_name;
   18794           0 :         PyObject *py_sid;
   18795           0 :         PyObject *py_flags;
   18796           0 :         result = PyTuple_New(4);
   18797           0 :         if (*r->out.name == NULL) {
   18798           0 :                 py_name = Py_None;
   18799           0 :                 Py_INCREF(py_name);
   18800             :         } else {
   18801           0 :                 if (*r->out.name == NULL) {
   18802           0 :                         py_name = Py_None;
   18803           0 :                         Py_INCREF(py_name);
   18804             :                 } else {
   18805           0 :                         py_name = PyUnicode_Decode(*r->out.name, strlen(*r->out.name), "utf-8", "ignore");
   18806             :                 }
   18807             :         }
   18808           0 :         PyTuple_SetItem(result, 0, py_name);
   18809           0 :         if (*r->out.alt_name == NULL) {
   18810           0 :                 py_alt_name = Py_None;
   18811           0 :                 Py_INCREF(py_alt_name);
   18812             :         } else {
   18813           0 :                 if (*r->out.alt_name == NULL) {
   18814           0 :                         py_alt_name = Py_None;
   18815           0 :                         Py_INCREF(py_alt_name);
   18816             :                 } else {
   18817           0 :                         py_alt_name = PyUnicode_Decode(*r->out.alt_name, strlen(*r->out.alt_name), "utf-8", "ignore");
   18818             :                 }
   18819             :         }
   18820           0 :         PyTuple_SetItem(result, 1, py_alt_name);
   18821           0 :         py_sid = pytalloc_reference_ex(dom_sid_Type, r->out.sid, r->out.sid);
   18822           0 :         PyTuple_SetItem(result, 2, py_sid);
   18823           0 :         py_flags = PyLong_FromLong((uint16_t)*r->out.flags);
   18824           0 :         PyTuple_SetItem(result, 3, py_flags);
   18825           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   18826           0 :                 PyErr_SetNTSTATUS(r->out.result);
   18827           0 :                 return NULL;
   18828             :         }
   18829             : 
   18830           0 :         return result;
   18831             : }
   18832             : 
   18833             : 
   18834           0 : static PyObject *py_winbind_SamLogon_in_get_logon_level(PyObject *obj, void *closure)
   18835             : {
   18836           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(obj);
   18837           0 :         PyObject *py_logon_level;
   18838           0 :         py_logon_level = PyLong_FromLong((uint16_t)object->in.logon_level);
   18839           0 :         return py_logon_level;
   18840             : }
   18841             : 
   18842           0 : static int py_winbind_SamLogon_in_set_logon_level(PyObject *py_obj, PyObject *value, void *closure)
   18843             : {
   18844           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(py_obj);
   18845           0 :         if (value == NULL) {
   18846           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_level");
   18847           0 :                 return -1;
   18848             :         }
   18849             :         {
   18850           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.logon_level));
   18851           0 :                 if (PyLong_Check(value)) {
   18852           0 :                         unsigned long long test_var;
   18853           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18854           0 :                         if (PyErr_Occurred() != NULL) {
   18855           0 :                                 return -1;
   18856             :                         }
   18857           0 :                         if (test_var > uint_max) {
   18858           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18859             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18860           0 :                                 return -1;
   18861             :                         }
   18862           0 :                         object->in.logon_level = test_var;
   18863             :                 } else {
   18864           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18865             :                           PyLong_Type.tp_name);
   18866           0 :                         return -1;
   18867             :                 }
   18868             :         }
   18869           0 :         return 0;
   18870             : }
   18871             : 
   18872           0 : static PyObject *py_winbind_SamLogon_in_get_logon(PyObject *obj, void *closure)
   18873             : {
   18874           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(obj);
   18875           0 :         PyObject *py_logon;
   18876           0 :         py_logon = pyrpc_import_union(netr_LogonLevel_Type, pytalloc_get_mem_ctx(obj), object->in.logon_level, &object->in.logon, "union netr_LogonLevel");
   18877           0 :         if (py_logon == NULL) {
   18878           0 :                 return NULL;
   18879             :         }
   18880           0 :         return py_logon;
   18881             : }
   18882             : 
   18883           0 : static int py_winbind_SamLogon_in_set_logon(PyObject *py_obj, PyObject *value, void *closure)
   18884             : {
   18885           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(py_obj);
   18886           0 :         if (value == NULL) {
   18887           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon");
   18888           0 :                 return -1;
   18889             :         }
   18890             :         {
   18891           0 :                 union netr_LogonLevel *logon_switch_0;
   18892           0 :                 logon_switch_0 = (union netr_LogonLevel *)pyrpc_export_union(netr_LogonLevel_Type, pytalloc_get_mem_ctx(py_obj), object->in.logon_level, value, "union netr_LogonLevel");
   18893           0 :                 if (logon_switch_0 == NULL) {
   18894           0 :                         return -1;
   18895             :                 }
   18896           0 :                 object->in.logon = *logon_switch_0;
   18897             :         }
   18898           0 :         return 0;
   18899             : }
   18900             : 
   18901           0 : static PyObject *py_winbind_SamLogon_in_get_validation_level(PyObject *obj, void *closure)
   18902             : {
   18903           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(obj);
   18904           0 :         PyObject *py_validation_level;
   18905           0 :         py_validation_level = PyLong_FromLong((uint16_t)object->in.validation_level);
   18906           0 :         return py_validation_level;
   18907             : }
   18908             : 
   18909           0 : static int py_winbind_SamLogon_in_set_validation_level(PyObject *py_obj, PyObject *value, void *closure)
   18910             : {
   18911           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(py_obj);
   18912           0 :         if (value == NULL) {
   18913           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.validation_level");
   18914           0 :                 return -1;
   18915             :         }
   18916             :         {
   18917           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.validation_level));
   18918           0 :                 if (PyLong_Check(value)) {
   18919           0 :                         unsigned long long test_var;
   18920           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18921           0 :                         if (PyErr_Occurred() != NULL) {
   18922           0 :                                 return -1;
   18923             :                         }
   18924           0 :                         if (test_var > uint_max) {
   18925           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18926             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18927           0 :                                 return -1;
   18928             :                         }
   18929           0 :                         object->in.validation_level = test_var;
   18930             :                 } else {
   18931           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18932             :                           PyLong_Type.tp_name);
   18933           0 :                         return -1;
   18934             :                 }
   18935             :         }
   18936           0 :         return 0;
   18937             : }
   18938             : 
   18939           0 : static PyObject *py_winbind_SamLogon_out_get_validation(PyObject *obj, void *closure)
   18940             : {
   18941           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(obj);
   18942           0 :         PyObject *py_validation;
   18943           0 :         py_validation = pyrpc_import_union(netr_Validation_Type, pytalloc_get_mem_ctx(obj), object->in.validation_level, &object->out.validation, "union netr_Validation");
   18944           0 :         if (py_validation == NULL) {
   18945           0 :                 return NULL;
   18946             :         }
   18947           0 :         return py_validation;
   18948             : }
   18949             : 
   18950           0 : static int py_winbind_SamLogon_out_set_validation(PyObject *py_obj, PyObject *value, void *closure)
   18951             : {
   18952           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(py_obj);
   18953           0 :         if (value == NULL) {
   18954           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.validation");
   18955           0 :                 return -1;
   18956             :         }
   18957             :         {
   18958           0 :                 union netr_Validation *validation_switch_0;
   18959           0 :                 validation_switch_0 = (union netr_Validation *)pyrpc_export_union(netr_Validation_Type, pytalloc_get_mem_ctx(py_obj), object->in.validation_level, value, "union netr_Validation");
   18960           0 :                 if (validation_switch_0 == NULL) {
   18961           0 :                         return -1;
   18962             :                 }
   18963           0 :                 object->out.validation = *validation_switch_0;
   18964             :         }
   18965           0 :         return 0;
   18966             : }
   18967             : 
   18968           0 : static PyObject *py_winbind_SamLogon_out_get_authoritative(PyObject *obj, void *closure)
   18969             : {
   18970           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(obj);
   18971           0 :         PyObject *py_authoritative;
   18972           0 :         py_authoritative = PyLong_FromLong((uint16_t)object->out.authoritative);
   18973           0 :         return py_authoritative;
   18974             : }
   18975             : 
   18976           0 : static int py_winbind_SamLogon_out_set_authoritative(PyObject *py_obj, PyObject *value, void *closure)
   18977             : {
   18978           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(py_obj);
   18979           0 :         if (value == NULL) {
   18980           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.authoritative");
   18981           0 :                 return -1;
   18982             :         }
   18983             :         {
   18984           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->out.authoritative));
   18985           0 :                 if (PyLong_Check(value)) {
   18986           0 :                         unsigned long long test_var;
   18987           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18988           0 :                         if (PyErr_Occurred() != NULL) {
   18989           0 :                                 return -1;
   18990             :                         }
   18991           0 :                         if (test_var > uint_max) {
   18992           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18993             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18994           0 :                                 return -1;
   18995             :                         }
   18996           0 :                         object->out.authoritative = test_var;
   18997             :                 } else {
   18998           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18999             :                           PyLong_Type.tp_name);
   19000           0 :                         return -1;
   19001             :                 }
   19002             :         }
   19003           0 :         return 0;
   19004             : }
   19005             : 
   19006           0 : static PyObject *py_winbind_SamLogon_get_result(PyObject *obj, void *closure)
   19007             : {
   19008           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(obj);
   19009           0 :         PyObject *py_result;
   19010           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   19011           0 :         return py_result;
   19012             : }
   19013             : 
   19014           0 : static int py_winbind_SamLogon_set_result(PyObject *py_obj, PyObject *value, void *closure)
   19015             : {
   19016           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(py_obj);
   19017           0 :         if (value == NULL) {
   19018           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   19019           0 :                 return -1;
   19020             :         }
   19021           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   19022           0 :         return 0;
   19023             : }
   19024             : 
   19025             : static PyGetSetDef py_winbind_SamLogon_getsetters[] = {
   19026             :         {
   19027             :                 .name = discard_const_p(char, "in_logon_level"),
   19028             :                 .get = py_winbind_SamLogon_in_get_logon_level,
   19029             :                 .set = py_winbind_SamLogon_in_set_logon_level,
   19030             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19031             :         },
   19032             :         {
   19033             :                 .name = discard_const_p(char, "in_logon"),
   19034             :                 .get = py_winbind_SamLogon_in_get_logon,
   19035             :                 .set = py_winbind_SamLogon_in_set_logon,
   19036             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonLevel")
   19037             :         },
   19038             :         {
   19039             :                 .name = discard_const_p(char, "in_validation_level"),
   19040             :                 .get = py_winbind_SamLogon_in_get_validation_level,
   19041             :                 .set = py_winbind_SamLogon_in_set_validation_level,
   19042             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19043             :         },
   19044             :         {
   19045             :                 .name = discard_const_p(char, "out_validation"),
   19046             :                 .get = py_winbind_SamLogon_out_get_validation,
   19047             :                 .set = py_winbind_SamLogon_out_set_validation,
   19048             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Validation")
   19049             :         },
   19050             :         {
   19051             :                 .name = discard_const_p(char, "out_authoritative"),
   19052             :                 .get = py_winbind_SamLogon_out_get_authoritative,
   19053             :                 .set = py_winbind_SamLogon_out_set_authoritative,
   19054             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   19055             :         },
   19056             :         {
   19057             :                 .name = discard_const_p(char, "result"),
   19058             :                 .get = py_winbind_SamLogon_get_result,
   19059             :                 .set = py_winbind_SamLogon_set_result,
   19060             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   19061             :         },
   19062             :         { .name = NULL }
   19063             : };
   19064             : 
   19065           0 : static PyObject *py_winbind_SamLogon_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   19066             : {
   19067           0 :         PyObject *self = pytalloc_new(struct winbind_SamLogon, type);
   19068           0 :         return self;
   19069             : }
   19070             : 
   19071           0 : static PyObject *py_winbind_SamLogon_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   19072             : {
   19073             : 
   19074             : 
   19075           0 :         return PyLong_FromLong(28);
   19076             : }
   19077             : 
   19078           0 : static PyObject *py_winbind_SamLogon_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   19079             : {
   19080           0 :         const struct ndr_interface_call *call = NULL;
   19081           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(py_obj);
   19082           0 :         PyObject *ret = NULL;
   19083           0 :         struct ndr_push *push = NULL;
   19084           0 :         DATA_BLOB blob;
   19085           0 :         enum ndr_err_code err;
   19086             : 
   19087           0 :         if (ndr_table_winbind.num_calls < 29) {
   19088           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_SamLogon_ndr_pack");
   19089           0 :                 return NULL;
   19090             :         }
   19091           0 :         call = &ndr_table_winbind.calls[28];
   19092             : 
   19093           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   19094           0 :         if (push == NULL) {
   19095           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   19096           0 :                 return NULL;
   19097             :         }
   19098             : 
   19099           0 :         push->flags |= ndr_push_flags;
   19100             : 
   19101           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   19102           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   19103           0 :                 TALLOC_FREE(push);
   19104           0 :                 PyErr_SetNdrError(err);
   19105           0 :                 return NULL;
   19106             :         }
   19107           0 :         blob = ndr_push_blob(push);
   19108           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   19109           0 :         TALLOC_FREE(push);
   19110           0 :         return ret;
   19111             : }
   19112             : 
   19113           0 : static PyObject *py_winbind_SamLogon_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   19114             : {
   19115           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   19116           0 :         PyObject *bigendian_obj = NULL;
   19117           0 :         PyObject *ndr64_obj = NULL;
   19118           0 :         libndr_flags ndr_push_flags = 0;
   19119             : 
   19120           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   19121             :                 discard_const_p(char *, kwnames),
   19122             :                 &bigendian_obj,
   19123             :                 &ndr64_obj)) {
   19124           0 :                 return NULL;
   19125             :         }
   19126             : 
   19127           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   19128           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   19129             :         }
   19130           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   19131           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   19132             :         }
   19133             : 
   19134           0 :         return py_winbind_SamLogon_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   19135             : }
   19136             : 
   19137           0 : static PyObject *py_winbind_SamLogon_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   19138             : {
   19139           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   19140           0 :         PyObject *bigendian_obj = NULL;
   19141           0 :         PyObject *ndr64_obj = NULL;
   19142           0 :         libndr_flags ndr_push_flags = 0;
   19143             : 
   19144           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   19145             :                 discard_const_p(char *, kwnames),
   19146             :                 &bigendian_obj,
   19147             :                 &ndr64_obj)) {
   19148           0 :                 return NULL;
   19149             :         }
   19150             : 
   19151           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   19152           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   19153             :         }
   19154           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   19155           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   19156             :         }
   19157             : 
   19158           0 :         return py_winbind_SamLogon_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   19159             : }
   19160             : 
   19161           0 : static PyObject *py_winbind_SamLogon_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   19162             : {
   19163           0 :         const struct ndr_interface_call *call = NULL;
   19164           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(py_obj);
   19165           0 :         struct ndr_pull *pull = NULL;
   19166           0 :         enum ndr_err_code err;
   19167             : 
   19168           0 :         if (ndr_table_winbind.num_calls < 29) {
   19169           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_SamLogon_ndr_unpack");
   19170           0 :                 return NULL;
   19171             :         }
   19172           0 :         call = &ndr_table_winbind.calls[28];
   19173             : 
   19174           0 :         pull = ndr_pull_init_blob(blob, object);
   19175           0 :         if (pull == NULL) {
   19176           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   19177           0 :                 return NULL;
   19178             :         }
   19179             : 
   19180           0 :         pull->flags |= ndr_pull_flags;
   19181             : 
   19182           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   19183           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   19184           0 :                 TALLOC_FREE(pull);
   19185           0 :                 PyErr_SetNdrError(err);
   19186           0 :                 return NULL;
   19187             :         }
   19188           0 :         if (!allow_remaining) {
   19189           0 :                 uint32_t highest_ofs;
   19190             : 
   19191           0 :                 if (pull->offset > pull->relative_highest_offset) {
   19192           0 :                         highest_ofs = pull->offset;
   19193             :                 } else {
   19194           0 :                         highest_ofs = pull->relative_highest_offset;
   19195             :                 }
   19196           0 :                 if (highest_ofs < pull->data_size) {
   19197           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   19198             :                                 "not all bytes consumed ofs[%u] size[%u]",
   19199             :                                 highest_ofs, pull->data_size);
   19200           0 :                         TALLOC_FREE(pull);
   19201           0 :                         PyErr_SetNdrError(err);
   19202           0 :                         return NULL;
   19203             :                 }
   19204             :         }
   19205             : 
   19206           0 :         TALLOC_FREE(pull);
   19207           0 :         Py_RETURN_NONE;
   19208             : }
   19209             : 
   19210           0 : static PyObject *py_winbind_SamLogon_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   19211             : {
   19212           0 :         DATA_BLOB blob;
   19213           0 :         Py_ssize_t blob_length = 0;
   19214           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   19215           0 :         PyObject *bigendian_obj = NULL;
   19216           0 :         PyObject *ndr64_obj = NULL;
   19217           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   19218           0 :         PyObject *allow_remaining_obj = NULL;
   19219           0 :         bool allow_remaining = false;
   19220             : 
   19221           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   19222             :                 discard_const_p(char *, kwnames),
   19223             :                 &blob.data, &blob_length,
   19224             :                 &bigendian_obj,
   19225             :                 &ndr64_obj,
   19226             :                 &allow_remaining_obj)) {
   19227           0 :                 return NULL;
   19228             :         }
   19229           0 :         blob.length = blob_length;
   19230             : 
   19231           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   19232           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   19233             :         }
   19234           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   19235           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   19236             :         }
   19237             : 
   19238           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   19239           0 :                 allow_remaining = true;
   19240             :         }
   19241             : 
   19242           0 :         return py_winbind_SamLogon_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   19243             : }
   19244             : 
   19245           0 : static PyObject *py_winbind_SamLogon_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   19246             : {
   19247           0 :         DATA_BLOB blob;
   19248           0 :         Py_ssize_t blob_length = 0;
   19249           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   19250           0 :         PyObject *bigendian_obj = NULL;
   19251           0 :         PyObject *ndr64_obj = NULL;
   19252           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   19253           0 :         PyObject *allow_remaining_obj = NULL;
   19254           0 :         bool allow_remaining = false;
   19255             : 
   19256           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   19257             :                 discard_const_p(char *, kwnames),
   19258             :                 &blob.data, &blob_length,
   19259             :                 &bigendian_obj,
   19260             :                 &ndr64_obj,
   19261             :                 &allow_remaining_obj)) {
   19262           0 :                 return NULL;
   19263             :         }
   19264           0 :         blob.length = blob_length;
   19265             : 
   19266           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   19267           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   19268             :         }
   19269           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   19270           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   19271             :         }
   19272             : 
   19273           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   19274           0 :                 allow_remaining = true;
   19275             :         }
   19276             : 
   19277           0 :         return py_winbind_SamLogon_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   19278             : }
   19279             : 
   19280           0 : static PyObject *py_winbind_SamLogon_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   19281             : {
   19282           0 :         const struct ndr_interface_call *call = NULL;
   19283           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(py_obj);
   19284           0 :         PyObject *ret;
   19285           0 :         char *retstr;
   19286             : 
   19287           0 :         if (ndr_table_winbind.num_calls < 29) {
   19288           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_SamLogon_ndr_print");
   19289           0 :                 return NULL;
   19290             :         }
   19291           0 :         call = &ndr_table_winbind.calls[28];
   19292             : 
   19293           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   19294           0 :         ret = PyUnicode_FromString(retstr);
   19295           0 :         TALLOC_FREE(retstr);
   19296             : 
   19297           0 :         return ret;
   19298             : }
   19299             : 
   19300           0 : static PyObject *py_winbind_SamLogon_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   19301             : {
   19302           0 :         return py_winbind_SamLogon_ndr_print(py_obj, "winbind_SamLogon_in", NDR_IN);
   19303             : }
   19304             : 
   19305           0 : static PyObject *py_winbind_SamLogon_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   19306             : {
   19307           0 :         return py_winbind_SamLogon_ndr_print(py_obj, "winbind_SamLogon_out", NDR_OUT);
   19308             : }
   19309             : 
   19310             : static PyMethodDef py_winbind_SamLogon_methods[] = {
   19311             :         { "opnum", (PyCFunction)py_winbind_SamLogon_ndr_opnum, METH_NOARGS|METH_CLASS,
   19312             :                 "winbind.SamLogon.opnum() -> 28 (0x1c) " },
   19313             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_SamLogon_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   19314             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   19315             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_SamLogon_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   19316             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   19317             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_SamLogon_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   19318             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   19319             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_SamLogon_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   19320             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   19321             :         { "__ndr_print_in__", (PyCFunction)py_winbind_SamLogon_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   19322             :         { "__ndr_print_out__", (PyCFunction)py_winbind_SamLogon_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   19323             :         { NULL, NULL, 0, NULL }
   19324             : };
   19325             : 
   19326             : 
   19327             : static PyTypeObject winbind_SamLogon_Type = {
   19328             :         PyVarObject_HEAD_INIT(NULL, 0)
   19329             :         .tp_name = "winbind.SamLogon",
   19330             :         .tp_getset = py_winbind_SamLogon_getsetters,
   19331             :         .tp_methods = py_winbind_SamLogon_methods,
   19332             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   19333             :         .tp_new = py_winbind_SamLogon_new,
   19334             : };
   19335             : 
   19336           0 : static bool pack_py_winbind_SamLogon_args_in(PyObject *args, PyObject *kwargs, struct winbind_SamLogon *r)
   19337             : {
   19338           0 :         PyObject *py_logon_level;
   19339           0 :         PyObject *py_logon;
   19340           0 :         PyObject *py_validation_level;
   19341           0 :         const char *kwnames[] = {
   19342             :                 "logon_level", "logon", "validation_level", NULL
   19343             :         };
   19344             : 
   19345           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:winbind_SamLogon", discard_const_p(char *, kwnames), &py_logon_level, &py_logon, &py_validation_level)) {
   19346           0 :                 return false;
   19347             :         }
   19348             : 
   19349           0 :         if (py_logon_level == NULL) {
   19350           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_level");
   19351           0 :                 return false;
   19352             :         }
   19353             :         {
   19354           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.logon_level));
   19355           0 :                 if (PyLong_Check(py_logon_level)) {
   19356           0 :                         unsigned long long test_var;
   19357           0 :                         test_var = PyLong_AsUnsignedLongLong(py_logon_level);
   19358           0 :                         if (PyErr_Occurred() != NULL) {
   19359           0 :                                 return false;
   19360             :                         }
   19361           0 :                         if (test_var > uint_max) {
   19362           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19363             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19364           0 :                                 return false;
   19365             :                         }
   19366           0 :                         r->in.logon_level = test_var;
   19367             :                 } else {
   19368           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19369             :                           PyLong_Type.tp_name);
   19370           0 :                         return false;
   19371             :                 }
   19372             :         }
   19373           0 :         if (py_logon == NULL) {
   19374           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon");
   19375           0 :                 return false;
   19376             :         }
   19377             :         {
   19378           0 :                 union netr_LogonLevel *logon_switch_0;
   19379           0 :                 logon_switch_0 = (union netr_LogonLevel *)pyrpc_export_union(netr_LogonLevel_Type, r, r->in.logon_level, py_logon, "union netr_LogonLevel");
   19380           0 :                 if (logon_switch_0 == NULL) {
   19381           0 :                         return false;
   19382             :                 }
   19383           0 :                 r->in.logon = *logon_switch_0;
   19384             :         }
   19385           0 :         if (py_validation_level == NULL) {
   19386           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.validation_level");
   19387           0 :                 return false;
   19388             :         }
   19389             :         {
   19390           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.validation_level));
   19391           0 :                 if (PyLong_Check(py_validation_level)) {
   19392           0 :                         unsigned long long test_var;
   19393           0 :                         test_var = PyLong_AsUnsignedLongLong(py_validation_level);
   19394           0 :                         if (PyErr_Occurred() != NULL) {
   19395           0 :                                 return false;
   19396             :                         }
   19397           0 :                         if (test_var > uint_max) {
   19398           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19399             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19400           0 :                                 return false;
   19401             :                         }
   19402           0 :                         r->in.validation_level = test_var;
   19403             :                 } else {
   19404           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19405             :                           PyLong_Type.tp_name);
   19406           0 :                         return false;
   19407             :                 }
   19408             :         }
   19409           0 :         return true;
   19410             : }
   19411             : 
   19412           0 : static PyObject *unpack_py_winbind_SamLogon_args_out(struct winbind_SamLogon *r)
   19413             : {
   19414           0 :         PyObject *result;
   19415           0 :         PyObject *py_validation;
   19416           0 :         PyObject *py_authoritative;
   19417           0 :         result = PyTuple_New(2);
   19418           0 :         py_validation = pyrpc_import_union(netr_Validation_Type, r, r->in.validation_level, &r->out.validation, "union netr_Validation");
   19419           0 :         if (py_validation == NULL) {
   19420           0 :                 return NULL;
   19421             :         }
   19422           0 :         PyTuple_SetItem(result, 0, py_validation);
   19423           0 :         py_authoritative = PyLong_FromLong((uint16_t)r->out.authoritative);
   19424           0 :         PyTuple_SetItem(result, 1, py_authoritative);
   19425           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   19426           0 :                 PyErr_SetNTSTATUS(r->out.result);
   19427           0 :                 return NULL;
   19428             :         }
   19429             : 
   19430           0 :         return result;
   19431             : }
   19432             : 
   19433             : 
   19434           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_get_site_name(PyObject *obj, void *closure)
   19435             : {
   19436           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   19437           0 :         PyObject *py_site_name;
   19438           0 :         if (object->in.site_name == NULL) {
   19439           0 :                 Py_RETURN_NONE;
   19440             :         }
   19441           0 :         if (object->in.site_name == NULL) {
   19442           0 :                 py_site_name = Py_None;
   19443           0 :                 Py_INCREF(py_site_name);
   19444             :         } else {
   19445           0 :                 if (object->in.site_name == NULL) {
   19446           0 :                         py_site_name = Py_None;
   19447           0 :                         Py_INCREF(py_site_name);
   19448             :                 } else {
   19449           0 :                         py_site_name = PyUnicode_Decode(object->in.site_name, strlen(object->in.site_name), "utf-8", "ignore");
   19450             :                 }
   19451             :         }
   19452           0 :         return py_site_name;
   19453             : }
   19454             : 
   19455           0 : static int py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
   19456             : {
   19457           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   19458           0 :         if (value == NULL) {
   19459           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.site_name");
   19460           0 :                 return -1;
   19461             :         }
   19462           0 :         if (value == Py_None) {
   19463           0 :                 object->in.site_name = NULL;
   19464             :         } else {
   19465           0 :                 object->in.site_name = NULL;
   19466             :                 {
   19467           0 :                         const char *test_str;
   19468           0 :                         const char *talloc_str;
   19469           0 :                         PyObject *unicode = NULL;
   19470           0 :                         if (PyUnicode_Check(value)) {
   19471           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19472           0 :                                 if (unicode == NULL) {
   19473           0 :                                         PyErr_NoMemory();
   19474           0 :                                         return -1;
   19475             :                                 }
   19476           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19477           0 :                         } else if (PyBytes_Check(value)) {
   19478           0 :                                 test_str = PyBytes_AS_STRING(value);
   19479             :                         } else {
   19480           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19481           0 :                                 return -1;
   19482             :                         }
   19483           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19484           0 :                         if (unicode != NULL) {
   19485           0 :                                 Py_DECREF(unicode);
   19486             :                         }
   19487           0 :                         if (talloc_str == NULL) {
   19488           0 :                                 PyErr_NoMemory();
   19489           0 :                                 return -1;
   19490             :                         }
   19491           0 :                         object->in.site_name = talloc_str;
   19492             :                 }
   19493             :         }
   19494           0 :         return 0;
   19495             : }
   19496             : 
   19497           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_ttl(PyObject *obj, void *closure)
   19498             : {
   19499           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   19500           0 :         PyObject *py_dns_ttl;
   19501           0 :         py_dns_ttl = PyLong_FromUnsignedLongLong((uint32_t)object->in.dns_ttl);
   19502           0 :         return py_dns_ttl;
   19503             : }
   19504             : 
   19505           0 : static int py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_ttl(PyObject *py_obj, PyObject *value, void *closure)
   19506             : {
   19507           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   19508           0 :         if (value == NULL) {
   19509           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dns_ttl");
   19510           0 :                 return -1;
   19511             :         }
   19512             :         {
   19513           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dns_ttl));
   19514           0 :                 if (PyLong_Check(value)) {
   19515           0 :                         unsigned long long test_var;
   19516           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19517           0 :                         if (PyErr_Occurred() != NULL) {
   19518           0 :                                 return -1;
   19519             :                         }
   19520           0 :                         if (test_var > uint_max) {
   19521           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19522             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19523           0 :                                 return -1;
   19524             :                         }
   19525           0 :                         object->in.dns_ttl = test_var;
   19526             :                 } else {
   19527           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19528             :                           PyLong_Type.tp_name);
   19529           0 :                         return -1;
   19530             :                 }
   19531             :         }
   19532           0 :         return 0;
   19533             : }
   19534             : 
   19535           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_names(PyObject *obj, void *closure)
   19536             : {
   19537           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   19538           0 :         PyObject *py_dns_names;
   19539           0 :         if (object->in.dns_names == NULL) {
   19540           0 :                 Py_RETURN_NONE;
   19541             :         }
   19542           0 :         py_dns_names = pytalloc_reference_ex(NL_DNS_NAME_INFO_ARRAY_Type, object->in.dns_names, object->in.dns_names);
   19543           0 :         return py_dns_names;
   19544             : }
   19545             : 
   19546           0 : static int py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_names(PyObject *py_obj, PyObject *value, void *closure)
   19547             : {
   19548           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   19549           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.dns_names));
   19550           0 :         if (value == NULL) {
   19551           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dns_names");
   19552           0 :                 return -1;
   19553             :         }
   19554           0 :         object->in.dns_names = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.dns_names);
   19555           0 :         if (object->in.dns_names == NULL) {
   19556           0 :                 PyErr_NoMemory();
   19557           0 :                 return -1;
   19558             :         }
   19559           0 :         PY_CHECK_TYPE(NL_DNS_NAME_INFO_ARRAY_Type, value, return -1;);
   19560           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   19561           0 :                 PyErr_NoMemory();
   19562           0 :                 return -1;
   19563             :         }
   19564           0 :         object->in.dns_names = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(value);
   19565           0 :         return 0;
   19566             : }
   19567             : 
   19568           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_out_get_dns_names(PyObject *obj, void *closure)
   19569             : {
   19570           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   19571           0 :         PyObject *py_dns_names;
   19572           0 :         if (object->out.dns_names == NULL) {
   19573           0 :                 Py_RETURN_NONE;
   19574             :         }
   19575           0 :         py_dns_names = pytalloc_reference_ex(NL_DNS_NAME_INFO_ARRAY_Type, object->out.dns_names, object->out.dns_names);
   19576           0 :         return py_dns_names;
   19577             : }
   19578             : 
   19579           0 : static int py_winbind_DsrUpdateReadOnlyServerDnsRecords_out_set_dns_names(PyObject *py_obj, PyObject *value, void *closure)
   19580             : {
   19581           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   19582           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dns_names));
   19583           0 :         if (value == NULL) {
   19584           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.dns_names");
   19585           0 :                 return -1;
   19586             :         }
   19587           0 :         object->out.dns_names = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dns_names);
   19588           0 :         if (object->out.dns_names == NULL) {
   19589           0 :                 PyErr_NoMemory();
   19590           0 :                 return -1;
   19591             :         }
   19592           0 :         PY_CHECK_TYPE(NL_DNS_NAME_INFO_ARRAY_Type, value, return -1;);
   19593           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   19594           0 :                 PyErr_NoMemory();
   19595           0 :                 return -1;
   19596             :         }
   19597           0 :         object->out.dns_names = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(value);
   19598           0 :         return 0;
   19599             : }
   19600             : 
   19601           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_get_result(PyObject *obj, void *closure)
   19602             : {
   19603           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   19604           0 :         PyObject *py_result;
   19605           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   19606           0 :         return py_result;
   19607             : }
   19608             : 
   19609           0 : static int py_winbind_DsrUpdateReadOnlyServerDnsRecords_set_result(PyObject *py_obj, PyObject *value, void *closure)
   19610             : {
   19611           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   19612           0 :         if (value == NULL) {
   19613           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   19614           0 :                 return -1;
   19615             :         }
   19616           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   19617           0 :         return 0;
   19618             : }
   19619             : 
   19620             : static PyGetSetDef py_winbind_DsrUpdateReadOnlyServerDnsRecords_getsetters[] = {
   19621             :         {
   19622             :                 .name = discard_const_p(char, "in_site_name"),
   19623             :                 .get = py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_get_site_name,
   19624             :                 .set = py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_set_site_name,
   19625             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19626             :         },
   19627             :         {
   19628             :                 .name = discard_const_p(char, "in_dns_ttl"),
   19629             :                 .get = py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_ttl,
   19630             :                 .set = py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_ttl,
   19631             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   19632             :         },
   19633             :         {
   19634             :                 .name = discard_const_p(char, "in_dns_names"),
   19635             :                 .get = py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_names,
   19636             :                 .set = py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_names,
   19637             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NL_DNS_NAME_INFO_ARRAY")
   19638             :         },
   19639             :         {
   19640             :                 .name = discard_const_p(char, "out_dns_names"),
   19641             :                 .get = py_winbind_DsrUpdateReadOnlyServerDnsRecords_out_get_dns_names,
   19642             :                 .set = py_winbind_DsrUpdateReadOnlyServerDnsRecords_out_set_dns_names,
   19643             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NL_DNS_NAME_INFO_ARRAY")
   19644             :         },
   19645             :         {
   19646             :                 .name = discard_const_p(char, "result"),
   19647             :                 .get = py_winbind_DsrUpdateReadOnlyServerDnsRecords_get_result,
   19648             :                 .set = py_winbind_DsrUpdateReadOnlyServerDnsRecords_set_result,
   19649             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   19650             :         },
   19651             :         { .name = NULL }
   19652             : };
   19653             : 
   19654           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   19655             : {
   19656           0 :         PyObject *self = pytalloc_new(struct winbind_DsrUpdateReadOnlyServerDnsRecords, type);
   19657           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *_self = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(self);
   19658           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   19659           0 :         _self->in.dns_names = talloc_zero(mem_ctx, struct NL_DNS_NAME_INFO_ARRAY);
   19660           0 :         _self->out.dns_names = talloc_zero(mem_ctx, struct NL_DNS_NAME_INFO_ARRAY);
   19661           0 :         return self;
   19662             : }
   19663             : 
   19664           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   19665             : {
   19666             : 
   19667             : 
   19668           0 :         return PyLong_FromLong(29);
   19669             : }
   19670             : 
   19671           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   19672             : {
   19673           0 :         const struct ndr_interface_call *call = NULL;
   19674           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   19675           0 :         PyObject *ret = NULL;
   19676           0 :         struct ndr_push *push = NULL;
   19677           0 :         DATA_BLOB blob;
   19678           0 :         enum ndr_err_code err;
   19679             : 
   19680           0 :         if (ndr_table_winbind.num_calls < 30) {
   19681           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_pack");
   19682           0 :                 return NULL;
   19683             :         }
   19684           0 :         call = &ndr_table_winbind.calls[29];
   19685             : 
   19686           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   19687           0 :         if (push == NULL) {
   19688           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   19689           0 :                 return NULL;
   19690             :         }
   19691             : 
   19692           0 :         push->flags |= ndr_push_flags;
   19693             : 
   19694           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   19695           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   19696           0 :                 TALLOC_FREE(push);
   19697           0 :                 PyErr_SetNdrError(err);
   19698           0 :                 return NULL;
   19699             :         }
   19700           0 :         blob = ndr_push_blob(push);
   19701           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   19702           0 :         TALLOC_FREE(push);
   19703           0 :         return ret;
   19704             : }
   19705             : 
   19706           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   19707             : {
   19708           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   19709           0 :         PyObject *bigendian_obj = NULL;
   19710           0 :         PyObject *ndr64_obj = NULL;
   19711           0 :         libndr_flags ndr_push_flags = 0;
   19712             : 
   19713           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   19714             :                 discard_const_p(char *, kwnames),
   19715             :                 &bigendian_obj,
   19716             :                 &ndr64_obj)) {
   19717           0 :                 return NULL;
   19718             :         }
   19719             : 
   19720           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   19721           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   19722             :         }
   19723           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   19724           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   19725             :         }
   19726             : 
   19727           0 :         return py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   19728             : }
   19729             : 
   19730           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   19731             : {
   19732           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   19733           0 :         PyObject *bigendian_obj = NULL;
   19734           0 :         PyObject *ndr64_obj = NULL;
   19735           0 :         libndr_flags ndr_push_flags = 0;
   19736             : 
   19737           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   19738             :                 discard_const_p(char *, kwnames),
   19739             :                 &bigendian_obj,
   19740             :                 &ndr64_obj)) {
   19741           0 :                 return NULL;
   19742             :         }
   19743             : 
   19744           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   19745           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   19746             :         }
   19747           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   19748           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   19749             :         }
   19750             : 
   19751           0 :         return py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   19752             : }
   19753             : 
   19754           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   19755             : {
   19756           0 :         const struct ndr_interface_call *call = NULL;
   19757           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   19758           0 :         struct ndr_pull *pull = NULL;
   19759           0 :         enum ndr_err_code err;
   19760             : 
   19761           0 :         if (ndr_table_winbind.num_calls < 30) {
   19762           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack");
   19763           0 :                 return NULL;
   19764             :         }
   19765           0 :         call = &ndr_table_winbind.calls[29];
   19766             : 
   19767           0 :         pull = ndr_pull_init_blob(blob, object);
   19768           0 :         if (pull == NULL) {
   19769           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   19770           0 :                 return NULL;
   19771             :         }
   19772             : 
   19773           0 :         pull->flags |= ndr_pull_flags;
   19774             : 
   19775           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   19776           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   19777           0 :                 TALLOC_FREE(pull);
   19778           0 :                 PyErr_SetNdrError(err);
   19779           0 :                 return NULL;
   19780             :         }
   19781           0 :         if (!allow_remaining) {
   19782           0 :                 uint32_t highest_ofs;
   19783             : 
   19784           0 :                 if (pull->offset > pull->relative_highest_offset) {
   19785           0 :                         highest_ofs = pull->offset;
   19786             :                 } else {
   19787           0 :                         highest_ofs = pull->relative_highest_offset;
   19788             :                 }
   19789           0 :                 if (highest_ofs < pull->data_size) {
   19790           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   19791             :                                 "not all bytes consumed ofs[%u] size[%u]",
   19792             :                                 highest_ofs, pull->data_size);
   19793           0 :                         TALLOC_FREE(pull);
   19794           0 :                         PyErr_SetNdrError(err);
   19795           0 :                         return NULL;
   19796             :                 }
   19797             :         }
   19798             : 
   19799           0 :         TALLOC_FREE(pull);
   19800           0 :         Py_RETURN_NONE;
   19801             : }
   19802             : 
   19803           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   19804             : {
   19805           0 :         DATA_BLOB blob;
   19806           0 :         Py_ssize_t blob_length = 0;
   19807           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   19808           0 :         PyObject *bigendian_obj = NULL;
   19809           0 :         PyObject *ndr64_obj = NULL;
   19810           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   19811           0 :         PyObject *allow_remaining_obj = NULL;
   19812           0 :         bool allow_remaining = false;
   19813             : 
   19814           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   19815             :                 discard_const_p(char *, kwnames),
   19816             :                 &blob.data, &blob_length,
   19817             :                 &bigendian_obj,
   19818             :                 &ndr64_obj,
   19819             :                 &allow_remaining_obj)) {
   19820           0 :                 return NULL;
   19821             :         }
   19822           0 :         blob.length = blob_length;
   19823             : 
   19824           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   19825           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   19826             :         }
   19827           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   19828           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   19829             :         }
   19830             : 
   19831           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   19832           0 :                 allow_remaining = true;
   19833             :         }
   19834             : 
   19835           0 :         return py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   19836             : }
   19837             : 
   19838           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   19839             : {
   19840           0 :         DATA_BLOB blob;
   19841           0 :         Py_ssize_t blob_length = 0;
   19842           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   19843           0 :         PyObject *bigendian_obj = NULL;
   19844           0 :         PyObject *ndr64_obj = NULL;
   19845           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   19846           0 :         PyObject *allow_remaining_obj = NULL;
   19847           0 :         bool allow_remaining = false;
   19848             : 
   19849           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   19850             :                 discard_const_p(char *, kwnames),
   19851             :                 &blob.data, &blob_length,
   19852             :                 &bigendian_obj,
   19853             :                 &ndr64_obj,
   19854             :                 &allow_remaining_obj)) {
   19855           0 :                 return NULL;
   19856             :         }
   19857           0 :         blob.length = blob_length;
   19858             : 
   19859           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   19860           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   19861             :         }
   19862           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   19863           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   19864             :         }
   19865             : 
   19866           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   19867           0 :                 allow_remaining = true;
   19868             :         }
   19869             : 
   19870           0 :         return py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   19871             : }
   19872             : 
   19873           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   19874             : {
   19875           0 :         const struct ndr_interface_call *call = NULL;
   19876           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   19877           0 :         PyObject *ret;
   19878           0 :         char *retstr;
   19879             : 
   19880           0 :         if (ndr_table_winbind.num_calls < 30) {
   19881           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_print");
   19882           0 :                 return NULL;
   19883             :         }
   19884           0 :         call = &ndr_table_winbind.calls[29];
   19885             : 
   19886           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   19887           0 :         ret = PyUnicode_FromString(retstr);
   19888           0 :         TALLOC_FREE(retstr);
   19889             : 
   19890           0 :         return ret;
   19891             : }
   19892             : 
   19893           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   19894             : {
   19895           0 :         return py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_print(py_obj, "winbind_DsrUpdateReadOnlyServerDnsRecords_in", NDR_IN);
   19896             : }
   19897             : 
   19898           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   19899             : {
   19900           0 :         return py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_print(py_obj, "winbind_DsrUpdateReadOnlyServerDnsRecords_out", NDR_OUT);
   19901             : }
   19902             : 
   19903             : static PyMethodDef py_winbind_DsrUpdateReadOnlyServerDnsRecords_methods[] = {
   19904             :         { "opnum", (PyCFunction)py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_opnum, METH_NOARGS|METH_CLASS,
   19905             :                 "winbind.DsrUpdateReadOnlyServerDnsRecords.opnum() -> 29 (0x1d) " },
   19906             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   19907             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   19908             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   19909             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   19910             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   19911             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   19912             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   19913             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   19914             :         { "__ndr_print_in__", (PyCFunction)py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   19915             :         { "__ndr_print_out__", (PyCFunction)py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   19916             :         { NULL, NULL, 0, NULL }
   19917             : };
   19918             : 
   19919             : 
   19920             : static PyTypeObject winbind_DsrUpdateReadOnlyServerDnsRecords_Type = {
   19921             :         PyVarObject_HEAD_INIT(NULL, 0)
   19922             :         .tp_name = "winbind.DsrUpdateReadOnlyServerDnsRecords",
   19923             :         .tp_getset = py_winbind_DsrUpdateReadOnlyServerDnsRecords_getsetters,
   19924             :         .tp_methods = py_winbind_DsrUpdateReadOnlyServerDnsRecords_methods,
   19925             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   19926             :         .tp_new = py_winbind_DsrUpdateReadOnlyServerDnsRecords_new,
   19927             : };
   19928             : 
   19929           5 : static bool pack_py_winbind_DsrUpdateReadOnlyServerDnsRecords_args_in(PyObject *args, PyObject *kwargs, struct winbind_DsrUpdateReadOnlyServerDnsRecords *r)
   19930             : {
   19931           0 :         PyObject *py_site_name;
   19932           0 :         PyObject *py_dns_ttl;
   19933           0 :         PyObject *py_dns_names;
   19934           5 :         const char *kwnames[] = {
   19935             :                 "site_name", "dns_ttl", "dns_names", NULL
   19936             :         };
   19937             : 
   19938           5 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:winbind_DsrUpdateReadOnlyServerDnsRecords", discard_const_p(char *, kwnames), &py_site_name, &py_dns_ttl, &py_dns_names)) {
   19939           0 :                 return false;
   19940             :         }
   19941             : 
   19942           5 :         if (py_site_name == NULL) {
   19943           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.site_name");
   19944           0 :                 return false;
   19945             :         }
   19946           5 :         if (py_site_name == Py_None) {
   19947           0 :                 r->in.site_name = NULL;
   19948             :         } else {
   19949           5 :                 r->in.site_name = NULL;
   19950             :                 {
   19951           0 :                         const char *test_str;
   19952           0 :                         const char *talloc_str;
   19953           5 :                         PyObject *unicode = NULL;
   19954           5 :                         if (PyUnicode_Check(py_site_name)) {
   19955           5 :                                 unicode = PyUnicode_AsEncodedString(py_site_name, "utf-8", "ignore");
   19956           5 :                                 if (unicode == NULL) {
   19957           0 :                                         PyErr_NoMemory();
   19958           0 :                                         return false;
   19959             :                                 }
   19960           5 :                                 test_str = PyBytes_AS_STRING(unicode);
   19961           0 :                         } else if (PyBytes_Check(py_site_name)) {
   19962           0 :                                 test_str = PyBytes_AS_STRING(py_site_name);
   19963             :                         } else {
   19964           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_site_name)->tp_name);
   19965           0 :                                 return false;
   19966             :                         }
   19967           5 :                         talloc_str = talloc_strdup(r, test_str);
   19968           5 :                         if (unicode != NULL) {
   19969           5 :                                 Py_DECREF(unicode);
   19970             :                         }
   19971           5 :                         if (talloc_str == NULL) {
   19972           0 :                                 PyErr_NoMemory();
   19973           0 :                                 return false;
   19974             :                         }
   19975           5 :                         r->in.site_name = talloc_str;
   19976             :                 }
   19977             :         }
   19978           5 :         if (py_dns_ttl == NULL) {
   19979           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dns_ttl");
   19980           0 :                 return false;
   19981             :         }
   19982             :         {
   19983           5 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dns_ttl));
   19984           5 :                 if (PyLong_Check(py_dns_ttl)) {
   19985           0 :                         unsigned long long test_var;
   19986           5 :                         test_var = PyLong_AsUnsignedLongLong(py_dns_ttl);
   19987           5 :                         if (PyErr_Occurred() != NULL) {
   19988           0 :                                 return false;
   19989             :                         }
   19990           5 :                         if (test_var > uint_max) {
   19991           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19992             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19993           0 :                                 return false;
   19994             :                         }
   19995           5 :                         r->in.dns_ttl = test_var;
   19996             :                 } else {
   19997           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19998             :                           PyLong_Type.tp_name);
   19999           0 :                         return false;
   20000             :                 }
   20001             :         }
   20002           5 :         if (py_dns_names == NULL) {
   20003           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dns_names");
   20004           0 :                 return false;
   20005             :         }
   20006           5 :         r->in.dns_names = talloc_ptrtype(r, r->in.dns_names);
   20007           5 :         if (r->in.dns_names == NULL) {
   20008           0 :                 PyErr_NoMemory();
   20009           0 :                 return false;
   20010             :         }
   20011           5 :         PY_CHECK_TYPE(NL_DNS_NAME_INFO_ARRAY_Type, py_dns_names, return false;);
   20012           5 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_dns_names)) == NULL) {
   20013           0 :                 PyErr_NoMemory();
   20014           0 :                 return false;
   20015             :         }
   20016           5 :         r->in.dns_names = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(py_dns_names);
   20017           5 :         return true;
   20018             : }
   20019             : 
   20020           5 : static PyObject *unpack_py_winbind_DsrUpdateReadOnlyServerDnsRecords_args_out(struct winbind_DsrUpdateReadOnlyServerDnsRecords *r)
   20021             : {
   20022           0 :         PyObject *result;
   20023           0 :         PyObject *py_dns_names;
   20024           5 :         py_dns_names = pytalloc_reference_ex(NL_DNS_NAME_INFO_ARRAY_Type, r->out.dns_names, r->out.dns_names);
   20025           5 :         result = py_dns_names;
   20026           5 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   20027           0 :                 PyErr_SetNTSTATUS(r->out.result);
   20028           0 :                 return NULL;
   20029             :         }
   20030             : 
   20031           5 :         return result;
   20032             : }
   20033             : 
   20034             : 
   20035           0 : static PyObject *py_winbind_LogonControl_in_get_function_code(PyObject *obj, void *closure)
   20036             : {
   20037           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(obj);
   20038           0 :         PyObject *py_function_code;
   20039           0 :         py_function_code = PyLong_FromUnsignedLongLong((uint32_t)object->in.function_code);
   20040           0 :         return py_function_code;
   20041             : }
   20042             : 
   20043           0 : static int py_winbind_LogonControl_in_set_function_code(PyObject *py_obj, PyObject *value, void *closure)
   20044             : {
   20045           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(py_obj);
   20046           0 :         if (value == NULL) {
   20047           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.function_code");
   20048           0 :                 return -1;
   20049             :         }
   20050             :         {
   20051           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.function_code));
   20052           0 :                 if (PyLong_Check(value)) {
   20053           0 :                         unsigned long long test_var;
   20054           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20055           0 :                         if (PyErr_Occurred() != NULL) {
   20056           0 :                                 return -1;
   20057             :                         }
   20058           0 :                         if (test_var > uint_max) {
   20059           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20060             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20061           0 :                                 return -1;
   20062             :                         }
   20063           0 :                         object->in.function_code = test_var;
   20064             :                 } else {
   20065           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20066             :                           PyLong_Type.tp_name);
   20067           0 :                         return -1;
   20068             :                 }
   20069             :         }
   20070           0 :         return 0;
   20071             : }
   20072             : 
   20073           0 : static PyObject *py_winbind_LogonControl_in_get_level(PyObject *obj, void *closure)
   20074             : {
   20075           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(obj);
   20076           0 :         PyObject *py_level;
   20077           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   20078           0 :         return py_level;
   20079             : }
   20080             : 
   20081           0 : static int py_winbind_LogonControl_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   20082             : {
   20083           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(py_obj);
   20084           0 :         if (value == NULL) {
   20085           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   20086           0 :                 return -1;
   20087             :         }
   20088             :         {
   20089           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   20090           0 :                 if (PyLong_Check(value)) {
   20091           0 :                         unsigned long long test_var;
   20092           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20093           0 :                         if (PyErr_Occurred() != NULL) {
   20094           0 :                                 return -1;
   20095             :                         }
   20096           0 :                         if (test_var > uint_max) {
   20097           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20098             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20099           0 :                                 return -1;
   20100             :                         }
   20101           0 :                         object->in.level = test_var;
   20102             :                 } else {
   20103           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20104             :                           PyLong_Type.tp_name);
   20105           0 :                         return -1;
   20106             :                 }
   20107             :         }
   20108           0 :         return 0;
   20109             : }
   20110             : 
   20111           0 : static PyObject *py_winbind_LogonControl_in_get_data(PyObject *obj, void *closure)
   20112             : {
   20113           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(obj);
   20114           0 :         PyObject *py_data;
   20115           0 :         if (object->in.data == NULL) {
   20116           0 :                 Py_RETURN_NONE;
   20117             :         }
   20118           0 :         py_data = pyrpc_import_union(netr_CONTROL_DATA_INFORMATION_Type, object->in.data, object->in.function_code, object->in.data, "union netr_CONTROL_DATA_INFORMATION");
   20119           0 :         if (py_data == NULL) {
   20120           0 :                 return NULL;
   20121             :         }
   20122           0 :         return py_data;
   20123             : }
   20124             : 
   20125           0 : static int py_winbind_LogonControl_in_set_data(PyObject *py_obj, PyObject *value, void *closure)
   20126             : {
   20127           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(py_obj);
   20128           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.data));
   20129           0 :         if (value == NULL) {
   20130           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.data");
   20131           0 :                 return -1;
   20132             :         }
   20133           0 :         object->in.data = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.data);
   20134           0 :         if (object->in.data == NULL) {
   20135           0 :                 PyErr_NoMemory();
   20136           0 :                 return -1;
   20137             :         }
   20138             :         {
   20139           0 :                 union netr_CONTROL_DATA_INFORMATION *data_switch_1;
   20140           0 :                 data_switch_1 = (union netr_CONTROL_DATA_INFORMATION *)pyrpc_export_union(netr_CONTROL_DATA_INFORMATION_Type, pytalloc_get_mem_ctx(py_obj), object->in.function_code, value, "union netr_CONTROL_DATA_INFORMATION");
   20141           0 :                 if (data_switch_1 == NULL) {
   20142           0 :                         return -1;
   20143             :                 }
   20144           0 :                 object->in.data = data_switch_1;
   20145             :         }
   20146           0 :         return 0;
   20147             : }
   20148             : 
   20149           0 : static PyObject *py_winbind_LogonControl_out_get_query(PyObject *obj, void *closure)
   20150             : {
   20151           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(obj);
   20152           0 :         PyObject *py_query;
   20153           0 :         if (object->out.query == NULL) {
   20154           0 :                 Py_RETURN_NONE;
   20155             :         }
   20156           0 :         py_query = pyrpc_import_union(netr_CONTROL_QUERY_INFORMATION_Type, object->out.query, object->in.level, object->out.query, "union netr_CONTROL_QUERY_INFORMATION");
   20157           0 :         if (py_query == NULL) {
   20158           0 :                 return NULL;
   20159             :         }
   20160           0 :         return py_query;
   20161             : }
   20162             : 
   20163           0 : static int py_winbind_LogonControl_out_set_query(PyObject *py_obj, PyObject *value, void *closure)
   20164             : {
   20165           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(py_obj);
   20166           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.query));
   20167           0 :         if (value == NULL) {
   20168           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.query");
   20169           0 :                 return -1;
   20170             :         }
   20171           0 :         object->out.query = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.query);
   20172           0 :         if (object->out.query == NULL) {
   20173           0 :                 PyErr_NoMemory();
   20174           0 :                 return -1;
   20175             :         }
   20176             :         {
   20177           0 :                 union netr_CONTROL_QUERY_INFORMATION *query_switch_1;
   20178           0 :                 query_switch_1 = (union netr_CONTROL_QUERY_INFORMATION *)pyrpc_export_union(netr_CONTROL_QUERY_INFORMATION_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union netr_CONTROL_QUERY_INFORMATION");
   20179           0 :                 if (query_switch_1 == NULL) {
   20180           0 :                         return -1;
   20181             :                 }
   20182           0 :                 object->out.query = query_switch_1;
   20183             :         }
   20184           0 :         return 0;
   20185             : }
   20186             : 
   20187           0 : static PyObject *py_winbind_LogonControl_get_result(PyObject *obj, void *closure)
   20188             : {
   20189           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(obj);
   20190           0 :         PyObject *py_result;
   20191           0 :         py_result = PyErr_FromWERROR(object->out.result);
   20192           0 :         return py_result;
   20193             : }
   20194             : 
   20195           0 : static int py_winbind_LogonControl_set_result(PyObject *py_obj, PyObject *value, void *closure)
   20196             : {
   20197           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(py_obj);
   20198           0 :         if (value == NULL) {
   20199           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   20200           0 :                 return -1;
   20201             :         }
   20202           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   20203           0 :         return 0;
   20204             : }
   20205             : 
   20206             : static PyGetSetDef py_winbind_LogonControl_getsetters[] = {
   20207             :         {
   20208             :                 .name = discard_const_p(char, "in_function_code"),
   20209             :                 .get = py_winbind_LogonControl_in_get_function_code,
   20210             :                 .set = py_winbind_LogonControl_in_set_function_code,
   20211             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonControlCode")
   20212             :         },
   20213             :         {
   20214             :                 .name = discard_const_p(char, "in_level"),
   20215             :                 .get = py_winbind_LogonControl_in_get_level,
   20216             :                 .set = py_winbind_LogonControl_in_set_level,
   20217             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20218             :         },
   20219             :         {
   20220             :                 .name = discard_const_p(char, "in_data"),
   20221             :                 .get = py_winbind_LogonControl_in_get_data,
   20222             :                 .set = py_winbind_LogonControl_in_set_data,
   20223             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_DATA_INFORMATION")
   20224             :         },
   20225             :         {
   20226             :                 .name = discard_const_p(char, "out_query"),
   20227             :                 .get = py_winbind_LogonControl_out_get_query,
   20228             :                 .set = py_winbind_LogonControl_out_set_query,
   20229             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_QUERY_INFORMATION")
   20230             :         },
   20231             :         {
   20232             :                 .name = discard_const_p(char, "result"),
   20233             :                 .get = py_winbind_LogonControl_get_result,
   20234             :                 .set = py_winbind_LogonControl_set_result,
   20235             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   20236             :         },
   20237             :         { .name = NULL }
   20238             : };
   20239             : 
   20240           0 : static PyObject *py_winbind_LogonControl_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20241             : {
   20242           0 :         PyObject *self = pytalloc_new(struct winbind_LogonControl, type);
   20243           0 :         struct winbind_LogonControl *_self = (struct winbind_LogonControl *)pytalloc_get_ptr(self);
   20244           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   20245           0 :         _self->in.data = talloc_zero(mem_ctx, union netr_CONTROL_DATA_INFORMATION);
   20246           0 :         _self->out.query = talloc_zero(mem_ctx, union netr_CONTROL_QUERY_INFORMATION);
   20247           0 :         return self;
   20248             : }
   20249             : 
   20250           0 : static PyObject *py_winbind_LogonControl_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   20251             : {
   20252             : 
   20253             : 
   20254           0 :         return PyLong_FromLong(30);
   20255             : }
   20256             : 
   20257           0 : static PyObject *py_winbind_LogonControl_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   20258             : {
   20259           0 :         const struct ndr_interface_call *call = NULL;
   20260           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(py_obj);
   20261           0 :         PyObject *ret = NULL;
   20262           0 :         struct ndr_push *push = NULL;
   20263           0 :         DATA_BLOB blob;
   20264           0 :         enum ndr_err_code err;
   20265             : 
   20266           0 :         if (ndr_table_winbind.num_calls < 31) {
   20267           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_LogonControl_ndr_pack");
   20268           0 :                 return NULL;
   20269             :         }
   20270           0 :         call = &ndr_table_winbind.calls[30];
   20271             : 
   20272           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   20273           0 :         if (push == NULL) {
   20274           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   20275           0 :                 return NULL;
   20276             :         }
   20277             : 
   20278           0 :         push->flags |= ndr_push_flags;
   20279             : 
   20280           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   20281           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   20282           0 :                 TALLOC_FREE(push);
   20283           0 :                 PyErr_SetNdrError(err);
   20284           0 :                 return NULL;
   20285             :         }
   20286           0 :         blob = ndr_push_blob(push);
   20287           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   20288           0 :         TALLOC_FREE(push);
   20289           0 :         return ret;
   20290             : }
   20291             : 
   20292           0 : static PyObject *py_winbind_LogonControl_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   20293             : {
   20294           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   20295           0 :         PyObject *bigendian_obj = NULL;
   20296           0 :         PyObject *ndr64_obj = NULL;
   20297           0 :         libndr_flags ndr_push_flags = 0;
   20298             : 
   20299           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   20300             :                 discard_const_p(char *, kwnames),
   20301             :                 &bigendian_obj,
   20302             :                 &ndr64_obj)) {
   20303           0 :                 return NULL;
   20304             :         }
   20305             : 
   20306           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   20307           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   20308             :         }
   20309           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   20310           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   20311             :         }
   20312             : 
   20313           0 :         return py_winbind_LogonControl_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   20314             : }
   20315             : 
   20316           0 : static PyObject *py_winbind_LogonControl_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   20317             : {
   20318           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   20319           0 :         PyObject *bigendian_obj = NULL;
   20320           0 :         PyObject *ndr64_obj = NULL;
   20321           0 :         libndr_flags ndr_push_flags = 0;
   20322             : 
   20323           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   20324             :                 discard_const_p(char *, kwnames),
   20325             :                 &bigendian_obj,
   20326             :                 &ndr64_obj)) {
   20327           0 :                 return NULL;
   20328             :         }
   20329             : 
   20330           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   20331           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   20332             :         }
   20333           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   20334           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   20335             :         }
   20336             : 
   20337           0 :         return py_winbind_LogonControl_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   20338             : }
   20339             : 
   20340           0 : static PyObject *py_winbind_LogonControl_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   20341             : {
   20342           0 :         const struct ndr_interface_call *call = NULL;
   20343           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(py_obj);
   20344           0 :         struct ndr_pull *pull = NULL;
   20345           0 :         enum ndr_err_code err;
   20346             : 
   20347           0 :         if (ndr_table_winbind.num_calls < 31) {
   20348           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_LogonControl_ndr_unpack");
   20349           0 :                 return NULL;
   20350             :         }
   20351           0 :         call = &ndr_table_winbind.calls[30];
   20352             : 
   20353           0 :         pull = ndr_pull_init_blob(blob, object);
   20354           0 :         if (pull == NULL) {
   20355           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   20356           0 :                 return NULL;
   20357             :         }
   20358             : 
   20359           0 :         pull->flags |= ndr_pull_flags;
   20360             : 
   20361           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   20362           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   20363           0 :                 TALLOC_FREE(pull);
   20364           0 :                 PyErr_SetNdrError(err);
   20365           0 :                 return NULL;
   20366             :         }
   20367           0 :         if (!allow_remaining) {
   20368           0 :                 uint32_t highest_ofs;
   20369             : 
   20370           0 :                 if (pull->offset > pull->relative_highest_offset) {
   20371           0 :                         highest_ofs = pull->offset;
   20372             :                 } else {
   20373           0 :                         highest_ofs = pull->relative_highest_offset;
   20374             :                 }
   20375           0 :                 if (highest_ofs < pull->data_size) {
   20376           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   20377             :                                 "not all bytes consumed ofs[%u] size[%u]",
   20378             :                                 highest_ofs, pull->data_size);
   20379           0 :                         TALLOC_FREE(pull);
   20380           0 :                         PyErr_SetNdrError(err);
   20381           0 :                         return NULL;
   20382             :                 }
   20383             :         }
   20384             : 
   20385           0 :         TALLOC_FREE(pull);
   20386           0 :         Py_RETURN_NONE;
   20387             : }
   20388             : 
   20389           0 : static PyObject *py_winbind_LogonControl_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   20390             : {
   20391           0 :         DATA_BLOB blob;
   20392           0 :         Py_ssize_t blob_length = 0;
   20393           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   20394           0 :         PyObject *bigendian_obj = NULL;
   20395           0 :         PyObject *ndr64_obj = NULL;
   20396           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   20397           0 :         PyObject *allow_remaining_obj = NULL;
   20398           0 :         bool allow_remaining = false;
   20399             : 
   20400           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   20401             :                 discard_const_p(char *, kwnames),
   20402             :                 &blob.data, &blob_length,
   20403             :                 &bigendian_obj,
   20404             :                 &ndr64_obj,
   20405             :                 &allow_remaining_obj)) {
   20406           0 :                 return NULL;
   20407             :         }
   20408           0 :         blob.length = blob_length;
   20409             : 
   20410           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   20411           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   20412             :         }
   20413           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   20414           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   20415             :         }
   20416             : 
   20417           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   20418           0 :                 allow_remaining = true;
   20419             :         }
   20420             : 
   20421           0 :         return py_winbind_LogonControl_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   20422             : }
   20423             : 
   20424           0 : static PyObject *py_winbind_LogonControl_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   20425             : {
   20426           0 :         DATA_BLOB blob;
   20427           0 :         Py_ssize_t blob_length = 0;
   20428           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   20429           0 :         PyObject *bigendian_obj = NULL;
   20430           0 :         PyObject *ndr64_obj = NULL;
   20431           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   20432           0 :         PyObject *allow_remaining_obj = NULL;
   20433           0 :         bool allow_remaining = false;
   20434             : 
   20435           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   20436             :                 discard_const_p(char *, kwnames),
   20437             :                 &blob.data, &blob_length,
   20438             :                 &bigendian_obj,
   20439             :                 &ndr64_obj,
   20440             :                 &allow_remaining_obj)) {
   20441           0 :                 return NULL;
   20442             :         }
   20443           0 :         blob.length = blob_length;
   20444             : 
   20445           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   20446           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   20447             :         }
   20448           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   20449           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   20450             :         }
   20451             : 
   20452           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   20453           0 :                 allow_remaining = true;
   20454             :         }
   20455             : 
   20456           0 :         return py_winbind_LogonControl_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   20457             : }
   20458             : 
   20459           0 : static PyObject *py_winbind_LogonControl_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   20460             : {
   20461           0 :         const struct ndr_interface_call *call = NULL;
   20462           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(py_obj);
   20463           0 :         PyObject *ret;
   20464           0 :         char *retstr;
   20465             : 
   20466           0 :         if (ndr_table_winbind.num_calls < 31) {
   20467           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_LogonControl_ndr_print");
   20468           0 :                 return NULL;
   20469             :         }
   20470           0 :         call = &ndr_table_winbind.calls[30];
   20471             : 
   20472           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   20473           0 :         ret = PyUnicode_FromString(retstr);
   20474           0 :         TALLOC_FREE(retstr);
   20475             : 
   20476           0 :         return ret;
   20477             : }
   20478             : 
   20479           0 : static PyObject *py_winbind_LogonControl_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   20480             : {
   20481           0 :         return py_winbind_LogonControl_ndr_print(py_obj, "winbind_LogonControl_in", NDR_IN);
   20482             : }
   20483             : 
   20484           0 : static PyObject *py_winbind_LogonControl_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   20485             : {
   20486           0 :         return py_winbind_LogonControl_ndr_print(py_obj, "winbind_LogonControl_out", NDR_OUT);
   20487             : }
   20488             : 
   20489             : static PyMethodDef py_winbind_LogonControl_methods[] = {
   20490             :         { "opnum", (PyCFunction)py_winbind_LogonControl_ndr_opnum, METH_NOARGS|METH_CLASS,
   20491             :                 "winbind.LogonControl.opnum() -> 30 (0x1e) " },
   20492             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_LogonControl_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   20493             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   20494             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_LogonControl_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   20495             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   20496             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_LogonControl_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   20497             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   20498             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_LogonControl_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   20499             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   20500             :         { "__ndr_print_in__", (PyCFunction)py_winbind_LogonControl_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   20501             :         { "__ndr_print_out__", (PyCFunction)py_winbind_LogonControl_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   20502             :         { NULL, NULL, 0, NULL }
   20503             : };
   20504             : 
   20505             : 
   20506             : static PyTypeObject winbind_LogonControl_Type = {
   20507             :         PyVarObject_HEAD_INIT(NULL, 0)
   20508             :         .tp_name = "winbind.LogonControl",
   20509             :         .tp_getset = py_winbind_LogonControl_getsetters,
   20510             :         .tp_methods = py_winbind_LogonControl_methods,
   20511             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20512             :         .tp_new = py_winbind_LogonControl_new,
   20513             : };
   20514             : 
   20515           0 : static bool pack_py_winbind_LogonControl_args_in(PyObject *args, PyObject *kwargs, struct winbind_LogonControl *r)
   20516             : {
   20517           0 :         PyObject *py_function_code;
   20518           0 :         PyObject *py_level;
   20519           0 :         PyObject *py_data;
   20520           0 :         const char *kwnames[] = {
   20521             :                 "function_code", "level", "data", NULL
   20522             :         };
   20523             : 
   20524           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:winbind_LogonControl", discard_const_p(char *, kwnames), &py_function_code, &py_level, &py_data)) {
   20525           0 :                 return false;
   20526             :         }
   20527             : 
   20528           0 :         if (py_function_code == NULL) {
   20529           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.function_code");
   20530           0 :                 return false;
   20531             :         }
   20532             :         {
   20533           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.function_code));
   20534           0 :                 if (PyLong_Check(py_function_code)) {
   20535           0 :                         unsigned long long test_var;
   20536           0 :                         test_var = PyLong_AsUnsignedLongLong(py_function_code);
   20537           0 :                         if (PyErr_Occurred() != NULL) {
   20538           0 :                                 return false;
   20539             :                         }
   20540           0 :                         if (test_var > uint_max) {
   20541           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20542             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20543           0 :                                 return false;
   20544             :                         }
   20545           0 :                         r->in.function_code = test_var;
   20546             :                 } else {
   20547           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20548             :                           PyLong_Type.tp_name);
   20549           0 :                         return false;
   20550             :                 }
   20551             :         }
   20552           0 :         if (py_level == NULL) {
   20553           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   20554           0 :                 return false;
   20555             :         }
   20556             :         {
   20557           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   20558           0 :                 if (PyLong_Check(py_level)) {
   20559           0 :                         unsigned long long test_var;
   20560           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   20561           0 :                         if (PyErr_Occurred() != NULL) {
   20562           0 :                                 return false;
   20563             :                         }
   20564           0 :                         if (test_var > uint_max) {
   20565           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20566             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20567           0 :                                 return false;
   20568             :                         }
   20569           0 :                         r->in.level = test_var;
   20570             :                 } else {
   20571           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20572             :                           PyLong_Type.tp_name);
   20573           0 :                         return false;
   20574             :                 }
   20575             :         }
   20576           0 :         if (py_data == NULL) {
   20577           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.data");
   20578           0 :                 return false;
   20579             :         }
   20580           0 :         r->in.data = talloc_ptrtype(r, r->in.data);
   20581           0 :         if (r->in.data == NULL) {
   20582           0 :                 PyErr_NoMemory();
   20583           0 :                 return false;
   20584             :         }
   20585             :         {
   20586           0 :                 union netr_CONTROL_DATA_INFORMATION *data_switch_1;
   20587           0 :                 data_switch_1 = (union netr_CONTROL_DATA_INFORMATION *)pyrpc_export_union(netr_CONTROL_DATA_INFORMATION_Type, r, r->in.function_code, py_data, "union netr_CONTROL_DATA_INFORMATION");
   20588           0 :                 if (data_switch_1 == NULL) {
   20589           0 :                         return false;
   20590             :                 }
   20591           0 :                 r->in.data = data_switch_1;
   20592             :         }
   20593           0 :         return true;
   20594             : }
   20595             : 
   20596           0 : static PyObject *unpack_py_winbind_LogonControl_args_out(struct winbind_LogonControl *r)
   20597             : {
   20598           0 :         PyObject *result;
   20599           0 :         PyObject *py_query;
   20600           0 :         py_query = pyrpc_import_union(netr_CONTROL_QUERY_INFORMATION_Type, r->out.query, r->in.level, r->out.query, "union netr_CONTROL_QUERY_INFORMATION");
   20601           0 :         if (py_query == NULL) {
   20602           0 :                 return NULL;
   20603             :         }
   20604           0 :         result = py_query;
   20605           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   20606           0 :                 PyErr_SetWERROR(r->out.result);
   20607           0 :                 return NULL;
   20608             :         }
   20609             : 
   20610           0 :         return result;
   20611             : }
   20612             : 
   20613             : 
   20614           0 : static PyObject *py_winbind_GetForestTrustInformation_in_get_trusted_domain_name(PyObject *obj, void *closure)
   20615             : {
   20616           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   20617           0 :         PyObject *py_trusted_domain_name;
   20618           0 :         if (object->in.trusted_domain_name == NULL) {
   20619           0 :                 Py_RETURN_NONE;
   20620             :         }
   20621           0 :         if (object->in.trusted_domain_name == NULL) {
   20622           0 :                 py_trusted_domain_name = Py_None;
   20623           0 :                 Py_INCREF(py_trusted_domain_name);
   20624             :         } else {
   20625           0 :                 if (object->in.trusted_domain_name == NULL) {
   20626           0 :                         py_trusted_domain_name = Py_None;
   20627           0 :                         Py_INCREF(py_trusted_domain_name);
   20628             :                 } else {
   20629           0 :                         py_trusted_domain_name = PyUnicode_Decode(object->in.trusted_domain_name, strlen(object->in.trusted_domain_name), "utf-8", "ignore");
   20630             :                 }
   20631             :         }
   20632           0 :         return py_trusted_domain_name;
   20633             : }
   20634             : 
   20635           0 : static int py_winbind_GetForestTrustInformation_in_set_trusted_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   20636             : {
   20637           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   20638           0 :         if (value == NULL) {
   20639           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.trusted_domain_name");
   20640           0 :                 return -1;
   20641             :         }
   20642           0 :         if (value == Py_None) {
   20643           0 :                 object->in.trusted_domain_name = NULL;
   20644             :         } else {
   20645           0 :                 object->in.trusted_domain_name = NULL;
   20646             :                 {
   20647           0 :                         const char *test_str;
   20648           0 :                         const char *talloc_str;
   20649           0 :                         PyObject *unicode = NULL;
   20650           0 :                         if (PyUnicode_Check(value)) {
   20651           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   20652           0 :                                 if (unicode == NULL) {
   20653           0 :                                         PyErr_NoMemory();
   20654           0 :                                         return -1;
   20655             :                                 }
   20656           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   20657           0 :                         } else if (PyBytes_Check(value)) {
   20658           0 :                                 test_str = PyBytes_AS_STRING(value);
   20659             :                         } else {
   20660           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   20661           0 :                                 return -1;
   20662             :                         }
   20663           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   20664           0 :                         if (unicode != NULL) {
   20665           0 :                                 Py_DECREF(unicode);
   20666             :                         }
   20667           0 :                         if (talloc_str == NULL) {
   20668           0 :                                 PyErr_NoMemory();
   20669           0 :                                 return -1;
   20670             :                         }
   20671           0 :                         object->in.trusted_domain_name = talloc_str;
   20672             :                 }
   20673             :         }
   20674           0 :         return 0;
   20675             : }
   20676             : 
   20677           0 : static PyObject *py_winbind_GetForestTrustInformation_in_get_flags(PyObject *obj, void *closure)
   20678             : {
   20679           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   20680           0 :         PyObject *py_flags;
   20681           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   20682           0 :         return py_flags;
   20683             : }
   20684             : 
   20685           0 : static int py_winbind_GetForestTrustInformation_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   20686             : {
   20687           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   20688           0 :         if (value == NULL) {
   20689           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   20690           0 :                 return -1;
   20691             :         }
   20692             :         {
   20693           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   20694           0 :                 if (PyLong_Check(value)) {
   20695           0 :                         unsigned long long test_var;
   20696           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20697           0 :                         if (PyErr_Occurred() != NULL) {
   20698           0 :                                 return -1;
   20699             :                         }
   20700           0 :                         if (test_var > uint_max) {
   20701           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20702             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20703           0 :                                 return -1;
   20704             :                         }
   20705           0 :                         object->in.flags = test_var;
   20706             :                 } else {
   20707           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20708             :                           PyLong_Type.tp_name);
   20709           0 :                         return -1;
   20710             :                 }
   20711             :         }
   20712           0 :         return 0;
   20713             : }
   20714             : 
   20715           0 : static PyObject *py_winbind_GetForestTrustInformation_out_get_forest_trust_info(PyObject *obj, void *closure)
   20716             : {
   20717           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   20718           0 :         PyObject *py_forest_trust_info;
   20719           0 :         if (object->out.forest_trust_info == NULL) {
   20720           0 :                 Py_RETURN_NONE;
   20721             :         }
   20722           0 :         if (*object->out.forest_trust_info == NULL) {
   20723           0 :                 py_forest_trust_info = Py_None;
   20724           0 :                 Py_INCREF(py_forest_trust_info);
   20725             :         } else {
   20726           0 :                 py_forest_trust_info = pytalloc_reference_ex(lsa_ForestTrustInformation_Type, *object->out.forest_trust_info, *object->out.forest_trust_info);
   20727             :         }
   20728           0 :         return py_forest_trust_info;
   20729             : }
   20730             : 
   20731           0 : static int py_winbind_GetForestTrustInformation_out_set_forest_trust_info(PyObject *py_obj, PyObject *value, void *closure)
   20732             : {
   20733           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   20734           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.forest_trust_info));
   20735           0 :         if (value == NULL) {
   20736           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.forest_trust_info");
   20737           0 :                 return -1;
   20738             :         }
   20739           0 :         object->out.forest_trust_info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.forest_trust_info);
   20740           0 :         if (object->out.forest_trust_info == NULL) {
   20741           0 :                 PyErr_NoMemory();
   20742           0 :                 return -1;
   20743             :         }
   20744           0 :         if (value == Py_None) {
   20745           0 :                 *object->out.forest_trust_info = NULL;
   20746             :         } else {
   20747           0 :                 *object->out.forest_trust_info = NULL;
   20748           0 :                 PY_CHECK_TYPE(lsa_ForestTrustInformation_Type, value, return -1;);
   20749           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   20750           0 :                         PyErr_NoMemory();
   20751           0 :                         return -1;
   20752             :                 }
   20753           0 :                 *object->out.forest_trust_info = (struct lsa_ForestTrustInformation *)pytalloc_get_ptr(value);
   20754             :         }
   20755           0 :         return 0;
   20756             : }
   20757             : 
   20758           0 : static PyObject *py_winbind_GetForestTrustInformation_get_result(PyObject *obj, void *closure)
   20759             : {
   20760           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   20761           0 :         PyObject *py_result;
   20762           0 :         py_result = PyErr_FromWERROR(object->out.result);
   20763           0 :         return py_result;
   20764             : }
   20765             : 
   20766           0 : static int py_winbind_GetForestTrustInformation_set_result(PyObject *py_obj, PyObject *value, void *closure)
   20767             : {
   20768           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   20769           0 :         if (value == NULL) {
   20770           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   20771           0 :                 return -1;
   20772             :         }
   20773           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   20774           0 :         return 0;
   20775             : }
   20776             : 
   20777             : static PyGetSetDef py_winbind_GetForestTrustInformation_getsetters[] = {
   20778             :         {
   20779             :                 .name = discard_const_p(char, "in_trusted_domain_name"),
   20780             :                 .get = py_winbind_GetForestTrustInformation_in_get_trusted_domain_name,
   20781             :                 .set = py_winbind_GetForestTrustInformation_in_set_trusted_domain_name,
   20782             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20783             :         },
   20784             :         {
   20785             :                 .name = discard_const_p(char, "in_flags"),
   20786             :                 .get = py_winbind_GetForestTrustInformation_in_get_flags,
   20787             :                 .set = py_winbind_GetForestTrustInformation_in_set_flags,
   20788             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20789             :         },
   20790             :         {
   20791             :                 .name = discard_const_p(char, "out_forest_trust_info"),
   20792             :                 .get = py_winbind_GetForestTrustInformation_out_get_forest_trust_info,
   20793             :                 .set = py_winbind_GetForestTrustInformation_out_set_forest_trust_info,
   20794             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_ForestTrustInformation")
   20795             :         },
   20796             :         {
   20797             :                 .name = discard_const_p(char, "result"),
   20798             :                 .get = py_winbind_GetForestTrustInformation_get_result,
   20799             :                 .set = py_winbind_GetForestTrustInformation_set_result,
   20800             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   20801             :         },
   20802             :         { .name = NULL }
   20803             : };
   20804             : 
   20805           0 : static PyObject *py_winbind_GetForestTrustInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20806             : {
   20807           0 :         PyObject *self = pytalloc_new(struct winbind_GetForestTrustInformation, type);
   20808           0 :         struct winbind_GetForestTrustInformation *_self = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(self);
   20809           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   20810             :         /* a pointer to a NULL pointer */
   20811           0 :         _self->out.forest_trust_info = talloc_zero(mem_ctx, struct lsa_ForestTrustInformation *);
   20812           0 :         return self;
   20813             : }
   20814             : 
   20815           0 : static PyObject *py_winbind_GetForestTrustInformation_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   20816             : {
   20817             : 
   20818             : 
   20819           0 :         return PyLong_FromLong(31);
   20820             : }
   20821             : 
   20822           0 : static PyObject *py_winbind_GetForestTrustInformation_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   20823             : {
   20824           0 :         const struct ndr_interface_call *call = NULL;
   20825           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   20826           0 :         PyObject *ret = NULL;
   20827           0 :         struct ndr_push *push = NULL;
   20828           0 :         DATA_BLOB blob;
   20829           0 :         enum ndr_err_code err;
   20830             : 
   20831           0 :         if (ndr_table_winbind.num_calls < 32) {
   20832           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_GetForestTrustInformation_ndr_pack");
   20833           0 :                 return NULL;
   20834             :         }
   20835           0 :         call = &ndr_table_winbind.calls[31];
   20836             : 
   20837           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   20838           0 :         if (push == NULL) {
   20839           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   20840           0 :                 return NULL;
   20841             :         }
   20842             : 
   20843           0 :         push->flags |= ndr_push_flags;
   20844             : 
   20845           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   20846           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   20847           0 :                 TALLOC_FREE(push);
   20848           0 :                 PyErr_SetNdrError(err);
   20849           0 :                 return NULL;
   20850             :         }
   20851           0 :         blob = ndr_push_blob(push);
   20852           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   20853           0 :         TALLOC_FREE(push);
   20854           0 :         return ret;
   20855             : }
   20856             : 
   20857           0 : static PyObject *py_winbind_GetForestTrustInformation_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   20858             : {
   20859           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   20860           0 :         PyObject *bigendian_obj = NULL;
   20861           0 :         PyObject *ndr64_obj = NULL;
   20862           0 :         libndr_flags ndr_push_flags = 0;
   20863             : 
   20864           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   20865             :                 discard_const_p(char *, kwnames),
   20866             :                 &bigendian_obj,
   20867             :                 &ndr64_obj)) {
   20868           0 :                 return NULL;
   20869             :         }
   20870             : 
   20871           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   20872           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   20873             :         }
   20874           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   20875           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   20876             :         }
   20877             : 
   20878           0 :         return py_winbind_GetForestTrustInformation_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   20879             : }
   20880             : 
   20881           0 : static PyObject *py_winbind_GetForestTrustInformation_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   20882             : {
   20883           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   20884           0 :         PyObject *bigendian_obj = NULL;
   20885           0 :         PyObject *ndr64_obj = NULL;
   20886           0 :         libndr_flags ndr_push_flags = 0;
   20887             : 
   20888           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   20889             :                 discard_const_p(char *, kwnames),
   20890             :                 &bigendian_obj,
   20891             :                 &ndr64_obj)) {
   20892           0 :                 return NULL;
   20893             :         }
   20894             : 
   20895           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   20896           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   20897             :         }
   20898           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   20899           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   20900             :         }
   20901             : 
   20902           0 :         return py_winbind_GetForestTrustInformation_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   20903             : }
   20904             : 
   20905           0 : static PyObject *py_winbind_GetForestTrustInformation_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   20906             : {
   20907           0 :         const struct ndr_interface_call *call = NULL;
   20908           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   20909           0 :         struct ndr_pull *pull = NULL;
   20910           0 :         enum ndr_err_code err;
   20911             : 
   20912           0 :         if (ndr_table_winbind.num_calls < 32) {
   20913           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_GetForestTrustInformation_ndr_unpack");
   20914           0 :                 return NULL;
   20915             :         }
   20916           0 :         call = &ndr_table_winbind.calls[31];
   20917             : 
   20918           0 :         pull = ndr_pull_init_blob(blob, object);
   20919           0 :         if (pull == NULL) {
   20920           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   20921           0 :                 return NULL;
   20922             :         }
   20923             : 
   20924           0 :         pull->flags |= ndr_pull_flags;
   20925             : 
   20926           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   20927           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   20928           0 :                 TALLOC_FREE(pull);
   20929           0 :                 PyErr_SetNdrError(err);
   20930           0 :                 return NULL;
   20931             :         }
   20932           0 :         if (!allow_remaining) {
   20933           0 :                 uint32_t highest_ofs;
   20934             : 
   20935           0 :                 if (pull->offset > pull->relative_highest_offset) {
   20936           0 :                         highest_ofs = pull->offset;
   20937             :                 } else {
   20938           0 :                         highest_ofs = pull->relative_highest_offset;
   20939             :                 }
   20940           0 :                 if (highest_ofs < pull->data_size) {
   20941           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   20942             :                                 "not all bytes consumed ofs[%u] size[%u]",
   20943             :                                 highest_ofs, pull->data_size);
   20944           0 :                         TALLOC_FREE(pull);
   20945           0 :                         PyErr_SetNdrError(err);
   20946           0 :                         return NULL;
   20947             :                 }
   20948             :         }
   20949             : 
   20950           0 :         TALLOC_FREE(pull);
   20951           0 :         Py_RETURN_NONE;
   20952             : }
   20953             : 
   20954           0 : static PyObject *py_winbind_GetForestTrustInformation_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   20955             : {
   20956           0 :         DATA_BLOB blob;
   20957           0 :         Py_ssize_t blob_length = 0;
   20958           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   20959           0 :         PyObject *bigendian_obj = NULL;
   20960           0 :         PyObject *ndr64_obj = NULL;
   20961           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   20962           0 :         PyObject *allow_remaining_obj = NULL;
   20963           0 :         bool allow_remaining = false;
   20964             : 
   20965           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   20966             :                 discard_const_p(char *, kwnames),
   20967             :                 &blob.data, &blob_length,
   20968             :                 &bigendian_obj,
   20969             :                 &ndr64_obj,
   20970             :                 &allow_remaining_obj)) {
   20971           0 :                 return NULL;
   20972             :         }
   20973           0 :         blob.length = blob_length;
   20974             : 
   20975           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   20976           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   20977             :         }
   20978           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   20979           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   20980             :         }
   20981             : 
   20982           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   20983           0 :                 allow_remaining = true;
   20984             :         }
   20985             : 
   20986           0 :         return py_winbind_GetForestTrustInformation_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   20987             : }
   20988             : 
   20989           0 : static PyObject *py_winbind_GetForestTrustInformation_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   20990             : {
   20991           0 :         DATA_BLOB blob;
   20992           0 :         Py_ssize_t blob_length = 0;
   20993           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   20994           0 :         PyObject *bigendian_obj = NULL;
   20995           0 :         PyObject *ndr64_obj = NULL;
   20996           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   20997           0 :         PyObject *allow_remaining_obj = NULL;
   20998           0 :         bool allow_remaining = false;
   20999             : 
   21000           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   21001             :                 discard_const_p(char *, kwnames),
   21002             :                 &blob.data, &blob_length,
   21003             :                 &bigendian_obj,
   21004             :                 &ndr64_obj,
   21005             :                 &allow_remaining_obj)) {
   21006           0 :                 return NULL;
   21007             :         }
   21008           0 :         blob.length = blob_length;
   21009             : 
   21010           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   21011           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   21012             :         }
   21013           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   21014           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   21015             :         }
   21016             : 
   21017           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   21018           0 :                 allow_remaining = true;
   21019             :         }
   21020             : 
   21021           0 :         return py_winbind_GetForestTrustInformation_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   21022             : }
   21023             : 
   21024           0 : static PyObject *py_winbind_GetForestTrustInformation_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   21025             : {
   21026           0 :         const struct ndr_interface_call *call = NULL;
   21027           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   21028           0 :         PyObject *ret;
   21029           0 :         char *retstr;
   21030             : 
   21031           0 :         if (ndr_table_winbind.num_calls < 32) {
   21032           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_GetForestTrustInformation_ndr_print");
   21033           0 :                 return NULL;
   21034             :         }
   21035           0 :         call = &ndr_table_winbind.calls[31];
   21036             : 
   21037           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   21038           0 :         ret = PyUnicode_FromString(retstr);
   21039           0 :         TALLOC_FREE(retstr);
   21040             : 
   21041           0 :         return ret;
   21042             : }
   21043             : 
   21044           0 : static PyObject *py_winbind_GetForestTrustInformation_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   21045             : {
   21046           0 :         return py_winbind_GetForestTrustInformation_ndr_print(py_obj, "winbind_GetForestTrustInformation_in", NDR_IN);
   21047             : }
   21048             : 
   21049           0 : static PyObject *py_winbind_GetForestTrustInformation_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   21050             : {
   21051           0 :         return py_winbind_GetForestTrustInformation_ndr_print(py_obj, "winbind_GetForestTrustInformation_out", NDR_OUT);
   21052             : }
   21053             : 
   21054             : static PyMethodDef py_winbind_GetForestTrustInformation_methods[] = {
   21055             :         { "opnum", (PyCFunction)py_winbind_GetForestTrustInformation_ndr_opnum, METH_NOARGS|METH_CLASS,
   21056             :                 "winbind.GetForestTrustInformation.opnum() -> 31 (0x1f) " },
   21057             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_GetForestTrustInformation_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   21058             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   21059             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_GetForestTrustInformation_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   21060             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   21061             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_GetForestTrustInformation_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   21062             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   21063             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_GetForestTrustInformation_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   21064             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   21065             :         { "__ndr_print_in__", (PyCFunction)py_winbind_GetForestTrustInformation_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   21066             :         { "__ndr_print_out__", (PyCFunction)py_winbind_GetForestTrustInformation_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   21067             :         { NULL, NULL, 0, NULL }
   21068             : };
   21069             : 
   21070             : 
   21071             : static PyTypeObject winbind_GetForestTrustInformation_Type = {
   21072             :         PyVarObject_HEAD_INIT(NULL, 0)
   21073             :         .tp_name = "winbind.GetForestTrustInformation",
   21074             :         .tp_getset = py_winbind_GetForestTrustInformation_getsetters,
   21075             :         .tp_methods = py_winbind_GetForestTrustInformation_methods,
   21076             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21077             :         .tp_new = py_winbind_GetForestTrustInformation_new,
   21078             : };
   21079             : 
   21080           0 : static bool pack_py_winbind_GetForestTrustInformation_args_in(PyObject *args, PyObject *kwargs, struct winbind_GetForestTrustInformation *r)
   21081             : {
   21082           0 :         PyObject *py_trusted_domain_name;
   21083           0 :         PyObject *py_flags;
   21084           0 :         const char *kwnames[] = {
   21085             :                 "trusted_domain_name", "flags", NULL
   21086             :         };
   21087             : 
   21088           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:winbind_GetForestTrustInformation", discard_const_p(char *, kwnames), &py_trusted_domain_name, &py_flags)) {
   21089           0 :                 return false;
   21090             :         }
   21091             : 
   21092           0 :         if (py_trusted_domain_name == NULL) {
   21093           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.trusted_domain_name");
   21094           0 :                 return false;
   21095             :         }
   21096           0 :         if (py_trusted_domain_name == Py_None) {
   21097           0 :                 r->in.trusted_domain_name = NULL;
   21098             :         } else {
   21099           0 :                 r->in.trusted_domain_name = NULL;
   21100             :                 {
   21101           0 :                         const char *test_str;
   21102           0 :                         const char *talloc_str;
   21103           0 :                         PyObject *unicode = NULL;
   21104           0 :                         if (PyUnicode_Check(py_trusted_domain_name)) {
   21105           0 :                                 unicode = PyUnicode_AsEncodedString(py_trusted_domain_name, "utf-8", "ignore");
   21106           0 :                                 if (unicode == NULL) {
   21107           0 :                                         PyErr_NoMemory();
   21108           0 :                                         return false;
   21109             :                                 }
   21110           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   21111           0 :                         } else if (PyBytes_Check(py_trusted_domain_name)) {
   21112           0 :                                 test_str = PyBytes_AS_STRING(py_trusted_domain_name);
   21113             :                         } else {
   21114           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_trusted_domain_name)->tp_name);
   21115           0 :                                 return false;
   21116             :                         }
   21117           0 :                         talloc_str = talloc_strdup(r, test_str);
   21118           0 :                         if (unicode != NULL) {
   21119           0 :                                 Py_DECREF(unicode);
   21120             :                         }
   21121           0 :                         if (talloc_str == NULL) {
   21122           0 :                                 PyErr_NoMemory();
   21123           0 :                                 return false;
   21124             :                         }
   21125           0 :                         r->in.trusted_domain_name = talloc_str;
   21126             :                 }
   21127             :         }
   21128           0 :         if (py_flags == NULL) {
   21129           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   21130           0 :                 return false;
   21131             :         }
   21132             :         {
   21133           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   21134           0 :                 if (PyLong_Check(py_flags)) {
   21135           0 :                         unsigned long long test_var;
   21136           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   21137           0 :                         if (PyErr_Occurred() != NULL) {
   21138           0 :                                 return false;
   21139             :                         }
   21140           0 :                         if (test_var > uint_max) {
   21141           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21142             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21143           0 :                                 return false;
   21144             :                         }
   21145           0 :                         r->in.flags = test_var;
   21146             :                 } else {
   21147           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21148             :                           PyLong_Type.tp_name);
   21149           0 :                         return false;
   21150             :                 }
   21151             :         }
   21152           0 :         return true;
   21153             : }
   21154             : 
   21155           0 : static PyObject *unpack_py_winbind_GetForestTrustInformation_args_out(struct winbind_GetForestTrustInformation *r)
   21156             : {
   21157           0 :         PyObject *result;
   21158           0 :         PyObject *py_forest_trust_info;
   21159           0 :         if (*r->out.forest_trust_info == NULL) {
   21160           0 :                 py_forest_trust_info = Py_None;
   21161           0 :                 Py_INCREF(py_forest_trust_info);
   21162             :         } else {
   21163           0 :                 py_forest_trust_info = pytalloc_reference_ex(lsa_ForestTrustInformation_Type, *r->out.forest_trust_info, *r->out.forest_trust_info);
   21164             :         }
   21165           0 :         result = py_forest_trust_info;
   21166           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   21167           0 :                 PyErr_SetWERROR(r->out.result);
   21168           0 :                 return NULL;
   21169             :         }
   21170             : 
   21171           0 :         return result;
   21172             : }
   21173             : 
   21174             : 
   21175           0 : static PyObject *py_winbind_SendToSam_in_get_message(PyObject *obj, void *closure)
   21176             : {
   21177           0 :         struct winbind_SendToSam *object = (struct winbind_SendToSam *)pytalloc_get_ptr(obj);
   21178           0 :         PyObject *py_message;
   21179           0 :         py_message = pytalloc_reference_ex(netr_SendToSamBase_Type, pytalloc_get_mem_ctx(obj), &object->in.message);
   21180           0 :         return py_message;
   21181             : }
   21182             : 
   21183           0 : static int py_winbind_SendToSam_in_set_message(PyObject *py_obj, PyObject *value, void *closure)
   21184             : {
   21185           0 :         struct winbind_SendToSam *object = (struct winbind_SendToSam *)pytalloc_get_ptr(py_obj);
   21186           0 :         if (value == NULL) {
   21187           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.message");
   21188           0 :                 return -1;
   21189             :         }
   21190           0 :         PY_CHECK_TYPE(netr_SendToSamBase_Type, value, return -1;);
   21191           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   21192           0 :                 PyErr_NoMemory();
   21193           0 :                 return -1;
   21194             :         }
   21195           0 :         object->in.message = *(struct netr_SendToSamBase *)pytalloc_get_ptr(value);
   21196           0 :         return 0;
   21197             : }
   21198             : 
   21199           0 : static PyObject *py_winbind_SendToSam_get_result(PyObject *obj, void *closure)
   21200             : {
   21201           0 :         struct winbind_SendToSam *object = (struct winbind_SendToSam *)pytalloc_get_ptr(obj);
   21202           0 :         PyObject *py_result;
   21203           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   21204           0 :         return py_result;
   21205             : }
   21206             : 
   21207           0 : static int py_winbind_SendToSam_set_result(PyObject *py_obj, PyObject *value, void *closure)
   21208             : {
   21209           0 :         struct winbind_SendToSam *object = (struct winbind_SendToSam *)pytalloc_get_ptr(py_obj);
   21210           0 :         if (value == NULL) {
   21211           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   21212           0 :                 return -1;
   21213             :         }
   21214           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   21215           0 :         return 0;
   21216             : }
   21217             : 
   21218             : static PyGetSetDef py_winbind_SendToSam_getsetters[] = {
   21219             :         {
   21220             :                 .name = discard_const_p(char, "in_message"),
   21221             :                 .get = py_winbind_SendToSam_in_get_message,
   21222             :                 .set = py_winbind_SendToSam_in_set_message,
   21223             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SendToSamBase")
   21224             :         },
   21225             :         {
   21226             :                 .name = discard_const_p(char, "result"),
   21227             :                 .get = py_winbind_SendToSam_get_result,
   21228             :                 .set = py_winbind_SendToSam_set_result,
   21229             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   21230             :         },
   21231             :         { .name = NULL }
   21232             : };
   21233             : 
   21234           0 : static PyObject *py_winbind_SendToSam_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21235             : {
   21236           0 :         PyObject *self = pytalloc_new(struct winbind_SendToSam, type);
   21237           0 :         return self;
   21238             : }
   21239             : 
   21240           0 : static PyObject *py_winbind_SendToSam_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   21241             : {
   21242             : 
   21243             : 
   21244           0 :         return PyLong_FromLong(32);
   21245             : }
   21246             : 
   21247           0 : static PyObject *py_winbind_SendToSam_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   21248             : {
   21249           0 :         const struct ndr_interface_call *call = NULL;
   21250           0 :         struct winbind_SendToSam *object = (struct winbind_SendToSam *)pytalloc_get_ptr(py_obj);
   21251           0 :         PyObject *ret = NULL;
   21252           0 :         struct ndr_push *push = NULL;
   21253           0 :         DATA_BLOB blob;
   21254           0 :         enum ndr_err_code err;
   21255             : 
   21256           0 :         if (ndr_table_winbind.num_calls < 33) {
   21257           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_SendToSam_ndr_pack");
   21258           0 :                 return NULL;
   21259             :         }
   21260           0 :         call = &ndr_table_winbind.calls[32];
   21261             : 
   21262           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   21263           0 :         if (push == NULL) {
   21264           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   21265           0 :                 return NULL;
   21266             :         }
   21267             : 
   21268           0 :         push->flags |= ndr_push_flags;
   21269             : 
   21270           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   21271           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   21272           0 :                 TALLOC_FREE(push);
   21273           0 :                 PyErr_SetNdrError(err);
   21274           0 :                 return NULL;
   21275             :         }
   21276           0 :         blob = ndr_push_blob(push);
   21277           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   21278           0 :         TALLOC_FREE(push);
   21279           0 :         return ret;
   21280             : }
   21281             : 
   21282           0 : static PyObject *py_winbind_SendToSam_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   21283             : {
   21284           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   21285           0 :         PyObject *bigendian_obj = NULL;
   21286           0 :         PyObject *ndr64_obj = NULL;
   21287           0 :         libndr_flags ndr_push_flags = 0;
   21288             : 
   21289           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   21290             :                 discard_const_p(char *, kwnames),
   21291             :                 &bigendian_obj,
   21292             :                 &ndr64_obj)) {
   21293           0 :                 return NULL;
   21294             :         }
   21295             : 
   21296           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   21297           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   21298             :         }
   21299           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   21300           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   21301             :         }
   21302             : 
   21303           0 :         return py_winbind_SendToSam_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   21304             : }
   21305             : 
   21306           0 : static PyObject *py_winbind_SendToSam_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   21307             : {
   21308           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   21309           0 :         PyObject *bigendian_obj = NULL;
   21310           0 :         PyObject *ndr64_obj = NULL;
   21311           0 :         libndr_flags ndr_push_flags = 0;
   21312             : 
   21313           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   21314             :                 discard_const_p(char *, kwnames),
   21315             :                 &bigendian_obj,
   21316             :                 &ndr64_obj)) {
   21317           0 :                 return NULL;
   21318             :         }
   21319             : 
   21320           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   21321           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   21322             :         }
   21323           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   21324           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   21325             :         }
   21326             : 
   21327           0 :         return py_winbind_SendToSam_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   21328             : }
   21329             : 
   21330           0 : static PyObject *py_winbind_SendToSam_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   21331             : {
   21332           0 :         const struct ndr_interface_call *call = NULL;
   21333           0 :         struct winbind_SendToSam *object = (struct winbind_SendToSam *)pytalloc_get_ptr(py_obj);
   21334           0 :         struct ndr_pull *pull = NULL;
   21335           0 :         enum ndr_err_code err;
   21336             : 
   21337           0 :         if (ndr_table_winbind.num_calls < 33) {
   21338           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_SendToSam_ndr_unpack");
   21339           0 :                 return NULL;
   21340             :         }
   21341           0 :         call = &ndr_table_winbind.calls[32];
   21342             : 
   21343           0 :         pull = ndr_pull_init_blob(blob, object);
   21344           0 :         if (pull == NULL) {
   21345           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   21346           0 :                 return NULL;
   21347             :         }
   21348             : 
   21349           0 :         pull->flags |= ndr_pull_flags;
   21350             : 
   21351           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   21352           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   21353           0 :                 TALLOC_FREE(pull);
   21354           0 :                 PyErr_SetNdrError(err);
   21355           0 :                 return NULL;
   21356             :         }
   21357           0 :         if (!allow_remaining) {
   21358           0 :                 uint32_t highest_ofs;
   21359             : 
   21360           0 :                 if (pull->offset > pull->relative_highest_offset) {
   21361           0 :                         highest_ofs = pull->offset;
   21362             :                 } else {
   21363           0 :                         highest_ofs = pull->relative_highest_offset;
   21364             :                 }
   21365           0 :                 if (highest_ofs < pull->data_size) {
   21366           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   21367             :                                 "not all bytes consumed ofs[%u] size[%u]",
   21368             :                                 highest_ofs, pull->data_size);
   21369           0 :                         TALLOC_FREE(pull);
   21370           0 :                         PyErr_SetNdrError(err);
   21371           0 :                         return NULL;
   21372             :                 }
   21373             :         }
   21374             : 
   21375           0 :         TALLOC_FREE(pull);
   21376           0 :         Py_RETURN_NONE;
   21377             : }
   21378             : 
   21379           0 : static PyObject *py_winbind_SendToSam_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   21380             : {
   21381           0 :         DATA_BLOB blob;
   21382           0 :         Py_ssize_t blob_length = 0;
   21383           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   21384           0 :         PyObject *bigendian_obj = NULL;
   21385           0 :         PyObject *ndr64_obj = NULL;
   21386           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   21387           0 :         PyObject *allow_remaining_obj = NULL;
   21388           0 :         bool allow_remaining = false;
   21389             : 
   21390           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   21391             :                 discard_const_p(char *, kwnames),
   21392             :                 &blob.data, &blob_length,
   21393             :                 &bigendian_obj,
   21394             :                 &ndr64_obj,
   21395             :                 &allow_remaining_obj)) {
   21396           0 :                 return NULL;
   21397             :         }
   21398           0 :         blob.length = blob_length;
   21399             : 
   21400           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   21401           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   21402             :         }
   21403           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   21404           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   21405             :         }
   21406             : 
   21407           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   21408           0 :                 allow_remaining = true;
   21409             :         }
   21410             : 
   21411           0 :         return py_winbind_SendToSam_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   21412             : }
   21413             : 
   21414           0 : static PyObject *py_winbind_SendToSam_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   21415             : {
   21416           0 :         DATA_BLOB blob;
   21417           0 :         Py_ssize_t blob_length = 0;
   21418           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   21419           0 :         PyObject *bigendian_obj = NULL;
   21420           0 :         PyObject *ndr64_obj = NULL;
   21421           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   21422           0 :         PyObject *allow_remaining_obj = NULL;
   21423           0 :         bool allow_remaining = false;
   21424             : 
   21425           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   21426             :                 discard_const_p(char *, kwnames),
   21427             :                 &blob.data, &blob_length,
   21428             :                 &bigendian_obj,
   21429             :                 &ndr64_obj,
   21430             :                 &allow_remaining_obj)) {
   21431           0 :                 return NULL;
   21432             :         }
   21433           0 :         blob.length = blob_length;
   21434             : 
   21435           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   21436           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   21437             :         }
   21438           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   21439           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   21440             :         }
   21441             : 
   21442           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   21443           0 :                 allow_remaining = true;
   21444             :         }
   21445             : 
   21446           0 :         return py_winbind_SendToSam_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   21447             : }
   21448             : 
   21449           0 : static PyObject *py_winbind_SendToSam_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   21450             : {
   21451           0 :         const struct ndr_interface_call *call = NULL;
   21452           0 :         struct winbind_SendToSam *object = (struct winbind_SendToSam *)pytalloc_get_ptr(py_obj);
   21453           0 :         PyObject *ret;
   21454           0 :         char *retstr;
   21455             : 
   21456           0 :         if (ndr_table_winbind.num_calls < 33) {
   21457           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_SendToSam_ndr_print");
   21458           0 :                 return NULL;
   21459             :         }
   21460           0 :         call = &ndr_table_winbind.calls[32];
   21461             : 
   21462           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   21463           0 :         ret = PyUnicode_FromString(retstr);
   21464           0 :         TALLOC_FREE(retstr);
   21465             : 
   21466           0 :         return ret;
   21467             : }
   21468             : 
   21469           0 : static PyObject *py_winbind_SendToSam_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   21470             : {
   21471           0 :         return py_winbind_SendToSam_ndr_print(py_obj, "winbind_SendToSam_in", NDR_IN);
   21472             : }
   21473             : 
   21474           0 : static PyObject *py_winbind_SendToSam_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   21475             : {
   21476           0 :         return py_winbind_SendToSam_ndr_print(py_obj, "winbind_SendToSam_out", NDR_OUT);
   21477             : }
   21478             : 
   21479             : static PyMethodDef py_winbind_SendToSam_methods[] = {
   21480             :         { "opnum", (PyCFunction)py_winbind_SendToSam_ndr_opnum, METH_NOARGS|METH_CLASS,
   21481             :                 "winbind.SendToSam.opnum() -> 32 (0x20) " },
   21482             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_SendToSam_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   21483             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   21484             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_SendToSam_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   21485             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   21486             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_SendToSam_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   21487             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   21488             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_SendToSam_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   21489             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   21490             :         { "__ndr_print_in__", (PyCFunction)py_winbind_SendToSam_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   21491             :         { "__ndr_print_out__", (PyCFunction)py_winbind_SendToSam_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   21492             :         { NULL, NULL, 0, NULL }
   21493             : };
   21494             : 
   21495             : 
   21496             : static PyTypeObject winbind_SendToSam_Type = {
   21497             :         PyVarObject_HEAD_INIT(NULL, 0)
   21498             :         .tp_name = "winbind.SendToSam",
   21499             :         .tp_getset = py_winbind_SendToSam_getsetters,
   21500             :         .tp_methods = py_winbind_SendToSam_methods,
   21501             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21502             :         .tp_new = py_winbind_SendToSam_new,
   21503             : };
   21504             : 
   21505           0 : static bool pack_py_winbind_SendToSam_args_in(PyObject *args, PyObject *kwargs, struct winbind_SendToSam *r)
   21506             : {
   21507           0 :         PyObject *py_message;
   21508           0 :         const char *kwnames[] = {
   21509             :                 "message", NULL
   21510             :         };
   21511             : 
   21512           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:winbind_SendToSam", discard_const_p(char *, kwnames), &py_message)) {
   21513           0 :                 return false;
   21514             :         }
   21515             : 
   21516           0 :         if (py_message == NULL) {
   21517           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.message");
   21518           0 :                 return false;
   21519             :         }
   21520           0 :         PY_CHECK_TYPE(netr_SendToSamBase_Type, py_message, return false;);
   21521           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_message)) == NULL) {
   21522           0 :                 PyErr_NoMemory();
   21523           0 :                 return false;
   21524             :         }
   21525           0 :         r->in.message = *(struct netr_SendToSamBase *)pytalloc_get_ptr(py_message);
   21526           0 :         return true;
   21527             : }
   21528             : 
   21529           0 : static PyObject *unpack_py_winbind_SendToSam_args_out(struct winbind_SendToSam *r)
   21530             : {
   21531           0 :         PyObject *result;
   21532           0 :         result = Py_None;
   21533           0 :         Py_INCREF(result);
   21534           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   21535           0 :                 PyErr_SetNTSTATUS(r->out.result);
   21536           0 :                 return NULL;
   21537             :         }
   21538             : 
   21539           0 :         return result;
   21540             : }
   21541             : 
   21542             : const struct PyNdrRpcMethodDef py_ndr_winbind_methods[] = {
   21543             :         { "wbint_Ping", "S.wbint_Ping(in_data) -> out_data", (py_dcerpc_call_fn)dcerpc_wbint_Ping_r, (py_data_pack_fn)pack_py_wbint_Ping_args_in, (py_data_unpack_fn)unpack_py_wbint_Ping_args_out, 0, &ndr_table_winbind },
   21544             :         { "wbint_LookupSid", "S.wbint_LookupSid(sid) -> (type, domain, name)", (py_dcerpc_call_fn)dcerpc_wbint_LookupSid_r, (py_data_pack_fn)pack_py_wbint_LookupSid_args_in, (py_data_unpack_fn)unpack_py_wbint_LookupSid_args_out, 1, &ndr_table_winbind },
   21545             :         { "wbint_LookupSids", "S.wbint_LookupSids(sids) -> (domains, names)", (py_dcerpc_call_fn)dcerpc_wbint_LookupSids_r, (py_data_pack_fn)pack_py_wbint_LookupSids_args_in, (py_data_unpack_fn)unpack_py_wbint_LookupSids_args_out, 2, &ndr_table_winbind },
   21546             :         { "wbint_LookupName", "S.wbint_LookupName(domain, name, flags) -> (type, sid)", (py_dcerpc_call_fn)dcerpc_wbint_LookupName_r, (py_data_pack_fn)pack_py_wbint_LookupName_args_in, (py_data_unpack_fn)unpack_py_wbint_LookupName_args_out, 3, &ndr_table_winbind },
   21547             :         { "wbint_Sids2UnixIDs", "S.wbint_Sids2UnixIDs(domains, ids) -> ids", (py_dcerpc_call_fn)dcerpc_wbint_Sids2UnixIDs_r, (py_data_pack_fn)pack_py_wbint_Sids2UnixIDs_args_in, (py_data_unpack_fn)unpack_py_wbint_Sids2UnixIDs_args_out, 4, &ndr_table_winbind },
   21548             :         { "wbint_UnixIDs2Sids", "S.wbint_UnixIDs2Sids(domain_name, domain_sid, num_ids, xids) -> (xids, sids)", (py_dcerpc_call_fn)dcerpc_wbint_UnixIDs2Sids_r, (py_data_pack_fn)pack_py_wbint_UnixIDs2Sids_args_in, (py_data_unpack_fn)unpack_py_wbint_UnixIDs2Sids_args_out, 5, &ndr_table_winbind },
   21549             :         { "wbint_AllocateUid", "S.wbint_AllocateUid() -> uid", (py_dcerpc_call_fn)dcerpc_wbint_AllocateUid_r, (py_data_pack_fn)pack_py_wbint_AllocateUid_args_in, (py_data_unpack_fn)unpack_py_wbint_AllocateUid_args_out, 6, &ndr_table_winbind },
   21550             :         { "wbint_AllocateGid", "S.wbint_AllocateGid() -> gid", (py_dcerpc_call_fn)dcerpc_wbint_AllocateGid_r, (py_data_pack_fn)pack_py_wbint_AllocateGid_args_in, (py_data_unpack_fn)unpack_py_wbint_AllocateGid_args_out, 7, &ndr_table_winbind },
   21551             :         { "wbint_GetNssInfo", "S.wbint_GetNssInfo(info) -> info", (py_dcerpc_call_fn)dcerpc_wbint_GetNssInfo_r, (py_data_pack_fn)pack_py_wbint_GetNssInfo_args_in, (py_data_unpack_fn)unpack_py_wbint_GetNssInfo_args_out, 8, &ndr_table_winbind },
   21552             :         { "wbint_LookupUserAliases", "S.wbint_LookupUserAliases(sids) -> rids", (py_dcerpc_call_fn)dcerpc_wbint_LookupUserAliases_r, (py_data_pack_fn)pack_py_wbint_LookupUserAliases_args_in, (py_data_unpack_fn)unpack_py_wbint_LookupUserAliases_args_out, 9, &ndr_table_winbind },
   21553             :         { "wbint_LookupUserGroups", "S.wbint_LookupUserGroups(sid) -> sids", (py_dcerpc_call_fn)dcerpc_wbint_LookupUserGroups_r, (py_data_pack_fn)pack_py_wbint_LookupUserGroups_args_in, (py_data_unpack_fn)unpack_py_wbint_LookupUserGroups_args_out, 10, &ndr_table_winbind },
   21554             :         { "wbint_QuerySequenceNumber", "S.wbint_QuerySequenceNumber() -> sequence", (py_dcerpc_call_fn)dcerpc_wbint_QuerySequenceNumber_r, (py_data_pack_fn)pack_py_wbint_QuerySequenceNumber_args_in, (py_data_unpack_fn)unpack_py_wbint_QuerySequenceNumber_args_out, 11, &ndr_table_winbind },
   21555             :         { "wbint_LookupGroupMembers", "S.wbint_LookupGroupMembers(sid, type) -> members", (py_dcerpc_call_fn)dcerpc_wbint_LookupGroupMembers_r, (py_data_pack_fn)pack_py_wbint_LookupGroupMembers_args_in, (py_data_unpack_fn)unpack_py_wbint_LookupGroupMembers_args_out, 12, &ndr_table_winbind },
   21556             :         { "wbint_LookupAliasMembers", "S.wbint_LookupAliasMembers(sid, type) -> sids", (py_dcerpc_call_fn)dcerpc_wbint_LookupAliasMembers_r, (py_data_pack_fn)pack_py_wbint_LookupAliasMembers_args_in, (py_data_unpack_fn)unpack_py_wbint_LookupAliasMembers_args_out, 13, &ndr_table_winbind },
   21557             :         { "wbint_QueryGroupList", "S.wbint_QueryGroupList() -> groups", (py_dcerpc_call_fn)dcerpc_wbint_QueryGroupList_r, (py_data_pack_fn)pack_py_wbint_QueryGroupList_args_in, (py_data_unpack_fn)unpack_py_wbint_QueryGroupList_args_out, 14, &ndr_table_winbind },
   21558             :         { "wbint_QueryUserRidList", "S.wbint_QueryUserRidList() -> rids", (py_dcerpc_call_fn)dcerpc_wbint_QueryUserRidList_r, (py_data_pack_fn)pack_py_wbint_QueryUserRidList_args_in, (py_data_unpack_fn)unpack_py_wbint_QueryUserRidList_args_out, 15, &ndr_table_winbind },
   21559             :         { "wbint_DsGetDcName", "S.wbint_DsGetDcName(domain_name, domain_guid, site_name, flags) -> dc_info", (py_dcerpc_call_fn)dcerpc_wbint_DsGetDcName_r, (py_data_pack_fn)pack_py_wbint_DsGetDcName_args_in, (py_data_unpack_fn)unpack_py_wbint_DsGetDcName_args_out, 16, &ndr_table_winbind },
   21560             :         { "wbint_LookupRids", "S.wbint_LookupRids(domain_sid, rids) -> (domain_name, names)", (py_dcerpc_call_fn)dcerpc_wbint_LookupRids_r, (py_data_pack_fn)pack_py_wbint_LookupRids_args_in, (py_data_unpack_fn)unpack_py_wbint_LookupRids_args_out, 17, &ndr_table_winbind },
   21561             :         { "wbint_CheckMachineAccount", "S.wbint_CheckMachineAccount() -> None", (py_dcerpc_call_fn)dcerpc_wbint_CheckMachineAccount_r, (py_data_pack_fn)pack_py_wbint_CheckMachineAccount_args_in, (py_data_unpack_fn)unpack_py_wbint_CheckMachineAccount_args_out, 18, &ndr_table_winbind },
   21562             :         { "wbint_ChangeMachineAccount", "S.wbint_ChangeMachineAccount(dcname) -> None", (py_dcerpc_call_fn)dcerpc_wbint_ChangeMachineAccount_r, (py_data_pack_fn)pack_py_wbint_ChangeMachineAccount_args_in, (py_data_unpack_fn)unpack_py_wbint_ChangeMachineAccount_args_out, 19, &ndr_table_winbind },
   21563             :         { "wbint_PingDc", "S.wbint_PingDc() -> dcname", (py_dcerpc_call_fn)dcerpc_wbint_PingDc_r, (py_data_pack_fn)pack_py_wbint_PingDc_args_in, (py_data_unpack_fn)unpack_py_wbint_PingDc_args_out, 20, &ndr_table_winbind },
   21564             :         { "wbint_ListTrustedDomains", "S.wbint_ListTrustedDomains(client_name, client_pid) -> domains", (py_dcerpc_call_fn)dcerpc_wbint_ListTrustedDomains_r, (py_data_pack_fn)pack_py_wbint_ListTrustedDomains_args_in, (py_data_unpack_fn)unpack_py_wbint_ListTrustedDomains_args_out, 21, &ndr_table_winbind },
   21565             :         { "wbint_PamAuth", "S.wbint_PamAuth(client_name, client_pid, flags, info, require_membership_of_sid) -> validation", (py_dcerpc_call_fn)dcerpc_wbint_PamAuth_r, (py_data_pack_fn)pack_py_wbint_PamAuth_args_in, (py_data_unpack_fn)unpack_py_wbint_PamAuth_args_out, 22, &ndr_table_winbind },
   21566             :         { "wbint_PamAuthCrap", "S.wbint_PamAuthCrap(client_name, client_pid, flags, user, domain, workstation, lm_resp, nt_resp, chal, logon_parameters, require_membership_of_sid) -> (authoritative, validation)", (py_dcerpc_call_fn)dcerpc_wbint_PamAuthCrap_r, (py_data_pack_fn)pack_py_wbint_PamAuthCrap_args_in, (py_data_unpack_fn)unpack_py_wbint_PamAuthCrap_args_out, 23, &ndr_table_winbind },
   21567             :         { "wbint_PamLogOff", "S.wbint_PamLogOff(client_name, client_pid, flags, user, krb5ccname, uid) -> None", (py_dcerpc_call_fn)dcerpc_wbint_PamLogOff_r, (py_data_pack_fn)pack_py_wbint_PamLogOff_args_in, (py_data_unpack_fn)unpack_py_wbint_PamLogOff_args_out, 24, &ndr_table_winbind },
   21568             :         { "wbint_PamAuthCrapChangePassword", "S.wbint_PamAuthCrapChangePassword(client_name, client_pid, user, domain, new_nt_pswd, old_nt_hash_enc, new_lm_pswd, old_lm_hash_enc) -> None", (py_dcerpc_call_fn)dcerpc_wbint_PamAuthCrapChangePassword_r, (py_data_pack_fn)pack_py_wbint_PamAuthCrapChangePassword_args_in, (py_data_unpack_fn)unpack_py_wbint_PamAuthCrapChangePassword_args_out, 25, &ndr_table_winbind },
   21569             :         { "wbint_PamAuthChangePassword", "S.wbint_PamAuthChangePassword(client_name, client_pid, flags, user, old_password, new_password) -> (dominfo, reject_reason)", (py_dcerpc_call_fn)dcerpc_wbint_PamAuthChangePassword_r, (py_data_pack_fn)pack_py_wbint_PamAuthChangePassword_args_in, (py_data_unpack_fn)unpack_py_wbint_PamAuthChangePassword_args_out, 26, &ndr_table_winbind },
   21570             :         { "wbint_InitConnection", "S.wbint_InitConnection(dcname) -> (name, alt_name, sid, flags)", (py_dcerpc_call_fn)dcerpc_wbint_InitConnection_r, (py_data_pack_fn)pack_py_wbint_InitConnection_args_in, (py_data_unpack_fn)unpack_py_wbint_InitConnection_args_out, 27, &ndr_table_winbind },
   21571             :         { "SamLogon", "S.SamLogon(logon_level, logon, validation_level) -> (validation, authoritative)", (py_dcerpc_call_fn)dcerpc_winbind_SamLogon_r, (py_data_pack_fn)pack_py_winbind_SamLogon_args_in, (py_data_unpack_fn)unpack_py_winbind_SamLogon_args_out, 28, &ndr_table_winbind },
   21572             :         { "DsrUpdateReadOnlyServerDnsRecords", "S.DsrUpdateReadOnlyServerDnsRecords(site_name, dns_ttl, dns_names) -> dns_names", (py_dcerpc_call_fn)dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_r, (py_data_pack_fn)pack_py_winbind_DsrUpdateReadOnlyServerDnsRecords_args_in, (py_data_unpack_fn)unpack_py_winbind_DsrUpdateReadOnlyServerDnsRecords_args_out, 29, &ndr_table_winbind },
   21573             :         { "LogonControl", "S.LogonControl(function_code, level, data) -> query", (py_dcerpc_call_fn)dcerpc_winbind_LogonControl_r, (py_data_pack_fn)pack_py_winbind_LogonControl_args_in, (py_data_unpack_fn)unpack_py_winbind_LogonControl_args_out, 30, &ndr_table_winbind },
   21574             :         { "GetForestTrustInformation", "S.GetForestTrustInformation(trusted_domain_name, flags) -> forest_trust_info", (py_dcerpc_call_fn)dcerpc_winbind_GetForestTrustInformation_r, (py_data_pack_fn)pack_py_winbind_GetForestTrustInformation_args_in, (py_data_unpack_fn)unpack_py_winbind_GetForestTrustInformation_args_out, 31, &ndr_table_winbind },
   21575             :         { "SendToSam", "S.SendToSam(message) -> None", (py_dcerpc_call_fn)dcerpc_winbind_SendToSam_r, (py_data_pack_fn)pack_py_winbind_SendToSam_args_in, (py_data_unpack_fn)unpack_py_winbind_SendToSam_args_out, 32, &ndr_table_winbind },
   21576             :         {0}
   21577             : };
   21578             : 
   21579           2 : static PyObject *interface_winbind_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21580             : {
   21581           2 :         return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_winbind);
   21582             : }
   21583             : 
   21584             : #define PY_DOC_WINBIND "winbind parent-child protocol"
   21585             : static PyTypeObject winbind_InterfaceType = {
   21586             :         PyVarObject_HEAD_INIT(NULL, 0)
   21587             :         .tp_name = "winbind.winbind",
   21588             :         .tp_basicsize = sizeof(dcerpc_InterfaceObject),
   21589             :         .tp_doc = "winbind(binding, lp_ctx=None, credentials=None) -> connection\n"
   21590             : "\n"
   21591             : "binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
   21592             : "lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
   21593             : "credentials should be a credentials.Credentials object.\n\n"PY_DOC_WINBIND,
   21594             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21595             :         .tp_new = interface_winbind_new,
   21596             : };
   21597             : 
   21598           0 : static PyObject *syntax_winbind_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21599             : {
   21600           0 :         return py_dcerpc_syntax_init_helper(type, args, kwargs, &ndr_table_winbind.syntax_id);
   21601             : }
   21602             : 
   21603             : #define PY_DOC_WINBIND_SYNTAX "winbind parent-child protocol"
   21604             : static PyTypeObject winbind_SyntaxType = {
   21605             :         PyVarObject_HEAD_INIT(NULL, 0)
   21606             :         .tp_name = "winbind.winbind_abstract_syntax",
   21607             :         .tp_doc = "winbind_abstract_syntax()\n"PY_DOC_WINBIND_SYNTAX,
   21608             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21609             :         .tp_new = syntax_winbind_new,
   21610             : };
   21611             : 
   21612             : static PyMethodDef winbind_methods[] = {
   21613             :         { NULL, NULL, 0, NULL }
   21614             : };
   21615             : 
   21616             : static struct PyModuleDef moduledef = {
   21617             :         PyModuleDef_HEAD_INIT,
   21618             :         .m_name = "winbind",
   21619             :         .m_doc = "winbind DCE/RPC",
   21620             :         .m_size = -1,
   21621             :         .m_methods = winbind_methods,
   21622             : };
   21623         141 : MODULE_INIT_FUNC(winbind)
   21624             : {
   21625         141 :         PyObject *m = NULL;
   21626         141 :         PyObject *dep_samba_dcerpc_lsa = NULL;
   21627         141 :         PyObject *dep_samba_dcerpc_netlogon = NULL;
   21628         141 :         PyObject *dep_samba_dcerpc_samr = NULL;
   21629         141 :         PyObject *dep_samba_dcerpc_misc = NULL;
   21630         141 :         PyObject *dep_samba_dcerpc_security = NULL;
   21631         141 :         PyObject *dep_samba_dcerpc_idmap = NULL;
   21632         141 :         PyObject *dep_talloc = NULL;
   21633         141 :         PyObject *dep_samba_dcerpc_base = NULL;
   21634             : 
   21635         141 :         dep_samba_dcerpc_lsa = PyImport_ImportModule("samba.dcerpc.lsa");
   21636         141 :         if (dep_samba_dcerpc_lsa == NULL)
   21637           0 :                 goto out;
   21638             : 
   21639         141 :         dep_samba_dcerpc_netlogon = PyImport_ImportModule("samba.dcerpc.netlogon");
   21640         141 :         if (dep_samba_dcerpc_netlogon == NULL)
   21641           0 :                 goto out;
   21642             : 
   21643         141 :         dep_samba_dcerpc_samr = PyImport_ImportModule("samba.dcerpc.samr");
   21644         141 :         if (dep_samba_dcerpc_samr == NULL)
   21645           0 :                 goto out;
   21646             : 
   21647         141 :         dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
   21648         141 :         if (dep_samba_dcerpc_misc == NULL)
   21649           0 :                 goto out;
   21650             : 
   21651         141 :         dep_samba_dcerpc_security = PyImport_ImportModule("samba.dcerpc.security");
   21652         141 :         if (dep_samba_dcerpc_security == NULL)
   21653           0 :                 goto out;
   21654             : 
   21655         141 :         dep_samba_dcerpc_idmap = PyImport_ImportModule("samba.dcerpc.idmap");
   21656         141 :         if (dep_samba_dcerpc_idmap == NULL)
   21657           0 :                 goto out;
   21658             : 
   21659         141 :         dep_talloc = PyImport_ImportModule("talloc");
   21660         141 :         if (dep_talloc == NULL)
   21661           0 :                 goto out;
   21662             : 
   21663         141 :         dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
   21664         141 :         if (dep_samba_dcerpc_base == NULL)
   21665           0 :                 goto out;
   21666             : 
   21667         141 :         unixid_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_idmap, "unixid");
   21668         141 :         if (unixid_Type == NULL)
   21669           0 :                 goto out;
   21670             : 
   21671         141 :         BaseObject_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "BaseObject");
   21672         141 :         if (BaseObject_Type == NULL)
   21673           0 :                 goto out;
   21674             : 
   21675         141 :         dom_sid_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "dom_sid");
   21676         141 :         if (dom_sid_Type == NULL)
   21677           0 :                 goto out;
   21678             : 
   21679         141 :         netr_Validation_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_netlogon, "netr_Validation");
   21680         141 :         if (netr_Validation_Type == NULL)
   21681           0 :                 goto out;
   21682             : 
   21683         141 :         lsa_SidArray_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "SidArray");
   21684         141 :         if (lsa_SidArray_Type == NULL)
   21685           0 :                 goto out;
   21686             : 
   21687         141 :         lsa_RefDomainList_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "RefDomainList");
   21688         141 :         if (lsa_RefDomainList_Type == NULL)
   21689           0 :                 goto out;
   21690             : 
   21691         141 :         lsa_TransNameArray_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "TransNameArray");
   21692         141 :         if (lsa_TransNameArray_Type == NULL)
   21693           0 :                 goto out;
   21694             : 
   21695         141 :         GUID_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "GUID");
   21696         141 :         if (GUID_Type == NULL)
   21697           0 :                 goto out;
   21698             : 
   21699         141 :         netr_DsRGetDCNameInfo_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_netlogon, "netr_DsRGetDCNameInfo");
   21700         141 :         if (netr_DsRGetDCNameInfo_Type == NULL)
   21701           0 :                 goto out;
   21702             : 
   21703         141 :         netr_DomainTrustList_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_netlogon, "netr_DomainTrustList");
   21704         141 :         if (netr_DomainTrustList_Type == NULL)
   21705           0 :                 goto out;
   21706             : 
   21707         141 :         samr_DomInfo1_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_samr, "DomInfo1");
   21708         141 :         if (samr_DomInfo1_Type == NULL)
   21709           0 :                 goto out;
   21710             : 
   21711         141 :         netr_LogonLevel_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_netlogon, "netr_LogonLevel");
   21712         141 :         if (netr_LogonLevel_Type == NULL)
   21713           0 :                 goto out;
   21714             : 
   21715         141 :         NL_DNS_NAME_INFO_ARRAY_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_netlogon, "NL_DNS_NAME_INFO_ARRAY");
   21716         141 :         if (NL_DNS_NAME_INFO_ARRAY_Type == NULL)
   21717           0 :                 goto out;
   21718             : 
   21719         141 :         netr_CONTROL_DATA_INFORMATION_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_netlogon, "netr_CONTROL_DATA_INFORMATION");
   21720         141 :         if (netr_CONTROL_DATA_INFORMATION_Type == NULL)
   21721           0 :                 goto out;
   21722             : 
   21723         141 :         netr_CONTROL_QUERY_INFORMATION_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_netlogon, "netr_CONTROL_QUERY_INFORMATION");
   21724         141 :         if (netr_CONTROL_QUERY_INFORMATION_Type == NULL)
   21725           0 :                 goto out;
   21726             : 
   21727         141 :         lsa_ForestTrustInformation_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "ForestTrustInformation");
   21728         141 :         if (lsa_ForestTrustInformation_Type == NULL)
   21729           0 :                 goto out;
   21730             : 
   21731         141 :         netr_SendToSamBase_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_netlogon, "netr_SendToSamBase");
   21732         141 :         if (netr_SendToSamBase_Type == NULL)
   21733           0 :                 goto out;
   21734             : 
   21735         141 :         ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
   21736         141 :         if (ClientConnection_Type == NULL)
   21737           0 :                 goto out;
   21738             : 
   21739         141 :         ndr_syntax_id_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "ndr_syntax_id");
   21740         141 :         if (ndr_syntax_id_Type == NULL)
   21741           0 :                 goto out;
   21742             : 
   21743         141 :         wbint_TransID_Type.tp_base = BaseObject_Type;
   21744         141 :         wbint_TransID_Type.tp_basicsize = pytalloc_BaseObject_size();
   21745             : 
   21746         141 :         wbint_TransIDArray_Type.tp_base = BaseObject_Type;
   21747         141 :         wbint_TransIDArray_Type.tp_basicsize = pytalloc_BaseObject_size();
   21748             : 
   21749         141 :         wbint_userinfo_Type.tp_base = BaseObject_Type;
   21750         141 :         wbint_userinfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   21751             : 
   21752         141 :         wbint_SidArray_Type.tp_base = BaseObject_Type;
   21753         141 :         wbint_SidArray_Type.tp_basicsize = pytalloc_BaseObject_size();
   21754             : 
   21755         141 :         wbint_RidArray_Type.tp_base = BaseObject_Type;
   21756         141 :         wbint_RidArray_Type.tp_basicsize = pytalloc_BaseObject_size();
   21757             : 
   21758         141 :         wbint_Principal_Type.tp_base = BaseObject_Type;
   21759         141 :         wbint_Principal_Type.tp_basicsize = pytalloc_BaseObject_size();
   21760             : 
   21761         141 :         wbint_Principals_Type.tp_base = BaseObject_Type;
   21762         141 :         wbint_Principals_Type.tp_basicsize = pytalloc_BaseObject_size();
   21763             : 
   21764         141 :         wbint_userinfos_Type.tp_base = BaseObject_Type;
   21765         141 :         wbint_userinfos_Type.tp_basicsize = pytalloc_BaseObject_size();
   21766             : 
   21767         141 :         wbint_Validation_Type.tp_base = BaseObject_Type;
   21768         141 :         wbint_Validation_Type.tp_basicsize = pytalloc_BaseObject_size();
   21769             : 
   21770         141 :         wbint_AuthUserInfo_Type.tp_base = BaseObject_Type;
   21771         141 :         wbint_AuthUserInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   21772             : 
   21773         141 :         wbint_PamAuthCrapValidation_Type.tp_base = BaseObject_Type;
   21774         141 :         wbint_PamAuthCrapValidation_Type.tp_basicsize = pytalloc_BaseObject_size();
   21775             : 
   21776         141 :         wbint_Ping_Type.tp_base = BaseObject_Type;
   21777         141 :         wbint_Ping_Type.tp_basicsize = pytalloc_BaseObject_size();
   21778             : 
   21779         141 :         wbint_LookupSid_Type.tp_base = BaseObject_Type;
   21780         141 :         wbint_LookupSid_Type.tp_basicsize = pytalloc_BaseObject_size();
   21781             : 
   21782         141 :         wbint_LookupSids_Type.tp_base = BaseObject_Type;
   21783         141 :         wbint_LookupSids_Type.tp_basicsize = pytalloc_BaseObject_size();
   21784             : 
   21785         141 :         wbint_LookupName_Type.tp_base = BaseObject_Type;
   21786         141 :         wbint_LookupName_Type.tp_basicsize = pytalloc_BaseObject_size();
   21787             : 
   21788         141 :         wbint_Sids2UnixIDs_Type.tp_base = BaseObject_Type;
   21789         141 :         wbint_Sids2UnixIDs_Type.tp_basicsize = pytalloc_BaseObject_size();
   21790             : 
   21791         141 :         wbint_UnixIDs2Sids_Type.tp_base = BaseObject_Type;
   21792         141 :         wbint_UnixIDs2Sids_Type.tp_basicsize = pytalloc_BaseObject_size();
   21793             : 
   21794         141 :         wbint_AllocateUid_Type.tp_base = BaseObject_Type;
   21795         141 :         wbint_AllocateUid_Type.tp_basicsize = pytalloc_BaseObject_size();
   21796             : 
   21797         141 :         wbint_AllocateGid_Type.tp_base = BaseObject_Type;
   21798         141 :         wbint_AllocateGid_Type.tp_basicsize = pytalloc_BaseObject_size();
   21799             : 
   21800         141 :         wbint_GetNssInfo_Type.tp_base = BaseObject_Type;
   21801         141 :         wbint_GetNssInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   21802             : 
   21803         141 :         wbint_LookupUserAliases_Type.tp_base = BaseObject_Type;
   21804         141 :         wbint_LookupUserAliases_Type.tp_basicsize = pytalloc_BaseObject_size();
   21805             : 
   21806         141 :         wbint_LookupUserGroups_Type.tp_base = BaseObject_Type;
   21807         141 :         wbint_LookupUserGroups_Type.tp_basicsize = pytalloc_BaseObject_size();
   21808             : 
   21809         141 :         wbint_QuerySequenceNumber_Type.tp_base = BaseObject_Type;
   21810         141 :         wbint_QuerySequenceNumber_Type.tp_basicsize = pytalloc_BaseObject_size();
   21811             : 
   21812         141 :         wbint_LookupGroupMembers_Type.tp_base = BaseObject_Type;
   21813         141 :         wbint_LookupGroupMembers_Type.tp_basicsize = pytalloc_BaseObject_size();
   21814             : 
   21815         141 :         wbint_LookupAliasMembers_Type.tp_base = BaseObject_Type;
   21816         141 :         wbint_LookupAliasMembers_Type.tp_basicsize = pytalloc_BaseObject_size();
   21817             : 
   21818         141 :         wbint_QueryGroupList_Type.tp_base = BaseObject_Type;
   21819         141 :         wbint_QueryGroupList_Type.tp_basicsize = pytalloc_BaseObject_size();
   21820             : 
   21821         141 :         wbint_QueryUserRidList_Type.tp_base = BaseObject_Type;
   21822         141 :         wbint_QueryUserRidList_Type.tp_basicsize = pytalloc_BaseObject_size();
   21823             : 
   21824         141 :         wbint_DsGetDcName_Type.tp_base = BaseObject_Type;
   21825         141 :         wbint_DsGetDcName_Type.tp_basicsize = pytalloc_BaseObject_size();
   21826             : 
   21827         141 :         wbint_LookupRids_Type.tp_base = BaseObject_Type;
   21828         141 :         wbint_LookupRids_Type.tp_basicsize = pytalloc_BaseObject_size();
   21829             : 
   21830         141 :         wbint_CheckMachineAccount_Type.tp_base = BaseObject_Type;
   21831         141 :         wbint_CheckMachineAccount_Type.tp_basicsize = pytalloc_BaseObject_size();
   21832             : 
   21833         141 :         wbint_ChangeMachineAccount_Type.tp_base = BaseObject_Type;
   21834         141 :         wbint_ChangeMachineAccount_Type.tp_basicsize = pytalloc_BaseObject_size();
   21835             : 
   21836         141 :         wbint_PingDc_Type.tp_base = BaseObject_Type;
   21837         141 :         wbint_PingDc_Type.tp_basicsize = pytalloc_BaseObject_size();
   21838             : 
   21839         141 :         wbint_ListTrustedDomains_Type.tp_base = BaseObject_Type;
   21840         141 :         wbint_ListTrustedDomains_Type.tp_basicsize = pytalloc_BaseObject_size();
   21841             : 
   21842         141 :         wbint_PamAuth_Type.tp_base = BaseObject_Type;
   21843         141 :         wbint_PamAuth_Type.tp_basicsize = pytalloc_BaseObject_size();
   21844             : 
   21845         141 :         wbint_PamAuthCrap_Type.tp_base = BaseObject_Type;
   21846         141 :         wbint_PamAuthCrap_Type.tp_basicsize = pytalloc_BaseObject_size();
   21847             : 
   21848         141 :         wbint_PamLogOff_Type.tp_base = BaseObject_Type;
   21849         141 :         wbint_PamLogOff_Type.tp_basicsize = pytalloc_BaseObject_size();
   21850             : 
   21851         141 :         wbint_PamAuthCrapChangePassword_Type.tp_base = BaseObject_Type;
   21852         141 :         wbint_PamAuthCrapChangePassword_Type.tp_basicsize = pytalloc_BaseObject_size();
   21853             : 
   21854         141 :         wbint_PamAuthChangePassword_Type.tp_base = BaseObject_Type;
   21855         141 :         wbint_PamAuthChangePassword_Type.tp_basicsize = pytalloc_BaseObject_size();
   21856             : 
   21857         141 :         wbint_InitConnection_Type.tp_base = BaseObject_Type;
   21858         141 :         wbint_InitConnection_Type.tp_basicsize = pytalloc_BaseObject_size();
   21859             : 
   21860         141 :         winbind_SamLogon_Type.tp_base = BaseObject_Type;
   21861         141 :         winbind_SamLogon_Type.tp_basicsize = pytalloc_BaseObject_size();
   21862             : 
   21863         141 :         winbind_DsrUpdateReadOnlyServerDnsRecords_Type.tp_base = BaseObject_Type;
   21864         141 :         winbind_DsrUpdateReadOnlyServerDnsRecords_Type.tp_basicsize = pytalloc_BaseObject_size();
   21865             : 
   21866         141 :         winbind_LogonControl_Type.tp_base = BaseObject_Type;
   21867         141 :         winbind_LogonControl_Type.tp_basicsize = pytalloc_BaseObject_size();
   21868             : 
   21869         141 :         winbind_GetForestTrustInformation_Type.tp_base = BaseObject_Type;
   21870         141 :         winbind_GetForestTrustInformation_Type.tp_basicsize = pytalloc_BaseObject_size();
   21871             : 
   21872         141 :         winbind_SendToSam_Type.tp_base = BaseObject_Type;
   21873         141 :         winbind_SendToSam_Type.tp_basicsize = pytalloc_BaseObject_size();
   21874             : 
   21875         141 :         winbind_InterfaceType.tp_base = ClientConnection_Type;
   21876             : 
   21877         141 :         winbind_SyntaxType.tp_base = ndr_syntax_id_Type;
   21878         141 :         winbind_SyntaxType.tp_basicsize = pytalloc_BaseObject_size();
   21879             : 
   21880         141 :         if (PyType_Ready(&wbint_TransID_Type) < 0)
   21881           0 :                 goto out;
   21882         141 :         if (PyType_Ready(&wbint_TransIDArray_Type) < 0)
   21883           0 :                 goto out;
   21884         141 :         if (PyType_Ready(&wbint_userinfo_Type) < 0)
   21885           0 :                 goto out;
   21886         141 :         if (PyType_Ready(&wbint_SidArray_Type) < 0)
   21887           0 :                 goto out;
   21888         141 :         if (PyType_Ready(&wbint_RidArray_Type) < 0)
   21889           0 :                 goto out;
   21890         141 :         if (PyType_Ready(&wbint_Principal_Type) < 0)
   21891           0 :                 goto out;
   21892         141 :         if (PyType_Ready(&wbint_Principals_Type) < 0)
   21893           0 :                 goto out;
   21894         141 :         if (PyType_Ready(&wbint_userinfos_Type) < 0)
   21895           0 :                 goto out;
   21896         141 :         if (PyType_Ready(&wbint_Validation_Type) < 0)
   21897           0 :                 goto out;
   21898         141 :         if (PyType_Ready(&wbint_AuthUserInfo_Type) < 0)
   21899           0 :                 goto out;
   21900         141 :         if (PyType_Ready(&wbint_PamAuthCrapValidation_Type) < 0)
   21901           0 :                 goto out;
   21902         141 :         if (PyType_Ready(&wbint_Ping_Type) < 0)
   21903           0 :                 goto out;
   21904         141 :         if (PyType_Ready(&wbint_LookupSid_Type) < 0)
   21905           0 :                 goto out;
   21906         141 :         if (PyType_Ready(&wbint_LookupSids_Type) < 0)
   21907           0 :                 goto out;
   21908         141 :         if (PyType_Ready(&wbint_LookupName_Type) < 0)
   21909           0 :                 goto out;
   21910         141 :         if (PyType_Ready(&wbint_Sids2UnixIDs_Type) < 0)
   21911           0 :                 goto out;
   21912         141 :         if (PyType_Ready(&wbint_UnixIDs2Sids_Type) < 0)
   21913           0 :                 goto out;
   21914         141 :         if (PyType_Ready(&wbint_AllocateUid_Type) < 0)
   21915           0 :                 goto out;
   21916         141 :         if (PyType_Ready(&wbint_AllocateGid_Type) < 0)
   21917           0 :                 goto out;
   21918         141 :         if (PyType_Ready(&wbint_GetNssInfo_Type) < 0)
   21919           0 :                 goto out;
   21920         141 :         if (PyType_Ready(&wbint_LookupUserAliases_Type) < 0)
   21921           0 :                 goto out;
   21922         141 :         if (PyType_Ready(&wbint_LookupUserGroups_Type) < 0)
   21923           0 :                 goto out;
   21924         141 :         if (PyType_Ready(&wbint_QuerySequenceNumber_Type) < 0)
   21925           0 :                 goto out;
   21926         141 :         if (PyType_Ready(&wbint_LookupGroupMembers_Type) < 0)
   21927           0 :                 goto out;
   21928         141 :         if (PyType_Ready(&wbint_LookupAliasMembers_Type) < 0)
   21929           0 :                 goto out;
   21930         141 :         if (PyType_Ready(&wbint_QueryGroupList_Type) < 0)
   21931           0 :                 goto out;
   21932         141 :         if (PyType_Ready(&wbint_QueryUserRidList_Type) < 0)
   21933           0 :                 goto out;
   21934         141 :         if (PyType_Ready(&wbint_DsGetDcName_Type) < 0)
   21935           0 :                 goto out;
   21936         141 :         if (PyType_Ready(&wbint_LookupRids_Type) < 0)
   21937           0 :                 goto out;
   21938         141 :         if (PyType_Ready(&wbint_CheckMachineAccount_Type) < 0)
   21939           0 :                 goto out;
   21940         141 :         if (PyType_Ready(&wbint_ChangeMachineAccount_Type) < 0)
   21941           0 :                 goto out;
   21942         141 :         if (PyType_Ready(&wbint_PingDc_Type) < 0)
   21943           0 :                 goto out;
   21944         141 :         if (PyType_Ready(&wbint_ListTrustedDomains_Type) < 0)
   21945           0 :                 goto out;
   21946         141 :         if (PyType_Ready(&wbint_PamAuth_Type) < 0)
   21947           0 :                 goto out;
   21948         141 :         if (PyType_Ready(&wbint_PamAuthCrap_Type) < 0)
   21949           0 :                 goto out;
   21950         141 :         if (PyType_Ready(&wbint_PamLogOff_Type) < 0)
   21951           0 :                 goto out;
   21952         141 :         if (PyType_Ready(&wbint_PamAuthCrapChangePassword_Type) < 0)
   21953           0 :                 goto out;
   21954         141 :         if (PyType_Ready(&wbint_PamAuthChangePassword_Type) < 0)
   21955           0 :                 goto out;
   21956         141 :         if (PyType_Ready(&wbint_InitConnection_Type) < 0)
   21957           0 :                 goto out;
   21958         141 :         if (PyType_Ready(&winbind_SamLogon_Type) < 0)
   21959           0 :                 goto out;
   21960         141 :         if (PyType_Ready(&winbind_DsrUpdateReadOnlyServerDnsRecords_Type) < 0)
   21961           0 :                 goto out;
   21962         141 :         if (PyType_Ready(&winbind_LogonControl_Type) < 0)
   21963           0 :                 goto out;
   21964         141 :         if (PyType_Ready(&winbind_GetForestTrustInformation_Type) < 0)
   21965           0 :                 goto out;
   21966         141 :         if (PyType_Ready(&winbind_SendToSam_Type) < 0)
   21967           0 :                 goto out;
   21968         141 :         if (PyType_Ready(&winbind_InterfaceType) < 0)
   21969           0 :                 goto out;
   21970         141 :         if (PyType_Ready(&winbind_SyntaxType) < 0)
   21971           0 :                 goto out;
   21972         141 :         if (!PyInterface_AddNdrRpcMethods(&winbind_InterfaceType, py_ndr_winbind_methods))
   21973           0 :                 return NULL;
   21974             : 
   21975             : #ifdef PY_WBINT_TRANSID_PATCH
   21976             :         PY_WBINT_TRANSID_PATCH(&wbint_TransID_Type);
   21977             : #endif
   21978             : #ifdef PY_WBINT_TRANSIDARRAY_PATCH
   21979             :         PY_WBINT_TRANSIDARRAY_PATCH(&wbint_TransIDArray_Type);
   21980             : #endif
   21981             : #ifdef PY_WBINT_USERINFO_PATCH
   21982             :         PY_WBINT_USERINFO_PATCH(&wbint_userinfo_Type);
   21983             : #endif
   21984             : #ifdef PY_WBINT_SIDARRAY_PATCH
   21985             :         PY_WBINT_SIDARRAY_PATCH(&wbint_SidArray_Type);
   21986             : #endif
   21987             : #ifdef PY_WBINT_RIDARRAY_PATCH
   21988             :         PY_WBINT_RIDARRAY_PATCH(&wbint_RidArray_Type);
   21989             : #endif
   21990             : #ifdef PY_WBINT_PRINCIPAL_PATCH
   21991             :         PY_WBINT_PRINCIPAL_PATCH(&wbint_Principal_Type);
   21992             : #endif
   21993             : #ifdef PY_WBINT_PRINCIPALS_PATCH
   21994             :         PY_WBINT_PRINCIPALS_PATCH(&wbint_Principals_Type);
   21995             : #endif
   21996             : #ifdef PY_WBINT_USERINFOS_PATCH
   21997             :         PY_WBINT_USERINFOS_PATCH(&wbint_userinfos_Type);
   21998             : #endif
   21999             : #ifdef PY_WBINT_VALIDATION_PATCH
   22000             :         PY_WBINT_VALIDATION_PATCH(&wbint_Validation_Type);
   22001             : #endif
   22002             : #ifdef PY_WBINT_AUTHUSERINFO_PATCH
   22003             :         PY_WBINT_AUTHUSERINFO_PATCH(&wbint_AuthUserInfo_Type);
   22004             : #endif
   22005             : #ifdef PY_WBINT_PAMAUTHCRAPVALIDATION_PATCH
   22006             :         PY_WBINT_PAMAUTHCRAPVALIDATION_PATCH(&wbint_PamAuthCrapValidation_Type);
   22007             : #endif
   22008             : #ifdef PY_WBINT_PING_PATCH
   22009             :         PY_WBINT_PING_PATCH(&wbint_Ping_Type);
   22010             : #endif
   22011             : #ifdef PY_WBINT_LOOKUPSID_PATCH
   22012             :         PY_WBINT_LOOKUPSID_PATCH(&wbint_LookupSid_Type);
   22013             : #endif
   22014             : #ifdef PY_WBINT_LOOKUPSIDS_PATCH
   22015             :         PY_WBINT_LOOKUPSIDS_PATCH(&wbint_LookupSids_Type);
   22016             : #endif
   22017             : #ifdef PY_WBINT_LOOKUPNAME_PATCH
   22018             :         PY_WBINT_LOOKUPNAME_PATCH(&wbint_LookupName_Type);
   22019             : #endif
   22020             : #ifdef PY_WBINT_SIDS2UNIXIDS_PATCH
   22021             :         PY_WBINT_SIDS2UNIXIDS_PATCH(&wbint_Sids2UnixIDs_Type);
   22022             : #endif
   22023             : #ifdef PY_WBINT_UNIXIDS2SIDS_PATCH
   22024             :         PY_WBINT_UNIXIDS2SIDS_PATCH(&wbint_UnixIDs2Sids_Type);
   22025             : #endif
   22026             : #ifdef PY_WBINT_ALLOCATEUID_PATCH
   22027             :         PY_WBINT_ALLOCATEUID_PATCH(&wbint_AllocateUid_Type);
   22028             : #endif
   22029             : #ifdef PY_WBINT_ALLOCATEGID_PATCH
   22030             :         PY_WBINT_ALLOCATEGID_PATCH(&wbint_AllocateGid_Type);
   22031             : #endif
   22032             : #ifdef PY_WBINT_GETNSSINFO_PATCH
   22033             :         PY_WBINT_GETNSSINFO_PATCH(&wbint_GetNssInfo_Type);
   22034             : #endif
   22035             : #ifdef PY_WBINT_LOOKUPUSERALIASES_PATCH
   22036             :         PY_WBINT_LOOKUPUSERALIASES_PATCH(&wbint_LookupUserAliases_Type);
   22037             : #endif
   22038             : #ifdef PY_WBINT_LOOKUPUSERGROUPS_PATCH
   22039             :         PY_WBINT_LOOKUPUSERGROUPS_PATCH(&wbint_LookupUserGroups_Type);
   22040             : #endif
   22041             : #ifdef PY_WBINT_QUERYSEQUENCENUMBER_PATCH
   22042             :         PY_WBINT_QUERYSEQUENCENUMBER_PATCH(&wbint_QuerySequenceNumber_Type);
   22043             : #endif
   22044             : #ifdef PY_WBINT_LOOKUPGROUPMEMBERS_PATCH
   22045             :         PY_WBINT_LOOKUPGROUPMEMBERS_PATCH(&wbint_LookupGroupMembers_Type);
   22046             : #endif
   22047             : #ifdef PY_WBINT_LOOKUPALIASMEMBERS_PATCH
   22048             :         PY_WBINT_LOOKUPALIASMEMBERS_PATCH(&wbint_LookupAliasMembers_Type);
   22049             : #endif
   22050             : #ifdef PY_WBINT_QUERYGROUPLIST_PATCH
   22051             :         PY_WBINT_QUERYGROUPLIST_PATCH(&wbint_QueryGroupList_Type);
   22052             : #endif
   22053             : #ifdef PY_WBINT_QUERYUSERRIDLIST_PATCH
   22054             :         PY_WBINT_QUERYUSERRIDLIST_PATCH(&wbint_QueryUserRidList_Type);
   22055             : #endif
   22056             : #ifdef PY_WBINT_DSGETDCNAME_PATCH
   22057             :         PY_WBINT_DSGETDCNAME_PATCH(&wbint_DsGetDcName_Type);
   22058             : #endif
   22059             : #ifdef PY_WBINT_LOOKUPRIDS_PATCH
   22060             :         PY_WBINT_LOOKUPRIDS_PATCH(&wbint_LookupRids_Type);
   22061             : #endif
   22062             : #ifdef PY_WBINT_CHECKMACHINEACCOUNT_PATCH
   22063             :         PY_WBINT_CHECKMACHINEACCOUNT_PATCH(&wbint_CheckMachineAccount_Type);
   22064             : #endif
   22065             : #ifdef PY_WBINT_CHANGEMACHINEACCOUNT_PATCH
   22066             :         PY_WBINT_CHANGEMACHINEACCOUNT_PATCH(&wbint_ChangeMachineAccount_Type);
   22067             : #endif
   22068             : #ifdef PY_WBINT_PINGDC_PATCH
   22069             :         PY_WBINT_PINGDC_PATCH(&wbint_PingDc_Type);
   22070             : #endif
   22071             : #ifdef PY_WBINT_LISTTRUSTEDDOMAINS_PATCH
   22072             :         PY_WBINT_LISTTRUSTEDDOMAINS_PATCH(&wbint_ListTrustedDomains_Type);
   22073             : #endif
   22074             : #ifdef PY_WBINT_PAMAUTH_PATCH
   22075             :         PY_WBINT_PAMAUTH_PATCH(&wbint_PamAuth_Type);
   22076             : #endif
   22077             : #ifdef PY_WBINT_PAMAUTHCRAP_PATCH
   22078             :         PY_WBINT_PAMAUTHCRAP_PATCH(&wbint_PamAuthCrap_Type);
   22079             : #endif
   22080             : #ifdef PY_WBINT_PAMLOGOFF_PATCH
   22081             :         PY_WBINT_PAMLOGOFF_PATCH(&wbint_PamLogOff_Type);
   22082             : #endif
   22083             : #ifdef PY_WBINT_PAMAUTHCRAPCHANGEPASSWORD_PATCH
   22084             :         PY_WBINT_PAMAUTHCRAPCHANGEPASSWORD_PATCH(&wbint_PamAuthCrapChangePassword_Type);
   22085             : #endif
   22086             : #ifdef PY_WBINT_PAMAUTHCHANGEPASSWORD_PATCH
   22087             :         PY_WBINT_PAMAUTHCHANGEPASSWORD_PATCH(&wbint_PamAuthChangePassword_Type);
   22088             : #endif
   22089             : #ifdef PY_WBINT_INITCONNECTION_PATCH
   22090             :         PY_WBINT_INITCONNECTION_PATCH(&wbint_InitConnection_Type);
   22091             : #endif
   22092             : #ifdef PY_SAMLOGON_PATCH
   22093             :         PY_SAMLOGON_PATCH(&winbind_SamLogon_Type);
   22094             : #endif
   22095             : #ifdef PY_DSRUPDATEREADONLYSERVERDNSRECORDS_PATCH
   22096             :         PY_DSRUPDATEREADONLYSERVERDNSRECORDS_PATCH(&winbind_DsrUpdateReadOnlyServerDnsRecords_Type);
   22097             : #endif
   22098             : #ifdef PY_LOGONCONTROL_PATCH
   22099             :         PY_LOGONCONTROL_PATCH(&winbind_LogonControl_Type);
   22100             : #endif
   22101             : #ifdef PY_GETFORESTTRUSTINFORMATION_PATCH
   22102             :         PY_GETFORESTTRUSTINFORMATION_PATCH(&winbind_GetForestTrustInformation_Type);
   22103             : #endif
   22104             : #ifdef PY_SENDTOSAM_PATCH
   22105             :         PY_SENDTOSAM_PATCH(&winbind_SendToSam_Type);
   22106             : #endif
   22107             : #ifdef PY_WINBIND_PATCH
   22108             :         PY_WINBIND_PATCH(&winbind_InterfaceType);
   22109             : #endif
   22110             : #ifdef PY_WINBIND_ABSTRACT_SYNTAX_PATCH
   22111             :         PY_WINBIND_ABSTRACT_SYNTAX_PATCH(&winbind_SyntaxType);
   22112             : #endif
   22113             : #ifdef PY_ABSTRACT_SYNTAX_PATCH
   22114             :         PY_ABSTRACT_SYNTAX_PATCH(&winbind_SyntaxType);
   22115             : #endif
   22116             : 
   22117         141 :         m = PyModule_Create(&moduledef);
   22118         141 :         if (m == NULL)
   22119           0 :                 goto out;
   22120             : 
   22121         141 :         PyModule_AddObject(m, "WB_DOMINFO_DOMAIN_UNKNOWN", PyLong_FromLong((uint16_t)WB_DOMINFO_DOMAIN_UNKNOWN));
   22122         141 :         PyModule_AddObject(m, "WB_DOMINFO_DOMAIN_NATIVE", PyLong_FromLong((uint16_t)WB_DOMINFO_DOMAIN_NATIVE));
   22123         141 :         PyModule_AddObject(m, "WB_DOMINFO_DOMAIN_AD", PyLong_FromLong((uint16_t)WB_DOMINFO_DOMAIN_AD));
   22124         141 :         PyModule_AddObject(m, "WB_DOMINFO_DOMAIN_PRIMARY", PyLong_FromLong((uint16_t)WB_DOMINFO_DOMAIN_PRIMARY));
   22125         141 :         PyModule_AddObject(m, "WB_DOMINFO_DOMAIN_OFFLINE", PyLong_FromLong((uint16_t)WB_DOMINFO_DOMAIN_OFFLINE));
   22126         141 :         Py_INCREF((PyObject *)(void *)&wbint_TransID_Type);
   22127         141 :         PyModule_AddObject(m, "wbint_TransID", (PyObject *)(void *)&wbint_TransID_Type);
   22128         141 :         Py_INCREF((PyObject *)(void *)&wbint_TransIDArray_Type);
   22129         141 :         PyModule_AddObject(m, "wbint_TransIDArray", (PyObject *)(void *)&wbint_TransIDArray_Type);
   22130         141 :         Py_INCREF((PyObject *)(void *)&wbint_userinfo_Type);
   22131         141 :         PyModule_AddObject(m, "wbint_userinfo", (PyObject *)(void *)&wbint_userinfo_Type);
   22132         141 :         Py_INCREF((PyObject *)(void *)&wbint_SidArray_Type);
   22133         141 :         PyModule_AddObject(m, "wbint_SidArray", (PyObject *)(void *)&wbint_SidArray_Type);
   22134         141 :         Py_INCREF((PyObject *)(void *)&wbint_RidArray_Type);
   22135         141 :         PyModule_AddObject(m, "wbint_RidArray", (PyObject *)(void *)&wbint_RidArray_Type);
   22136         141 :         Py_INCREF((PyObject *)(void *)&wbint_Principal_Type);
   22137         141 :         PyModule_AddObject(m, "wbint_Principal", (PyObject *)(void *)&wbint_Principal_Type);
   22138         141 :         Py_INCREF((PyObject *)(void *)&wbint_Principals_Type);
   22139         141 :         PyModule_AddObject(m, "wbint_Principals", (PyObject *)(void *)&wbint_Principals_Type);
   22140         141 :         Py_INCREF((PyObject *)(void *)&wbint_userinfos_Type);
   22141         141 :         PyModule_AddObject(m, "wbint_userinfos", (PyObject *)(void *)&wbint_userinfos_Type);
   22142         141 :         Py_INCREF((PyObject *)(void *)&wbint_Validation_Type);
   22143         141 :         PyModule_AddObject(m, "wbint_Validation", (PyObject *)(void *)&wbint_Validation_Type);
   22144         141 :         Py_INCREF((PyObject *)(void *)&wbint_AuthUserInfo_Type);
   22145         141 :         PyModule_AddObject(m, "wbint_AuthUserInfo", (PyObject *)(void *)&wbint_AuthUserInfo_Type);
   22146         141 :         Py_INCREF((PyObject *)(void *)&wbint_PamAuthCrapValidation_Type);
   22147         141 :         PyModule_AddObject(m, "wbint_PamAuthCrapValidation", (PyObject *)(void *)&wbint_PamAuthCrapValidation_Type);
   22148         141 :         Py_INCREF((PyObject *)(void *)&wbint_Ping_Type);
   22149         141 :         PyModule_AddObject(m, "wbint_Ping", (PyObject *)(void *)&wbint_Ping_Type);
   22150         141 :         Py_INCREF((PyObject *)(void *)&wbint_LookupSid_Type);
   22151         141 :         PyModule_AddObject(m, "wbint_LookupSid", (PyObject *)(void *)&wbint_LookupSid_Type);
   22152         141 :         Py_INCREF((PyObject *)(void *)&wbint_LookupSids_Type);
   22153         141 :         PyModule_AddObject(m, "wbint_LookupSids", (PyObject *)(void *)&wbint_LookupSids_Type);
   22154         141 :         Py_INCREF((PyObject *)(void *)&wbint_LookupName_Type);
   22155         141 :         PyModule_AddObject(m, "wbint_LookupName", (PyObject *)(void *)&wbint_LookupName_Type);
   22156         141 :         Py_INCREF((PyObject *)(void *)&wbint_Sids2UnixIDs_Type);
   22157         141 :         PyModule_AddObject(m, "wbint_Sids2UnixIDs", (PyObject *)(void *)&wbint_Sids2UnixIDs_Type);
   22158         141 :         Py_INCREF((PyObject *)(void *)&wbint_UnixIDs2Sids_Type);
   22159         141 :         PyModule_AddObject(m, "wbint_UnixIDs2Sids", (PyObject *)(void *)&wbint_UnixIDs2Sids_Type);
   22160         141 :         Py_INCREF((PyObject *)(void *)&wbint_AllocateUid_Type);
   22161         141 :         PyModule_AddObject(m, "wbint_AllocateUid", (PyObject *)(void *)&wbint_AllocateUid_Type);
   22162         141 :         Py_INCREF((PyObject *)(void *)&wbint_AllocateGid_Type);
   22163         141 :         PyModule_AddObject(m, "wbint_AllocateGid", (PyObject *)(void *)&wbint_AllocateGid_Type);
   22164         141 :         Py_INCREF((PyObject *)(void *)&wbint_GetNssInfo_Type);
   22165         141 :         PyModule_AddObject(m, "wbint_GetNssInfo", (PyObject *)(void *)&wbint_GetNssInfo_Type);
   22166         141 :         Py_INCREF((PyObject *)(void *)&wbint_LookupUserAliases_Type);
   22167         141 :         PyModule_AddObject(m, "wbint_LookupUserAliases", (PyObject *)(void *)&wbint_LookupUserAliases_Type);
   22168         141 :         Py_INCREF((PyObject *)(void *)&wbint_LookupUserGroups_Type);
   22169         141 :         PyModule_AddObject(m, "wbint_LookupUserGroups", (PyObject *)(void *)&wbint_LookupUserGroups_Type);
   22170         141 :         Py_INCREF((PyObject *)(void *)&wbint_QuerySequenceNumber_Type);
   22171         141 :         PyModule_AddObject(m, "wbint_QuerySequenceNumber", (PyObject *)(void *)&wbint_QuerySequenceNumber_Type);
   22172         141 :         Py_INCREF((PyObject *)(void *)&wbint_LookupGroupMembers_Type);
   22173         141 :         PyModule_AddObject(m, "wbint_LookupGroupMembers", (PyObject *)(void *)&wbint_LookupGroupMembers_Type);
   22174         141 :         Py_INCREF((PyObject *)(void *)&wbint_LookupAliasMembers_Type);
   22175         141 :         PyModule_AddObject(m, "wbint_LookupAliasMembers", (PyObject *)(void *)&wbint_LookupAliasMembers_Type);
   22176         141 :         Py_INCREF((PyObject *)(void *)&wbint_QueryGroupList_Type);
   22177         141 :         PyModule_AddObject(m, "wbint_QueryGroupList", (PyObject *)(void *)&wbint_QueryGroupList_Type);
   22178         141 :         Py_INCREF((PyObject *)(void *)&wbint_QueryUserRidList_Type);
   22179         141 :         PyModule_AddObject(m, "wbint_QueryUserRidList", (PyObject *)(void *)&wbint_QueryUserRidList_Type);
   22180         141 :         Py_INCREF((PyObject *)(void *)&wbint_DsGetDcName_Type);
   22181         141 :         PyModule_AddObject(m, "wbint_DsGetDcName", (PyObject *)(void *)&wbint_DsGetDcName_Type);
   22182         141 :         Py_INCREF((PyObject *)(void *)&wbint_LookupRids_Type);
   22183         141 :         PyModule_AddObject(m, "wbint_LookupRids", (PyObject *)(void *)&wbint_LookupRids_Type);
   22184         141 :         Py_INCREF((PyObject *)(void *)&wbint_CheckMachineAccount_Type);
   22185         141 :         PyModule_AddObject(m, "wbint_CheckMachineAccount", (PyObject *)(void *)&wbint_CheckMachineAccount_Type);
   22186         141 :         Py_INCREF((PyObject *)(void *)&wbint_ChangeMachineAccount_Type);
   22187         141 :         PyModule_AddObject(m, "wbint_ChangeMachineAccount", (PyObject *)(void *)&wbint_ChangeMachineAccount_Type);
   22188         141 :         Py_INCREF((PyObject *)(void *)&wbint_PingDc_Type);
   22189         141 :         PyModule_AddObject(m, "wbint_PingDc", (PyObject *)(void *)&wbint_PingDc_Type);
   22190         141 :         Py_INCREF((PyObject *)(void *)&wbint_ListTrustedDomains_Type);
   22191         141 :         PyModule_AddObject(m, "wbint_ListTrustedDomains", (PyObject *)(void *)&wbint_ListTrustedDomains_Type);
   22192         141 :         Py_INCREF((PyObject *)(void *)&wbint_PamAuth_Type);
   22193         141 :         PyModule_AddObject(m, "wbint_PamAuth", (PyObject *)(void *)&wbint_PamAuth_Type);
   22194         141 :         Py_INCREF((PyObject *)(void *)&wbint_PamAuthCrap_Type);
   22195         141 :         PyModule_AddObject(m, "wbint_PamAuthCrap", (PyObject *)(void *)&wbint_PamAuthCrap_Type);
   22196         141 :         Py_INCREF((PyObject *)(void *)&wbint_PamLogOff_Type);
   22197         141 :         PyModule_AddObject(m, "wbint_PamLogOff", (PyObject *)(void *)&wbint_PamLogOff_Type);
   22198         141 :         Py_INCREF((PyObject *)(void *)&wbint_PamAuthCrapChangePassword_Type);
   22199         141 :         PyModule_AddObject(m, "wbint_PamAuthCrapChangePassword", (PyObject *)(void *)&wbint_PamAuthCrapChangePassword_Type);
   22200         141 :         Py_INCREF((PyObject *)(void *)&wbint_PamAuthChangePassword_Type);
   22201         141 :         PyModule_AddObject(m, "wbint_PamAuthChangePassword", (PyObject *)(void *)&wbint_PamAuthChangePassword_Type);
   22202         141 :         Py_INCREF((PyObject *)(void *)&wbint_InitConnection_Type);
   22203         141 :         PyModule_AddObject(m, "wbint_InitConnection", (PyObject *)(void *)&wbint_InitConnection_Type);
   22204         141 :         Py_INCREF((PyObject *)(void *)&winbind_SamLogon_Type);
   22205         141 :         PyModule_AddObject(m, "SamLogon", (PyObject *)(void *)&winbind_SamLogon_Type);
   22206         141 :         Py_INCREF((PyObject *)(void *)&winbind_DsrUpdateReadOnlyServerDnsRecords_Type);
   22207         141 :         PyModule_AddObject(m, "DsrUpdateReadOnlyServerDnsRecords", (PyObject *)(void *)&winbind_DsrUpdateReadOnlyServerDnsRecords_Type);
   22208         141 :         Py_INCREF((PyObject *)(void *)&winbind_LogonControl_Type);
   22209         141 :         PyModule_AddObject(m, "LogonControl", (PyObject *)(void *)&winbind_LogonControl_Type);
   22210         141 :         Py_INCREF((PyObject *)(void *)&winbind_GetForestTrustInformation_Type);
   22211         141 :         PyModule_AddObject(m, "GetForestTrustInformation", (PyObject *)(void *)&winbind_GetForestTrustInformation_Type);
   22212         141 :         Py_INCREF((PyObject *)(void *)&winbind_SendToSam_Type);
   22213         141 :         PyModule_AddObject(m, "SendToSam", (PyObject *)(void *)&winbind_SendToSam_Type);
   22214         141 :         Py_INCREF((PyObject *)(void *)&winbind_InterfaceType);
   22215         141 :         PyModule_AddObject(m, "winbind", (PyObject *)(void *)&winbind_InterfaceType);
   22216         141 :         Py_INCREF((PyObject *)(void *)&winbind_SyntaxType);
   22217         141 :         PyModule_AddObject(m, "winbind_abstract_syntax", (PyObject *)(void *)&winbind_SyntaxType);
   22218         141 :         Py_INCREF((PyObject *)(void *)&winbind_SyntaxType);
   22219         141 :         PyModule_AddObject(m, "abstract_syntax", (PyObject *)(void *)&winbind_SyntaxType);
   22220             : #ifdef PY_MOD_WINBIND_PATCH
   22221             :         PY_MOD_WINBIND_PATCH(m);
   22222             : #endif
   22223         141 :         out:
   22224         141 :         Py_XDECREF(dep_samba_dcerpc_lsa);
   22225         141 :         Py_XDECREF(dep_samba_dcerpc_netlogon);
   22226         141 :         Py_XDECREF(dep_samba_dcerpc_samr);
   22227         141 :         Py_XDECREF(dep_samba_dcerpc_misc);
   22228         141 :         Py_XDECREF(dep_samba_dcerpc_security);
   22229         141 :         Py_XDECREF(dep_samba_dcerpc_idmap);
   22230         141 :         Py_XDECREF(dep_talloc);
   22231         141 :         Py_XDECREF(dep_samba_dcerpc_base);
   22232         138 :         return m;
   22233             : 
   22234             : }

Generated by: LCOV version 1.14