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 v4-17-test 1498b464 Lines: 349 11029 3.2 %
Date: 2024-06-13 04:01:37 Functions: 5 820 0.6 %

          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           4 : static inline unsigned long long ndr_sizeof2uintmax(size_t var_size)
      33             : {
      34           4 :         switch (var_size) {
      35           0 :         case 8:
      36           0 :                 return UINT64_MAX;
      37           4 :         case 4:
      38           4 :                 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_QueryGroupList_Type;
      96             : static PyTypeObject wbint_QueryUserRidList_Type;
      97             : static PyTypeObject wbint_DsGetDcName_Type;
      98             : static PyTypeObject wbint_LookupRids_Type;
      99             : static PyTypeObject wbint_CheckMachineAccount_Type;
     100             : static PyTypeObject wbint_ChangeMachineAccount_Type;
     101             : static PyTypeObject wbint_PingDc_Type;
     102             : static PyTypeObject wbint_ListTrustedDomains_Type;
     103             : static PyTypeObject wbint_PamAuth_Type;
     104             : static PyTypeObject wbint_PamAuthCrap_Type;
     105             : static PyTypeObject wbint_PamLogOff_Type;
     106             : static PyTypeObject wbint_PamAuthCrapChangePassword_Type;
     107             : static PyTypeObject wbint_PamAuthChangePassword_Type;
     108             : static PyTypeObject wbint_InitConnection_Type;
     109             : static PyTypeObject winbind_SamLogon_Type;
     110             : static PyTypeObject winbind_DsrUpdateReadOnlyServerDnsRecords_Type;
     111             : static PyTypeObject winbind_LogonControl_Type;
     112             : static PyTypeObject winbind_GetForestTrustInformation_Type;
     113             : static PyTypeObject winbind_SendToSam_Type;
     114             : 
     115             : static PyTypeObject *unixid_Type;
     116             : static PyTypeObject *BaseObject_Type;
     117             : static PyTypeObject *dom_sid_Type;
     118             : static PyTypeObject *netr_Validation_Type;
     119             : static PyTypeObject *lsa_SidArray_Type;
     120             : static PyTypeObject *lsa_RefDomainList_Type;
     121             : static PyTypeObject *lsa_TransNameArray_Type;
     122             : static PyTypeObject *GUID_Type;
     123             : static PyTypeObject *netr_DsRGetDCNameInfo_Type;
     124             : static PyTypeObject *netr_DomainTrustList_Type;
     125             : static PyTypeObject *samr_DomInfo1_Type;
     126             : static PyTypeObject *netr_LogonLevel_Type;
     127             : static PyTypeObject *NL_DNS_NAME_INFO_ARRAY_Type;
     128             : static PyTypeObject *netr_CONTROL_DATA_INFORMATION_Type;
     129             : static PyTypeObject *netr_CONTROL_QUERY_INFORMATION_Type;
     130             : static PyTypeObject *lsa_ForestTrustInformation_Type;
     131             : static PyTypeObject *netr_SendToSamBase_Type;
     132             : static PyTypeObject *ClientConnection_Type;
     133             : static PyTypeObject *ndr_syntax_id_Type;
     134             : 
     135           0 : static PyObject *py_wbint_TransID_get_type_hint(PyObject *obj, void *closure)
     136             : {
     137           0 :         struct wbint_TransID *object = (struct wbint_TransID *)pytalloc_get_ptr(obj);
     138             :         PyObject *py_type_hint;
     139           0 :         py_type_hint = PyLong_FromLong((uint16_t)object->type_hint);
     140           0 :         return py_type_hint;
     141             : }
     142             : 
     143           0 : static int py_wbint_TransID_set_type_hint(PyObject *py_obj, PyObject *value, void *closure)
     144             : {
     145           0 :         struct wbint_TransID *object = (struct wbint_TransID *)pytalloc_get_ptr(py_obj);
     146           0 :         if (value == NULL) {
     147           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->type_hint");
     148           0 :                 return -1;
     149             :         }
     150             :         {
     151           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type_hint));
     152           0 :                 if (PyLong_Check(value)) {
     153             :                         unsigned long long test_var;
     154           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     155           0 :                         if (PyErr_Occurred() != NULL) {
     156           0 :                                 return -1;
     157             :                         }
     158           0 :                         if (test_var > uint_max) {
     159           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     160             :                                   PyLong_Type.tp_name, uint_max, test_var);
     161           0 :                                 return -1;
     162             :                         }
     163           0 :                         object->type_hint = test_var;
     164             :                 } else {
     165           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     166             :                           PyLong_Type.tp_name);
     167           0 :                         return -1;
     168             :                 }
     169             :         }
     170           0 :         return 0;
     171             : }
     172             : 
     173           0 : static PyObject *py_wbint_TransID_get_domain_index(PyObject *obj, void *closure)
     174             : {
     175           0 :         struct wbint_TransID *object = (struct wbint_TransID *)pytalloc_get_ptr(obj);
     176             :         PyObject *py_domain_index;
     177           0 :         py_domain_index = PyLong_FromUnsignedLongLong((uint32_t)object->domain_index);
     178           0 :         return py_domain_index;
     179             : }
     180             : 
     181           0 : static int py_wbint_TransID_set_domain_index(PyObject *py_obj, PyObject *value, void *closure)
     182             : {
     183           0 :         struct wbint_TransID *object = (struct wbint_TransID *)pytalloc_get_ptr(py_obj);
     184           0 :         if (value == NULL) {
     185           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_index");
     186           0 :                 return -1;
     187             :         }
     188             :         {
     189           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->domain_index));
     190           0 :                 if (PyLong_Check(value)) {
     191             :                         unsigned long long test_var;
     192           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     193           0 :                         if (PyErr_Occurred() != NULL) {
     194           0 :                                 return -1;
     195             :                         }
     196           0 :                         if (test_var > uint_max) {
     197           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     198             :                                   PyLong_Type.tp_name, uint_max, test_var);
     199           0 :                                 return -1;
     200             :                         }
     201           0 :                         object->domain_index = test_var;
     202             :                 } else {
     203           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     204             :                           PyLong_Type.tp_name);
     205           0 :                         return -1;
     206             :                 }
     207             :         }
     208           0 :         return 0;
     209             : }
     210             : 
     211           0 : static PyObject *py_wbint_TransID_get_rid(PyObject *obj, void *closure)
     212             : {
     213           0 :         struct wbint_TransID *object = (struct wbint_TransID *)pytalloc_get_ptr(obj);
     214             :         PyObject *py_rid;
     215           0 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)object->rid);
     216           0 :         return py_rid;
     217             : }
     218             : 
     219           0 : static int py_wbint_TransID_set_rid(PyObject *py_obj, PyObject *value, void *closure)
     220             : {
     221           0 :         struct wbint_TransID *object = (struct wbint_TransID *)pytalloc_get_ptr(py_obj);
     222           0 :         if (value == NULL) {
     223           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rid");
     224           0 :                 return -1;
     225             :         }
     226             :         {
     227           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rid));
     228           0 :                 if (PyLong_Check(value)) {
     229             :                         unsigned long long test_var;
     230           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     231           0 :                         if (PyErr_Occurred() != NULL) {
     232           0 :                                 return -1;
     233             :                         }
     234           0 :                         if (test_var > uint_max) {
     235           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     236             :                                   PyLong_Type.tp_name, uint_max, test_var);
     237           0 :                                 return -1;
     238             :                         }
     239           0 :                         object->rid = test_var;
     240             :                 } else {
     241           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     242             :                           PyLong_Type.tp_name);
     243           0 :                         return -1;
     244             :                 }
     245             :         }
     246           0 :         return 0;
     247             : }
     248             : 
     249           0 : static PyObject *py_wbint_TransID_get_xid(PyObject *obj, void *closure)
     250             : {
     251           0 :         struct wbint_TransID *object = (struct wbint_TransID *)pytalloc_get_ptr(obj);
     252             :         PyObject *py_xid;
     253           0 :         py_xid = pytalloc_reference_ex(unixid_Type, pytalloc_get_mem_ctx(obj), &object->xid);
     254           0 :         return py_xid;
     255             : }
     256             : 
     257           0 : static int py_wbint_TransID_set_xid(PyObject *py_obj, PyObject *value, void *closure)
     258             : {
     259           0 :         struct wbint_TransID *object = (struct wbint_TransID *)pytalloc_get_ptr(py_obj);
     260           0 :         if (value == NULL) {
     261           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->xid");
     262           0 :                 return -1;
     263             :         }
     264           0 :         PY_CHECK_TYPE(unixid_Type, value, return -1;);
     265           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
     266           0 :                 PyErr_NoMemory();
     267           0 :                 return -1;
     268             :         }
     269           0 :         object->xid = *(struct unixid *)pytalloc_get_ptr(value);
     270           0 :         return 0;
     271             : }
     272             : 
     273             : static PyGetSetDef py_wbint_TransID_getsetters[] = {
     274             :         {
     275             :                 .name = discard_const_p(char, "type_hint"),
     276             :                 .get = py_wbint_TransID_get_type_hint,
     277             :                 .set = py_wbint_TransID_set_type_hint,
     278             :                 .doc = discard_const_p(char, "PIDL-generated element of base type id_type")
     279             :         },
     280             :         {
     281             :                 .name = discard_const_p(char, "domain_index"),
     282             :                 .get = py_wbint_TransID_get_domain_index,
     283             :                 .set = py_wbint_TransID_set_domain_index,
     284             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     285             :         },
     286             :         {
     287             :                 .name = discard_const_p(char, "rid"),
     288             :                 .get = py_wbint_TransID_get_rid,
     289             :                 .set = py_wbint_TransID_set_rid,
     290             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     291             :         },
     292             :         {
     293             :                 .name = discard_const_p(char, "xid"),
     294             :                 .get = py_wbint_TransID_get_xid,
     295             :                 .set = py_wbint_TransID_set_xid,
     296             :                 .doc = discard_const_p(char, "PIDL-generated element of base type unixid")
     297             :         },
     298             :         { .name = NULL }
     299             : };
     300             : 
     301           0 : static PyObject *py_wbint_TransID_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     302             : {
     303           0 :         return pytalloc_new(struct wbint_TransID, type);
     304             : }
     305             : 
     306             : 
     307             : static PyTypeObject wbint_TransID_Type = {
     308             :         PyVarObject_HEAD_INIT(NULL, 0)
     309             :         .tp_name = "winbind.wbint_TransID",
     310             :         .tp_getset = py_wbint_TransID_getsetters,
     311             :         .tp_methods = NULL,
     312             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     313             :         .tp_new = py_wbint_TransID_new,
     314             : };
     315             : 
     316             : 
     317           0 : static PyObject *py_wbint_TransIDArray_get_num_ids(PyObject *obj, void *closure)
     318             : {
     319           0 :         struct wbint_TransIDArray *object = (struct wbint_TransIDArray *)pytalloc_get_ptr(obj);
     320             :         PyObject *py_num_ids;
     321           0 :         py_num_ids = PyLong_FromUnsignedLongLong((uint32_t)object->num_ids);
     322           0 :         return py_num_ids;
     323             : }
     324             : 
     325           0 : static int py_wbint_TransIDArray_set_num_ids(PyObject *py_obj, PyObject *value, void *closure)
     326             : {
     327           0 :         struct wbint_TransIDArray *object = (struct wbint_TransIDArray *)pytalloc_get_ptr(py_obj);
     328           0 :         if (value == NULL) {
     329           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_ids");
     330           0 :                 return -1;
     331             :         }
     332             :         {
     333           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_ids));
     334           0 :                 if (PyLong_Check(value)) {
     335             :                         unsigned long long test_var;
     336           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     337           0 :                         if (PyErr_Occurred() != NULL) {
     338           0 :                                 return -1;
     339             :                         }
     340           0 :                         if (test_var > uint_max) {
     341           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     342             :                                   PyLong_Type.tp_name, uint_max, test_var);
     343           0 :                                 return -1;
     344             :                         }
     345           0 :                         object->num_ids = test_var;
     346             :                 } else {
     347           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     348             :                           PyLong_Type.tp_name);
     349           0 :                         return -1;
     350             :                 }
     351             :         }
     352           0 :         return 0;
     353             : }
     354             : 
     355           0 : static PyObject *py_wbint_TransIDArray_get_ids(PyObject *obj, void *closure)
     356             : {
     357           0 :         struct wbint_TransIDArray *object = (struct wbint_TransIDArray *)pytalloc_get_ptr(obj);
     358             :         PyObject *py_ids;
     359           0 :         py_ids = PyList_New(object->num_ids);
     360           0 :         if (py_ids == NULL) {
     361           0 :                 return NULL;
     362             :         }
     363             :         {
     364             :                 int ids_cntr_0;
     365           0 :                 for (ids_cntr_0 = 0; ids_cntr_0 < (object->num_ids); ids_cntr_0++) {
     366             :                         PyObject *py_ids_0;
     367           0 :                         py_ids_0 = pytalloc_reference_ex(&wbint_TransID_Type, object->ids, &object->ids[ids_cntr_0]);
     368           0 :                         PyList_SetItem(py_ids, ids_cntr_0, py_ids_0);
     369             :                 }
     370             :         }
     371           0 :         return py_ids;
     372             : }
     373             : 
     374           0 : static int py_wbint_TransIDArray_set_ids(PyObject *py_obj, PyObject *value, void *closure)
     375             : {
     376           0 :         struct wbint_TransIDArray *object = (struct wbint_TransIDArray *)pytalloc_get_ptr(py_obj);
     377           0 :         if (value == NULL) {
     378           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ids");
     379           0 :                 return -1;
     380             :         }
     381           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
     382             :         {
     383             :                 int ids_cntr_0;
     384           0 :                 object->ids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->ids, PyList_GET_SIZE(value));
     385           0 :                 if (!object->ids) { return -1;; }
     386           0 :                 talloc_set_name_const(object->ids, "ARRAY: object->ids");
     387           0 :                 for (ids_cntr_0 = 0; ids_cntr_0 < PyList_GET_SIZE(value); ids_cntr_0++) {
     388           0 :                         if (PyList_GET_ITEM(value, ids_cntr_0) == NULL) {
     389           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ids[ids_cntr_0]");
     390           0 :                                 return -1;
     391             :                         }
     392           0 :                         PY_CHECK_TYPE(&wbint_TransID_Type, PyList_GET_ITEM(value, ids_cntr_0), return -1;);
     393           0 :                         if (talloc_reference(object->ids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, ids_cntr_0))) == NULL) {
     394           0 :                                 PyErr_NoMemory();
     395           0 :                                 return -1;
     396             :                         }
     397           0 :                         object->ids[ids_cntr_0] = *(struct wbint_TransID *)pytalloc_get_ptr(PyList_GET_ITEM(value, ids_cntr_0));
     398             :                 }
     399             :         }
     400           0 :         return 0;
     401             : }
     402             : 
     403             : static PyGetSetDef py_wbint_TransIDArray_getsetters[] = {
     404             :         {
     405             :                 .name = discard_const_p(char, "num_ids"),
     406             :                 .get = py_wbint_TransIDArray_get_num_ids,
     407             :                 .set = py_wbint_TransIDArray_set_num_ids,
     408             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     409             :         },
     410             :         {
     411             :                 .name = discard_const_p(char, "ids"),
     412             :                 .get = py_wbint_TransIDArray_get_ids,
     413             :                 .set = py_wbint_TransIDArray_set_ids,
     414             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_TransID")
     415             :         },
     416             :         { .name = NULL }
     417             : };
     418             : 
     419           0 : static PyObject *py_wbint_TransIDArray_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     420             : {
     421           0 :         return pytalloc_new(struct wbint_TransIDArray, type);
     422             : }
     423             : 
     424             : 
     425             : static PyTypeObject wbint_TransIDArray_Type = {
     426             :         PyVarObject_HEAD_INIT(NULL, 0)
     427             :         .tp_name = "winbind.wbint_TransIDArray",
     428             :         .tp_getset = py_wbint_TransIDArray_getsetters,
     429             :         .tp_methods = NULL,
     430             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     431             :         .tp_new = py_wbint_TransIDArray_new,
     432             : };
     433             : 
     434             : 
     435           0 : static PyObject *py_wbint_userinfo_get_domain_name(PyObject *obj, void *closure)
     436             : {
     437           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(obj);
     438             :         PyObject *py_domain_name;
     439           0 :         if (object->domain_name == NULL) {
     440           0 :                 Py_RETURN_NONE;
     441             :         }
     442           0 :         if (object->domain_name == NULL) {
     443           0 :                 py_domain_name = Py_None;
     444           0 :                 Py_INCREF(py_domain_name);
     445             :         } else {
     446           0 :                 if (object->domain_name == NULL) {
     447           0 :                         py_domain_name = Py_None;
     448           0 :                         Py_INCREF(py_domain_name);
     449             :                 } else {
     450           0 :                         py_domain_name = PyUnicode_Decode(object->domain_name, strlen(object->domain_name), "utf-8", "ignore");
     451             :                 }
     452             :         }
     453           0 :         return py_domain_name;
     454             : }
     455             : 
     456           0 : static int py_wbint_userinfo_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
     457             : {
     458           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
     459           0 :         if (value == NULL) {
     460           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_name");
     461           0 :                 return -1;
     462             :         }
     463           0 :         if (value == Py_None) {
     464           0 :                 object->domain_name = NULL;
     465             :         } else {
     466           0 :                 object->domain_name = NULL;
     467             :                 {
     468             :                         const char *test_str;
     469             :                         const char *talloc_str;
     470           0 :                         PyObject *unicode = NULL;
     471           0 :                         if (PyUnicode_Check(value)) {
     472           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     473           0 :                                 if (unicode == NULL) {
     474           0 :                                         PyErr_NoMemory();
     475           0 :                                         return -1;
     476             :                                 }
     477           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     478           0 :                         } else if (PyBytes_Check(value)) {
     479           0 :                                 test_str = PyBytes_AS_STRING(value);
     480             :                         } else {
     481           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     482           0 :                                 return -1;
     483             :                         }
     484           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     485           0 :                         if (unicode != NULL) {
     486           0 :                                 Py_DECREF(unicode);
     487             :                         }
     488           0 :                         if (talloc_str == NULL) {
     489           0 :                                 PyErr_NoMemory();
     490           0 :                                 return -1;
     491             :                         }
     492           0 :                         object->domain_name = talloc_str;
     493             :                 }
     494             :         }
     495           0 :         return 0;
     496             : }
     497             : 
     498           0 : static PyObject *py_wbint_userinfo_get_acct_name(PyObject *obj, void *closure)
     499             : {
     500           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(obj);
     501             :         PyObject *py_acct_name;
     502           0 :         if (object->acct_name == NULL) {
     503           0 :                 Py_RETURN_NONE;
     504             :         }
     505           0 :         if (object->acct_name == NULL) {
     506           0 :                 py_acct_name = Py_None;
     507           0 :                 Py_INCREF(py_acct_name);
     508             :         } else {
     509           0 :                 if (object->acct_name == NULL) {
     510           0 :                         py_acct_name = Py_None;
     511           0 :                         Py_INCREF(py_acct_name);
     512             :                 } else {
     513           0 :                         py_acct_name = PyUnicode_Decode(object->acct_name, strlen(object->acct_name), "utf-8", "ignore");
     514             :                 }
     515             :         }
     516           0 :         return py_acct_name;
     517             : }
     518             : 
     519           0 : static int py_wbint_userinfo_set_acct_name(PyObject *py_obj, PyObject *value, void *closure)
     520             : {
     521           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
     522           0 :         if (value == NULL) {
     523           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->acct_name");
     524           0 :                 return -1;
     525             :         }
     526           0 :         if (value == Py_None) {
     527           0 :                 object->acct_name = NULL;
     528             :         } else {
     529           0 :                 object->acct_name = NULL;
     530             :                 {
     531             :                         const char *test_str;
     532             :                         const char *talloc_str;
     533           0 :                         PyObject *unicode = NULL;
     534           0 :                         if (PyUnicode_Check(value)) {
     535           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     536           0 :                                 if (unicode == NULL) {
     537           0 :                                         PyErr_NoMemory();
     538           0 :                                         return -1;
     539             :                                 }
     540           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     541           0 :                         } else if (PyBytes_Check(value)) {
     542           0 :                                 test_str = PyBytes_AS_STRING(value);
     543             :                         } else {
     544           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     545           0 :                                 return -1;
     546             :                         }
     547           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     548           0 :                         if (unicode != NULL) {
     549           0 :                                 Py_DECREF(unicode);
     550             :                         }
     551           0 :                         if (talloc_str == NULL) {
     552           0 :                                 PyErr_NoMemory();
     553           0 :                                 return -1;
     554             :                         }
     555           0 :                         object->acct_name = talloc_str;
     556             :                 }
     557             :         }
     558           0 :         return 0;
     559             : }
     560             : 
     561           0 : static PyObject *py_wbint_userinfo_get_full_name(PyObject *obj, void *closure)
     562             : {
     563           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(obj);
     564             :         PyObject *py_full_name;
     565           0 :         if (object->full_name == NULL) {
     566           0 :                 Py_RETURN_NONE;
     567             :         }
     568           0 :         if (object->full_name == NULL) {
     569           0 :                 py_full_name = Py_None;
     570           0 :                 Py_INCREF(py_full_name);
     571             :         } else {
     572           0 :                 if (object->full_name == NULL) {
     573           0 :                         py_full_name = Py_None;
     574           0 :                         Py_INCREF(py_full_name);
     575             :                 } else {
     576           0 :                         py_full_name = PyUnicode_Decode(object->full_name, strlen(object->full_name), "utf-8", "ignore");
     577             :                 }
     578             :         }
     579           0 :         return py_full_name;
     580             : }
     581             : 
     582           0 : static int py_wbint_userinfo_set_full_name(PyObject *py_obj, PyObject *value, void *closure)
     583             : {
     584           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
     585           0 :         if (value == NULL) {
     586           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->full_name");
     587           0 :                 return -1;
     588             :         }
     589           0 :         if (value == Py_None) {
     590           0 :                 object->full_name = NULL;
     591             :         } else {
     592           0 :                 object->full_name = NULL;
     593             :                 {
     594             :                         const char *test_str;
     595             :                         const char *talloc_str;
     596           0 :                         PyObject *unicode = NULL;
     597           0 :                         if (PyUnicode_Check(value)) {
     598           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     599           0 :                                 if (unicode == NULL) {
     600           0 :                                         PyErr_NoMemory();
     601           0 :                                         return -1;
     602             :                                 }
     603           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     604           0 :                         } else if (PyBytes_Check(value)) {
     605           0 :                                 test_str = PyBytes_AS_STRING(value);
     606             :                         } else {
     607           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     608           0 :                                 return -1;
     609             :                         }
     610           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     611           0 :                         if (unicode != NULL) {
     612           0 :                                 Py_DECREF(unicode);
     613             :                         }
     614           0 :                         if (talloc_str == NULL) {
     615           0 :                                 PyErr_NoMemory();
     616           0 :                                 return -1;
     617             :                         }
     618           0 :                         object->full_name = talloc_str;
     619             :                 }
     620             :         }
     621           0 :         return 0;
     622             : }
     623             : 
     624           0 : static PyObject *py_wbint_userinfo_get_homedir(PyObject *obj, void *closure)
     625             : {
     626           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(obj);
     627             :         PyObject *py_homedir;
     628           0 :         if (object->homedir == NULL) {
     629           0 :                 Py_RETURN_NONE;
     630             :         }
     631           0 :         if (object->homedir == NULL) {
     632           0 :                 py_homedir = Py_None;
     633           0 :                 Py_INCREF(py_homedir);
     634             :         } else {
     635           0 :                 if (object->homedir == NULL) {
     636           0 :                         py_homedir = Py_None;
     637           0 :                         Py_INCREF(py_homedir);
     638             :                 } else {
     639           0 :                         py_homedir = PyUnicode_Decode(object->homedir, strlen(object->homedir), "utf-8", "ignore");
     640             :                 }
     641             :         }
     642           0 :         return py_homedir;
     643             : }
     644             : 
     645           0 : static int py_wbint_userinfo_set_homedir(PyObject *py_obj, PyObject *value, void *closure)
     646             : {
     647           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
     648           0 :         if (value == NULL) {
     649           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->homedir");
     650           0 :                 return -1;
     651             :         }
     652           0 :         if (value == Py_None) {
     653           0 :                 object->homedir = NULL;
     654             :         } else {
     655           0 :                 object->homedir = NULL;
     656             :                 {
     657             :                         const char *test_str;
     658             :                         const char *talloc_str;
     659           0 :                         PyObject *unicode = NULL;
     660           0 :                         if (PyUnicode_Check(value)) {
     661           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     662           0 :                                 if (unicode == NULL) {
     663           0 :                                         PyErr_NoMemory();
     664           0 :                                         return -1;
     665             :                                 }
     666           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     667           0 :                         } else if (PyBytes_Check(value)) {
     668           0 :                                 test_str = PyBytes_AS_STRING(value);
     669             :                         } else {
     670           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     671           0 :                                 return -1;
     672             :                         }
     673           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     674           0 :                         if (unicode != NULL) {
     675           0 :                                 Py_DECREF(unicode);
     676             :                         }
     677           0 :                         if (talloc_str == NULL) {
     678           0 :                                 PyErr_NoMemory();
     679           0 :                                 return -1;
     680             :                         }
     681           0 :                         object->homedir = talloc_str;
     682             :                 }
     683             :         }
     684           0 :         return 0;
     685             : }
     686             : 
     687           0 : static PyObject *py_wbint_userinfo_get_shell(PyObject *obj, void *closure)
     688             : {
     689           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(obj);
     690             :         PyObject *py_shell;
     691           0 :         if (object->shell == NULL) {
     692           0 :                 Py_RETURN_NONE;
     693             :         }
     694           0 :         if (object->shell == NULL) {
     695           0 :                 py_shell = Py_None;
     696           0 :                 Py_INCREF(py_shell);
     697             :         } else {
     698           0 :                 if (object->shell == NULL) {
     699           0 :                         py_shell = Py_None;
     700           0 :                         Py_INCREF(py_shell);
     701             :                 } else {
     702           0 :                         py_shell = PyUnicode_Decode(object->shell, strlen(object->shell), "utf-8", "ignore");
     703             :                 }
     704             :         }
     705           0 :         return py_shell;
     706             : }
     707             : 
     708           0 : static int py_wbint_userinfo_set_shell(PyObject *py_obj, PyObject *value, void *closure)
     709             : {
     710           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
     711           0 :         if (value == NULL) {
     712           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->shell");
     713           0 :                 return -1;
     714             :         }
     715           0 :         if (value == Py_None) {
     716           0 :                 object->shell = NULL;
     717             :         } else {
     718           0 :                 object->shell = NULL;
     719             :                 {
     720             :                         const char *test_str;
     721             :                         const char *talloc_str;
     722           0 :                         PyObject *unicode = NULL;
     723           0 :                         if (PyUnicode_Check(value)) {
     724           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     725           0 :                                 if (unicode == NULL) {
     726           0 :                                         PyErr_NoMemory();
     727           0 :                                         return -1;
     728             :                                 }
     729           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     730           0 :                         } else if (PyBytes_Check(value)) {
     731           0 :                                 test_str = PyBytes_AS_STRING(value);
     732             :                         } else {
     733           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     734           0 :                                 return -1;
     735             :                         }
     736           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     737           0 :                         if (unicode != NULL) {
     738           0 :                                 Py_DECREF(unicode);
     739             :                         }
     740           0 :                         if (talloc_str == NULL) {
     741           0 :                                 PyErr_NoMemory();
     742           0 :                                 return -1;
     743             :                         }
     744           0 :                         object->shell = talloc_str;
     745             :                 }
     746             :         }
     747           0 :         return 0;
     748             : }
     749             : 
     750           0 : static PyObject *py_wbint_userinfo_get_uid(PyObject *obj, void *closure)
     751             : {
     752           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(obj);
     753             :         PyObject *py_uid;
     754           0 :         py_uid = PyLong_FromUnsignedLongLong(object->uid);
     755           0 :         return py_uid;
     756             : }
     757             : 
     758           0 : static int py_wbint_userinfo_set_uid(PyObject *py_obj, PyObject *value, void *closure)
     759             : {
     760           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
     761           0 :         if (value == NULL) {
     762           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->uid");
     763           0 :                 return -1;
     764             :         }
     765             :         {
     766           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->uid));
     767           0 :                 if (PyLong_Check(value)) {
     768             :                         unsigned long long test_var;
     769           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     770           0 :                         if (PyErr_Occurred() != NULL) {
     771           0 :                                 return -1;
     772             :                         }
     773           0 :                         if (test_var > uint_max) {
     774           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     775             :                                   PyLong_Type.tp_name, uint_max, test_var);
     776           0 :                                 return -1;
     777             :                         }
     778           0 :                         object->uid = test_var;
     779             :                 } else {
     780           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     781             :                           PyLong_Type.tp_name);
     782           0 :                         return -1;
     783             :                 }
     784             :         }
     785           0 :         return 0;
     786             : }
     787             : 
     788           0 : static PyObject *py_wbint_userinfo_get_primary_gid(PyObject *obj, void *closure)
     789             : {
     790           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(obj);
     791             :         PyObject *py_primary_gid;
     792           0 :         py_primary_gid = PyLong_FromUnsignedLongLong(object->primary_gid);
     793           0 :         return py_primary_gid;
     794             : }
     795             : 
     796           0 : static int py_wbint_userinfo_set_primary_gid(PyObject *py_obj, PyObject *value, void *closure)
     797             : {
     798           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
     799           0 :         if (value == NULL) {
     800           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->primary_gid");
     801           0 :                 return -1;
     802             :         }
     803             :         {
     804           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->primary_gid));
     805           0 :                 if (PyLong_Check(value)) {
     806             :                         unsigned long long test_var;
     807           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     808           0 :                         if (PyErr_Occurred() != NULL) {
     809           0 :                                 return -1;
     810             :                         }
     811           0 :                         if (test_var > uint_max) {
     812           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     813             :                                   PyLong_Type.tp_name, uint_max, test_var);
     814           0 :                                 return -1;
     815             :                         }
     816           0 :                         object->primary_gid = test_var;
     817             :                 } else {
     818           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     819             :                           PyLong_Type.tp_name);
     820           0 :                         return -1;
     821             :                 }
     822             :         }
     823           0 :         return 0;
     824             : }
     825             : 
     826           0 : static PyObject *py_wbint_userinfo_get_primary_group_name(PyObject *obj, void *closure)
     827             : {
     828           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(obj);
     829             :         PyObject *py_primary_group_name;
     830           0 :         if (object->primary_group_name == NULL) {
     831           0 :                 Py_RETURN_NONE;
     832             :         }
     833           0 :         if (object->primary_group_name == NULL) {
     834           0 :                 py_primary_group_name = Py_None;
     835           0 :                 Py_INCREF(py_primary_group_name);
     836             :         } else {
     837           0 :                 if (object->primary_group_name == NULL) {
     838           0 :                         py_primary_group_name = Py_None;
     839           0 :                         Py_INCREF(py_primary_group_name);
     840             :                 } else {
     841           0 :                         py_primary_group_name = PyUnicode_Decode(object->primary_group_name, strlen(object->primary_group_name), "utf-8", "ignore");
     842             :                 }
     843             :         }
     844           0 :         return py_primary_group_name;
     845             : }
     846             : 
     847           0 : static int py_wbint_userinfo_set_primary_group_name(PyObject *py_obj, PyObject *value, void *closure)
     848             : {
     849           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
     850           0 :         if (value == NULL) {
     851           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->primary_group_name");
     852           0 :                 return -1;
     853             :         }
     854           0 :         if (value == Py_None) {
     855           0 :                 object->primary_group_name = NULL;
     856             :         } else {
     857           0 :                 object->primary_group_name = NULL;
     858             :                 {
     859             :                         const char *test_str;
     860             :                         const char *talloc_str;
     861           0 :                         PyObject *unicode = NULL;
     862           0 :                         if (PyUnicode_Check(value)) {
     863           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     864           0 :                                 if (unicode == NULL) {
     865           0 :                                         PyErr_NoMemory();
     866           0 :                                         return -1;
     867             :                                 }
     868           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     869           0 :                         } else if (PyBytes_Check(value)) {
     870           0 :                                 test_str = PyBytes_AS_STRING(value);
     871             :                         } else {
     872           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     873           0 :                                 return -1;
     874             :                         }
     875           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     876           0 :                         if (unicode != NULL) {
     877           0 :                                 Py_DECREF(unicode);
     878             :                         }
     879           0 :                         if (talloc_str == NULL) {
     880           0 :                                 PyErr_NoMemory();
     881           0 :                                 return -1;
     882             :                         }
     883           0 :                         object->primary_group_name = talloc_str;
     884             :                 }
     885             :         }
     886           0 :         return 0;
     887             : }
     888             : 
     889           0 : static PyObject *py_wbint_userinfo_get_user_sid(PyObject *obj, void *closure)
     890             : {
     891           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(obj);
     892             :         PyObject *py_user_sid;
     893           0 :         py_user_sid = pytalloc_reference_ex(dom_sid_Type, pytalloc_get_mem_ctx(obj), &object->user_sid);
     894           0 :         return py_user_sid;
     895             : }
     896             : 
     897           0 : static int py_wbint_userinfo_set_user_sid(PyObject *py_obj, PyObject *value, void *closure)
     898             : {
     899           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
     900           0 :         if (value == NULL) {
     901           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user_sid");
     902           0 :                 return -1;
     903             :         }
     904           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
     905           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
     906           0 :                 PyErr_NoMemory();
     907           0 :                 return -1;
     908             :         }
     909           0 :         object->user_sid = *(struct dom_sid *)pytalloc_get_ptr(value);
     910           0 :         return 0;
     911             : }
     912             : 
     913           0 : static PyObject *py_wbint_userinfo_get_group_sid(PyObject *obj, void *closure)
     914             : {
     915           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(obj);
     916             :         PyObject *py_group_sid;
     917           0 :         py_group_sid = pytalloc_reference_ex(dom_sid_Type, pytalloc_get_mem_ctx(obj), &object->group_sid);
     918           0 :         return py_group_sid;
     919             : }
     920             : 
     921           0 : static int py_wbint_userinfo_set_group_sid(PyObject *py_obj, PyObject *value, void *closure)
     922             : {
     923           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
     924           0 :         if (value == NULL) {
     925           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->group_sid");
     926           0 :                 return -1;
     927             :         }
     928           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
     929           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
     930           0 :                 PyErr_NoMemory();
     931           0 :                 return -1;
     932             :         }
     933           0 :         object->group_sid = *(struct dom_sid *)pytalloc_get_ptr(value);
     934           0 :         return 0;
     935             : }
     936             : 
     937             : static PyGetSetDef py_wbint_userinfo_getsetters[] = {
     938             :         {
     939             :                 .name = discard_const_p(char, "domain_name"),
     940             :                 .get = py_wbint_userinfo_get_domain_name,
     941             :                 .set = py_wbint_userinfo_set_domain_name,
     942             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
     943             :         },
     944             :         {
     945             :                 .name = discard_const_p(char, "acct_name"),
     946             :                 .get = py_wbint_userinfo_get_acct_name,
     947             :                 .set = py_wbint_userinfo_set_acct_name,
     948             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
     949             :         },
     950             :         {
     951             :                 .name = discard_const_p(char, "full_name"),
     952             :                 .get = py_wbint_userinfo_get_full_name,
     953             :                 .set = py_wbint_userinfo_set_full_name,
     954             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
     955             :         },
     956             :         {
     957             :                 .name = discard_const_p(char, "homedir"),
     958             :                 .get = py_wbint_userinfo_get_homedir,
     959             :                 .set = py_wbint_userinfo_set_homedir,
     960             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
     961             :         },
     962             :         {
     963             :                 .name = discard_const_p(char, "shell"),
     964             :                 .get = py_wbint_userinfo_get_shell,
     965             :                 .set = py_wbint_userinfo_set_shell,
     966             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
     967             :         },
     968             :         {
     969             :                 .name = discard_const_p(char, "uid"),
     970             :                 .get = py_wbint_userinfo_get_uid,
     971             :                 .set = py_wbint_userinfo_set_uid,
     972             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
     973             :         },
     974             :         {
     975             :                 .name = discard_const_p(char, "primary_gid"),
     976             :                 .get = py_wbint_userinfo_get_primary_gid,
     977             :                 .set = py_wbint_userinfo_set_primary_gid,
     978             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
     979             :         },
     980             :         {
     981             :                 .name = discard_const_p(char, "primary_group_name"),
     982             :                 .get = py_wbint_userinfo_get_primary_group_name,
     983             :                 .set = py_wbint_userinfo_set_primary_group_name,
     984             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
     985             :         },
     986             :         {
     987             :                 .name = discard_const_p(char, "user_sid"),
     988             :                 .get = py_wbint_userinfo_get_user_sid,
     989             :                 .set = py_wbint_userinfo_set_user_sid,
     990             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
     991             :         },
     992             :         {
     993             :                 .name = discard_const_p(char, "group_sid"),
     994             :                 .get = py_wbint_userinfo_get_group_sid,
     995             :                 .set = py_wbint_userinfo_set_group_sid,
     996             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
     997             :         },
     998             :         { .name = NULL }
     999             : };
    1000             : 
    1001           0 : static PyObject *py_wbint_userinfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1002             : {
    1003           0 :         return pytalloc_new(struct wbint_userinfo, type);
    1004             : }
    1005             : 
    1006           0 : static PyObject *py_wbint_userinfo_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    1007             : {
    1008           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
    1009           0 :         PyObject *ret = NULL;
    1010             :         DATA_BLOB blob;
    1011             :         enum ndr_err_code err;
    1012           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    1013           0 :         if (tmp_ctx == NULL) {
    1014           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    1015           0 :                 return NULL;
    1016             :         }
    1017           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_wbint_userinfo);
    1018           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1019           0 :                 TALLOC_FREE(tmp_ctx);
    1020           0 :                 PyErr_SetNdrError(err);
    1021           0 :                 return NULL;
    1022             :         }
    1023             : 
    1024           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    1025           0 :         TALLOC_FREE(tmp_ctx);
    1026           0 :         return ret;
    1027             : }
    1028             : 
    1029           0 : static PyObject *py_wbint_userinfo_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    1030             : {
    1031           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
    1032           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1033           0 :         Py_ssize_t blob_length = 0;
    1034             :         enum ndr_err_code err;
    1035           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    1036           0 :         PyObject *allow_remaining_obj = NULL;
    1037           0 :         bool allow_remaining = false;
    1038             : 
    1039           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    1040             :                 discard_const_p(char *, kwnames),
    1041             :                 &blob.data, &blob_length,
    1042             :                 &allow_remaining_obj)) {
    1043           0 :                 return NULL;
    1044             :         }
    1045           0 :         blob.length = blob_length;
    1046             : 
    1047           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    1048           0 :                 allow_remaining = true;
    1049             :         }
    1050             : 
    1051           0 :         if (allow_remaining) {
    1052           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_userinfo);
    1053             :         } else {
    1054           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_userinfo);
    1055             :         }
    1056           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1057           0 :                 PyErr_SetNdrError(err);
    1058           0 :                 return NULL;
    1059             :         }
    1060             : 
    1061           0 :         Py_RETURN_NONE;
    1062             : }
    1063             : 
    1064           0 : static PyObject *py_wbint_userinfo_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    1065             : {
    1066           0 :         struct wbint_userinfo *object = (struct wbint_userinfo *)pytalloc_get_ptr(py_obj);
    1067             :         PyObject *ret;
    1068             :         char *retstr;
    1069             : 
    1070           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_wbint_userinfo, "wbint_userinfo", object);
    1071           0 :         ret = PyUnicode_FromString(retstr);
    1072           0 :         talloc_free(retstr);
    1073             : 
    1074           0 :         return ret;
    1075             : }
    1076             : 
    1077             : static PyMethodDef py_wbint_userinfo_methods[] = {
    1078             :         { "__ndr_pack__", (PyCFunction)py_wbint_userinfo_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    1079             :         { "__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" },
    1080             :         { "__ndr_print__", (PyCFunction)py_wbint_userinfo_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    1081             :         { NULL, NULL, 0, NULL }
    1082             : };
    1083             : 
    1084             : 
    1085             : static PyTypeObject wbint_userinfo_Type = {
    1086             :         PyVarObject_HEAD_INIT(NULL, 0)
    1087             :         .tp_name = "winbind.wbint_userinfo",
    1088             :         .tp_getset = py_wbint_userinfo_getsetters,
    1089             :         .tp_methods = py_wbint_userinfo_methods,
    1090             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1091             :         .tp_new = py_wbint_userinfo_new,
    1092             : };
    1093             : 
    1094             : 
    1095           0 : static PyObject *py_wbint_SidArray_get_num_sids(PyObject *obj, void *closure)
    1096             : {
    1097           0 :         struct wbint_SidArray *object = (struct wbint_SidArray *)pytalloc_get_ptr(obj);
    1098             :         PyObject *py_num_sids;
    1099           0 :         py_num_sids = PyLong_FromUnsignedLongLong((uint32_t)object->num_sids);
    1100           0 :         return py_num_sids;
    1101             : }
    1102             : 
    1103           0 : static int py_wbint_SidArray_set_num_sids(PyObject *py_obj, PyObject *value, void *closure)
    1104             : {
    1105           0 :         struct wbint_SidArray *object = (struct wbint_SidArray *)pytalloc_get_ptr(py_obj);
    1106           0 :         if (value == NULL) {
    1107           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_sids");
    1108           0 :                 return -1;
    1109             :         }
    1110             :         {
    1111           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_sids));
    1112           0 :                 if (PyLong_Check(value)) {
    1113             :                         unsigned long long test_var;
    1114           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1115           0 :                         if (PyErr_Occurred() != NULL) {
    1116           0 :                                 return -1;
    1117             :                         }
    1118           0 :                         if (test_var > uint_max) {
    1119           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1120             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1121           0 :                                 return -1;
    1122             :                         }
    1123           0 :                         object->num_sids = test_var;
    1124             :                 } else {
    1125           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1126             :                           PyLong_Type.tp_name);
    1127           0 :                         return -1;
    1128             :                 }
    1129             :         }
    1130           0 :         return 0;
    1131             : }
    1132             : 
    1133           0 : static PyObject *py_wbint_SidArray_get_sids(PyObject *obj, void *closure)
    1134             : {
    1135           0 :         struct wbint_SidArray *object = (struct wbint_SidArray *)pytalloc_get_ptr(obj);
    1136             :         PyObject *py_sids;
    1137           0 :         py_sids = PyList_New(object->num_sids);
    1138           0 :         if (py_sids == NULL) {
    1139           0 :                 return NULL;
    1140             :         }
    1141             :         {
    1142             :                 int sids_cntr_0;
    1143           0 :                 for (sids_cntr_0 = 0; sids_cntr_0 < (object->num_sids); sids_cntr_0++) {
    1144             :                         PyObject *py_sids_0;
    1145           0 :                         py_sids_0 = pytalloc_reference_ex(dom_sid_Type, object->sids, &object->sids[sids_cntr_0]);
    1146           0 :                         PyList_SetItem(py_sids, sids_cntr_0, py_sids_0);
    1147             :                 }
    1148             :         }
    1149           0 :         return py_sids;
    1150             : }
    1151             : 
    1152           0 : static int py_wbint_SidArray_set_sids(PyObject *py_obj, PyObject *value, void *closure)
    1153             : {
    1154           0 :         struct wbint_SidArray *object = (struct wbint_SidArray *)pytalloc_get_ptr(py_obj);
    1155           0 :         if (value == NULL) {
    1156           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sids");
    1157           0 :                 return -1;
    1158             :         }
    1159           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1160             :         {
    1161             :                 int sids_cntr_0;
    1162           0 :                 object->sids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sids, PyList_GET_SIZE(value));
    1163           0 :                 if (!object->sids) { return -1;; }
    1164           0 :                 talloc_set_name_const(object->sids, "ARRAY: object->sids");
    1165           0 :                 for (sids_cntr_0 = 0; sids_cntr_0 < PyList_GET_SIZE(value); sids_cntr_0++) {
    1166           0 :                         if (PyList_GET_ITEM(value, sids_cntr_0) == NULL) {
    1167           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sids[sids_cntr_0]");
    1168           0 :                                 return -1;
    1169             :                         }
    1170           0 :                         PY_CHECK_TYPE(dom_sid_Type, PyList_GET_ITEM(value, sids_cntr_0), return -1;);
    1171           0 :                         if (talloc_reference(object->sids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sids_cntr_0))) == NULL) {
    1172           0 :                                 PyErr_NoMemory();
    1173           0 :                                 return -1;
    1174             :                         }
    1175           0 :                         object->sids[sids_cntr_0] = *(struct dom_sid *)pytalloc_get_ptr(PyList_GET_ITEM(value, sids_cntr_0));
    1176             :                 }
    1177             :         }
    1178           0 :         return 0;
    1179             : }
    1180             : 
    1181             : static PyGetSetDef py_wbint_SidArray_getsetters[] = {
    1182             :         {
    1183             :                 .name = discard_const_p(char, "num_sids"),
    1184             :                 .get = py_wbint_SidArray_get_num_sids,
    1185             :                 .set = py_wbint_SidArray_set_num_sids,
    1186             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1187             :         },
    1188             :         {
    1189             :                 .name = discard_const_p(char, "sids"),
    1190             :                 .get = py_wbint_SidArray_get_sids,
    1191             :                 .set = py_wbint_SidArray_set_sids,
    1192             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
    1193             :         },
    1194             :         { .name = NULL }
    1195             : };
    1196             : 
    1197           0 : static PyObject *py_wbint_SidArray_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1198             : {
    1199           0 :         return pytalloc_new(struct wbint_SidArray, type);
    1200             : }
    1201             : 
    1202           0 : static PyObject *py_wbint_SidArray_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    1203             : {
    1204           0 :         struct wbint_SidArray *object = (struct wbint_SidArray *)pytalloc_get_ptr(py_obj);
    1205           0 :         PyObject *ret = NULL;
    1206             :         DATA_BLOB blob;
    1207             :         enum ndr_err_code err;
    1208           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    1209           0 :         if (tmp_ctx == NULL) {
    1210           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    1211           0 :                 return NULL;
    1212             :         }
    1213           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_wbint_SidArray);
    1214           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1215           0 :                 TALLOC_FREE(tmp_ctx);
    1216           0 :                 PyErr_SetNdrError(err);
    1217           0 :                 return NULL;
    1218             :         }
    1219             : 
    1220           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    1221           0 :         TALLOC_FREE(tmp_ctx);
    1222           0 :         return ret;
    1223             : }
    1224             : 
    1225           0 : static PyObject *py_wbint_SidArray_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    1226             : {
    1227           0 :         struct wbint_SidArray *object = (struct wbint_SidArray *)pytalloc_get_ptr(py_obj);
    1228           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1229           0 :         Py_ssize_t blob_length = 0;
    1230             :         enum ndr_err_code err;
    1231           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    1232           0 :         PyObject *allow_remaining_obj = NULL;
    1233           0 :         bool allow_remaining = false;
    1234             : 
    1235           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    1236             :                 discard_const_p(char *, kwnames),
    1237             :                 &blob.data, &blob_length,
    1238             :                 &allow_remaining_obj)) {
    1239           0 :                 return NULL;
    1240             :         }
    1241           0 :         blob.length = blob_length;
    1242             : 
    1243           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    1244           0 :                 allow_remaining = true;
    1245             :         }
    1246             : 
    1247           0 :         if (allow_remaining) {
    1248           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_SidArray);
    1249             :         } else {
    1250           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_SidArray);
    1251             :         }
    1252           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1253           0 :                 PyErr_SetNdrError(err);
    1254           0 :                 return NULL;
    1255             :         }
    1256             : 
    1257           0 :         Py_RETURN_NONE;
    1258             : }
    1259             : 
    1260           0 : static PyObject *py_wbint_SidArray_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    1261             : {
    1262           0 :         struct wbint_SidArray *object = (struct wbint_SidArray *)pytalloc_get_ptr(py_obj);
    1263             :         PyObject *ret;
    1264             :         char *retstr;
    1265             : 
    1266           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_wbint_SidArray, "wbint_SidArray", object);
    1267           0 :         ret = PyUnicode_FromString(retstr);
    1268           0 :         talloc_free(retstr);
    1269             : 
    1270           0 :         return ret;
    1271             : }
    1272             : 
    1273             : static PyMethodDef py_wbint_SidArray_methods[] = {
    1274             :         { "__ndr_pack__", (PyCFunction)py_wbint_SidArray_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    1275             :         { "__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" },
    1276             :         { "__ndr_print__", (PyCFunction)py_wbint_SidArray_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    1277             :         { NULL, NULL, 0, NULL }
    1278             : };
    1279             : 
    1280             : 
    1281             : static PyTypeObject wbint_SidArray_Type = {
    1282             :         PyVarObject_HEAD_INIT(NULL, 0)
    1283             :         .tp_name = "winbind.wbint_SidArray",
    1284             :         .tp_getset = py_wbint_SidArray_getsetters,
    1285             :         .tp_methods = py_wbint_SidArray_methods,
    1286             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1287             :         .tp_new = py_wbint_SidArray_new,
    1288             : };
    1289             : 
    1290             : 
    1291           0 : static PyObject *py_wbint_RidArray_get_num_rids(PyObject *obj, void *closure)
    1292             : {
    1293           0 :         struct wbint_RidArray *object = (struct wbint_RidArray *)pytalloc_get_ptr(obj);
    1294             :         PyObject *py_num_rids;
    1295           0 :         py_num_rids = PyLong_FromUnsignedLongLong((uint32_t)object->num_rids);
    1296           0 :         return py_num_rids;
    1297             : }
    1298             : 
    1299           0 : static int py_wbint_RidArray_set_num_rids(PyObject *py_obj, PyObject *value, void *closure)
    1300             : {
    1301           0 :         struct wbint_RidArray *object = (struct wbint_RidArray *)pytalloc_get_ptr(py_obj);
    1302           0 :         if (value == NULL) {
    1303           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_rids");
    1304           0 :                 return -1;
    1305             :         }
    1306             :         {
    1307           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_rids));
    1308           0 :                 if (PyLong_Check(value)) {
    1309             :                         unsigned long long test_var;
    1310           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1311           0 :                         if (PyErr_Occurred() != NULL) {
    1312           0 :                                 return -1;
    1313             :                         }
    1314           0 :                         if (test_var > uint_max) {
    1315           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1316             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1317           0 :                                 return -1;
    1318             :                         }
    1319           0 :                         object->num_rids = test_var;
    1320             :                 } else {
    1321           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1322             :                           PyLong_Type.tp_name);
    1323           0 :                         return -1;
    1324             :                 }
    1325             :         }
    1326           0 :         return 0;
    1327             : }
    1328             : 
    1329           0 : static PyObject *py_wbint_RidArray_get_rids(PyObject *obj, void *closure)
    1330             : {
    1331           0 :         struct wbint_RidArray *object = (struct wbint_RidArray *)pytalloc_get_ptr(obj);
    1332             :         PyObject *py_rids;
    1333           0 :         py_rids = PyList_New(object->num_rids);
    1334           0 :         if (py_rids == NULL) {
    1335           0 :                 return NULL;
    1336             :         }
    1337             :         {
    1338             :                 int rids_cntr_0;
    1339           0 :                 for (rids_cntr_0 = 0; rids_cntr_0 < (object->num_rids); rids_cntr_0++) {
    1340             :                         PyObject *py_rids_0;
    1341           0 :                         py_rids_0 = PyLong_FromUnsignedLongLong((uint32_t)object->rids[rids_cntr_0]);
    1342           0 :                         PyList_SetItem(py_rids, rids_cntr_0, py_rids_0);
    1343             :                 }
    1344             :         }
    1345           0 :         return py_rids;
    1346             : }
    1347             : 
    1348           0 : static int py_wbint_RidArray_set_rids(PyObject *py_obj, PyObject *value, void *closure)
    1349             : {
    1350           0 :         struct wbint_RidArray *object = (struct wbint_RidArray *)pytalloc_get_ptr(py_obj);
    1351           0 :         if (value == NULL) {
    1352           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rids");
    1353           0 :                 return -1;
    1354             :         }
    1355           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1356             :         {
    1357             :                 int rids_cntr_0;
    1358           0 :                 object->rids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->rids, PyList_GET_SIZE(value));
    1359           0 :                 if (!object->rids) { return -1;; }
    1360           0 :                 talloc_set_name_const(object->rids, "ARRAY: object->rids");
    1361           0 :                 for (rids_cntr_0 = 0; rids_cntr_0 < PyList_GET_SIZE(value); rids_cntr_0++) {
    1362           0 :                         if (PyList_GET_ITEM(value, rids_cntr_0) == NULL) {
    1363           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rids[rids_cntr_0]");
    1364           0 :                                 return -1;
    1365             :                         }
    1366             :                         {
    1367           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rids[rids_cntr_0]));
    1368           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, rids_cntr_0))) {
    1369             :                                         unsigned long long test_var;
    1370           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, rids_cntr_0));
    1371           0 :                                         if (PyErr_Occurred() != NULL) {
    1372           0 :                                                 return -1;
    1373             :                                         }
    1374           0 :                                         if (test_var > uint_max) {
    1375           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1376             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    1377           0 :                                                 return -1;
    1378             :                                         }
    1379           0 :                                         object->rids[rids_cntr_0] = test_var;
    1380             :                                 } else {
    1381           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1382             :                                           PyLong_Type.tp_name);
    1383           0 :                                         return -1;
    1384             :                                 }
    1385             :                         }
    1386             :                 }
    1387             :         }
    1388           0 :         return 0;
    1389             : }
    1390             : 
    1391             : static PyGetSetDef py_wbint_RidArray_getsetters[] = {
    1392             :         {
    1393             :                 .name = discard_const_p(char, "num_rids"),
    1394             :                 .get = py_wbint_RidArray_get_num_rids,
    1395             :                 .set = py_wbint_RidArray_set_num_rids,
    1396             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1397             :         },
    1398             :         {
    1399             :                 .name = discard_const_p(char, "rids"),
    1400             :                 .get = py_wbint_RidArray_get_rids,
    1401             :                 .set = py_wbint_RidArray_set_rids,
    1402             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1403             :         },
    1404             :         { .name = NULL }
    1405             : };
    1406             : 
    1407           0 : static PyObject *py_wbint_RidArray_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1408             : {
    1409           0 :         return pytalloc_new(struct wbint_RidArray, type);
    1410             : }
    1411             : 
    1412           0 : static PyObject *py_wbint_RidArray_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    1413             : {
    1414           0 :         struct wbint_RidArray *object = (struct wbint_RidArray *)pytalloc_get_ptr(py_obj);
    1415           0 :         PyObject *ret = NULL;
    1416             :         DATA_BLOB blob;
    1417             :         enum ndr_err_code err;
    1418           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    1419           0 :         if (tmp_ctx == NULL) {
    1420           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    1421           0 :                 return NULL;
    1422             :         }
    1423           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_wbint_RidArray);
    1424           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1425           0 :                 TALLOC_FREE(tmp_ctx);
    1426           0 :                 PyErr_SetNdrError(err);
    1427           0 :                 return NULL;
    1428             :         }
    1429             : 
    1430           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    1431           0 :         TALLOC_FREE(tmp_ctx);
    1432           0 :         return ret;
    1433             : }
    1434             : 
    1435           0 : static PyObject *py_wbint_RidArray_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    1436             : {
    1437           0 :         struct wbint_RidArray *object = (struct wbint_RidArray *)pytalloc_get_ptr(py_obj);
    1438           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1439           0 :         Py_ssize_t blob_length = 0;
    1440             :         enum ndr_err_code err;
    1441           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    1442           0 :         PyObject *allow_remaining_obj = NULL;
    1443           0 :         bool allow_remaining = false;
    1444             : 
    1445           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    1446             :                 discard_const_p(char *, kwnames),
    1447             :                 &blob.data, &blob_length,
    1448             :                 &allow_remaining_obj)) {
    1449           0 :                 return NULL;
    1450             :         }
    1451           0 :         blob.length = blob_length;
    1452             : 
    1453           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    1454           0 :                 allow_remaining = true;
    1455             :         }
    1456             : 
    1457           0 :         if (allow_remaining) {
    1458           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_RidArray);
    1459             :         } else {
    1460           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_RidArray);
    1461             :         }
    1462           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1463           0 :                 PyErr_SetNdrError(err);
    1464           0 :                 return NULL;
    1465             :         }
    1466             : 
    1467           0 :         Py_RETURN_NONE;
    1468             : }
    1469             : 
    1470           0 : static PyObject *py_wbint_RidArray_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    1471             : {
    1472           0 :         struct wbint_RidArray *object = (struct wbint_RidArray *)pytalloc_get_ptr(py_obj);
    1473             :         PyObject *ret;
    1474             :         char *retstr;
    1475             : 
    1476           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_wbint_RidArray, "wbint_RidArray", object);
    1477           0 :         ret = PyUnicode_FromString(retstr);
    1478           0 :         talloc_free(retstr);
    1479             : 
    1480           0 :         return ret;
    1481             : }
    1482             : 
    1483             : static PyMethodDef py_wbint_RidArray_methods[] = {
    1484             :         { "__ndr_pack__", (PyCFunction)py_wbint_RidArray_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    1485             :         { "__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" },
    1486             :         { "__ndr_print__", (PyCFunction)py_wbint_RidArray_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    1487             :         { NULL, NULL, 0, NULL }
    1488             : };
    1489             : 
    1490             : 
    1491             : static PyTypeObject wbint_RidArray_Type = {
    1492             :         PyVarObject_HEAD_INIT(NULL, 0)
    1493             :         .tp_name = "winbind.wbint_RidArray",
    1494             :         .tp_getset = py_wbint_RidArray_getsetters,
    1495             :         .tp_methods = py_wbint_RidArray_methods,
    1496             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1497             :         .tp_new = py_wbint_RidArray_new,
    1498             : };
    1499             : 
    1500             : 
    1501           0 : static PyObject *py_wbint_Principal_get_sid(PyObject *obj, void *closure)
    1502             : {
    1503           0 :         struct wbint_Principal *object = (struct wbint_Principal *)pytalloc_get_ptr(obj);
    1504             :         PyObject *py_sid;
    1505           0 :         py_sid = pytalloc_reference_ex(dom_sid_Type, pytalloc_get_mem_ctx(obj), &object->sid);
    1506           0 :         return py_sid;
    1507             : }
    1508             : 
    1509           0 : static int py_wbint_Principal_set_sid(PyObject *py_obj, PyObject *value, void *closure)
    1510             : {
    1511           0 :         struct wbint_Principal *object = (struct wbint_Principal *)pytalloc_get_ptr(py_obj);
    1512           0 :         if (value == NULL) {
    1513           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sid");
    1514           0 :                 return -1;
    1515             :         }
    1516           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    1517           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1518           0 :                 PyErr_NoMemory();
    1519           0 :                 return -1;
    1520             :         }
    1521           0 :         object->sid = *(struct dom_sid *)pytalloc_get_ptr(value);
    1522           0 :         return 0;
    1523             : }
    1524             : 
    1525           0 : static PyObject *py_wbint_Principal_get_type(PyObject *obj, void *closure)
    1526             : {
    1527           0 :         struct wbint_Principal *object = (struct wbint_Principal *)pytalloc_get_ptr(obj);
    1528             :         PyObject *py_type;
    1529           0 :         py_type = PyLong_FromLong((uint16_t)object->type);
    1530           0 :         return py_type;
    1531             : }
    1532             : 
    1533           0 : static int py_wbint_Principal_set_type(PyObject *py_obj, PyObject *value, void *closure)
    1534             : {
    1535           0 :         struct wbint_Principal *object = (struct wbint_Principal *)pytalloc_get_ptr(py_obj);
    1536           0 :         if (value == NULL) {
    1537           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->type");
    1538           0 :                 return -1;
    1539             :         }
    1540             :         {
    1541           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
    1542           0 :                 if (PyLong_Check(value)) {
    1543             :                         unsigned long long test_var;
    1544           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1545           0 :                         if (PyErr_Occurred() != NULL) {
    1546           0 :                                 return -1;
    1547             :                         }
    1548           0 :                         if (test_var > uint_max) {
    1549           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1550             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1551           0 :                                 return -1;
    1552             :                         }
    1553           0 :                         object->type = test_var;
    1554             :                 } else {
    1555           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1556             :                           PyLong_Type.tp_name);
    1557           0 :                         return -1;
    1558             :                 }
    1559             :         }
    1560           0 :         return 0;
    1561             : }
    1562             : 
    1563           0 : static PyObject *py_wbint_Principal_get_name(PyObject *obj, void *closure)
    1564             : {
    1565           0 :         struct wbint_Principal *object = (struct wbint_Principal *)pytalloc_get_ptr(obj);
    1566             :         PyObject *py_name;
    1567           0 :         if (object->name == NULL) {
    1568           0 :                 Py_RETURN_NONE;
    1569             :         }
    1570           0 :         if (object->name == NULL) {
    1571           0 :                 py_name = Py_None;
    1572           0 :                 Py_INCREF(py_name);
    1573             :         } else {
    1574           0 :                 if (object->name == NULL) {
    1575           0 :                         py_name = Py_None;
    1576           0 :                         Py_INCREF(py_name);
    1577             :                 } else {
    1578           0 :                         py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
    1579             :                 }
    1580             :         }
    1581           0 :         return py_name;
    1582             : }
    1583             : 
    1584           0 : static int py_wbint_Principal_set_name(PyObject *py_obj, PyObject *value, void *closure)
    1585             : {
    1586           0 :         struct wbint_Principal *object = (struct wbint_Principal *)pytalloc_get_ptr(py_obj);
    1587           0 :         if (value == NULL) {
    1588           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name");
    1589           0 :                 return -1;
    1590             :         }
    1591           0 :         if (value == Py_None) {
    1592           0 :                 object->name = NULL;
    1593             :         } else {
    1594           0 :                 object->name = NULL;
    1595             :                 {
    1596             :                         const char *test_str;
    1597             :                         const char *talloc_str;
    1598           0 :                         PyObject *unicode = NULL;
    1599           0 :                         if (PyUnicode_Check(value)) {
    1600           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    1601           0 :                                 if (unicode == NULL) {
    1602           0 :                                         PyErr_NoMemory();
    1603           0 :                                         return -1;
    1604             :                                 }
    1605           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    1606           0 :                         } else if (PyBytes_Check(value)) {
    1607           0 :                                 test_str = PyBytes_AS_STRING(value);
    1608             :                         } else {
    1609           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    1610           0 :                                 return -1;
    1611             :                         }
    1612           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    1613           0 :                         if (unicode != NULL) {
    1614           0 :                                 Py_DECREF(unicode);
    1615             :                         }
    1616           0 :                         if (talloc_str == NULL) {
    1617           0 :                                 PyErr_NoMemory();
    1618           0 :                                 return -1;
    1619             :                         }
    1620           0 :                         object->name = talloc_str;
    1621             :                 }
    1622             :         }
    1623           0 :         return 0;
    1624             : }
    1625             : 
    1626             : static PyGetSetDef py_wbint_Principal_getsetters[] = {
    1627             :         {
    1628             :                 .name = discard_const_p(char, "sid"),
    1629             :                 .get = py_wbint_Principal_get_sid,
    1630             :                 .set = py_wbint_Principal_set_sid,
    1631             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
    1632             :         },
    1633             :         {
    1634             :                 .name = discard_const_p(char, "type"),
    1635             :                 .get = py_wbint_Principal_get_type,
    1636             :                 .set = py_wbint_Principal_set_type,
    1637             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_SidType")
    1638             :         },
    1639             :         {
    1640             :                 .name = discard_const_p(char, "name"),
    1641             :                 .get = py_wbint_Principal_get_name,
    1642             :                 .set = py_wbint_Principal_set_name,
    1643             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    1644             :         },
    1645             :         { .name = NULL }
    1646             : };
    1647             : 
    1648           0 : static PyObject *py_wbint_Principal_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1649             : {
    1650           0 :         return pytalloc_new(struct wbint_Principal, type);
    1651             : }
    1652             : 
    1653           0 : static PyObject *py_wbint_Principal_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    1654             : {
    1655           0 :         struct wbint_Principal *object = (struct wbint_Principal *)pytalloc_get_ptr(py_obj);
    1656           0 :         PyObject *ret = NULL;
    1657             :         DATA_BLOB blob;
    1658             :         enum ndr_err_code err;
    1659           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    1660           0 :         if (tmp_ctx == NULL) {
    1661           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    1662           0 :                 return NULL;
    1663             :         }
    1664           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_wbint_Principal);
    1665           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1666           0 :                 TALLOC_FREE(tmp_ctx);
    1667           0 :                 PyErr_SetNdrError(err);
    1668           0 :                 return NULL;
    1669             :         }
    1670             : 
    1671           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    1672           0 :         TALLOC_FREE(tmp_ctx);
    1673           0 :         return ret;
    1674             : }
    1675             : 
    1676           0 : static PyObject *py_wbint_Principal_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    1677             : {
    1678           0 :         struct wbint_Principal *object = (struct wbint_Principal *)pytalloc_get_ptr(py_obj);
    1679           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1680           0 :         Py_ssize_t blob_length = 0;
    1681             :         enum ndr_err_code err;
    1682           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    1683           0 :         PyObject *allow_remaining_obj = NULL;
    1684           0 :         bool allow_remaining = false;
    1685             : 
    1686           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    1687             :                 discard_const_p(char *, kwnames),
    1688             :                 &blob.data, &blob_length,
    1689             :                 &allow_remaining_obj)) {
    1690           0 :                 return NULL;
    1691             :         }
    1692           0 :         blob.length = blob_length;
    1693             : 
    1694           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    1695           0 :                 allow_remaining = true;
    1696             :         }
    1697             : 
    1698           0 :         if (allow_remaining) {
    1699           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_Principal);
    1700             :         } else {
    1701           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_Principal);
    1702             :         }
    1703           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1704           0 :                 PyErr_SetNdrError(err);
    1705           0 :                 return NULL;
    1706             :         }
    1707             : 
    1708           0 :         Py_RETURN_NONE;
    1709             : }
    1710             : 
    1711           0 : static PyObject *py_wbint_Principal_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    1712             : {
    1713           0 :         struct wbint_Principal *object = (struct wbint_Principal *)pytalloc_get_ptr(py_obj);
    1714             :         PyObject *ret;
    1715             :         char *retstr;
    1716             : 
    1717           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_wbint_Principal, "wbint_Principal", object);
    1718           0 :         ret = PyUnicode_FromString(retstr);
    1719           0 :         talloc_free(retstr);
    1720             : 
    1721           0 :         return ret;
    1722             : }
    1723             : 
    1724             : static PyMethodDef py_wbint_Principal_methods[] = {
    1725             :         { "__ndr_pack__", (PyCFunction)py_wbint_Principal_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    1726             :         { "__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" },
    1727             :         { "__ndr_print__", (PyCFunction)py_wbint_Principal_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    1728             :         { NULL, NULL, 0, NULL }
    1729             : };
    1730             : 
    1731             : 
    1732             : static PyTypeObject wbint_Principal_Type = {
    1733             :         PyVarObject_HEAD_INIT(NULL, 0)
    1734             :         .tp_name = "winbind.wbint_Principal",
    1735             :         .tp_getset = py_wbint_Principal_getsetters,
    1736             :         .tp_methods = py_wbint_Principal_methods,
    1737             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1738             :         .tp_new = py_wbint_Principal_new,
    1739             : };
    1740             : 
    1741             : 
    1742           0 : static PyObject *py_wbint_Principals_get_num_principals(PyObject *obj, void *closure)
    1743             : {
    1744           0 :         struct wbint_Principals *object = (struct wbint_Principals *)pytalloc_get_ptr(obj);
    1745             :         PyObject *py_num_principals;
    1746           0 :         py_num_principals = PyLong_FromUnsignedLongLong((uint32_t)object->num_principals);
    1747           0 :         return py_num_principals;
    1748             : }
    1749             : 
    1750           0 : static int py_wbint_Principals_set_num_principals(PyObject *py_obj, PyObject *value, void *closure)
    1751             : {
    1752           0 :         struct wbint_Principals *object = (struct wbint_Principals *)pytalloc_get_ptr(py_obj);
    1753           0 :         if (value == NULL) {
    1754           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_principals");
    1755           0 :                 return -1;
    1756             :         }
    1757             :         {
    1758           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_principals));
    1759           0 :                 if (PyLong_Check(value)) {
    1760             :                         unsigned long long test_var;
    1761           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1762           0 :                         if (PyErr_Occurred() != NULL) {
    1763           0 :                                 return -1;
    1764             :                         }
    1765           0 :                         if (test_var > uint_max) {
    1766           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1767             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1768           0 :                                 return -1;
    1769             :                         }
    1770           0 :                         object->num_principals = test_var;
    1771             :                 } else {
    1772           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1773             :                           PyLong_Type.tp_name);
    1774           0 :                         return -1;
    1775             :                 }
    1776             :         }
    1777           0 :         return 0;
    1778             : }
    1779             : 
    1780           0 : static PyObject *py_wbint_Principals_get_principals(PyObject *obj, void *closure)
    1781             : {
    1782           0 :         struct wbint_Principals *object = (struct wbint_Principals *)pytalloc_get_ptr(obj);
    1783             :         PyObject *py_principals;
    1784           0 :         py_principals = PyList_New(object->num_principals);
    1785           0 :         if (py_principals == NULL) {
    1786           0 :                 return NULL;
    1787             :         }
    1788             :         {
    1789             :                 int principals_cntr_0;
    1790           0 :                 for (principals_cntr_0 = 0; principals_cntr_0 < (object->num_principals); principals_cntr_0++) {
    1791             :                         PyObject *py_principals_0;
    1792           0 :                         py_principals_0 = pytalloc_reference_ex(&wbint_Principal_Type, object->principals, &object->principals[principals_cntr_0]);
    1793           0 :                         PyList_SetItem(py_principals, principals_cntr_0, py_principals_0);
    1794             :                 }
    1795             :         }
    1796           0 :         return py_principals;
    1797             : }
    1798             : 
    1799           0 : static int py_wbint_Principals_set_principals(PyObject *py_obj, PyObject *value, void *closure)
    1800             : {
    1801           0 :         struct wbint_Principals *object = (struct wbint_Principals *)pytalloc_get_ptr(py_obj);
    1802           0 :         if (value == NULL) {
    1803           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->principals");
    1804           0 :                 return -1;
    1805             :         }
    1806           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1807             :         {
    1808             :                 int principals_cntr_0;
    1809           0 :                 object->principals = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->principals, PyList_GET_SIZE(value));
    1810           0 :                 if (!object->principals) { return -1;; }
    1811           0 :                 talloc_set_name_const(object->principals, "ARRAY: object->principals");
    1812           0 :                 for (principals_cntr_0 = 0; principals_cntr_0 < PyList_GET_SIZE(value); principals_cntr_0++) {
    1813           0 :                         if (PyList_GET_ITEM(value, principals_cntr_0) == NULL) {
    1814           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->principals[principals_cntr_0]");
    1815           0 :                                 return -1;
    1816             :                         }
    1817           0 :                         PY_CHECK_TYPE(&wbint_Principal_Type, PyList_GET_ITEM(value, principals_cntr_0), return -1;);
    1818           0 :                         if (talloc_reference(object->principals, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, principals_cntr_0))) == NULL) {
    1819           0 :                                 PyErr_NoMemory();
    1820           0 :                                 return -1;
    1821             :                         }
    1822           0 :                         object->principals[principals_cntr_0] = *(struct wbint_Principal *)pytalloc_get_ptr(PyList_GET_ITEM(value, principals_cntr_0));
    1823             :                 }
    1824             :         }
    1825           0 :         return 0;
    1826             : }
    1827             : 
    1828             : static PyGetSetDef py_wbint_Principals_getsetters[] = {
    1829             :         {
    1830             :                 .name = discard_const_p(char, "num_principals"),
    1831             :                 .get = py_wbint_Principals_get_num_principals,
    1832             :                 .set = py_wbint_Principals_set_num_principals,
    1833             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1834             :         },
    1835             :         {
    1836             :                 .name = discard_const_p(char, "principals"),
    1837             :                 .get = py_wbint_Principals_get_principals,
    1838             :                 .set = py_wbint_Principals_set_principals,
    1839             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_Principal")
    1840             :         },
    1841             :         { .name = NULL }
    1842             : };
    1843             : 
    1844           0 : static PyObject *py_wbint_Principals_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1845             : {
    1846           0 :         return pytalloc_new(struct wbint_Principals, type);
    1847             : }
    1848             : 
    1849           0 : static PyObject *py_wbint_Principals_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    1850             : {
    1851           0 :         struct wbint_Principals *object = (struct wbint_Principals *)pytalloc_get_ptr(py_obj);
    1852           0 :         PyObject *ret = NULL;
    1853             :         DATA_BLOB blob;
    1854             :         enum ndr_err_code err;
    1855           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    1856           0 :         if (tmp_ctx == NULL) {
    1857           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    1858           0 :                 return NULL;
    1859             :         }
    1860           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_wbint_Principals);
    1861           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1862           0 :                 TALLOC_FREE(tmp_ctx);
    1863           0 :                 PyErr_SetNdrError(err);
    1864           0 :                 return NULL;
    1865             :         }
    1866             : 
    1867           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    1868           0 :         TALLOC_FREE(tmp_ctx);
    1869           0 :         return ret;
    1870             : }
    1871             : 
    1872           0 : static PyObject *py_wbint_Principals_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    1873             : {
    1874           0 :         struct wbint_Principals *object = (struct wbint_Principals *)pytalloc_get_ptr(py_obj);
    1875           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1876           0 :         Py_ssize_t blob_length = 0;
    1877             :         enum ndr_err_code err;
    1878           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    1879           0 :         PyObject *allow_remaining_obj = NULL;
    1880           0 :         bool allow_remaining = false;
    1881             : 
    1882           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    1883             :                 discard_const_p(char *, kwnames),
    1884             :                 &blob.data, &blob_length,
    1885             :                 &allow_remaining_obj)) {
    1886           0 :                 return NULL;
    1887             :         }
    1888           0 :         blob.length = blob_length;
    1889             : 
    1890           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    1891           0 :                 allow_remaining = true;
    1892             :         }
    1893             : 
    1894           0 :         if (allow_remaining) {
    1895           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_Principals);
    1896             :         } else {
    1897           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_Principals);
    1898             :         }
    1899           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1900           0 :                 PyErr_SetNdrError(err);
    1901           0 :                 return NULL;
    1902             :         }
    1903             : 
    1904           0 :         Py_RETURN_NONE;
    1905             : }
    1906             : 
    1907           0 : static PyObject *py_wbint_Principals_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    1908             : {
    1909           0 :         struct wbint_Principals *object = (struct wbint_Principals *)pytalloc_get_ptr(py_obj);
    1910             :         PyObject *ret;
    1911             :         char *retstr;
    1912             : 
    1913           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_wbint_Principals, "wbint_Principals", object);
    1914           0 :         ret = PyUnicode_FromString(retstr);
    1915           0 :         talloc_free(retstr);
    1916             : 
    1917           0 :         return ret;
    1918             : }
    1919             : 
    1920             : static PyMethodDef py_wbint_Principals_methods[] = {
    1921             :         { "__ndr_pack__", (PyCFunction)py_wbint_Principals_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    1922             :         { "__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" },
    1923             :         { "__ndr_print__", (PyCFunction)py_wbint_Principals_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    1924             :         { NULL, NULL, 0, NULL }
    1925             : };
    1926             : 
    1927             : 
    1928             : static PyTypeObject wbint_Principals_Type = {
    1929             :         PyVarObject_HEAD_INIT(NULL, 0)
    1930             :         .tp_name = "winbind.wbint_Principals",
    1931             :         .tp_getset = py_wbint_Principals_getsetters,
    1932             :         .tp_methods = py_wbint_Principals_methods,
    1933             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1934             :         .tp_new = py_wbint_Principals_new,
    1935             : };
    1936             : 
    1937             : 
    1938           0 : static PyObject *py_wbint_userinfos_get_num_userinfos(PyObject *obj, void *closure)
    1939             : {
    1940           0 :         struct wbint_userinfos *object = (struct wbint_userinfos *)pytalloc_get_ptr(obj);
    1941             :         PyObject *py_num_userinfos;
    1942           0 :         py_num_userinfos = PyLong_FromUnsignedLongLong((uint32_t)object->num_userinfos);
    1943           0 :         return py_num_userinfos;
    1944             : }
    1945             : 
    1946           0 : static int py_wbint_userinfos_set_num_userinfos(PyObject *py_obj, PyObject *value, void *closure)
    1947             : {
    1948           0 :         struct wbint_userinfos *object = (struct wbint_userinfos *)pytalloc_get_ptr(py_obj);
    1949           0 :         if (value == NULL) {
    1950           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_userinfos");
    1951           0 :                 return -1;
    1952             :         }
    1953             :         {
    1954           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_userinfos));
    1955           0 :                 if (PyLong_Check(value)) {
    1956             :                         unsigned long long test_var;
    1957           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1958           0 :                         if (PyErr_Occurred() != NULL) {
    1959           0 :                                 return -1;
    1960             :                         }
    1961           0 :                         if (test_var > uint_max) {
    1962           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1963             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1964           0 :                                 return -1;
    1965             :                         }
    1966           0 :                         object->num_userinfos = test_var;
    1967             :                 } else {
    1968           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1969             :                           PyLong_Type.tp_name);
    1970           0 :                         return -1;
    1971             :                 }
    1972             :         }
    1973           0 :         return 0;
    1974             : }
    1975             : 
    1976           0 : static PyObject *py_wbint_userinfos_get_userinfos(PyObject *obj, void *closure)
    1977             : {
    1978           0 :         struct wbint_userinfos *object = (struct wbint_userinfos *)pytalloc_get_ptr(obj);
    1979             :         PyObject *py_userinfos;
    1980           0 :         py_userinfos = PyList_New(object->num_userinfos);
    1981           0 :         if (py_userinfos == NULL) {
    1982           0 :                 return NULL;
    1983             :         }
    1984             :         {
    1985             :                 int userinfos_cntr_0;
    1986           0 :                 for (userinfos_cntr_0 = 0; userinfos_cntr_0 < (object->num_userinfos); userinfos_cntr_0++) {
    1987             :                         PyObject *py_userinfos_0;
    1988           0 :                         py_userinfos_0 = pytalloc_reference_ex(&wbint_userinfo_Type, object->userinfos, &object->userinfos[userinfos_cntr_0]);
    1989           0 :                         PyList_SetItem(py_userinfos, userinfos_cntr_0, py_userinfos_0);
    1990             :                 }
    1991             :         }
    1992           0 :         return py_userinfos;
    1993             : }
    1994             : 
    1995           0 : static int py_wbint_userinfos_set_userinfos(PyObject *py_obj, PyObject *value, void *closure)
    1996             : {
    1997           0 :         struct wbint_userinfos *object = (struct wbint_userinfos *)pytalloc_get_ptr(py_obj);
    1998           0 :         if (value == NULL) {
    1999           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->userinfos");
    2000           0 :                 return -1;
    2001             :         }
    2002           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    2003             :         {
    2004             :                 int userinfos_cntr_0;
    2005           0 :                 object->userinfos = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->userinfos, PyList_GET_SIZE(value));
    2006           0 :                 if (!object->userinfos) { return -1;; }
    2007           0 :                 talloc_set_name_const(object->userinfos, "ARRAY: object->userinfos");
    2008           0 :                 for (userinfos_cntr_0 = 0; userinfos_cntr_0 < PyList_GET_SIZE(value); userinfos_cntr_0++) {
    2009           0 :                         if (PyList_GET_ITEM(value, userinfos_cntr_0) == NULL) {
    2010           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->userinfos[userinfos_cntr_0]");
    2011           0 :                                 return -1;
    2012             :                         }
    2013           0 :                         PY_CHECK_TYPE(&wbint_userinfo_Type, PyList_GET_ITEM(value, userinfos_cntr_0), return -1;);
    2014           0 :                         if (talloc_reference(object->userinfos, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, userinfos_cntr_0))) == NULL) {
    2015           0 :                                 PyErr_NoMemory();
    2016           0 :                                 return -1;
    2017             :                         }
    2018           0 :                         object->userinfos[userinfos_cntr_0] = *(struct wbint_userinfo *)pytalloc_get_ptr(PyList_GET_ITEM(value, userinfos_cntr_0));
    2019             :                 }
    2020             :         }
    2021           0 :         return 0;
    2022             : }
    2023             : 
    2024             : static PyGetSetDef py_wbint_userinfos_getsetters[] = {
    2025             :         {
    2026             :                 .name = discard_const_p(char, "num_userinfos"),
    2027             :                 .get = py_wbint_userinfos_get_num_userinfos,
    2028             :                 .set = py_wbint_userinfos_set_num_userinfos,
    2029             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2030             :         },
    2031             :         {
    2032             :                 .name = discard_const_p(char, "userinfos"),
    2033             :                 .get = py_wbint_userinfos_get_userinfos,
    2034             :                 .set = py_wbint_userinfos_set_userinfos,
    2035             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_userinfo")
    2036             :         },
    2037             :         { .name = NULL }
    2038             : };
    2039             : 
    2040           0 : static PyObject *py_wbint_userinfos_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2041             : {
    2042           0 :         return pytalloc_new(struct wbint_userinfos, type);
    2043             : }
    2044             : 
    2045           0 : static PyObject *py_wbint_userinfos_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2046             : {
    2047           0 :         struct wbint_userinfos *object = (struct wbint_userinfos *)pytalloc_get_ptr(py_obj);
    2048           0 :         PyObject *ret = NULL;
    2049             :         DATA_BLOB blob;
    2050             :         enum ndr_err_code err;
    2051           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2052           0 :         if (tmp_ctx == NULL) {
    2053           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2054           0 :                 return NULL;
    2055             :         }
    2056           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_wbint_userinfos);
    2057           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2058           0 :                 TALLOC_FREE(tmp_ctx);
    2059           0 :                 PyErr_SetNdrError(err);
    2060           0 :                 return NULL;
    2061             :         }
    2062             : 
    2063           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2064           0 :         TALLOC_FREE(tmp_ctx);
    2065           0 :         return ret;
    2066             : }
    2067             : 
    2068           0 : static PyObject *py_wbint_userinfos_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2069             : {
    2070           0 :         struct wbint_userinfos *object = (struct wbint_userinfos *)pytalloc_get_ptr(py_obj);
    2071           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2072           0 :         Py_ssize_t blob_length = 0;
    2073             :         enum ndr_err_code err;
    2074           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2075           0 :         PyObject *allow_remaining_obj = NULL;
    2076           0 :         bool allow_remaining = false;
    2077             : 
    2078           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    2079             :                 discard_const_p(char *, kwnames),
    2080             :                 &blob.data, &blob_length,
    2081             :                 &allow_remaining_obj)) {
    2082           0 :                 return NULL;
    2083             :         }
    2084           0 :         blob.length = blob_length;
    2085             : 
    2086           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    2087           0 :                 allow_remaining = true;
    2088             :         }
    2089             : 
    2090           0 :         if (allow_remaining) {
    2091           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_userinfos);
    2092             :         } else {
    2093           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_userinfos);
    2094             :         }
    2095           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2096           0 :                 PyErr_SetNdrError(err);
    2097           0 :                 return NULL;
    2098             :         }
    2099             : 
    2100           0 :         Py_RETURN_NONE;
    2101             : }
    2102             : 
    2103           0 : static PyObject *py_wbint_userinfos_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    2104             : {
    2105           0 :         struct wbint_userinfos *object = (struct wbint_userinfos *)pytalloc_get_ptr(py_obj);
    2106             :         PyObject *ret;
    2107             :         char *retstr;
    2108             : 
    2109           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_wbint_userinfos, "wbint_userinfos", object);
    2110           0 :         ret = PyUnicode_FromString(retstr);
    2111           0 :         talloc_free(retstr);
    2112             : 
    2113           0 :         return ret;
    2114             : }
    2115             : 
    2116             : static PyMethodDef py_wbint_userinfos_methods[] = {
    2117             :         { "__ndr_pack__", (PyCFunction)py_wbint_userinfos_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    2118             :         { "__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" },
    2119             :         { "__ndr_print__", (PyCFunction)py_wbint_userinfos_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    2120             :         { NULL, NULL, 0, NULL }
    2121             : };
    2122             : 
    2123             : 
    2124             : static PyTypeObject wbint_userinfos_Type = {
    2125             :         PyVarObject_HEAD_INIT(NULL, 0)
    2126             :         .tp_name = "winbind.wbint_userinfos",
    2127             :         .tp_getset = py_wbint_userinfos_getsetters,
    2128             :         .tp_methods = py_wbint_userinfos_methods,
    2129             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2130             :         .tp_new = py_wbint_userinfos_new,
    2131             : };
    2132             : 
    2133             : 
    2134           0 : static PyObject *py_wbint_Validation_get_level(PyObject *obj, void *closure)
    2135             : {
    2136           0 :         struct wbint_Validation *object = (struct wbint_Validation *)pytalloc_get_ptr(obj);
    2137             :         PyObject *py_level;
    2138           0 :         py_level = PyLong_FromLong((uint16_t)object->level);
    2139           0 :         return py_level;
    2140             : }
    2141             : 
    2142           0 : static int py_wbint_Validation_set_level(PyObject *py_obj, PyObject *value, void *closure)
    2143             : {
    2144           0 :         struct wbint_Validation *object = (struct wbint_Validation *)pytalloc_get_ptr(py_obj);
    2145           0 :         if (value == NULL) {
    2146           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
    2147           0 :                 return -1;
    2148             :         }
    2149             :         {
    2150           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
    2151           0 :                 if (PyLong_Check(value)) {
    2152             :                         unsigned long long test_var;
    2153           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2154           0 :                         if (PyErr_Occurred() != NULL) {
    2155           0 :                                 return -1;
    2156             :                         }
    2157           0 :                         if (test_var > uint_max) {
    2158           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2159             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2160           0 :                                 return -1;
    2161             :                         }
    2162           0 :                         object->level = test_var;
    2163             :                 } else {
    2164           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2165             :                           PyLong_Type.tp_name);
    2166           0 :                         return -1;
    2167             :                 }
    2168             :         }
    2169           0 :         return 0;
    2170             : }
    2171             : 
    2172           0 : static PyObject *py_wbint_Validation_get_validation(PyObject *obj, void *closure)
    2173             : {
    2174           0 :         struct wbint_Validation *object = (struct wbint_Validation *)pytalloc_get_ptr(obj);
    2175             :         PyObject *py_validation;
    2176           0 :         if (object->validation == NULL) {
    2177           0 :                 Py_RETURN_NONE;
    2178             :         }
    2179           0 :         if (object->validation == NULL) {
    2180           0 :                 py_validation = Py_None;
    2181           0 :                 Py_INCREF(py_validation);
    2182             :         } else {
    2183           0 :                 py_validation = pyrpc_import_union(netr_Validation_Type, object->validation, object->level, object->validation, "union netr_Validation");
    2184           0 :                 if (py_validation == NULL) {
    2185           0 :                         return NULL;
    2186             :                 }
    2187             :         }
    2188           0 :         return py_validation;
    2189             : }
    2190             : 
    2191           0 : static int py_wbint_Validation_set_validation(PyObject *py_obj, PyObject *value, void *closure)
    2192             : {
    2193           0 :         struct wbint_Validation *object = (struct wbint_Validation *)pytalloc_get_ptr(py_obj);
    2194           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->validation));
    2195           0 :         if (value == NULL) {
    2196           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->validation");
    2197           0 :                 return -1;
    2198             :         }
    2199           0 :         if (value == Py_None) {
    2200           0 :                 object->validation = NULL;
    2201             :         } else {
    2202           0 :                 object->validation = NULL;
    2203             :                 {
    2204             :                         union netr_Validation *validation_switch_1;
    2205           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");
    2206           0 :                         if (validation_switch_1 == NULL) {
    2207           0 :                                 return -1;
    2208             :                         }
    2209           0 :                         object->validation = validation_switch_1;
    2210             :                 }
    2211             :         }
    2212           0 :         return 0;
    2213             : }
    2214             : 
    2215           0 : static PyObject *py_wbint_Validation_get_krb5ccname(PyObject *obj, void *closure)
    2216             : {
    2217           0 :         struct wbint_Validation *object = (struct wbint_Validation *)pytalloc_get_ptr(obj);
    2218             :         PyObject *py_krb5ccname;
    2219           0 :         if (object->krb5ccname == NULL) {
    2220           0 :                 Py_RETURN_NONE;
    2221             :         }
    2222           0 :         if (object->krb5ccname == NULL) {
    2223           0 :                 py_krb5ccname = Py_None;
    2224           0 :                 Py_INCREF(py_krb5ccname);
    2225             :         } else {
    2226           0 :                 if (object->krb5ccname == NULL) {
    2227           0 :                         py_krb5ccname = Py_None;
    2228           0 :                         Py_INCREF(py_krb5ccname);
    2229             :                 } else {
    2230           0 :                         py_krb5ccname = PyUnicode_Decode(object->krb5ccname, strlen(object->krb5ccname), "utf-8", "ignore");
    2231             :                 }
    2232             :         }
    2233           0 :         return py_krb5ccname;
    2234             : }
    2235             : 
    2236           0 : static int py_wbint_Validation_set_krb5ccname(PyObject *py_obj, PyObject *value, void *closure)
    2237             : {
    2238           0 :         struct wbint_Validation *object = (struct wbint_Validation *)pytalloc_get_ptr(py_obj);
    2239           0 :         if (value == NULL) {
    2240           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->krb5ccname");
    2241           0 :                 return -1;
    2242             :         }
    2243           0 :         if (value == Py_None) {
    2244           0 :                 object->krb5ccname = NULL;
    2245             :         } else {
    2246           0 :                 object->krb5ccname = NULL;
    2247             :                 {
    2248             :                         const char *test_str;
    2249             :                         const char *talloc_str;
    2250           0 :                         PyObject *unicode = NULL;
    2251           0 :                         if (PyUnicode_Check(value)) {
    2252           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    2253           0 :                                 if (unicode == NULL) {
    2254           0 :                                         PyErr_NoMemory();
    2255           0 :                                         return -1;
    2256             :                                 }
    2257           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    2258           0 :                         } else if (PyBytes_Check(value)) {
    2259           0 :                                 test_str = PyBytes_AS_STRING(value);
    2260             :                         } else {
    2261           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    2262           0 :                                 return -1;
    2263             :                         }
    2264           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    2265           0 :                         if (unicode != NULL) {
    2266           0 :                                 Py_DECREF(unicode);
    2267             :                         }
    2268           0 :                         if (talloc_str == NULL) {
    2269           0 :                                 PyErr_NoMemory();
    2270           0 :                                 return -1;
    2271             :                         }
    2272           0 :                         object->krb5ccname = talloc_str;
    2273             :                 }
    2274             :         }
    2275           0 :         return 0;
    2276             : }
    2277             : 
    2278             : static PyGetSetDef py_wbint_Validation_getsetters[] = {
    2279             :         {
    2280             :                 .name = discard_const_p(char, "level"),
    2281             :                 .get = py_wbint_Validation_get_level,
    2282             :                 .set = py_wbint_Validation_set_level,
    2283             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    2284             :         },
    2285             :         {
    2286             :                 .name = discard_const_p(char, "validation"),
    2287             :                 .get = py_wbint_Validation_get_validation,
    2288             :                 .set = py_wbint_Validation_set_validation,
    2289             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Validation")
    2290             :         },
    2291             :         {
    2292             :                 .name = discard_const_p(char, "krb5ccname"),
    2293             :                 .get = py_wbint_Validation_get_krb5ccname,
    2294             :                 .set = py_wbint_Validation_set_krb5ccname,
    2295             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2296             :         },
    2297             :         { .name = NULL }
    2298             : };
    2299             : 
    2300           0 : static PyObject *py_wbint_Validation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2301             : {
    2302           0 :         return pytalloc_new(struct wbint_Validation, type);
    2303             : }
    2304             : 
    2305           0 : static PyObject *py_wbint_Validation_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2306             : {
    2307           0 :         struct wbint_Validation *object = (struct wbint_Validation *)pytalloc_get_ptr(py_obj);
    2308           0 :         PyObject *ret = NULL;
    2309             :         DATA_BLOB blob;
    2310             :         enum ndr_err_code err;
    2311           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2312           0 :         if (tmp_ctx == NULL) {
    2313           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2314           0 :                 return NULL;
    2315             :         }
    2316           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_wbint_Validation);
    2317           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2318           0 :                 TALLOC_FREE(tmp_ctx);
    2319           0 :                 PyErr_SetNdrError(err);
    2320           0 :                 return NULL;
    2321             :         }
    2322             : 
    2323           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2324           0 :         TALLOC_FREE(tmp_ctx);
    2325           0 :         return ret;
    2326             : }
    2327             : 
    2328           0 : static PyObject *py_wbint_Validation_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2329             : {
    2330           0 :         struct wbint_Validation *object = (struct wbint_Validation *)pytalloc_get_ptr(py_obj);
    2331           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2332           0 :         Py_ssize_t blob_length = 0;
    2333             :         enum ndr_err_code err;
    2334           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2335           0 :         PyObject *allow_remaining_obj = NULL;
    2336           0 :         bool allow_remaining = false;
    2337             : 
    2338           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    2339             :                 discard_const_p(char *, kwnames),
    2340             :                 &blob.data, &blob_length,
    2341             :                 &allow_remaining_obj)) {
    2342           0 :                 return NULL;
    2343             :         }
    2344           0 :         blob.length = blob_length;
    2345             : 
    2346           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    2347           0 :                 allow_remaining = true;
    2348             :         }
    2349             : 
    2350           0 :         if (allow_remaining) {
    2351           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_Validation);
    2352             :         } else {
    2353           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_Validation);
    2354             :         }
    2355           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2356           0 :                 PyErr_SetNdrError(err);
    2357           0 :                 return NULL;
    2358             :         }
    2359             : 
    2360           0 :         Py_RETURN_NONE;
    2361             : }
    2362             : 
    2363           0 : static PyObject *py_wbint_Validation_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    2364             : {
    2365           0 :         struct wbint_Validation *object = (struct wbint_Validation *)pytalloc_get_ptr(py_obj);
    2366             :         PyObject *ret;
    2367             :         char *retstr;
    2368             : 
    2369           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_wbint_Validation, "wbint_Validation", object);
    2370           0 :         ret = PyUnicode_FromString(retstr);
    2371           0 :         talloc_free(retstr);
    2372             : 
    2373           0 :         return ret;
    2374             : }
    2375             : 
    2376             : static PyMethodDef py_wbint_Validation_methods[] = {
    2377             :         { "__ndr_pack__", (PyCFunction)py_wbint_Validation_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    2378             :         { "__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" },
    2379             :         { "__ndr_print__", (PyCFunction)py_wbint_Validation_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    2380             :         { NULL, NULL, 0, NULL }
    2381             : };
    2382             : 
    2383             : 
    2384             : static PyTypeObject wbint_Validation_Type = {
    2385             :         PyVarObject_HEAD_INIT(NULL, 0)
    2386             :         .tp_name = "winbind.wbint_Validation",
    2387             :         .tp_getset = py_wbint_Validation_getsetters,
    2388             :         .tp_methods = py_wbint_Validation_methods,
    2389             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2390             :         .tp_new = py_wbint_Validation_new,
    2391             : };
    2392             : 
    2393             : 
    2394           0 : static PyObject *py_wbint_AuthUserInfo_get_username(PyObject *obj, void *closure)
    2395             : {
    2396           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(obj);
    2397             :         PyObject *py_username;
    2398           0 :         if (object->username == NULL) {
    2399           0 :                 Py_RETURN_NONE;
    2400             :         }
    2401           0 :         if (object->username == NULL) {
    2402           0 :                 py_username = Py_None;
    2403           0 :                 Py_INCREF(py_username);
    2404             :         } else {
    2405           0 :                 if (object->username == NULL) {
    2406           0 :                         py_username = Py_None;
    2407           0 :                         Py_INCREF(py_username);
    2408             :                 } else {
    2409           0 :                         py_username = PyUnicode_Decode(object->username, strlen(object->username), "utf-8", "ignore");
    2410             :                 }
    2411             :         }
    2412           0 :         return py_username;
    2413             : }
    2414             : 
    2415           0 : static int py_wbint_AuthUserInfo_set_username(PyObject *py_obj, PyObject *value, void *closure)
    2416             : {
    2417           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(py_obj);
    2418           0 :         if (value == NULL) {
    2419           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->username");
    2420           0 :                 return -1;
    2421             :         }
    2422           0 :         if (value == Py_None) {
    2423           0 :                 object->username = NULL;
    2424             :         } else {
    2425           0 :                 object->username = NULL;
    2426             :                 {
    2427             :                         const char *test_str;
    2428             :                         const char *talloc_str;
    2429           0 :                         PyObject *unicode = NULL;
    2430           0 :                         if (PyUnicode_Check(value)) {
    2431           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    2432           0 :                                 if (unicode == NULL) {
    2433           0 :                                         PyErr_NoMemory();
    2434           0 :                                         return -1;
    2435             :                                 }
    2436           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    2437           0 :                         } else if (PyBytes_Check(value)) {
    2438           0 :                                 test_str = PyBytes_AS_STRING(value);
    2439             :                         } else {
    2440           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    2441           0 :                                 return -1;
    2442             :                         }
    2443           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    2444           0 :                         if (unicode != NULL) {
    2445           0 :                                 Py_DECREF(unicode);
    2446             :                         }
    2447           0 :                         if (talloc_str == NULL) {
    2448           0 :                                 PyErr_NoMemory();
    2449           0 :                                 return -1;
    2450             :                         }
    2451           0 :                         object->username = talloc_str;
    2452             :                 }
    2453             :         }
    2454           0 :         return 0;
    2455             : }
    2456             : 
    2457           0 : static PyObject *py_wbint_AuthUserInfo_get_password(PyObject *obj, void *closure)
    2458             : {
    2459           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(obj);
    2460             :         PyObject *py_password;
    2461           0 :         if (object->password == NULL) {
    2462           0 :                 Py_RETURN_NONE;
    2463             :         }
    2464           0 :         if (object->password == NULL) {
    2465           0 :                 py_password = Py_None;
    2466           0 :                 Py_INCREF(py_password);
    2467             :         } else {
    2468           0 :                 if (object->password == NULL) {
    2469           0 :                         py_password = Py_None;
    2470           0 :                         Py_INCREF(py_password);
    2471             :                 } else {
    2472           0 :                         py_password = PyUnicode_Decode(object->password, strlen(object->password), "utf-8", "ignore");
    2473             :                 }
    2474             :         }
    2475           0 :         return py_password;
    2476             : }
    2477             : 
    2478           0 : static int py_wbint_AuthUserInfo_set_password(PyObject *py_obj, PyObject *value, void *closure)
    2479             : {
    2480           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(py_obj);
    2481           0 :         if (value == NULL) {
    2482           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->password");
    2483           0 :                 return -1;
    2484             :         }
    2485           0 :         if (value == Py_None) {
    2486           0 :                 object->password = NULL;
    2487             :         } else {
    2488           0 :                 object->password = NULL;
    2489             :                 {
    2490             :                         const char *test_str;
    2491             :                         const char *talloc_str;
    2492           0 :                         PyObject *unicode = NULL;
    2493           0 :                         if (PyUnicode_Check(value)) {
    2494           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    2495           0 :                                 if (unicode == NULL) {
    2496           0 :                                         PyErr_NoMemory();
    2497           0 :                                         return -1;
    2498             :                                 }
    2499           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    2500           0 :                         } else if (PyBytes_Check(value)) {
    2501           0 :                                 test_str = PyBytes_AS_STRING(value);
    2502             :                         } else {
    2503           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    2504           0 :                                 return -1;
    2505             :                         }
    2506           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    2507           0 :                         if (unicode != NULL) {
    2508           0 :                                 Py_DECREF(unicode);
    2509             :                         }
    2510           0 :                         if (talloc_str == NULL) {
    2511           0 :                                 PyErr_NoMemory();
    2512           0 :                                 return -1;
    2513             :                         }
    2514           0 :                         object->password = talloc_str;
    2515             :                 }
    2516             :         }
    2517           0 :         return 0;
    2518             : }
    2519             : 
    2520           0 : static PyObject *py_wbint_AuthUserInfo_get_krb5_cc_type(PyObject *obj, void *closure)
    2521             : {
    2522           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(obj);
    2523             :         PyObject *py_krb5_cc_type;
    2524           0 :         if (object->krb5_cc_type == NULL) {
    2525           0 :                 Py_RETURN_NONE;
    2526             :         }
    2527           0 :         if (object->krb5_cc_type == NULL) {
    2528           0 :                 py_krb5_cc_type = Py_None;
    2529           0 :                 Py_INCREF(py_krb5_cc_type);
    2530             :         } else {
    2531           0 :                 if (object->krb5_cc_type == NULL) {
    2532           0 :                         py_krb5_cc_type = Py_None;
    2533           0 :                         Py_INCREF(py_krb5_cc_type);
    2534             :                 } else {
    2535           0 :                         py_krb5_cc_type = PyUnicode_Decode(object->krb5_cc_type, strlen(object->krb5_cc_type), "utf-8", "ignore");
    2536             :                 }
    2537             :         }
    2538           0 :         return py_krb5_cc_type;
    2539             : }
    2540             : 
    2541           0 : static int py_wbint_AuthUserInfo_set_krb5_cc_type(PyObject *py_obj, PyObject *value, void *closure)
    2542             : {
    2543           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(py_obj);
    2544           0 :         if (value == NULL) {
    2545           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->krb5_cc_type");
    2546           0 :                 return -1;
    2547             :         }
    2548           0 :         if (value == Py_None) {
    2549           0 :                 object->krb5_cc_type = NULL;
    2550             :         } else {
    2551           0 :                 object->krb5_cc_type = NULL;
    2552             :                 {
    2553             :                         const char *test_str;
    2554             :                         const char *talloc_str;
    2555           0 :                         PyObject *unicode = NULL;
    2556           0 :                         if (PyUnicode_Check(value)) {
    2557           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    2558           0 :                                 if (unicode == NULL) {
    2559           0 :                                         PyErr_NoMemory();
    2560           0 :                                         return -1;
    2561             :                                 }
    2562           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    2563           0 :                         } else if (PyBytes_Check(value)) {
    2564           0 :                                 test_str = PyBytes_AS_STRING(value);
    2565             :                         } else {
    2566           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    2567           0 :                                 return -1;
    2568             :                         }
    2569           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    2570           0 :                         if (unicode != NULL) {
    2571           0 :                                 Py_DECREF(unicode);
    2572             :                         }
    2573           0 :                         if (talloc_str == NULL) {
    2574           0 :                                 PyErr_NoMemory();
    2575           0 :                                 return -1;
    2576             :                         }
    2577           0 :                         object->krb5_cc_type = talloc_str;
    2578             :                 }
    2579             :         }
    2580           0 :         return 0;
    2581             : }
    2582             : 
    2583           0 : static PyObject *py_wbint_AuthUserInfo_get_uid(PyObject *obj, void *closure)
    2584             : {
    2585           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(obj);
    2586             :         PyObject *py_uid;
    2587           0 :         py_uid = PyLong_FromUnsignedLongLong(object->uid);
    2588           0 :         return py_uid;
    2589             : }
    2590             : 
    2591           0 : static int py_wbint_AuthUserInfo_set_uid(PyObject *py_obj, PyObject *value, void *closure)
    2592             : {
    2593           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(py_obj);
    2594           0 :         if (value == NULL) {
    2595           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->uid");
    2596           0 :                 return -1;
    2597             :         }
    2598             :         {
    2599           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->uid));
    2600           0 :                 if (PyLong_Check(value)) {
    2601             :                         unsigned long long test_var;
    2602           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2603           0 :                         if (PyErr_Occurred() != NULL) {
    2604           0 :                                 return -1;
    2605             :                         }
    2606           0 :                         if (test_var > uint_max) {
    2607           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2608             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2609           0 :                                 return -1;
    2610             :                         }
    2611           0 :                         object->uid = test_var;
    2612             :                 } else {
    2613           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2614             :                           PyLong_Type.tp_name);
    2615           0 :                         return -1;
    2616             :                 }
    2617             :         }
    2618           0 :         return 0;
    2619             : }
    2620             : 
    2621             : static PyGetSetDef py_wbint_AuthUserInfo_getsetters[] = {
    2622             :         {
    2623             :                 .name = discard_const_p(char, "username"),
    2624             :                 .get = py_wbint_AuthUserInfo_get_username,
    2625             :                 .set = py_wbint_AuthUserInfo_set_username,
    2626             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2627             :         },
    2628             :         {
    2629             :                 .name = discard_const_p(char, "password"),
    2630             :                 .get = py_wbint_AuthUserInfo_get_password,
    2631             :                 .set = py_wbint_AuthUserInfo_set_password,
    2632             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2633             :         },
    2634             :         {
    2635             :                 .name = discard_const_p(char, "krb5_cc_type"),
    2636             :                 .get = py_wbint_AuthUserInfo_get_krb5_cc_type,
    2637             :                 .set = py_wbint_AuthUserInfo_set_krb5_cc_type,
    2638             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2639             :         },
    2640             :         {
    2641             :                 .name = discard_const_p(char, "uid"),
    2642             :                 .get = py_wbint_AuthUserInfo_get_uid,
    2643             :                 .set = py_wbint_AuthUserInfo_set_uid,
    2644             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
    2645             :         },
    2646             :         { .name = NULL }
    2647             : };
    2648             : 
    2649           0 : static PyObject *py_wbint_AuthUserInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2650             : {
    2651           0 :         return pytalloc_new(struct wbint_AuthUserInfo, type);
    2652             : }
    2653             : 
    2654           0 : static PyObject *py_wbint_AuthUserInfo_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2655             : {
    2656           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(py_obj);
    2657           0 :         PyObject *ret = NULL;
    2658             :         DATA_BLOB blob;
    2659             :         enum ndr_err_code err;
    2660           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2661           0 :         if (tmp_ctx == NULL) {
    2662           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2663           0 :                 return NULL;
    2664             :         }
    2665           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_wbint_AuthUserInfo);
    2666           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2667           0 :                 TALLOC_FREE(tmp_ctx);
    2668           0 :                 PyErr_SetNdrError(err);
    2669           0 :                 return NULL;
    2670             :         }
    2671             : 
    2672           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2673           0 :         TALLOC_FREE(tmp_ctx);
    2674           0 :         return ret;
    2675             : }
    2676             : 
    2677           0 : static PyObject *py_wbint_AuthUserInfo_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2678             : {
    2679           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(py_obj);
    2680           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2681           0 :         Py_ssize_t blob_length = 0;
    2682             :         enum ndr_err_code err;
    2683           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2684           0 :         PyObject *allow_remaining_obj = NULL;
    2685           0 :         bool allow_remaining = false;
    2686             : 
    2687           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    2688             :                 discard_const_p(char *, kwnames),
    2689             :                 &blob.data, &blob_length,
    2690             :                 &allow_remaining_obj)) {
    2691           0 :                 return NULL;
    2692             :         }
    2693           0 :         blob.length = blob_length;
    2694             : 
    2695           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    2696           0 :                 allow_remaining = true;
    2697             :         }
    2698             : 
    2699           0 :         if (allow_remaining) {
    2700           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_AuthUserInfo);
    2701             :         } else {
    2702           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_AuthUserInfo);
    2703             :         }
    2704           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2705           0 :                 PyErr_SetNdrError(err);
    2706           0 :                 return NULL;
    2707             :         }
    2708             : 
    2709           0 :         Py_RETURN_NONE;
    2710             : }
    2711             : 
    2712           0 : static PyObject *py_wbint_AuthUserInfo_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    2713             : {
    2714           0 :         struct wbint_AuthUserInfo *object = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(py_obj);
    2715             :         PyObject *ret;
    2716             :         char *retstr;
    2717             : 
    2718           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_wbint_AuthUserInfo, "wbint_AuthUserInfo", object);
    2719           0 :         ret = PyUnicode_FromString(retstr);
    2720           0 :         talloc_free(retstr);
    2721             : 
    2722           0 :         return ret;
    2723             : }
    2724             : 
    2725             : static PyMethodDef py_wbint_AuthUserInfo_methods[] = {
    2726             :         { "__ndr_pack__", (PyCFunction)py_wbint_AuthUserInfo_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    2727             :         { "__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" },
    2728             :         { "__ndr_print__", (PyCFunction)py_wbint_AuthUserInfo_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    2729             :         { NULL, NULL, 0, NULL }
    2730             : };
    2731             : 
    2732             : 
    2733             : static PyTypeObject wbint_AuthUserInfo_Type = {
    2734             :         PyVarObject_HEAD_INIT(NULL, 0)
    2735             :         .tp_name = "winbind.wbint_AuthUserInfo",
    2736             :         .tp_getset = py_wbint_AuthUserInfo_getsetters,
    2737             :         .tp_methods = py_wbint_AuthUserInfo_methods,
    2738             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2739             :         .tp_new = py_wbint_AuthUserInfo_new,
    2740             : };
    2741             : 
    2742             : 
    2743           0 : static PyObject *py_wbint_PamAuthCrapValidation_get_level(PyObject *obj, void *closure)
    2744             : {
    2745           0 :         struct wbint_PamAuthCrapValidation *object = (struct wbint_PamAuthCrapValidation *)pytalloc_get_ptr(obj);
    2746             :         PyObject *py_level;
    2747           0 :         py_level = PyLong_FromLong((uint16_t)object->level);
    2748           0 :         return py_level;
    2749             : }
    2750             : 
    2751           0 : static int py_wbint_PamAuthCrapValidation_set_level(PyObject *py_obj, PyObject *value, void *closure)
    2752             : {
    2753           0 :         struct wbint_PamAuthCrapValidation *object = (struct wbint_PamAuthCrapValidation *)pytalloc_get_ptr(py_obj);
    2754           0 :         if (value == NULL) {
    2755           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
    2756           0 :                 return -1;
    2757             :         }
    2758             :         {
    2759           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
    2760           0 :                 if (PyLong_Check(value)) {
    2761             :                         unsigned long long test_var;
    2762           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2763           0 :                         if (PyErr_Occurred() != NULL) {
    2764           0 :                                 return -1;
    2765             :                         }
    2766           0 :                         if (test_var > uint_max) {
    2767           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2768             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2769           0 :                                 return -1;
    2770             :                         }
    2771           0 :                         object->level = test_var;
    2772             :                 } else {
    2773           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2774             :                           PyLong_Type.tp_name);
    2775           0 :                         return -1;
    2776             :                 }
    2777             :         }
    2778           0 :         return 0;
    2779             : }
    2780             : 
    2781           0 : static PyObject *py_wbint_PamAuthCrapValidation_get_validation(PyObject *obj, void *closure)
    2782             : {
    2783           0 :         struct wbint_PamAuthCrapValidation *object = (struct wbint_PamAuthCrapValidation *)pytalloc_get_ptr(obj);
    2784             :         PyObject *py_validation;
    2785           0 :         if (object->validation == NULL) {
    2786           0 :                 Py_RETURN_NONE;
    2787             :         }
    2788           0 :         if (object->validation == NULL) {
    2789           0 :                 py_validation = Py_None;
    2790           0 :                 Py_INCREF(py_validation);
    2791             :         } else {
    2792           0 :                 py_validation = pyrpc_import_union(netr_Validation_Type, object->validation, object->level, object->validation, "union netr_Validation");
    2793           0 :                 if (py_validation == NULL) {
    2794           0 :                         return NULL;
    2795             :                 }
    2796             :         }
    2797           0 :         return py_validation;
    2798             : }
    2799             : 
    2800           0 : static int py_wbint_PamAuthCrapValidation_set_validation(PyObject *py_obj, PyObject *value, void *closure)
    2801             : {
    2802           0 :         struct wbint_PamAuthCrapValidation *object = (struct wbint_PamAuthCrapValidation *)pytalloc_get_ptr(py_obj);
    2803           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->validation));
    2804           0 :         if (value == NULL) {
    2805           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->validation");
    2806           0 :                 return -1;
    2807             :         }
    2808           0 :         if (value == Py_None) {
    2809           0 :                 object->validation = NULL;
    2810             :         } else {
    2811           0 :                 object->validation = NULL;
    2812             :                 {
    2813             :                         union netr_Validation *validation_switch_1;
    2814           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");
    2815           0 :                         if (validation_switch_1 == NULL) {
    2816           0 :                                 return -1;
    2817             :                         }
    2818           0 :                         object->validation = validation_switch_1;
    2819             :                 }
    2820             :         }
    2821           0 :         return 0;
    2822             : }
    2823             : 
    2824             : static PyGetSetDef py_wbint_PamAuthCrapValidation_getsetters[] = {
    2825             :         {
    2826             :                 .name = discard_const_p(char, "level"),
    2827             :                 .get = py_wbint_PamAuthCrapValidation_get_level,
    2828             :                 .set = py_wbint_PamAuthCrapValidation_set_level,
    2829             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    2830             :         },
    2831             :         {
    2832             :                 .name = discard_const_p(char, "validation"),
    2833             :                 .get = py_wbint_PamAuthCrapValidation_get_validation,
    2834             :                 .set = py_wbint_PamAuthCrapValidation_set_validation,
    2835             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Validation")
    2836             :         },
    2837             :         { .name = NULL }
    2838             : };
    2839             : 
    2840           0 : static PyObject *py_wbint_PamAuthCrapValidation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2841             : {
    2842           0 :         return pytalloc_new(struct wbint_PamAuthCrapValidation, type);
    2843             : }
    2844             : 
    2845           0 : static PyObject *py_wbint_PamAuthCrapValidation_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2846             : {
    2847           0 :         struct wbint_PamAuthCrapValidation *object = (struct wbint_PamAuthCrapValidation *)pytalloc_get_ptr(py_obj);
    2848           0 :         PyObject *ret = NULL;
    2849             :         DATA_BLOB blob;
    2850             :         enum ndr_err_code err;
    2851           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2852           0 :         if (tmp_ctx == NULL) {
    2853           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2854           0 :                 return NULL;
    2855             :         }
    2856           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_wbint_PamAuthCrapValidation);
    2857           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2858           0 :                 TALLOC_FREE(tmp_ctx);
    2859           0 :                 PyErr_SetNdrError(err);
    2860           0 :                 return NULL;
    2861             :         }
    2862             : 
    2863           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2864           0 :         TALLOC_FREE(tmp_ctx);
    2865           0 :         return ret;
    2866             : }
    2867             : 
    2868           0 : static PyObject *py_wbint_PamAuthCrapValidation_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2869             : {
    2870           0 :         struct wbint_PamAuthCrapValidation *object = (struct wbint_PamAuthCrapValidation *)pytalloc_get_ptr(py_obj);
    2871           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2872           0 :         Py_ssize_t blob_length = 0;
    2873             :         enum ndr_err_code err;
    2874           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2875           0 :         PyObject *allow_remaining_obj = NULL;
    2876           0 :         bool allow_remaining = false;
    2877             : 
    2878           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    2879             :                 discard_const_p(char *, kwnames),
    2880             :                 &blob.data, &blob_length,
    2881             :                 &allow_remaining_obj)) {
    2882           0 :                 return NULL;
    2883             :         }
    2884           0 :         blob.length = blob_length;
    2885             : 
    2886           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    2887           0 :                 allow_remaining = true;
    2888             :         }
    2889             : 
    2890           0 :         if (allow_remaining) {
    2891           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_PamAuthCrapValidation);
    2892             :         } else {
    2893           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_wbint_PamAuthCrapValidation);
    2894             :         }
    2895           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2896           0 :                 PyErr_SetNdrError(err);
    2897           0 :                 return NULL;
    2898             :         }
    2899             : 
    2900           0 :         Py_RETURN_NONE;
    2901             : }
    2902             : 
    2903           0 : static PyObject *py_wbint_PamAuthCrapValidation_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    2904             : {
    2905           0 :         struct wbint_PamAuthCrapValidation *object = (struct wbint_PamAuthCrapValidation *)pytalloc_get_ptr(py_obj);
    2906             :         PyObject *ret;
    2907             :         char *retstr;
    2908             : 
    2909           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_wbint_PamAuthCrapValidation, "wbint_PamAuthCrapValidation", object);
    2910           0 :         ret = PyUnicode_FromString(retstr);
    2911           0 :         talloc_free(retstr);
    2912             : 
    2913           0 :         return ret;
    2914             : }
    2915             : 
    2916             : static PyMethodDef py_wbint_PamAuthCrapValidation_methods[] = {
    2917             :         { "__ndr_pack__", (PyCFunction)py_wbint_PamAuthCrapValidation_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    2918             :         { "__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" },
    2919             :         { "__ndr_print__", (PyCFunction)py_wbint_PamAuthCrapValidation_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    2920             :         { NULL, NULL, 0, NULL }
    2921             : };
    2922             : 
    2923             : 
    2924             : static PyTypeObject wbint_PamAuthCrapValidation_Type = {
    2925             :         PyVarObject_HEAD_INIT(NULL, 0)
    2926             :         .tp_name = "winbind.wbint_PamAuthCrapValidation",
    2927             :         .tp_getset = py_wbint_PamAuthCrapValidation_getsetters,
    2928             :         .tp_methods = py_wbint_PamAuthCrapValidation_methods,
    2929             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2930             :         .tp_new = py_wbint_PamAuthCrapValidation_new,
    2931             : };
    2932             : 
    2933             : 
    2934             : 
    2935           0 : static PyObject *py_wbint_Ping_in_get_in_data(PyObject *obj, void *closure)
    2936             : {
    2937           0 :         struct wbint_Ping *object = (struct wbint_Ping *)pytalloc_get_ptr(obj);
    2938             :         PyObject *py_in_data;
    2939           0 :         py_in_data = PyLong_FromUnsignedLongLong((uint32_t)object->in.in_data);
    2940           0 :         return py_in_data;
    2941             : }
    2942             : 
    2943           0 : static int py_wbint_Ping_in_set_in_data(PyObject *py_obj, PyObject *value, void *closure)
    2944             : {
    2945           0 :         struct wbint_Ping *object = (struct wbint_Ping *)pytalloc_get_ptr(py_obj);
    2946           0 :         if (value == NULL) {
    2947           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.in_data");
    2948           0 :                 return -1;
    2949             :         }
    2950             :         {
    2951           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.in_data));
    2952           0 :                 if (PyLong_Check(value)) {
    2953             :                         unsigned long long test_var;
    2954           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2955           0 :                         if (PyErr_Occurred() != NULL) {
    2956           0 :                                 return -1;
    2957             :                         }
    2958           0 :                         if (test_var > uint_max) {
    2959           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2960             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2961           0 :                                 return -1;
    2962             :                         }
    2963           0 :                         object->in.in_data = test_var;
    2964             :                 } else {
    2965           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2966             :                           PyLong_Type.tp_name);
    2967           0 :                         return -1;
    2968             :                 }
    2969             :         }
    2970           0 :         return 0;
    2971             : }
    2972             : 
    2973           0 : static PyObject *py_wbint_Ping_out_get_out_data(PyObject *obj, void *closure)
    2974             : {
    2975           0 :         struct wbint_Ping *object = (struct wbint_Ping *)pytalloc_get_ptr(obj);
    2976             :         PyObject *py_out_data;
    2977           0 :         if (object->out.out_data == NULL) {
    2978           0 :                 Py_RETURN_NONE;
    2979             :         }
    2980           0 :         py_out_data = PyLong_FromUnsignedLongLong((uint32_t)*object->out.out_data);
    2981           0 :         return py_out_data;
    2982             : }
    2983             : 
    2984           0 : static int py_wbint_Ping_out_set_out_data(PyObject *py_obj, PyObject *value, void *closure)
    2985             : {
    2986           0 :         struct wbint_Ping *object = (struct wbint_Ping *)pytalloc_get_ptr(py_obj);
    2987           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.out_data));
    2988           0 :         if (value == NULL) {
    2989           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.out_data");
    2990           0 :                 return -1;
    2991             :         }
    2992           0 :         object->out.out_data = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.out_data);
    2993           0 :         if (object->out.out_data == NULL) {
    2994           0 :                 PyErr_NoMemory();
    2995           0 :                 return -1;
    2996             :         }
    2997             :         {
    2998           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.out_data));
    2999           0 :                 if (PyLong_Check(value)) {
    3000             :                         unsigned long long test_var;
    3001           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3002           0 :                         if (PyErr_Occurred() != NULL) {
    3003           0 :                                 return -1;
    3004             :                         }
    3005           0 :                         if (test_var > uint_max) {
    3006           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3007             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3008           0 :                                 return -1;
    3009             :                         }
    3010           0 :                         *object->out.out_data = test_var;
    3011             :                 } else {
    3012           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3013             :                           PyLong_Type.tp_name);
    3014           0 :                         return -1;
    3015             :                 }
    3016             :         }
    3017           0 :         return 0;
    3018             : }
    3019             : 
    3020           0 : static PyObject *py_wbint_Ping_get_result(PyObject *obj, void *closure)
    3021             : {
    3022           0 :         struct wbint_Ping *object = (struct wbint_Ping *)pytalloc_get_ptr(obj);
    3023             :         PyObject *py_result;
    3024           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    3025           0 :         return py_result;
    3026             : }
    3027             : 
    3028           0 : static int py_wbint_Ping_set_result(PyObject *py_obj, PyObject *value, void *closure)
    3029             : {
    3030           0 :         struct wbint_Ping *object = (struct wbint_Ping *)pytalloc_get_ptr(py_obj);
    3031           0 :         if (value == NULL) {
    3032           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    3033           0 :                 return -1;
    3034             :         }
    3035           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    3036           0 :         return 0;
    3037             : }
    3038             : 
    3039             : static PyGetSetDef py_wbint_Ping_getsetters[] = {
    3040             :         {
    3041             :                 .name = discard_const_p(char, "in_in_data"),
    3042             :                 .get = py_wbint_Ping_in_get_in_data,
    3043             :                 .set = py_wbint_Ping_in_set_in_data,
    3044             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3045             :         },
    3046             :         {
    3047             :                 .name = discard_const_p(char, "out_out_data"),
    3048             :                 .get = py_wbint_Ping_out_get_out_data,
    3049             :                 .set = py_wbint_Ping_out_set_out_data,
    3050             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3051             :         },
    3052             :         {
    3053             :                 .name = discard_const_p(char, "result"),
    3054             :                 .get = py_wbint_Ping_get_result,
    3055             :                 .set = py_wbint_Ping_set_result,
    3056             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    3057             :         },
    3058             :         { .name = NULL }
    3059             : };
    3060             : 
    3061           0 : static PyObject *py_wbint_Ping_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3062             : {
    3063           0 :         PyObject *self = pytalloc_new(struct wbint_Ping, type);
    3064           0 :         struct wbint_Ping *_self = (struct wbint_Ping *)pytalloc_get_ptr(self);
    3065           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    3066           0 :         _self->out.out_data = talloc_zero(mem_ctx, uint32_t);
    3067           0 :         return self;
    3068             : }
    3069             : 
    3070           0 : static PyObject *py_wbint_Ping_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    3071             : {
    3072             : 
    3073             : 
    3074           0 :         return PyLong_FromLong(0);
    3075             : }
    3076             : 
    3077           0 : static PyObject *py_wbint_Ping_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
    3078             : {
    3079           0 :         const struct ndr_interface_call *call = NULL;
    3080           0 :         struct wbint_Ping *object = (struct wbint_Ping *)pytalloc_get_ptr(py_obj);
    3081           0 :         PyObject *ret = NULL;
    3082           0 :         struct ndr_push *push = NULL;
    3083             :         DATA_BLOB blob;
    3084             :         enum ndr_err_code err;
    3085             : 
    3086           0 :         if (ndr_table_winbind.num_calls < 1) {
    3087           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_Ping_ndr_pack");
    3088           0 :                 return NULL;
    3089             :         }
    3090           0 :         call = &ndr_table_winbind.calls[0];
    3091             : 
    3092           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    3093           0 :         if (push == NULL) {
    3094           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    3095           0 :                 return NULL;
    3096             :         }
    3097             : 
    3098           0 :         push->flags |= ndr_push_flags;
    3099             : 
    3100           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    3101           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3102           0 :                 TALLOC_FREE(push);
    3103           0 :                 PyErr_SetNdrError(err);
    3104           0 :                 return NULL;
    3105             :         }
    3106           0 :         blob = ndr_push_blob(push);
    3107           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    3108           0 :         TALLOC_FREE(push);
    3109           0 :         return ret;
    3110             : }
    3111             : 
    3112           0 : static PyObject *py_wbint_Ping_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3113             : {
    3114           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    3115           0 :         PyObject *bigendian_obj = NULL;
    3116           0 :         PyObject *ndr64_obj = NULL;
    3117           0 :         uint32_t ndr_push_flags = 0;
    3118             : 
    3119           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    3120             :                 discard_const_p(char *, kwnames),
    3121             :                 &bigendian_obj,
    3122             :                 &ndr64_obj)) {
    3123           0 :                 return NULL;
    3124             :         }
    3125             : 
    3126           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    3127           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    3128             :         }
    3129           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    3130           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    3131             :         }
    3132             : 
    3133           0 :         return py_wbint_Ping_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    3134             : }
    3135             : 
    3136           0 : static PyObject *py_wbint_Ping_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3137             : {
    3138           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    3139           0 :         PyObject *bigendian_obj = NULL;
    3140           0 :         PyObject *ndr64_obj = NULL;
    3141           0 :         uint32_t ndr_push_flags = 0;
    3142             : 
    3143           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    3144             :                 discard_const_p(char *, kwnames),
    3145             :                 &bigendian_obj,
    3146             :                 &ndr64_obj)) {
    3147           0 :                 return NULL;
    3148             :         }
    3149             : 
    3150           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    3151           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    3152             :         }
    3153           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    3154           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    3155             :         }
    3156             : 
    3157           0 :         return py_wbint_Ping_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    3158             : }
    3159             : 
    3160           0 : static PyObject *py_wbint_Ping_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
    3161             : {
    3162           0 :         const struct ndr_interface_call *call = NULL;
    3163           0 :         struct wbint_Ping *object = (struct wbint_Ping *)pytalloc_get_ptr(py_obj);
    3164           0 :         struct ndr_pull *pull = NULL;
    3165             :         enum ndr_err_code err;
    3166             : 
    3167           0 :         if (ndr_table_winbind.num_calls < 1) {
    3168           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_Ping_ndr_unpack");
    3169           0 :                 return NULL;
    3170             :         }
    3171           0 :         call = &ndr_table_winbind.calls[0];
    3172             : 
    3173           0 :         pull = ndr_pull_init_blob(blob, object);
    3174           0 :         if (pull == NULL) {
    3175           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    3176           0 :                 return NULL;
    3177             :         }
    3178             : 
    3179           0 :         pull->flags |= ndr_pull_flags;
    3180             : 
    3181           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    3182           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3183           0 :                 TALLOC_FREE(pull);
    3184           0 :                 PyErr_SetNdrError(err);
    3185           0 :                 return NULL;
    3186             :         }
    3187           0 :         if (!allow_remaining) {
    3188             :                 uint32_t highest_ofs;
    3189             : 
    3190           0 :                 if (pull->offset > pull->relative_highest_offset) {
    3191           0 :                         highest_ofs = pull->offset;
    3192             :                 } else {
    3193           0 :                         highest_ofs = pull->relative_highest_offset;
    3194             :                 }
    3195           0 :                 if (highest_ofs < pull->data_size) {
    3196           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    3197             :                                 "not all bytes consumed ofs[%u] size[%u]",
    3198             :                                 highest_ofs, pull->data_size);
    3199           0 :                         TALLOC_FREE(pull);
    3200           0 :                         PyErr_SetNdrError(err);
    3201           0 :                         return NULL;
    3202             :                 }
    3203             :         }
    3204             : 
    3205           0 :         TALLOC_FREE(pull);
    3206           0 :         Py_RETURN_NONE;
    3207             : }
    3208             : 
    3209           0 : static PyObject *py_wbint_Ping_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3210             : {
    3211             :         DATA_BLOB blob;
    3212           0 :         Py_ssize_t blob_length = 0;
    3213           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    3214           0 :         PyObject *bigendian_obj = NULL;
    3215           0 :         PyObject *ndr64_obj = NULL;
    3216           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    3217           0 :         PyObject *allow_remaining_obj = NULL;
    3218           0 :         bool allow_remaining = false;
    3219             : 
    3220           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    3221             :                 discard_const_p(char *, kwnames),
    3222             :                 &blob.data, &blob_length,
    3223             :                 &bigendian_obj,
    3224             :                 &ndr64_obj,
    3225             :                 &allow_remaining_obj)) {
    3226           0 :                 return NULL;
    3227             :         }
    3228           0 :         blob.length = blob_length;
    3229             : 
    3230           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    3231           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    3232             :         }
    3233           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    3234           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    3235             :         }
    3236             : 
    3237           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    3238           0 :                 allow_remaining = true;
    3239             :         }
    3240             : 
    3241           0 :         return py_wbint_Ping_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    3242             : }
    3243             : 
    3244           0 : static PyObject *py_wbint_Ping_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3245             : {
    3246             :         DATA_BLOB blob;
    3247           0 :         Py_ssize_t blob_length = 0;
    3248           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    3249           0 :         PyObject *bigendian_obj = NULL;
    3250           0 :         PyObject *ndr64_obj = NULL;
    3251           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    3252           0 :         PyObject *allow_remaining_obj = NULL;
    3253           0 :         bool allow_remaining = false;
    3254             : 
    3255           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    3256             :                 discard_const_p(char *, kwnames),
    3257             :                 &blob.data, &blob_length,
    3258             :                 &bigendian_obj,
    3259             :                 &ndr64_obj,
    3260             :                 &allow_remaining_obj)) {
    3261           0 :                 return NULL;
    3262             :         }
    3263           0 :         blob.length = blob_length;
    3264             : 
    3265           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    3266           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    3267             :         }
    3268           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    3269           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    3270             :         }
    3271             : 
    3272           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    3273           0 :                 allow_remaining = true;
    3274             :         }
    3275             : 
    3276           0 :         return py_wbint_Ping_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    3277             : }
    3278             : 
    3279           0 : static PyObject *py_wbint_Ping_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
    3280             : {
    3281           0 :         const struct ndr_interface_call *call = NULL;
    3282           0 :         struct wbint_Ping *object = (struct wbint_Ping *)pytalloc_get_ptr(py_obj);
    3283             :         PyObject *ret;
    3284             :         char *retstr;
    3285             : 
    3286           0 :         if (ndr_table_winbind.num_calls < 1) {
    3287           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_Ping_ndr_print");
    3288           0 :                 return NULL;
    3289             :         }
    3290           0 :         call = &ndr_table_winbind.calls[0];
    3291             : 
    3292           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    3293           0 :         ret = PyUnicode_FromString(retstr);
    3294           0 :         TALLOC_FREE(retstr);
    3295             : 
    3296           0 :         return ret;
    3297             : }
    3298             : 
    3299           0 : static PyObject *py_wbint_Ping_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    3300             : {
    3301           0 :         return py_wbint_Ping_ndr_print(py_obj, "wbint_Ping_in", NDR_IN);
    3302             : }
    3303             : 
    3304           0 : static PyObject *py_wbint_Ping_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    3305             : {
    3306           0 :         return py_wbint_Ping_ndr_print(py_obj, "wbint_Ping_out", NDR_OUT);
    3307             : }
    3308             : 
    3309             : static PyMethodDef py_wbint_Ping_methods[] = {
    3310             :         { "opnum", (PyCFunction)py_wbint_Ping_ndr_opnum, METH_NOARGS|METH_CLASS,
    3311             :                 "winbind.wbint_Ping.opnum() -> 0 (0x00) " },
    3312             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_Ping_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    3313             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    3314             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_Ping_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    3315             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    3316             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_Ping_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    3317             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    3318             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_Ping_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    3319             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    3320             :         { "__ndr_print_in__", (PyCFunction)py_wbint_Ping_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    3321             :         { "__ndr_print_out__", (PyCFunction)py_wbint_Ping_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    3322             :         { NULL, NULL, 0, NULL }
    3323             : };
    3324             : 
    3325             : 
    3326             : static PyTypeObject wbint_Ping_Type = {
    3327             :         PyVarObject_HEAD_INIT(NULL, 0)
    3328             :         .tp_name = "winbind.wbint_Ping",
    3329             :         .tp_getset = py_wbint_Ping_getsetters,
    3330             :         .tp_methods = py_wbint_Ping_methods,
    3331             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3332             :         .tp_new = py_wbint_Ping_new,
    3333             : };
    3334             : 
    3335           0 : static bool pack_py_wbint_Ping_args_in(PyObject *args, PyObject *kwargs, struct wbint_Ping *r)
    3336             : {
    3337             :         PyObject *py_in_data;
    3338           0 :         const char *kwnames[] = {
    3339             :                 "in_data", NULL
    3340             :         };
    3341             : 
    3342           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:wbint_Ping", discard_const_p(char *, kwnames), &py_in_data)) {
    3343           0 :                 return false;
    3344             :         }
    3345             : 
    3346           0 :         if (py_in_data == NULL) {
    3347           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.in_data");
    3348           0 :                 return false;
    3349             :         }
    3350             :         {
    3351           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.in_data));
    3352           0 :                 if (PyLong_Check(py_in_data)) {
    3353             :                         unsigned long long test_var;
    3354           0 :                         test_var = PyLong_AsUnsignedLongLong(py_in_data);
    3355           0 :                         if (PyErr_Occurred() != NULL) {
    3356           0 :                                 return false;
    3357             :                         }
    3358           0 :                         if (test_var > uint_max) {
    3359           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3360             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3361           0 :                                 return false;
    3362             :                         }
    3363           0 :                         r->in.in_data = test_var;
    3364             :                 } else {
    3365           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3366             :                           PyLong_Type.tp_name);
    3367           0 :                         return false;
    3368             :                 }
    3369             :         }
    3370           0 :         return true;
    3371             : }
    3372             : 
    3373           0 : static PyObject *unpack_py_wbint_Ping_args_out(struct wbint_Ping *r)
    3374             : {
    3375             :         PyObject *result;
    3376             :         PyObject *py_out_data;
    3377           0 :         py_out_data = PyLong_FromUnsignedLongLong((uint32_t)*r->out.out_data);
    3378           0 :         result = py_out_data;
    3379           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    3380           0 :                 PyErr_SetNTSTATUS(r->out.result);
    3381           0 :                 return NULL;
    3382             :         }
    3383             : 
    3384           0 :         return result;
    3385             : }
    3386             : 
    3387             : 
    3388           0 : static PyObject *py_wbint_LookupSid_in_get_sid(PyObject *obj, void *closure)
    3389             : {
    3390           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(obj);
    3391             :         PyObject *py_sid;
    3392           0 :         if (object->in.sid == NULL) {
    3393           0 :                 Py_RETURN_NONE;
    3394             :         }
    3395           0 :         py_sid = pytalloc_reference_ex(dom_sid_Type, object->in.sid, object->in.sid);
    3396           0 :         return py_sid;
    3397             : }
    3398             : 
    3399           0 : static int py_wbint_LookupSid_in_set_sid(PyObject *py_obj, PyObject *value, void *closure)
    3400             : {
    3401           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(py_obj);
    3402           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sid));
    3403           0 :         if (value == NULL) {
    3404           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.sid");
    3405           0 :                 return -1;
    3406             :         }
    3407           0 :         object->in.sid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sid);
    3408           0 :         if (object->in.sid == NULL) {
    3409           0 :                 PyErr_NoMemory();
    3410           0 :                 return -1;
    3411             :         }
    3412           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    3413           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3414           0 :                 PyErr_NoMemory();
    3415           0 :                 return -1;
    3416             :         }
    3417           0 :         object->in.sid = (struct dom_sid *)pytalloc_get_ptr(value);
    3418           0 :         return 0;
    3419             : }
    3420             : 
    3421           0 : static PyObject *py_wbint_LookupSid_out_get_type(PyObject *obj, void *closure)
    3422             : {
    3423           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(obj);
    3424             :         PyObject *py_type;
    3425           0 :         if (object->out.type == NULL) {
    3426           0 :                 Py_RETURN_NONE;
    3427             :         }
    3428           0 :         py_type = PyLong_FromLong((uint16_t)*object->out.type);
    3429           0 :         return py_type;
    3430             : }
    3431             : 
    3432           0 : static int py_wbint_LookupSid_out_set_type(PyObject *py_obj, PyObject *value, void *closure)
    3433             : {
    3434           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(py_obj);
    3435           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.type));
    3436           0 :         if (value == NULL) {
    3437           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.type");
    3438           0 :                 return -1;
    3439             :         }
    3440           0 :         object->out.type = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.type);
    3441           0 :         if (object->out.type == NULL) {
    3442           0 :                 PyErr_NoMemory();
    3443           0 :                 return -1;
    3444             :         }
    3445             :         {
    3446           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.type));
    3447           0 :                 if (PyLong_Check(value)) {
    3448             :                         unsigned long long test_var;
    3449           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3450           0 :                         if (PyErr_Occurred() != NULL) {
    3451           0 :                                 return -1;
    3452             :                         }
    3453           0 :                         if (test_var > uint_max) {
    3454           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3455             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3456           0 :                                 return -1;
    3457             :                         }
    3458           0 :                         *object->out.type = test_var;
    3459             :                 } else {
    3460           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3461             :                           PyLong_Type.tp_name);
    3462           0 :                         return -1;
    3463             :                 }
    3464             :         }
    3465           0 :         return 0;
    3466             : }
    3467             : 
    3468           0 : static PyObject *py_wbint_LookupSid_out_get_domain(PyObject *obj, void *closure)
    3469             : {
    3470           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(obj);
    3471             :         PyObject *py_domain;
    3472           0 :         if (object->out.domain == NULL) {
    3473           0 :                 Py_RETURN_NONE;
    3474             :         }
    3475           0 :         if (*object->out.domain == NULL) {
    3476           0 :                 py_domain = Py_None;
    3477           0 :                 Py_INCREF(py_domain);
    3478             :         } else {
    3479           0 :                 if (*object->out.domain == NULL) {
    3480           0 :                         py_domain = Py_None;
    3481           0 :                         Py_INCREF(py_domain);
    3482             :                 } else {
    3483           0 :                         py_domain = PyUnicode_Decode(*object->out.domain, strlen(*object->out.domain), "utf-8", "ignore");
    3484             :                 }
    3485             :         }
    3486           0 :         return py_domain;
    3487             : }
    3488             : 
    3489           0 : static int py_wbint_LookupSid_out_set_domain(PyObject *py_obj, PyObject *value, void *closure)
    3490             : {
    3491           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(py_obj);
    3492           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.domain));
    3493           0 :         if (value == NULL) {
    3494           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.domain");
    3495           0 :                 return -1;
    3496             :         }
    3497           0 :         object->out.domain = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.domain);
    3498           0 :         if (object->out.domain == NULL) {
    3499           0 :                 PyErr_NoMemory();
    3500           0 :                 return -1;
    3501             :         }
    3502           0 :         if (value == Py_None) {
    3503           0 :                 *object->out.domain = NULL;
    3504             :         } else {
    3505           0 :                 *object->out.domain = NULL;
    3506             :                 {
    3507             :                         const char *test_str;
    3508             :                         const char *talloc_str;
    3509           0 :                         PyObject *unicode = NULL;
    3510           0 :                         if (PyUnicode_Check(value)) {
    3511           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    3512           0 :                                 if (unicode == NULL) {
    3513           0 :                                         PyErr_NoMemory();
    3514           0 :                                         return -1;
    3515             :                                 }
    3516           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    3517           0 :                         } else if (PyBytes_Check(value)) {
    3518           0 :                                 test_str = PyBytes_AS_STRING(value);
    3519             :                         } else {
    3520           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    3521           0 :                                 return -1;
    3522             :                         }
    3523           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    3524           0 :                         if (unicode != NULL) {
    3525           0 :                                 Py_DECREF(unicode);
    3526             :                         }
    3527           0 :                         if (talloc_str == NULL) {
    3528           0 :                                 PyErr_NoMemory();
    3529           0 :                                 return -1;
    3530             :                         }
    3531           0 :                         *object->out.domain = talloc_str;
    3532             :                 }
    3533             :         }
    3534           0 :         return 0;
    3535             : }
    3536             : 
    3537           0 : static PyObject *py_wbint_LookupSid_out_get_name(PyObject *obj, void *closure)
    3538             : {
    3539           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(obj);
    3540             :         PyObject *py_name;
    3541           0 :         if (object->out.name == NULL) {
    3542           0 :                 Py_RETURN_NONE;
    3543             :         }
    3544           0 :         if (*object->out.name == NULL) {
    3545           0 :                 py_name = Py_None;
    3546           0 :                 Py_INCREF(py_name);
    3547             :         } else {
    3548           0 :                 if (*object->out.name == NULL) {
    3549           0 :                         py_name = Py_None;
    3550           0 :                         Py_INCREF(py_name);
    3551             :                 } else {
    3552           0 :                         py_name = PyUnicode_Decode(*object->out.name, strlen(*object->out.name), "utf-8", "ignore");
    3553             :                 }
    3554             :         }
    3555           0 :         return py_name;
    3556             : }
    3557             : 
    3558           0 : static int py_wbint_LookupSid_out_set_name(PyObject *py_obj, PyObject *value, void *closure)
    3559             : {
    3560           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(py_obj);
    3561           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.name));
    3562           0 :         if (value == NULL) {
    3563           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.name");
    3564           0 :                 return -1;
    3565             :         }
    3566           0 :         object->out.name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.name);
    3567           0 :         if (object->out.name == NULL) {
    3568           0 :                 PyErr_NoMemory();
    3569           0 :                 return -1;
    3570             :         }
    3571           0 :         if (value == Py_None) {
    3572           0 :                 *object->out.name = NULL;
    3573             :         } else {
    3574           0 :                 *object->out.name = NULL;
    3575             :                 {
    3576             :                         const char *test_str;
    3577             :                         const char *talloc_str;
    3578           0 :                         PyObject *unicode = NULL;
    3579           0 :                         if (PyUnicode_Check(value)) {
    3580           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    3581           0 :                                 if (unicode == NULL) {
    3582           0 :                                         PyErr_NoMemory();
    3583           0 :                                         return -1;
    3584             :                                 }
    3585           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    3586           0 :                         } else if (PyBytes_Check(value)) {
    3587           0 :                                 test_str = PyBytes_AS_STRING(value);
    3588             :                         } else {
    3589           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    3590           0 :                                 return -1;
    3591             :                         }
    3592           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    3593           0 :                         if (unicode != NULL) {
    3594           0 :                                 Py_DECREF(unicode);
    3595             :                         }
    3596           0 :                         if (talloc_str == NULL) {
    3597           0 :                                 PyErr_NoMemory();
    3598           0 :                                 return -1;
    3599             :                         }
    3600           0 :                         *object->out.name = talloc_str;
    3601             :                 }
    3602             :         }
    3603           0 :         return 0;
    3604             : }
    3605             : 
    3606           0 : static PyObject *py_wbint_LookupSid_get_result(PyObject *obj, void *closure)
    3607             : {
    3608           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(obj);
    3609             :         PyObject *py_result;
    3610           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    3611           0 :         return py_result;
    3612             : }
    3613             : 
    3614           0 : static int py_wbint_LookupSid_set_result(PyObject *py_obj, PyObject *value, void *closure)
    3615             : {
    3616           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(py_obj);
    3617           0 :         if (value == NULL) {
    3618           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    3619           0 :                 return -1;
    3620             :         }
    3621           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    3622           0 :         return 0;
    3623             : }
    3624             : 
    3625             : static PyGetSetDef py_wbint_LookupSid_getsetters[] = {
    3626             :         {
    3627             :                 .name = discard_const_p(char, "in_sid"),
    3628             :                 .get = py_wbint_LookupSid_in_get_sid,
    3629             :                 .set = py_wbint_LookupSid_in_set_sid,
    3630             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
    3631             :         },
    3632             :         {
    3633             :                 .name = discard_const_p(char, "out_type"),
    3634             :                 .get = py_wbint_LookupSid_out_get_type,
    3635             :                 .set = py_wbint_LookupSid_out_set_type,
    3636             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_SidType")
    3637             :         },
    3638             :         {
    3639             :                 .name = discard_const_p(char, "out_domain"),
    3640             :                 .get = py_wbint_LookupSid_out_get_domain,
    3641             :                 .set = py_wbint_LookupSid_out_set_domain,
    3642             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    3643             :         },
    3644             :         {
    3645             :                 .name = discard_const_p(char, "out_name"),
    3646             :                 .get = py_wbint_LookupSid_out_get_name,
    3647             :                 .set = py_wbint_LookupSid_out_set_name,
    3648             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    3649             :         },
    3650             :         {
    3651             :                 .name = discard_const_p(char, "result"),
    3652             :                 .get = py_wbint_LookupSid_get_result,
    3653             :                 .set = py_wbint_LookupSid_set_result,
    3654             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    3655             :         },
    3656             :         { .name = NULL }
    3657             : };
    3658             : 
    3659           0 : static PyObject *py_wbint_LookupSid_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3660             : {
    3661           0 :         PyObject *self = pytalloc_new(struct wbint_LookupSid, type);
    3662           0 :         struct wbint_LookupSid *_self = (struct wbint_LookupSid *)pytalloc_get_ptr(self);
    3663           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    3664           0 :         _self->in.sid = talloc_zero(mem_ctx, struct dom_sid);
    3665           0 :         _self->out.type = talloc_zero(mem_ctx, enum lsa_SidType);
    3666           0 :         return self;
    3667             : }
    3668             : 
    3669           0 : static PyObject *py_wbint_LookupSid_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    3670             : {
    3671             : 
    3672             : 
    3673           0 :         return PyLong_FromLong(1);
    3674             : }
    3675             : 
    3676           0 : static PyObject *py_wbint_LookupSid_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
    3677             : {
    3678           0 :         const struct ndr_interface_call *call = NULL;
    3679           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(py_obj);
    3680           0 :         PyObject *ret = NULL;
    3681           0 :         struct ndr_push *push = NULL;
    3682             :         DATA_BLOB blob;
    3683             :         enum ndr_err_code err;
    3684             : 
    3685           0 :         if (ndr_table_winbind.num_calls < 2) {
    3686           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupSid_ndr_pack");
    3687           0 :                 return NULL;
    3688             :         }
    3689           0 :         call = &ndr_table_winbind.calls[1];
    3690             : 
    3691           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    3692           0 :         if (push == NULL) {
    3693           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    3694           0 :                 return NULL;
    3695             :         }
    3696             : 
    3697           0 :         push->flags |= ndr_push_flags;
    3698             : 
    3699           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    3700           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3701           0 :                 TALLOC_FREE(push);
    3702           0 :                 PyErr_SetNdrError(err);
    3703           0 :                 return NULL;
    3704             :         }
    3705           0 :         blob = ndr_push_blob(push);
    3706           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    3707           0 :         TALLOC_FREE(push);
    3708           0 :         return ret;
    3709             : }
    3710             : 
    3711           0 : static PyObject *py_wbint_LookupSid_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3712             : {
    3713           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    3714           0 :         PyObject *bigendian_obj = NULL;
    3715           0 :         PyObject *ndr64_obj = NULL;
    3716           0 :         uint32_t ndr_push_flags = 0;
    3717             : 
    3718           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    3719             :                 discard_const_p(char *, kwnames),
    3720             :                 &bigendian_obj,
    3721             :                 &ndr64_obj)) {
    3722           0 :                 return NULL;
    3723             :         }
    3724             : 
    3725           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    3726           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    3727             :         }
    3728           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    3729           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    3730             :         }
    3731             : 
    3732           0 :         return py_wbint_LookupSid_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    3733             : }
    3734             : 
    3735           0 : static PyObject *py_wbint_LookupSid_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3736             : {
    3737           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    3738           0 :         PyObject *bigendian_obj = NULL;
    3739           0 :         PyObject *ndr64_obj = NULL;
    3740           0 :         uint32_t ndr_push_flags = 0;
    3741             : 
    3742           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    3743             :                 discard_const_p(char *, kwnames),
    3744             :                 &bigendian_obj,
    3745             :                 &ndr64_obj)) {
    3746           0 :                 return NULL;
    3747             :         }
    3748             : 
    3749           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    3750           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    3751             :         }
    3752           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    3753           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    3754             :         }
    3755             : 
    3756           0 :         return py_wbint_LookupSid_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    3757             : }
    3758             : 
    3759           0 : static PyObject *py_wbint_LookupSid_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
    3760             : {
    3761           0 :         const struct ndr_interface_call *call = NULL;
    3762           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(py_obj);
    3763           0 :         struct ndr_pull *pull = NULL;
    3764             :         enum ndr_err_code err;
    3765             : 
    3766           0 :         if (ndr_table_winbind.num_calls < 2) {
    3767           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupSid_ndr_unpack");
    3768           0 :                 return NULL;
    3769             :         }
    3770           0 :         call = &ndr_table_winbind.calls[1];
    3771             : 
    3772           0 :         pull = ndr_pull_init_blob(blob, object);
    3773           0 :         if (pull == NULL) {
    3774           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    3775           0 :                 return NULL;
    3776             :         }
    3777             : 
    3778           0 :         pull->flags |= ndr_pull_flags;
    3779             : 
    3780           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    3781           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3782           0 :                 TALLOC_FREE(pull);
    3783           0 :                 PyErr_SetNdrError(err);
    3784           0 :                 return NULL;
    3785             :         }
    3786           0 :         if (!allow_remaining) {
    3787             :                 uint32_t highest_ofs;
    3788             : 
    3789           0 :                 if (pull->offset > pull->relative_highest_offset) {
    3790           0 :                         highest_ofs = pull->offset;
    3791             :                 } else {
    3792           0 :                         highest_ofs = pull->relative_highest_offset;
    3793             :                 }
    3794           0 :                 if (highest_ofs < pull->data_size) {
    3795           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    3796             :                                 "not all bytes consumed ofs[%u] size[%u]",
    3797             :                                 highest_ofs, pull->data_size);
    3798           0 :                         TALLOC_FREE(pull);
    3799           0 :                         PyErr_SetNdrError(err);
    3800           0 :                         return NULL;
    3801             :                 }
    3802             :         }
    3803             : 
    3804           0 :         TALLOC_FREE(pull);
    3805           0 :         Py_RETURN_NONE;
    3806             : }
    3807             : 
    3808           0 : static PyObject *py_wbint_LookupSid_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3809             : {
    3810             :         DATA_BLOB blob;
    3811           0 :         Py_ssize_t blob_length = 0;
    3812           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    3813           0 :         PyObject *bigendian_obj = NULL;
    3814           0 :         PyObject *ndr64_obj = NULL;
    3815           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    3816           0 :         PyObject *allow_remaining_obj = NULL;
    3817           0 :         bool allow_remaining = false;
    3818             : 
    3819           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    3820             :                 discard_const_p(char *, kwnames),
    3821             :                 &blob.data, &blob_length,
    3822             :                 &bigendian_obj,
    3823             :                 &ndr64_obj,
    3824             :                 &allow_remaining_obj)) {
    3825           0 :                 return NULL;
    3826             :         }
    3827           0 :         blob.length = blob_length;
    3828             : 
    3829           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    3830           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    3831             :         }
    3832           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    3833           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    3834             :         }
    3835             : 
    3836           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    3837           0 :                 allow_remaining = true;
    3838             :         }
    3839             : 
    3840           0 :         return py_wbint_LookupSid_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    3841             : }
    3842             : 
    3843           0 : static PyObject *py_wbint_LookupSid_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3844             : {
    3845             :         DATA_BLOB blob;
    3846           0 :         Py_ssize_t blob_length = 0;
    3847           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    3848           0 :         PyObject *bigendian_obj = NULL;
    3849           0 :         PyObject *ndr64_obj = NULL;
    3850           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    3851           0 :         PyObject *allow_remaining_obj = NULL;
    3852           0 :         bool allow_remaining = false;
    3853             : 
    3854           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    3855             :                 discard_const_p(char *, kwnames),
    3856             :                 &blob.data, &blob_length,
    3857             :                 &bigendian_obj,
    3858             :                 &ndr64_obj,
    3859             :                 &allow_remaining_obj)) {
    3860           0 :                 return NULL;
    3861             :         }
    3862           0 :         blob.length = blob_length;
    3863             : 
    3864           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    3865           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    3866             :         }
    3867           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    3868           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    3869             :         }
    3870             : 
    3871           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    3872           0 :                 allow_remaining = true;
    3873             :         }
    3874             : 
    3875           0 :         return py_wbint_LookupSid_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    3876             : }
    3877             : 
    3878           0 : static PyObject *py_wbint_LookupSid_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
    3879             : {
    3880           0 :         const struct ndr_interface_call *call = NULL;
    3881           0 :         struct wbint_LookupSid *object = (struct wbint_LookupSid *)pytalloc_get_ptr(py_obj);
    3882             :         PyObject *ret;
    3883             :         char *retstr;
    3884             : 
    3885           0 :         if (ndr_table_winbind.num_calls < 2) {
    3886           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupSid_ndr_print");
    3887           0 :                 return NULL;
    3888             :         }
    3889           0 :         call = &ndr_table_winbind.calls[1];
    3890             : 
    3891           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    3892           0 :         ret = PyUnicode_FromString(retstr);
    3893           0 :         TALLOC_FREE(retstr);
    3894             : 
    3895           0 :         return ret;
    3896             : }
    3897             : 
    3898           0 : static PyObject *py_wbint_LookupSid_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    3899             : {
    3900           0 :         return py_wbint_LookupSid_ndr_print(py_obj, "wbint_LookupSid_in", NDR_IN);
    3901             : }
    3902             : 
    3903           0 : static PyObject *py_wbint_LookupSid_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    3904             : {
    3905           0 :         return py_wbint_LookupSid_ndr_print(py_obj, "wbint_LookupSid_out", NDR_OUT);
    3906             : }
    3907             : 
    3908             : static PyMethodDef py_wbint_LookupSid_methods[] = {
    3909             :         { "opnum", (PyCFunction)py_wbint_LookupSid_ndr_opnum, METH_NOARGS|METH_CLASS,
    3910             :                 "winbind.wbint_LookupSid.opnum() -> 1 (0x01) " },
    3911             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupSid_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    3912             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    3913             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupSid_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    3914             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    3915             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupSid_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    3916             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    3917             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupSid_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    3918             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    3919             :         { "__ndr_print_in__", (PyCFunction)py_wbint_LookupSid_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    3920             :         { "__ndr_print_out__", (PyCFunction)py_wbint_LookupSid_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    3921             :         { NULL, NULL, 0, NULL }
    3922             : };
    3923             : 
    3924             : 
    3925             : static PyTypeObject wbint_LookupSid_Type = {
    3926             :         PyVarObject_HEAD_INIT(NULL, 0)
    3927             :         .tp_name = "winbind.wbint_LookupSid",
    3928             :         .tp_getset = py_wbint_LookupSid_getsetters,
    3929             :         .tp_methods = py_wbint_LookupSid_methods,
    3930             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3931             :         .tp_new = py_wbint_LookupSid_new,
    3932             : };
    3933             : 
    3934           0 : static bool pack_py_wbint_LookupSid_args_in(PyObject *args, PyObject *kwargs, struct wbint_LookupSid *r)
    3935             : {
    3936             :         PyObject *py_sid;
    3937           0 :         const char *kwnames[] = {
    3938             :                 "sid", NULL
    3939             :         };
    3940             : 
    3941           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:wbint_LookupSid", discard_const_p(char *, kwnames), &py_sid)) {
    3942           0 :                 return false;
    3943             :         }
    3944             : 
    3945           0 :         if (py_sid == NULL) {
    3946           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.sid");
    3947           0 :                 return false;
    3948             :         }
    3949           0 :         r->in.sid = talloc_ptrtype(r, r->in.sid);
    3950           0 :         if (r->in.sid == NULL) {
    3951           0 :                 PyErr_NoMemory();
    3952           0 :                 return false;
    3953             :         }
    3954           0 :         PY_CHECK_TYPE(dom_sid_Type, py_sid, return false;);
    3955           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_sid)) == NULL) {
    3956           0 :                 PyErr_NoMemory();
    3957           0 :                 return false;
    3958             :         }
    3959           0 :         r->in.sid = (struct dom_sid *)pytalloc_get_ptr(py_sid);
    3960           0 :         return true;
    3961             : }
    3962             : 
    3963           0 : static PyObject *unpack_py_wbint_LookupSid_args_out(struct wbint_LookupSid *r)
    3964             : {
    3965             :         PyObject *result;
    3966             :         PyObject *py_type;
    3967             :         PyObject *py_domain;
    3968             :         PyObject *py_name;
    3969           0 :         result = PyTuple_New(3);
    3970           0 :         py_type = PyLong_FromLong((uint16_t)*r->out.type);
    3971           0 :         PyTuple_SetItem(result, 0, py_type);
    3972           0 :         if (*r->out.domain == NULL) {
    3973           0 :                 py_domain = Py_None;
    3974           0 :                 Py_INCREF(py_domain);
    3975             :         } else {
    3976           0 :                 if (*r->out.domain == NULL) {
    3977           0 :                         py_domain = Py_None;
    3978           0 :                         Py_INCREF(py_domain);
    3979             :                 } else {
    3980           0 :                         py_domain = PyUnicode_Decode(*r->out.domain, strlen(*r->out.domain), "utf-8", "ignore");
    3981             :                 }
    3982             :         }
    3983           0 :         PyTuple_SetItem(result, 1, py_domain);
    3984           0 :         if (*r->out.name == NULL) {
    3985           0 :                 py_name = Py_None;
    3986           0 :                 Py_INCREF(py_name);
    3987             :         } else {
    3988           0 :                 if (*r->out.name == NULL) {
    3989           0 :                         py_name = Py_None;
    3990           0 :                         Py_INCREF(py_name);
    3991             :                 } else {
    3992           0 :                         py_name = PyUnicode_Decode(*r->out.name, strlen(*r->out.name), "utf-8", "ignore");
    3993             :                 }
    3994             :         }
    3995           0 :         PyTuple_SetItem(result, 2, py_name);
    3996           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    3997           0 :                 PyErr_SetNTSTATUS(r->out.result);
    3998           0 :                 return NULL;
    3999             :         }
    4000             : 
    4001           0 :         return result;
    4002             : }
    4003             : 
    4004             : 
    4005           0 : static PyObject *py_wbint_LookupSids_in_get_sids(PyObject *obj, void *closure)
    4006             : {
    4007           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(obj);
    4008             :         PyObject *py_sids;
    4009           0 :         if (object->in.sids == NULL) {
    4010           0 :                 Py_RETURN_NONE;
    4011             :         }
    4012           0 :         py_sids = pytalloc_reference_ex(lsa_SidArray_Type, object->in.sids, object->in.sids);
    4013           0 :         return py_sids;
    4014             : }
    4015             : 
    4016           0 : static int py_wbint_LookupSids_in_set_sids(PyObject *py_obj, PyObject *value, void *closure)
    4017             : {
    4018           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(py_obj);
    4019           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sids));
    4020           0 :         if (value == NULL) {
    4021           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.sids");
    4022           0 :                 return -1;
    4023             :         }
    4024           0 :         object->in.sids = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sids);
    4025           0 :         if (object->in.sids == NULL) {
    4026           0 :                 PyErr_NoMemory();
    4027           0 :                 return -1;
    4028             :         }
    4029           0 :         PY_CHECK_TYPE(lsa_SidArray_Type, value, return -1;);
    4030           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4031           0 :                 PyErr_NoMemory();
    4032           0 :                 return -1;
    4033             :         }
    4034           0 :         object->in.sids = (struct lsa_SidArray *)pytalloc_get_ptr(value);
    4035           0 :         return 0;
    4036             : }
    4037             : 
    4038           0 : static PyObject *py_wbint_LookupSids_out_get_domains(PyObject *obj, void *closure)
    4039             : {
    4040           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(obj);
    4041             :         PyObject *py_domains;
    4042           0 :         if (object->out.domains == NULL) {
    4043           0 :                 Py_RETURN_NONE;
    4044             :         }
    4045           0 :         py_domains = pytalloc_reference_ex(lsa_RefDomainList_Type, object->out.domains, object->out.domains);
    4046           0 :         return py_domains;
    4047             : }
    4048             : 
    4049           0 : static int py_wbint_LookupSids_out_set_domains(PyObject *py_obj, PyObject *value, void *closure)
    4050             : {
    4051           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(py_obj);
    4052           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.domains));
    4053           0 :         if (value == NULL) {
    4054           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.domains");
    4055           0 :                 return -1;
    4056             :         }
    4057           0 :         object->out.domains = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.domains);
    4058           0 :         if (object->out.domains == NULL) {
    4059           0 :                 PyErr_NoMemory();
    4060           0 :                 return -1;
    4061             :         }
    4062           0 :         PY_CHECK_TYPE(lsa_RefDomainList_Type, value, return -1;);
    4063           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4064           0 :                 PyErr_NoMemory();
    4065           0 :                 return -1;
    4066             :         }
    4067           0 :         object->out.domains = (struct lsa_RefDomainList *)pytalloc_get_ptr(value);
    4068           0 :         return 0;
    4069             : }
    4070             : 
    4071           0 : static PyObject *py_wbint_LookupSids_out_get_names(PyObject *obj, void *closure)
    4072             : {
    4073           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(obj);
    4074             :         PyObject *py_names;
    4075           0 :         if (object->out.names == NULL) {
    4076           0 :                 Py_RETURN_NONE;
    4077             :         }
    4078           0 :         py_names = pytalloc_reference_ex(lsa_TransNameArray_Type, object->out.names, object->out.names);
    4079           0 :         return py_names;
    4080             : }
    4081             : 
    4082           0 : static int py_wbint_LookupSids_out_set_names(PyObject *py_obj, PyObject *value, void *closure)
    4083             : {
    4084           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(py_obj);
    4085           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.names));
    4086           0 :         if (value == NULL) {
    4087           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.names");
    4088           0 :                 return -1;
    4089             :         }
    4090           0 :         object->out.names = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.names);
    4091           0 :         if (object->out.names == NULL) {
    4092           0 :                 PyErr_NoMemory();
    4093           0 :                 return -1;
    4094             :         }
    4095           0 :         PY_CHECK_TYPE(lsa_TransNameArray_Type, value, return -1;);
    4096           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4097           0 :                 PyErr_NoMemory();
    4098           0 :                 return -1;
    4099             :         }
    4100           0 :         object->out.names = (struct lsa_TransNameArray *)pytalloc_get_ptr(value);
    4101           0 :         return 0;
    4102             : }
    4103             : 
    4104           0 : static PyObject *py_wbint_LookupSids_get_result(PyObject *obj, void *closure)
    4105             : {
    4106           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(obj);
    4107             :         PyObject *py_result;
    4108           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    4109           0 :         return py_result;
    4110             : }
    4111             : 
    4112           0 : static int py_wbint_LookupSids_set_result(PyObject *py_obj, PyObject *value, void *closure)
    4113             : {
    4114           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(py_obj);
    4115           0 :         if (value == NULL) {
    4116           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    4117           0 :                 return -1;
    4118             :         }
    4119           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    4120           0 :         return 0;
    4121             : }
    4122             : 
    4123             : static PyGetSetDef py_wbint_LookupSids_getsetters[] = {
    4124             :         {
    4125             :                 .name = discard_const_p(char, "in_sids"),
    4126             :                 .get = py_wbint_LookupSids_in_get_sids,
    4127             :                 .set = py_wbint_LookupSids_in_set_sids,
    4128             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_SidArray")
    4129             :         },
    4130             :         {
    4131             :                 .name = discard_const_p(char, "out_domains"),
    4132             :                 .get = py_wbint_LookupSids_out_get_domains,
    4133             :                 .set = py_wbint_LookupSids_out_set_domains,
    4134             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_RefDomainList")
    4135             :         },
    4136             :         {
    4137             :                 .name = discard_const_p(char, "out_names"),
    4138             :                 .get = py_wbint_LookupSids_out_get_names,
    4139             :                 .set = py_wbint_LookupSids_out_set_names,
    4140             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_TransNameArray")
    4141             :         },
    4142             :         {
    4143             :                 .name = discard_const_p(char, "result"),
    4144             :                 .get = py_wbint_LookupSids_get_result,
    4145             :                 .set = py_wbint_LookupSids_set_result,
    4146             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    4147             :         },
    4148             :         { .name = NULL }
    4149             : };
    4150             : 
    4151           0 : static PyObject *py_wbint_LookupSids_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4152             : {
    4153           0 :         PyObject *self = pytalloc_new(struct wbint_LookupSids, type);
    4154           0 :         struct wbint_LookupSids *_self = (struct wbint_LookupSids *)pytalloc_get_ptr(self);
    4155           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    4156           0 :         _self->in.sids = talloc_zero(mem_ctx, struct lsa_SidArray);
    4157           0 :         _self->out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList);
    4158           0 :         _self->out.names = talloc_zero(mem_ctx, struct lsa_TransNameArray);
    4159           0 :         return self;
    4160             : }
    4161             : 
    4162           0 : static PyObject *py_wbint_LookupSids_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    4163             : {
    4164             : 
    4165             : 
    4166           0 :         return PyLong_FromLong(2);
    4167             : }
    4168             : 
    4169           0 : static PyObject *py_wbint_LookupSids_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
    4170             : {
    4171           0 :         const struct ndr_interface_call *call = NULL;
    4172           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(py_obj);
    4173           0 :         PyObject *ret = NULL;
    4174           0 :         struct ndr_push *push = NULL;
    4175             :         DATA_BLOB blob;
    4176             :         enum ndr_err_code err;
    4177             : 
    4178           0 :         if (ndr_table_winbind.num_calls < 3) {
    4179           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupSids_ndr_pack");
    4180           0 :                 return NULL;
    4181             :         }
    4182           0 :         call = &ndr_table_winbind.calls[2];
    4183             : 
    4184           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    4185           0 :         if (push == NULL) {
    4186           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4187           0 :                 return NULL;
    4188             :         }
    4189             : 
    4190           0 :         push->flags |= ndr_push_flags;
    4191             : 
    4192           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    4193           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4194           0 :                 TALLOC_FREE(push);
    4195           0 :                 PyErr_SetNdrError(err);
    4196           0 :                 return NULL;
    4197             :         }
    4198           0 :         blob = ndr_push_blob(push);
    4199           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4200           0 :         TALLOC_FREE(push);
    4201           0 :         return ret;
    4202             : }
    4203             : 
    4204           0 : static PyObject *py_wbint_LookupSids_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4205             : {
    4206           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    4207           0 :         PyObject *bigendian_obj = NULL;
    4208           0 :         PyObject *ndr64_obj = NULL;
    4209           0 :         uint32_t ndr_push_flags = 0;
    4210             : 
    4211           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    4212             :                 discard_const_p(char *, kwnames),
    4213             :                 &bigendian_obj,
    4214             :                 &ndr64_obj)) {
    4215           0 :                 return NULL;
    4216             :         }
    4217             : 
    4218           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    4219           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    4220             :         }
    4221           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    4222           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    4223             :         }
    4224             : 
    4225           0 :         return py_wbint_LookupSids_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    4226             : }
    4227             : 
    4228           0 : static PyObject *py_wbint_LookupSids_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4229             : {
    4230           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    4231           0 :         PyObject *bigendian_obj = NULL;
    4232           0 :         PyObject *ndr64_obj = NULL;
    4233           0 :         uint32_t ndr_push_flags = 0;
    4234             : 
    4235           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    4236             :                 discard_const_p(char *, kwnames),
    4237             :                 &bigendian_obj,
    4238             :                 &ndr64_obj)) {
    4239           0 :                 return NULL;
    4240             :         }
    4241             : 
    4242           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    4243           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    4244             :         }
    4245           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    4246           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    4247             :         }
    4248             : 
    4249           0 :         return py_wbint_LookupSids_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    4250             : }
    4251             : 
    4252           0 : static PyObject *py_wbint_LookupSids_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
    4253             : {
    4254           0 :         const struct ndr_interface_call *call = NULL;
    4255           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(py_obj);
    4256           0 :         struct ndr_pull *pull = NULL;
    4257             :         enum ndr_err_code err;
    4258             : 
    4259           0 :         if (ndr_table_winbind.num_calls < 3) {
    4260           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupSids_ndr_unpack");
    4261           0 :                 return NULL;
    4262             :         }
    4263           0 :         call = &ndr_table_winbind.calls[2];
    4264             : 
    4265           0 :         pull = ndr_pull_init_blob(blob, object);
    4266           0 :         if (pull == NULL) {
    4267           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4268           0 :                 return NULL;
    4269             :         }
    4270             : 
    4271           0 :         pull->flags |= ndr_pull_flags;
    4272             : 
    4273           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    4274           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4275           0 :                 TALLOC_FREE(pull);
    4276           0 :                 PyErr_SetNdrError(err);
    4277           0 :                 return NULL;
    4278             :         }
    4279           0 :         if (!allow_remaining) {
    4280             :                 uint32_t highest_ofs;
    4281             : 
    4282           0 :                 if (pull->offset > pull->relative_highest_offset) {
    4283           0 :                         highest_ofs = pull->offset;
    4284             :                 } else {
    4285           0 :                         highest_ofs = pull->relative_highest_offset;
    4286             :                 }
    4287           0 :                 if (highest_ofs < pull->data_size) {
    4288           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    4289             :                                 "not all bytes consumed ofs[%u] size[%u]",
    4290             :                                 highest_ofs, pull->data_size);
    4291           0 :                         TALLOC_FREE(pull);
    4292           0 :                         PyErr_SetNdrError(err);
    4293           0 :                         return NULL;
    4294             :                 }
    4295             :         }
    4296             : 
    4297           0 :         TALLOC_FREE(pull);
    4298           0 :         Py_RETURN_NONE;
    4299             : }
    4300             : 
    4301           0 : static PyObject *py_wbint_LookupSids_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4302             : {
    4303             :         DATA_BLOB blob;
    4304           0 :         Py_ssize_t blob_length = 0;
    4305           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    4306           0 :         PyObject *bigendian_obj = NULL;
    4307           0 :         PyObject *ndr64_obj = NULL;
    4308           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    4309           0 :         PyObject *allow_remaining_obj = NULL;
    4310           0 :         bool allow_remaining = false;
    4311             : 
    4312           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    4313             :                 discard_const_p(char *, kwnames),
    4314             :                 &blob.data, &blob_length,
    4315             :                 &bigendian_obj,
    4316             :                 &ndr64_obj,
    4317             :                 &allow_remaining_obj)) {
    4318           0 :                 return NULL;
    4319             :         }
    4320           0 :         blob.length = blob_length;
    4321             : 
    4322           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    4323           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    4324             :         }
    4325           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    4326           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    4327             :         }
    4328             : 
    4329           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4330           0 :                 allow_remaining = true;
    4331             :         }
    4332             : 
    4333           0 :         return py_wbint_LookupSids_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    4334             : }
    4335             : 
    4336           0 : static PyObject *py_wbint_LookupSids_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4337             : {
    4338             :         DATA_BLOB blob;
    4339           0 :         Py_ssize_t blob_length = 0;
    4340           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    4341           0 :         PyObject *bigendian_obj = NULL;
    4342           0 :         PyObject *ndr64_obj = NULL;
    4343           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    4344           0 :         PyObject *allow_remaining_obj = NULL;
    4345           0 :         bool allow_remaining = false;
    4346             : 
    4347           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    4348             :                 discard_const_p(char *, kwnames),
    4349             :                 &blob.data, &blob_length,
    4350             :                 &bigendian_obj,
    4351             :                 &ndr64_obj,
    4352             :                 &allow_remaining_obj)) {
    4353           0 :                 return NULL;
    4354             :         }
    4355           0 :         blob.length = blob_length;
    4356             : 
    4357           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    4358           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    4359             :         }
    4360           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    4361           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    4362             :         }
    4363             : 
    4364           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4365           0 :                 allow_remaining = true;
    4366             :         }
    4367             : 
    4368           0 :         return py_wbint_LookupSids_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    4369             : }
    4370             : 
    4371           0 : static PyObject *py_wbint_LookupSids_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
    4372             : {
    4373           0 :         const struct ndr_interface_call *call = NULL;
    4374           0 :         struct wbint_LookupSids *object = (struct wbint_LookupSids *)pytalloc_get_ptr(py_obj);
    4375             :         PyObject *ret;
    4376             :         char *retstr;
    4377             : 
    4378           0 :         if (ndr_table_winbind.num_calls < 3) {
    4379           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupSids_ndr_print");
    4380           0 :                 return NULL;
    4381             :         }
    4382           0 :         call = &ndr_table_winbind.calls[2];
    4383             : 
    4384           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    4385           0 :         ret = PyUnicode_FromString(retstr);
    4386           0 :         TALLOC_FREE(retstr);
    4387             : 
    4388           0 :         return ret;
    4389             : }
    4390             : 
    4391           0 : static PyObject *py_wbint_LookupSids_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4392             : {
    4393           0 :         return py_wbint_LookupSids_ndr_print(py_obj, "wbint_LookupSids_in", NDR_IN);
    4394             : }
    4395             : 
    4396           0 : static PyObject *py_wbint_LookupSids_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4397             : {
    4398           0 :         return py_wbint_LookupSids_ndr_print(py_obj, "wbint_LookupSids_out", NDR_OUT);
    4399             : }
    4400             : 
    4401             : static PyMethodDef py_wbint_LookupSids_methods[] = {
    4402             :         { "opnum", (PyCFunction)py_wbint_LookupSids_ndr_opnum, METH_NOARGS|METH_CLASS,
    4403             :                 "winbind.wbint_LookupSids.opnum() -> 2 (0x02) " },
    4404             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupSids_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    4405             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    4406             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupSids_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    4407             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    4408             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupSids_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    4409             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    4410             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupSids_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    4411             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    4412             :         { "__ndr_print_in__", (PyCFunction)py_wbint_LookupSids_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    4413             :         { "__ndr_print_out__", (PyCFunction)py_wbint_LookupSids_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    4414             :         { NULL, NULL, 0, NULL }
    4415             : };
    4416             : 
    4417             : 
    4418             : static PyTypeObject wbint_LookupSids_Type = {
    4419             :         PyVarObject_HEAD_INIT(NULL, 0)
    4420             :         .tp_name = "winbind.wbint_LookupSids",
    4421             :         .tp_getset = py_wbint_LookupSids_getsetters,
    4422             :         .tp_methods = py_wbint_LookupSids_methods,
    4423             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4424             :         .tp_new = py_wbint_LookupSids_new,
    4425             : };
    4426             : 
    4427           0 : static bool pack_py_wbint_LookupSids_args_in(PyObject *args, PyObject *kwargs, struct wbint_LookupSids *r)
    4428             : {
    4429             :         PyObject *py_sids;
    4430           0 :         const char *kwnames[] = {
    4431             :                 "sids", NULL
    4432             :         };
    4433             : 
    4434           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:wbint_LookupSids", discard_const_p(char *, kwnames), &py_sids)) {
    4435           0 :                 return false;
    4436             :         }
    4437             : 
    4438           0 :         if (py_sids == NULL) {
    4439           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.sids");
    4440           0 :                 return false;
    4441             :         }
    4442           0 :         r->in.sids = talloc_ptrtype(r, r->in.sids);
    4443           0 :         if (r->in.sids == NULL) {
    4444           0 :                 PyErr_NoMemory();
    4445           0 :                 return false;
    4446             :         }
    4447           0 :         PY_CHECK_TYPE(lsa_SidArray_Type, py_sids, return false;);
    4448           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_sids)) == NULL) {
    4449           0 :                 PyErr_NoMemory();
    4450           0 :                 return false;
    4451             :         }
    4452           0 :         r->in.sids = (struct lsa_SidArray *)pytalloc_get_ptr(py_sids);
    4453           0 :         return true;
    4454             : }
    4455             : 
    4456           0 : static PyObject *unpack_py_wbint_LookupSids_args_out(struct wbint_LookupSids *r)
    4457             : {
    4458             :         PyObject *result;
    4459             :         PyObject *py_domains;
    4460             :         PyObject *py_names;
    4461           0 :         result = PyTuple_New(2);
    4462           0 :         py_domains = pytalloc_reference_ex(lsa_RefDomainList_Type, r->out.domains, r->out.domains);
    4463           0 :         PyTuple_SetItem(result, 0, py_domains);
    4464           0 :         py_names = pytalloc_reference_ex(lsa_TransNameArray_Type, r->out.names, r->out.names);
    4465           0 :         PyTuple_SetItem(result, 1, py_names);
    4466           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    4467           0 :                 PyErr_SetNTSTATUS(r->out.result);
    4468           0 :                 return NULL;
    4469             :         }
    4470             : 
    4471           0 :         return result;
    4472             : }
    4473             : 
    4474             : 
    4475           0 : static PyObject *py_wbint_LookupName_in_get_domain(PyObject *obj, void *closure)
    4476             : {
    4477           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(obj);
    4478             :         PyObject *py_domain;
    4479           0 :         if (object->in.domain == NULL) {
    4480           0 :                 Py_RETURN_NONE;
    4481             :         }
    4482           0 :         if (object->in.domain == NULL) {
    4483           0 :                 py_domain = Py_None;
    4484           0 :                 Py_INCREF(py_domain);
    4485             :         } else {
    4486           0 :                 py_domain = PyUnicode_Decode(object->in.domain, strlen(object->in.domain), "utf-8", "ignore");
    4487             :         }
    4488           0 :         return py_domain;
    4489             : }
    4490             : 
    4491           0 : static int py_wbint_LookupName_in_set_domain(PyObject *py_obj, PyObject *value, void *closure)
    4492             : {
    4493           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(py_obj);
    4494           0 :         if (value == NULL) {
    4495           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain");
    4496           0 :                 return -1;
    4497             :         }
    4498           0 :         object->in.domain = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.domain);
    4499           0 :         if (object->in.domain == NULL) {
    4500           0 :                 PyErr_NoMemory();
    4501           0 :                 return -1;
    4502             :         }
    4503             :         {
    4504             :                 const char *test_str;
    4505             :                 const char *talloc_str;
    4506           0 :                 PyObject *unicode = NULL;
    4507           0 :                 if (PyUnicode_Check(value)) {
    4508           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    4509           0 :                         if (unicode == NULL) {
    4510           0 :                                 PyErr_NoMemory();
    4511           0 :                                 return -1;
    4512             :                         }
    4513           0 :                         test_str = PyBytes_AS_STRING(unicode);
    4514           0 :                 } else if (PyBytes_Check(value)) {
    4515           0 :                         test_str = PyBytes_AS_STRING(value);
    4516             :                 } else {
    4517           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    4518           0 :                         return -1;
    4519             :                 }
    4520           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    4521           0 :                 if (unicode != NULL) {
    4522           0 :                         Py_DECREF(unicode);
    4523             :                 }
    4524           0 :                 if (talloc_str == NULL) {
    4525           0 :                         PyErr_NoMemory();
    4526           0 :                         return -1;
    4527             :                 }
    4528           0 :                 object->in.domain = talloc_str;
    4529             :         }
    4530           0 :         return 0;
    4531             : }
    4532             : 
    4533           0 : static PyObject *py_wbint_LookupName_in_get_name(PyObject *obj, void *closure)
    4534             : {
    4535           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(obj);
    4536             :         PyObject *py_name;
    4537           0 :         if (object->in.name == NULL) {
    4538           0 :                 Py_RETURN_NONE;
    4539             :         }
    4540           0 :         if (object->in.name == NULL) {
    4541           0 :                 py_name = Py_None;
    4542           0 :                 Py_INCREF(py_name);
    4543             :         } else {
    4544           0 :                 py_name = PyUnicode_Decode(object->in.name, strlen(object->in.name), "utf-8", "ignore");
    4545             :         }
    4546           0 :         return py_name;
    4547             : }
    4548             : 
    4549           0 : static int py_wbint_LookupName_in_set_name(PyObject *py_obj, PyObject *value, void *closure)
    4550             : {
    4551           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(py_obj);
    4552           0 :         if (value == NULL) {
    4553           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.name");
    4554           0 :                 return -1;
    4555             :         }
    4556           0 :         object->in.name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.name);
    4557           0 :         if (object->in.name == NULL) {
    4558           0 :                 PyErr_NoMemory();
    4559           0 :                 return -1;
    4560             :         }
    4561             :         {
    4562             :                 const char *test_str;
    4563             :                 const char *talloc_str;
    4564           0 :                 PyObject *unicode = NULL;
    4565           0 :                 if (PyUnicode_Check(value)) {
    4566           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    4567           0 :                         if (unicode == NULL) {
    4568           0 :                                 PyErr_NoMemory();
    4569           0 :                                 return -1;
    4570             :                         }
    4571           0 :                         test_str = PyBytes_AS_STRING(unicode);
    4572           0 :                 } else if (PyBytes_Check(value)) {
    4573           0 :                         test_str = PyBytes_AS_STRING(value);
    4574             :                 } else {
    4575           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    4576           0 :                         return -1;
    4577             :                 }
    4578           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    4579           0 :                 if (unicode != NULL) {
    4580           0 :                         Py_DECREF(unicode);
    4581             :                 }
    4582           0 :                 if (talloc_str == NULL) {
    4583           0 :                         PyErr_NoMemory();
    4584           0 :                         return -1;
    4585             :                 }
    4586           0 :                 object->in.name = talloc_str;
    4587             :         }
    4588           0 :         return 0;
    4589             : }
    4590             : 
    4591           0 : static PyObject *py_wbint_LookupName_in_get_flags(PyObject *obj, void *closure)
    4592             : {
    4593           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(obj);
    4594             :         PyObject *py_flags;
    4595           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
    4596           0 :         return py_flags;
    4597             : }
    4598             : 
    4599           0 : static int py_wbint_LookupName_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
    4600             : {
    4601           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(py_obj);
    4602           0 :         if (value == NULL) {
    4603           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
    4604           0 :                 return -1;
    4605             :         }
    4606             :         {
    4607           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
    4608           0 :                 if (PyLong_Check(value)) {
    4609             :                         unsigned long long test_var;
    4610           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4611           0 :                         if (PyErr_Occurred() != NULL) {
    4612           0 :                                 return -1;
    4613             :                         }
    4614           0 :                         if (test_var > uint_max) {
    4615           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4616             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4617           0 :                                 return -1;
    4618             :                         }
    4619           0 :                         object->in.flags = test_var;
    4620             :                 } else {
    4621           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4622             :                           PyLong_Type.tp_name);
    4623           0 :                         return -1;
    4624             :                 }
    4625             :         }
    4626           0 :         return 0;
    4627             : }
    4628             : 
    4629           0 : static PyObject *py_wbint_LookupName_out_get_type(PyObject *obj, void *closure)
    4630             : {
    4631           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(obj);
    4632             :         PyObject *py_type;
    4633           0 :         if (object->out.type == NULL) {
    4634           0 :                 Py_RETURN_NONE;
    4635             :         }
    4636           0 :         py_type = PyLong_FromLong((uint16_t)*object->out.type);
    4637           0 :         return py_type;
    4638             : }
    4639             : 
    4640           0 : static int py_wbint_LookupName_out_set_type(PyObject *py_obj, PyObject *value, void *closure)
    4641             : {
    4642           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(py_obj);
    4643           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.type));
    4644           0 :         if (value == NULL) {
    4645           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.type");
    4646           0 :                 return -1;
    4647             :         }
    4648           0 :         object->out.type = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.type);
    4649           0 :         if (object->out.type == NULL) {
    4650           0 :                 PyErr_NoMemory();
    4651           0 :                 return -1;
    4652             :         }
    4653             :         {
    4654           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.type));
    4655           0 :                 if (PyLong_Check(value)) {
    4656             :                         unsigned long long test_var;
    4657           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4658           0 :                         if (PyErr_Occurred() != NULL) {
    4659           0 :                                 return -1;
    4660             :                         }
    4661           0 :                         if (test_var > uint_max) {
    4662           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4663             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4664           0 :                                 return -1;
    4665             :                         }
    4666           0 :                         *object->out.type = test_var;
    4667             :                 } else {
    4668           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4669             :                           PyLong_Type.tp_name);
    4670           0 :                         return -1;
    4671             :                 }
    4672             :         }
    4673           0 :         return 0;
    4674             : }
    4675             : 
    4676           0 : static PyObject *py_wbint_LookupName_out_get_sid(PyObject *obj, void *closure)
    4677             : {
    4678           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(obj);
    4679             :         PyObject *py_sid;
    4680           0 :         if (object->out.sid == NULL) {
    4681           0 :                 Py_RETURN_NONE;
    4682             :         }
    4683           0 :         py_sid = pytalloc_reference_ex(dom_sid_Type, object->out.sid, object->out.sid);
    4684           0 :         return py_sid;
    4685             : }
    4686             : 
    4687           0 : static int py_wbint_LookupName_out_set_sid(PyObject *py_obj, PyObject *value, void *closure)
    4688             : {
    4689           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(py_obj);
    4690           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sid));
    4691           0 :         if (value == NULL) {
    4692           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.sid");
    4693           0 :                 return -1;
    4694             :         }
    4695           0 :         object->out.sid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sid);
    4696           0 :         if (object->out.sid == NULL) {
    4697           0 :                 PyErr_NoMemory();
    4698           0 :                 return -1;
    4699             :         }
    4700           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    4701           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4702           0 :                 PyErr_NoMemory();
    4703           0 :                 return -1;
    4704             :         }
    4705           0 :         object->out.sid = (struct dom_sid *)pytalloc_get_ptr(value);
    4706           0 :         return 0;
    4707             : }
    4708             : 
    4709           0 : static PyObject *py_wbint_LookupName_get_result(PyObject *obj, void *closure)
    4710             : {
    4711           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(obj);
    4712             :         PyObject *py_result;
    4713           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    4714           0 :         return py_result;
    4715             : }
    4716             : 
    4717           0 : static int py_wbint_LookupName_set_result(PyObject *py_obj, PyObject *value, void *closure)
    4718             : {
    4719           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(py_obj);
    4720           0 :         if (value == NULL) {
    4721           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    4722           0 :                 return -1;
    4723             :         }
    4724           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    4725           0 :         return 0;
    4726             : }
    4727             : 
    4728             : static PyGetSetDef py_wbint_LookupName_getsetters[] = {
    4729             :         {
    4730             :                 .name = discard_const_p(char, "in_domain"),
    4731             :                 .get = py_wbint_LookupName_in_get_domain,
    4732             :                 .set = py_wbint_LookupName_in_set_domain,
    4733             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    4734             :         },
    4735             :         {
    4736             :                 .name = discard_const_p(char, "in_name"),
    4737             :                 .get = py_wbint_LookupName_in_get_name,
    4738             :                 .set = py_wbint_LookupName_in_set_name,
    4739             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    4740             :         },
    4741             :         {
    4742             :                 .name = discard_const_p(char, "in_flags"),
    4743             :                 .get = py_wbint_LookupName_in_get_flags,
    4744             :                 .set = py_wbint_LookupName_in_set_flags,
    4745             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4746             :         },
    4747             :         {
    4748             :                 .name = discard_const_p(char, "out_type"),
    4749             :                 .get = py_wbint_LookupName_out_get_type,
    4750             :                 .set = py_wbint_LookupName_out_set_type,
    4751             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_SidType")
    4752             :         },
    4753             :         {
    4754             :                 .name = discard_const_p(char, "out_sid"),
    4755             :                 .get = py_wbint_LookupName_out_get_sid,
    4756             :                 .set = py_wbint_LookupName_out_set_sid,
    4757             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
    4758             :         },
    4759             :         {
    4760             :                 .name = discard_const_p(char, "result"),
    4761             :                 .get = py_wbint_LookupName_get_result,
    4762             :                 .set = py_wbint_LookupName_set_result,
    4763             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    4764             :         },
    4765             :         { .name = NULL }
    4766             : };
    4767             : 
    4768           0 : static PyObject *py_wbint_LookupName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4769             : {
    4770           0 :         PyObject *self = pytalloc_new(struct wbint_LookupName, type);
    4771           0 :         struct wbint_LookupName *_self = (struct wbint_LookupName *)pytalloc_get_ptr(self);
    4772           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    4773           0 :         _self->out.type = talloc_zero(mem_ctx, enum lsa_SidType);
    4774           0 :         _self->out.sid = talloc_zero(mem_ctx, struct dom_sid);
    4775           0 :         return self;
    4776             : }
    4777             : 
    4778           0 : static PyObject *py_wbint_LookupName_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    4779             : {
    4780             : 
    4781             : 
    4782           0 :         return PyLong_FromLong(3);
    4783             : }
    4784             : 
    4785           0 : static PyObject *py_wbint_LookupName_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
    4786             : {
    4787           0 :         const struct ndr_interface_call *call = NULL;
    4788           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(py_obj);
    4789           0 :         PyObject *ret = NULL;
    4790           0 :         struct ndr_push *push = NULL;
    4791             :         DATA_BLOB blob;
    4792             :         enum ndr_err_code err;
    4793             : 
    4794           0 :         if (ndr_table_winbind.num_calls < 4) {
    4795           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupName_ndr_pack");
    4796           0 :                 return NULL;
    4797             :         }
    4798           0 :         call = &ndr_table_winbind.calls[3];
    4799             : 
    4800           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    4801           0 :         if (push == NULL) {
    4802           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4803           0 :                 return NULL;
    4804             :         }
    4805             : 
    4806           0 :         push->flags |= ndr_push_flags;
    4807             : 
    4808           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    4809           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4810           0 :                 TALLOC_FREE(push);
    4811           0 :                 PyErr_SetNdrError(err);
    4812           0 :                 return NULL;
    4813             :         }
    4814           0 :         blob = ndr_push_blob(push);
    4815           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4816           0 :         TALLOC_FREE(push);
    4817           0 :         return ret;
    4818             : }
    4819             : 
    4820           0 : static PyObject *py_wbint_LookupName_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4821             : {
    4822           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    4823           0 :         PyObject *bigendian_obj = NULL;
    4824           0 :         PyObject *ndr64_obj = NULL;
    4825           0 :         uint32_t ndr_push_flags = 0;
    4826             : 
    4827           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    4828             :                 discard_const_p(char *, kwnames),
    4829             :                 &bigendian_obj,
    4830             :                 &ndr64_obj)) {
    4831           0 :                 return NULL;
    4832             :         }
    4833             : 
    4834           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    4835           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    4836             :         }
    4837           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    4838           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    4839             :         }
    4840             : 
    4841           0 :         return py_wbint_LookupName_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    4842             : }
    4843             : 
    4844           0 : static PyObject *py_wbint_LookupName_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4845             : {
    4846           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    4847           0 :         PyObject *bigendian_obj = NULL;
    4848           0 :         PyObject *ndr64_obj = NULL;
    4849           0 :         uint32_t ndr_push_flags = 0;
    4850             : 
    4851           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    4852             :                 discard_const_p(char *, kwnames),
    4853             :                 &bigendian_obj,
    4854             :                 &ndr64_obj)) {
    4855           0 :                 return NULL;
    4856             :         }
    4857             : 
    4858           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    4859           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    4860             :         }
    4861           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    4862           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    4863             :         }
    4864             : 
    4865           0 :         return py_wbint_LookupName_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    4866             : }
    4867             : 
    4868           0 : static PyObject *py_wbint_LookupName_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
    4869             : {
    4870           0 :         const struct ndr_interface_call *call = NULL;
    4871           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(py_obj);
    4872           0 :         struct ndr_pull *pull = NULL;
    4873             :         enum ndr_err_code err;
    4874             : 
    4875           0 :         if (ndr_table_winbind.num_calls < 4) {
    4876           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupName_ndr_unpack");
    4877           0 :                 return NULL;
    4878             :         }
    4879           0 :         call = &ndr_table_winbind.calls[3];
    4880             : 
    4881           0 :         pull = ndr_pull_init_blob(blob, object);
    4882           0 :         if (pull == NULL) {
    4883           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4884           0 :                 return NULL;
    4885             :         }
    4886             : 
    4887           0 :         pull->flags |= ndr_pull_flags;
    4888             : 
    4889           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    4890           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4891           0 :                 TALLOC_FREE(pull);
    4892           0 :                 PyErr_SetNdrError(err);
    4893           0 :                 return NULL;
    4894             :         }
    4895           0 :         if (!allow_remaining) {
    4896             :                 uint32_t highest_ofs;
    4897             : 
    4898           0 :                 if (pull->offset > pull->relative_highest_offset) {
    4899           0 :                         highest_ofs = pull->offset;
    4900             :                 } else {
    4901           0 :                         highest_ofs = pull->relative_highest_offset;
    4902             :                 }
    4903           0 :                 if (highest_ofs < pull->data_size) {
    4904           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    4905             :                                 "not all bytes consumed ofs[%u] size[%u]",
    4906             :                                 highest_ofs, pull->data_size);
    4907           0 :                         TALLOC_FREE(pull);
    4908           0 :                         PyErr_SetNdrError(err);
    4909           0 :                         return NULL;
    4910             :                 }
    4911             :         }
    4912             : 
    4913           0 :         TALLOC_FREE(pull);
    4914           0 :         Py_RETURN_NONE;
    4915             : }
    4916             : 
    4917           0 : static PyObject *py_wbint_LookupName_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4918             : {
    4919             :         DATA_BLOB blob;
    4920           0 :         Py_ssize_t blob_length = 0;
    4921           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    4922           0 :         PyObject *bigendian_obj = NULL;
    4923           0 :         PyObject *ndr64_obj = NULL;
    4924           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    4925           0 :         PyObject *allow_remaining_obj = NULL;
    4926           0 :         bool allow_remaining = false;
    4927             : 
    4928           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    4929             :                 discard_const_p(char *, kwnames),
    4930             :                 &blob.data, &blob_length,
    4931             :                 &bigendian_obj,
    4932             :                 &ndr64_obj,
    4933             :                 &allow_remaining_obj)) {
    4934           0 :                 return NULL;
    4935             :         }
    4936           0 :         blob.length = blob_length;
    4937             : 
    4938           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    4939           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    4940             :         }
    4941           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    4942           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    4943             :         }
    4944             : 
    4945           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4946           0 :                 allow_remaining = true;
    4947             :         }
    4948             : 
    4949           0 :         return py_wbint_LookupName_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    4950             : }
    4951             : 
    4952           0 : static PyObject *py_wbint_LookupName_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4953             : {
    4954             :         DATA_BLOB blob;
    4955           0 :         Py_ssize_t blob_length = 0;
    4956           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    4957           0 :         PyObject *bigendian_obj = NULL;
    4958           0 :         PyObject *ndr64_obj = NULL;
    4959           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    4960           0 :         PyObject *allow_remaining_obj = NULL;
    4961           0 :         bool allow_remaining = false;
    4962             : 
    4963           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    4964             :                 discard_const_p(char *, kwnames),
    4965             :                 &blob.data, &blob_length,
    4966             :                 &bigendian_obj,
    4967             :                 &ndr64_obj,
    4968             :                 &allow_remaining_obj)) {
    4969           0 :                 return NULL;
    4970             :         }
    4971           0 :         blob.length = blob_length;
    4972             : 
    4973           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    4974           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    4975             :         }
    4976           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    4977           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    4978             :         }
    4979             : 
    4980           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4981           0 :                 allow_remaining = true;
    4982             :         }
    4983             : 
    4984           0 :         return py_wbint_LookupName_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    4985             : }
    4986             : 
    4987           0 : static PyObject *py_wbint_LookupName_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
    4988             : {
    4989           0 :         const struct ndr_interface_call *call = NULL;
    4990           0 :         struct wbint_LookupName *object = (struct wbint_LookupName *)pytalloc_get_ptr(py_obj);
    4991             :         PyObject *ret;
    4992             :         char *retstr;
    4993             : 
    4994           0 :         if (ndr_table_winbind.num_calls < 4) {
    4995           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupName_ndr_print");
    4996           0 :                 return NULL;
    4997             :         }
    4998           0 :         call = &ndr_table_winbind.calls[3];
    4999             : 
    5000           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    5001           0 :         ret = PyUnicode_FromString(retstr);
    5002           0 :         TALLOC_FREE(retstr);
    5003             : 
    5004           0 :         return ret;
    5005             : }
    5006             : 
    5007           0 : static PyObject *py_wbint_LookupName_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5008             : {
    5009           0 :         return py_wbint_LookupName_ndr_print(py_obj, "wbint_LookupName_in", NDR_IN);
    5010             : }
    5011             : 
    5012           0 : static PyObject *py_wbint_LookupName_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5013             : {
    5014           0 :         return py_wbint_LookupName_ndr_print(py_obj, "wbint_LookupName_out", NDR_OUT);
    5015             : }
    5016             : 
    5017             : static PyMethodDef py_wbint_LookupName_methods[] = {
    5018             :         { "opnum", (PyCFunction)py_wbint_LookupName_ndr_opnum, METH_NOARGS|METH_CLASS,
    5019             :                 "winbind.wbint_LookupName.opnum() -> 3 (0x03) " },
    5020             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupName_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    5021             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    5022             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupName_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    5023             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    5024             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupName_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    5025             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    5026             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupName_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    5027             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    5028             :         { "__ndr_print_in__", (PyCFunction)py_wbint_LookupName_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    5029             :         { "__ndr_print_out__", (PyCFunction)py_wbint_LookupName_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    5030             :         { NULL, NULL, 0, NULL }
    5031             : };
    5032             : 
    5033             : 
    5034             : static PyTypeObject wbint_LookupName_Type = {
    5035             :         PyVarObject_HEAD_INIT(NULL, 0)
    5036             :         .tp_name = "winbind.wbint_LookupName",
    5037             :         .tp_getset = py_wbint_LookupName_getsetters,
    5038             :         .tp_methods = py_wbint_LookupName_methods,
    5039             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5040             :         .tp_new = py_wbint_LookupName_new,
    5041             : };
    5042             : 
    5043           0 : static bool pack_py_wbint_LookupName_args_in(PyObject *args, PyObject *kwargs, struct wbint_LookupName *r)
    5044             : {
    5045             :         PyObject *py_domain;
    5046             :         PyObject *py_name;
    5047             :         PyObject *py_flags;
    5048           0 :         const char *kwnames[] = {
    5049             :                 "domain", "name", "flags", NULL
    5050             :         };
    5051             : 
    5052           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:wbint_LookupName", discard_const_p(char *, kwnames), &py_domain, &py_name, &py_flags)) {
    5053           0 :                 return false;
    5054             :         }
    5055             : 
    5056           0 :         if (py_domain == NULL) {
    5057           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain");
    5058           0 :                 return false;
    5059             :         }
    5060           0 :         r->in.domain = talloc_ptrtype(r, r->in.domain);
    5061           0 :         if (r->in.domain == NULL) {
    5062           0 :                 PyErr_NoMemory();
    5063           0 :                 return false;
    5064             :         }
    5065             :         {
    5066             :                 const char *test_str;
    5067             :                 const char *talloc_str;
    5068           0 :                 PyObject *unicode = NULL;
    5069           0 :                 if (PyUnicode_Check(py_domain)) {
    5070           0 :                         unicode = PyUnicode_AsEncodedString(py_domain, "utf-8", "ignore");
    5071           0 :                         if (unicode == NULL) {
    5072           0 :                                 PyErr_NoMemory();
    5073           0 :                                 return false;
    5074             :                         }
    5075           0 :                         test_str = PyBytes_AS_STRING(unicode);
    5076           0 :                 } else if (PyBytes_Check(py_domain)) {
    5077           0 :                         test_str = PyBytes_AS_STRING(py_domain);
    5078             :                 } else {
    5079           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain)->tp_name);
    5080           0 :                         return false;
    5081             :                 }
    5082           0 :                 talloc_str = talloc_strdup(r, test_str);
    5083           0 :                 if (unicode != NULL) {
    5084           0 :                         Py_DECREF(unicode);
    5085             :                 }
    5086           0 :                 if (talloc_str == NULL) {
    5087           0 :                         PyErr_NoMemory();
    5088           0 :                         return false;
    5089             :                 }
    5090           0 :                 r->in.domain = talloc_str;
    5091             :         }
    5092           0 :         if (py_name == NULL) {
    5093           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.name");
    5094           0 :                 return false;
    5095             :         }
    5096           0 :         r->in.name = talloc_ptrtype(r, r->in.name);
    5097           0 :         if (r->in.name == NULL) {
    5098           0 :                 PyErr_NoMemory();
    5099           0 :                 return false;
    5100             :         }
    5101             :         {
    5102             :                 const char *test_str;
    5103             :                 const char *talloc_str;
    5104           0 :                 PyObject *unicode = NULL;
    5105           0 :                 if (PyUnicode_Check(py_name)) {
    5106           0 :                         unicode = PyUnicode_AsEncodedString(py_name, "utf-8", "ignore");
    5107           0 :                         if (unicode == NULL) {
    5108           0 :                                 PyErr_NoMemory();
    5109           0 :                                 return false;
    5110             :                         }
    5111           0 :                         test_str = PyBytes_AS_STRING(unicode);
    5112           0 :                 } else if (PyBytes_Check(py_name)) {
    5113           0 :                         test_str = PyBytes_AS_STRING(py_name);
    5114             :                 } else {
    5115           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_name)->tp_name);
    5116           0 :                         return false;
    5117             :                 }
    5118           0 :                 talloc_str = talloc_strdup(r, test_str);
    5119           0 :                 if (unicode != NULL) {
    5120           0 :                         Py_DECREF(unicode);
    5121             :                 }
    5122           0 :                 if (talloc_str == NULL) {
    5123           0 :                         PyErr_NoMemory();
    5124           0 :                         return false;
    5125             :                 }
    5126           0 :                 r->in.name = talloc_str;
    5127             :         }
    5128           0 :         if (py_flags == NULL) {
    5129           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
    5130           0 :                 return false;
    5131             :         }
    5132             :         {
    5133           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
    5134           0 :                 if (PyLong_Check(py_flags)) {
    5135             :                         unsigned long long test_var;
    5136           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
    5137           0 :                         if (PyErr_Occurred() != NULL) {
    5138           0 :                                 return false;
    5139             :                         }
    5140           0 :                         if (test_var > uint_max) {
    5141           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5142             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5143           0 :                                 return false;
    5144             :                         }
    5145           0 :                         r->in.flags = test_var;
    5146             :                 } else {
    5147           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5148             :                           PyLong_Type.tp_name);
    5149           0 :                         return false;
    5150             :                 }
    5151             :         }
    5152           0 :         return true;
    5153             : }
    5154             : 
    5155           0 : static PyObject *unpack_py_wbint_LookupName_args_out(struct wbint_LookupName *r)
    5156             : {
    5157             :         PyObject *result;
    5158             :         PyObject *py_type;
    5159             :         PyObject *py_sid;
    5160           0 :         result = PyTuple_New(2);
    5161           0 :         py_type = PyLong_FromLong((uint16_t)*r->out.type);
    5162           0 :         PyTuple_SetItem(result, 0, py_type);
    5163           0 :         py_sid = pytalloc_reference_ex(dom_sid_Type, r->out.sid, r->out.sid);
    5164           0 :         PyTuple_SetItem(result, 1, py_sid);
    5165           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    5166           0 :                 PyErr_SetNTSTATUS(r->out.result);
    5167           0 :                 return NULL;
    5168             :         }
    5169             : 
    5170           0 :         return result;
    5171             : }
    5172             : 
    5173             : 
    5174           0 : static PyObject *py_wbint_Sids2UnixIDs_in_get_domains(PyObject *obj, void *closure)
    5175             : {
    5176           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(obj);
    5177             :         PyObject *py_domains;
    5178           0 :         if (object->in.domains == NULL) {
    5179           0 :                 Py_RETURN_NONE;
    5180             :         }
    5181           0 :         py_domains = pytalloc_reference_ex(lsa_RefDomainList_Type, object->in.domains, object->in.domains);
    5182           0 :         return py_domains;
    5183             : }
    5184             : 
    5185           0 : static int py_wbint_Sids2UnixIDs_in_set_domains(PyObject *py_obj, PyObject *value, void *closure)
    5186             : {
    5187           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(py_obj);
    5188           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domains));
    5189           0 :         if (value == NULL) {
    5190           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domains");
    5191           0 :                 return -1;
    5192             :         }
    5193           0 :         object->in.domains = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.domains);
    5194           0 :         if (object->in.domains == NULL) {
    5195           0 :                 PyErr_NoMemory();
    5196           0 :                 return -1;
    5197             :         }
    5198           0 :         PY_CHECK_TYPE(lsa_RefDomainList_Type, value, return -1;);
    5199           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5200           0 :                 PyErr_NoMemory();
    5201           0 :                 return -1;
    5202             :         }
    5203           0 :         object->in.domains = (struct lsa_RefDomainList *)pytalloc_get_ptr(value);
    5204           0 :         return 0;
    5205             : }
    5206             : 
    5207           0 : static PyObject *py_wbint_Sids2UnixIDs_in_get_ids(PyObject *obj, void *closure)
    5208             : {
    5209           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(obj);
    5210             :         PyObject *py_ids;
    5211           0 :         if (object->in.ids == NULL) {
    5212           0 :                 Py_RETURN_NONE;
    5213             :         }
    5214           0 :         py_ids = pytalloc_reference_ex(&wbint_TransIDArray_Type, object->in.ids, object->in.ids);
    5215           0 :         return py_ids;
    5216             : }
    5217             : 
    5218           0 : static int py_wbint_Sids2UnixIDs_in_set_ids(PyObject *py_obj, PyObject *value, void *closure)
    5219             : {
    5220           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(py_obj);
    5221           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.ids));
    5222           0 :         if (value == NULL) {
    5223           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.ids");
    5224           0 :                 return -1;
    5225             :         }
    5226           0 :         object->in.ids = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.ids);
    5227           0 :         if (object->in.ids == NULL) {
    5228           0 :                 PyErr_NoMemory();
    5229           0 :                 return -1;
    5230             :         }
    5231           0 :         PY_CHECK_TYPE(&wbint_TransIDArray_Type, value, return -1;);
    5232           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5233           0 :                 PyErr_NoMemory();
    5234           0 :                 return -1;
    5235             :         }
    5236           0 :         object->in.ids = (struct wbint_TransIDArray *)pytalloc_get_ptr(value);
    5237           0 :         return 0;
    5238             : }
    5239             : 
    5240           0 : static PyObject *py_wbint_Sids2UnixIDs_out_get_ids(PyObject *obj, void *closure)
    5241             : {
    5242           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(obj);
    5243             :         PyObject *py_ids;
    5244           0 :         if (object->out.ids == NULL) {
    5245           0 :                 Py_RETURN_NONE;
    5246             :         }
    5247           0 :         py_ids = pytalloc_reference_ex(&wbint_TransIDArray_Type, object->out.ids, object->out.ids);
    5248           0 :         return py_ids;
    5249             : }
    5250             : 
    5251           0 : static int py_wbint_Sids2UnixIDs_out_set_ids(PyObject *py_obj, PyObject *value, void *closure)
    5252             : {
    5253           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(py_obj);
    5254           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ids));
    5255           0 :         if (value == NULL) {
    5256           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ids");
    5257           0 :                 return -1;
    5258             :         }
    5259           0 :         object->out.ids = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ids);
    5260           0 :         if (object->out.ids == NULL) {
    5261           0 :                 PyErr_NoMemory();
    5262           0 :                 return -1;
    5263             :         }
    5264           0 :         PY_CHECK_TYPE(&wbint_TransIDArray_Type, value, return -1;);
    5265           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5266           0 :                 PyErr_NoMemory();
    5267           0 :                 return -1;
    5268             :         }
    5269           0 :         object->out.ids = (struct wbint_TransIDArray *)pytalloc_get_ptr(value);
    5270           0 :         return 0;
    5271             : }
    5272             : 
    5273           0 : static PyObject *py_wbint_Sids2UnixIDs_get_result(PyObject *obj, void *closure)
    5274             : {
    5275           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(obj);
    5276             :         PyObject *py_result;
    5277           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    5278           0 :         return py_result;
    5279             : }
    5280             : 
    5281           0 : static int py_wbint_Sids2UnixIDs_set_result(PyObject *py_obj, PyObject *value, void *closure)
    5282             : {
    5283           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(py_obj);
    5284           0 :         if (value == NULL) {
    5285           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    5286           0 :                 return -1;
    5287             :         }
    5288           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    5289           0 :         return 0;
    5290             : }
    5291             : 
    5292             : static PyGetSetDef py_wbint_Sids2UnixIDs_getsetters[] = {
    5293             :         {
    5294             :                 .name = discard_const_p(char, "in_domains"),
    5295             :                 .get = py_wbint_Sids2UnixIDs_in_get_domains,
    5296             :                 .set = py_wbint_Sids2UnixIDs_in_set_domains,
    5297             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_RefDomainList")
    5298             :         },
    5299             :         {
    5300             :                 .name = discard_const_p(char, "in_ids"),
    5301             :                 .get = py_wbint_Sids2UnixIDs_in_get_ids,
    5302             :                 .set = py_wbint_Sids2UnixIDs_in_set_ids,
    5303             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_TransIDArray")
    5304             :         },
    5305             :         {
    5306             :                 .name = discard_const_p(char, "out_ids"),
    5307             :                 .get = py_wbint_Sids2UnixIDs_out_get_ids,
    5308             :                 .set = py_wbint_Sids2UnixIDs_out_set_ids,
    5309             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_TransIDArray")
    5310             :         },
    5311             :         {
    5312             :                 .name = discard_const_p(char, "result"),
    5313             :                 .get = py_wbint_Sids2UnixIDs_get_result,
    5314             :                 .set = py_wbint_Sids2UnixIDs_set_result,
    5315             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    5316             :         },
    5317             :         { .name = NULL }
    5318             : };
    5319             : 
    5320           0 : static PyObject *py_wbint_Sids2UnixIDs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5321             : {
    5322           0 :         PyObject *self = pytalloc_new(struct wbint_Sids2UnixIDs, type);
    5323           0 :         struct wbint_Sids2UnixIDs *_self = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(self);
    5324           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    5325           0 :         _self->in.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList);
    5326           0 :         _self->in.ids = talloc_zero(mem_ctx, struct wbint_TransIDArray);
    5327           0 :         _self->out.ids = talloc_zero(mem_ctx, struct wbint_TransIDArray);
    5328           0 :         return self;
    5329             : }
    5330             : 
    5331           0 : static PyObject *py_wbint_Sids2UnixIDs_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    5332             : {
    5333             : 
    5334             : 
    5335           0 :         return PyLong_FromLong(4);
    5336             : }
    5337             : 
    5338           0 : static PyObject *py_wbint_Sids2UnixIDs_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
    5339             : {
    5340           0 :         const struct ndr_interface_call *call = NULL;
    5341           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(py_obj);
    5342           0 :         PyObject *ret = NULL;
    5343           0 :         struct ndr_push *push = NULL;
    5344             :         DATA_BLOB blob;
    5345             :         enum ndr_err_code err;
    5346             : 
    5347           0 :         if (ndr_table_winbind.num_calls < 5) {
    5348           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_Sids2UnixIDs_ndr_pack");
    5349           0 :                 return NULL;
    5350             :         }
    5351           0 :         call = &ndr_table_winbind.calls[4];
    5352             : 
    5353           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    5354           0 :         if (push == NULL) {
    5355           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    5356           0 :                 return NULL;
    5357             :         }
    5358             : 
    5359           0 :         push->flags |= ndr_push_flags;
    5360             : 
    5361           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    5362           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5363           0 :                 TALLOC_FREE(push);
    5364           0 :                 PyErr_SetNdrError(err);
    5365           0 :                 return NULL;
    5366             :         }
    5367           0 :         blob = ndr_push_blob(push);
    5368           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    5369           0 :         TALLOC_FREE(push);
    5370           0 :         return ret;
    5371             : }
    5372             : 
    5373           0 : static PyObject *py_wbint_Sids2UnixIDs_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5374             : {
    5375           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    5376           0 :         PyObject *bigendian_obj = NULL;
    5377           0 :         PyObject *ndr64_obj = NULL;
    5378           0 :         uint32_t ndr_push_flags = 0;
    5379             : 
    5380           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    5381             :                 discard_const_p(char *, kwnames),
    5382             :                 &bigendian_obj,
    5383             :                 &ndr64_obj)) {
    5384           0 :                 return NULL;
    5385             :         }
    5386             : 
    5387           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    5388           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    5389             :         }
    5390           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    5391           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    5392             :         }
    5393             : 
    5394           0 :         return py_wbint_Sids2UnixIDs_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    5395             : }
    5396             : 
    5397           0 : static PyObject *py_wbint_Sids2UnixIDs_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5398             : {
    5399           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    5400           0 :         PyObject *bigendian_obj = NULL;
    5401           0 :         PyObject *ndr64_obj = NULL;
    5402           0 :         uint32_t ndr_push_flags = 0;
    5403             : 
    5404           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    5405             :                 discard_const_p(char *, kwnames),
    5406             :                 &bigendian_obj,
    5407             :                 &ndr64_obj)) {
    5408           0 :                 return NULL;
    5409             :         }
    5410             : 
    5411           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    5412           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    5413             :         }
    5414           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    5415           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    5416             :         }
    5417             : 
    5418           0 :         return py_wbint_Sids2UnixIDs_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    5419             : }
    5420             : 
    5421           0 : static PyObject *py_wbint_Sids2UnixIDs_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
    5422             : {
    5423           0 :         const struct ndr_interface_call *call = NULL;
    5424           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(py_obj);
    5425           0 :         struct ndr_pull *pull = NULL;
    5426             :         enum ndr_err_code err;
    5427             : 
    5428           0 :         if (ndr_table_winbind.num_calls < 5) {
    5429           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_Sids2UnixIDs_ndr_unpack");
    5430           0 :                 return NULL;
    5431             :         }
    5432           0 :         call = &ndr_table_winbind.calls[4];
    5433             : 
    5434           0 :         pull = ndr_pull_init_blob(blob, object);
    5435           0 :         if (pull == NULL) {
    5436           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    5437           0 :                 return NULL;
    5438             :         }
    5439             : 
    5440           0 :         pull->flags |= ndr_pull_flags;
    5441             : 
    5442           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    5443           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5444           0 :                 TALLOC_FREE(pull);
    5445           0 :                 PyErr_SetNdrError(err);
    5446           0 :                 return NULL;
    5447             :         }
    5448           0 :         if (!allow_remaining) {
    5449             :                 uint32_t highest_ofs;
    5450             : 
    5451           0 :                 if (pull->offset > pull->relative_highest_offset) {
    5452           0 :                         highest_ofs = pull->offset;
    5453             :                 } else {
    5454           0 :                         highest_ofs = pull->relative_highest_offset;
    5455             :                 }
    5456           0 :                 if (highest_ofs < pull->data_size) {
    5457           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    5458             :                                 "not all bytes consumed ofs[%u] size[%u]",
    5459             :                                 highest_ofs, pull->data_size);
    5460           0 :                         TALLOC_FREE(pull);
    5461           0 :                         PyErr_SetNdrError(err);
    5462           0 :                         return NULL;
    5463             :                 }
    5464             :         }
    5465             : 
    5466           0 :         TALLOC_FREE(pull);
    5467           0 :         Py_RETURN_NONE;
    5468             : }
    5469             : 
    5470           0 : static PyObject *py_wbint_Sids2UnixIDs_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5471             : {
    5472             :         DATA_BLOB blob;
    5473           0 :         Py_ssize_t blob_length = 0;
    5474           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    5475           0 :         PyObject *bigendian_obj = NULL;
    5476           0 :         PyObject *ndr64_obj = NULL;
    5477           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    5478           0 :         PyObject *allow_remaining_obj = NULL;
    5479           0 :         bool allow_remaining = false;
    5480             : 
    5481           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    5482             :                 discard_const_p(char *, kwnames),
    5483             :                 &blob.data, &blob_length,
    5484             :                 &bigendian_obj,
    5485             :                 &ndr64_obj,
    5486             :                 &allow_remaining_obj)) {
    5487           0 :                 return NULL;
    5488             :         }
    5489           0 :         blob.length = blob_length;
    5490             : 
    5491           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    5492           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    5493             :         }
    5494           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    5495           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    5496             :         }
    5497             : 
    5498           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    5499           0 :                 allow_remaining = true;
    5500             :         }
    5501             : 
    5502           0 :         return py_wbint_Sids2UnixIDs_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    5503             : }
    5504             : 
    5505           0 : static PyObject *py_wbint_Sids2UnixIDs_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5506             : {
    5507             :         DATA_BLOB blob;
    5508           0 :         Py_ssize_t blob_length = 0;
    5509           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    5510           0 :         PyObject *bigendian_obj = NULL;
    5511           0 :         PyObject *ndr64_obj = NULL;
    5512           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    5513           0 :         PyObject *allow_remaining_obj = NULL;
    5514           0 :         bool allow_remaining = false;
    5515             : 
    5516           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    5517             :                 discard_const_p(char *, kwnames),
    5518             :                 &blob.data, &blob_length,
    5519             :                 &bigendian_obj,
    5520             :                 &ndr64_obj,
    5521             :                 &allow_remaining_obj)) {
    5522           0 :                 return NULL;
    5523             :         }
    5524           0 :         blob.length = blob_length;
    5525             : 
    5526           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    5527           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    5528             :         }
    5529           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    5530           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    5531             :         }
    5532             : 
    5533           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    5534           0 :                 allow_remaining = true;
    5535             :         }
    5536             : 
    5537           0 :         return py_wbint_Sids2UnixIDs_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    5538             : }
    5539             : 
    5540           0 : static PyObject *py_wbint_Sids2UnixIDs_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
    5541             : {
    5542           0 :         const struct ndr_interface_call *call = NULL;
    5543           0 :         struct wbint_Sids2UnixIDs *object = (struct wbint_Sids2UnixIDs *)pytalloc_get_ptr(py_obj);
    5544             :         PyObject *ret;
    5545             :         char *retstr;
    5546             : 
    5547           0 :         if (ndr_table_winbind.num_calls < 5) {
    5548           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_Sids2UnixIDs_ndr_print");
    5549           0 :                 return NULL;
    5550             :         }
    5551           0 :         call = &ndr_table_winbind.calls[4];
    5552             : 
    5553           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    5554           0 :         ret = PyUnicode_FromString(retstr);
    5555           0 :         TALLOC_FREE(retstr);
    5556             : 
    5557           0 :         return ret;
    5558             : }
    5559             : 
    5560           0 : static PyObject *py_wbint_Sids2UnixIDs_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5561             : {
    5562           0 :         return py_wbint_Sids2UnixIDs_ndr_print(py_obj, "wbint_Sids2UnixIDs_in", NDR_IN);
    5563             : }
    5564             : 
    5565           0 : static PyObject *py_wbint_Sids2UnixIDs_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5566             : {
    5567           0 :         return py_wbint_Sids2UnixIDs_ndr_print(py_obj, "wbint_Sids2UnixIDs_out", NDR_OUT);
    5568             : }
    5569             : 
    5570             : static PyMethodDef py_wbint_Sids2UnixIDs_methods[] = {
    5571             :         { "opnum", (PyCFunction)py_wbint_Sids2UnixIDs_ndr_opnum, METH_NOARGS|METH_CLASS,
    5572             :                 "winbind.wbint_Sids2UnixIDs.opnum() -> 4 (0x04) " },
    5573             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_Sids2UnixIDs_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    5574             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    5575             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_Sids2UnixIDs_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    5576             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    5577             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_Sids2UnixIDs_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    5578             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    5579             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_Sids2UnixIDs_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    5580             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    5581             :         { "__ndr_print_in__", (PyCFunction)py_wbint_Sids2UnixIDs_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    5582             :         { "__ndr_print_out__", (PyCFunction)py_wbint_Sids2UnixIDs_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    5583             :         { NULL, NULL, 0, NULL }
    5584             : };
    5585             : 
    5586             : 
    5587             : static PyTypeObject wbint_Sids2UnixIDs_Type = {
    5588             :         PyVarObject_HEAD_INIT(NULL, 0)
    5589             :         .tp_name = "winbind.wbint_Sids2UnixIDs",
    5590             :         .tp_getset = py_wbint_Sids2UnixIDs_getsetters,
    5591             :         .tp_methods = py_wbint_Sids2UnixIDs_methods,
    5592             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5593             :         .tp_new = py_wbint_Sids2UnixIDs_new,
    5594             : };
    5595             : 
    5596           0 : static bool pack_py_wbint_Sids2UnixIDs_args_in(PyObject *args, PyObject *kwargs, struct wbint_Sids2UnixIDs *r)
    5597             : {
    5598             :         PyObject *py_domains;
    5599             :         PyObject *py_ids;
    5600           0 :         const char *kwnames[] = {
    5601             :                 "domains", "ids", NULL
    5602             :         };
    5603             : 
    5604           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:wbint_Sids2UnixIDs", discard_const_p(char *, kwnames), &py_domains, &py_ids)) {
    5605           0 :                 return false;
    5606             :         }
    5607             : 
    5608           0 :         if (py_domains == NULL) {
    5609           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domains");
    5610           0 :                 return false;
    5611             :         }
    5612           0 :         r->in.domains = talloc_ptrtype(r, r->in.domains);
    5613           0 :         if (r->in.domains == NULL) {
    5614           0 :                 PyErr_NoMemory();
    5615           0 :                 return false;
    5616             :         }
    5617           0 :         PY_CHECK_TYPE(lsa_RefDomainList_Type, py_domains, return false;);
    5618           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_domains)) == NULL) {
    5619           0 :                 PyErr_NoMemory();
    5620           0 :                 return false;
    5621             :         }
    5622           0 :         r->in.domains = (struct lsa_RefDomainList *)pytalloc_get_ptr(py_domains);
    5623           0 :         if (py_ids == NULL) {
    5624           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.ids");
    5625           0 :                 return false;
    5626             :         }
    5627           0 :         r->in.ids = talloc_ptrtype(r, r->in.ids);
    5628           0 :         if (r->in.ids == NULL) {
    5629           0 :                 PyErr_NoMemory();
    5630           0 :                 return false;
    5631             :         }
    5632           0 :         PY_CHECK_TYPE(&wbint_TransIDArray_Type, py_ids, return false;);
    5633           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_ids)) == NULL) {
    5634           0 :                 PyErr_NoMemory();
    5635           0 :                 return false;
    5636             :         }
    5637           0 :         r->in.ids = (struct wbint_TransIDArray *)pytalloc_get_ptr(py_ids);
    5638           0 :         return true;
    5639             : }
    5640             : 
    5641           0 : static PyObject *unpack_py_wbint_Sids2UnixIDs_args_out(struct wbint_Sids2UnixIDs *r)
    5642             : {
    5643             :         PyObject *result;
    5644             :         PyObject *py_ids;
    5645           0 :         py_ids = pytalloc_reference_ex(&wbint_TransIDArray_Type, r->out.ids, r->out.ids);
    5646           0 :         result = py_ids;
    5647           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    5648           0 :                 PyErr_SetNTSTATUS(r->out.result);
    5649           0 :                 return NULL;
    5650             :         }
    5651             : 
    5652           0 :         return result;
    5653             : }
    5654             : 
    5655             : 
    5656           0 : static PyObject *py_wbint_UnixIDs2Sids_in_get_domain_name(PyObject *obj, void *closure)
    5657             : {
    5658           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(obj);
    5659             :         PyObject *py_domain_name;
    5660           0 :         if (object->in.domain_name == NULL) {
    5661           0 :                 Py_RETURN_NONE;
    5662             :         }
    5663           0 :         if (object->in.domain_name == NULL) {
    5664           0 :                 py_domain_name = Py_None;
    5665           0 :                 Py_INCREF(py_domain_name);
    5666             :         } else {
    5667           0 :                 py_domain_name = PyUnicode_Decode(object->in.domain_name, strlen(object->in.domain_name), "utf-8", "ignore");
    5668             :         }
    5669           0 :         return py_domain_name;
    5670             : }
    5671             : 
    5672           0 : static int py_wbint_UnixIDs2Sids_in_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
    5673             : {
    5674           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(py_obj);
    5675           0 :         if (value == NULL) {
    5676           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_name");
    5677           0 :                 return -1;
    5678             :         }
    5679           0 :         object->in.domain_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.domain_name);
    5680           0 :         if (object->in.domain_name == NULL) {
    5681           0 :                 PyErr_NoMemory();
    5682           0 :                 return -1;
    5683             :         }
    5684             :         {
    5685             :                 const char *test_str;
    5686             :                 const char *talloc_str;
    5687           0 :                 PyObject *unicode = NULL;
    5688           0 :                 if (PyUnicode_Check(value)) {
    5689           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    5690           0 :                         if (unicode == NULL) {
    5691           0 :                                 PyErr_NoMemory();
    5692           0 :                                 return -1;
    5693             :                         }
    5694           0 :                         test_str = PyBytes_AS_STRING(unicode);
    5695           0 :                 } else if (PyBytes_Check(value)) {
    5696           0 :                         test_str = PyBytes_AS_STRING(value);
    5697             :                 } else {
    5698           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    5699           0 :                         return -1;
    5700             :                 }
    5701           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    5702           0 :                 if (unicode != NULL) {
    5703           0 :                         Py_DECREF(unicode);
    5704             :                 }
    5705           0 :                 if (talloc_str == NULL) {
    5706           0 :                         PyErr_NoMemory();
    5707           0 :                         return -1;
    5708             :                 }
    5709           0 :                 object->in.domain_name = talloc_str;
    5710             :         }
    5711           0 :         return 0;
    5712             : }
    5713             : 
    5714           0 : static PyObject *py_wbint_UnixIDs2Sids_in_get_domain_sid(PyObject *obj, void *closure)
    5715             : {
    5716           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(obj);
    5717             :         PyObject *py_domain_sid;
    5718           0 :         py_domain_sid = pytalloc_reference_ex(dom_sid_Type, pytalloc_get_mem_ctx(obj), &object->in.domain_sid);
    5719           0 :         return py_domain_sid;
    5720             : }
    5721             : 
    5722           0 : static int py_wbint_UnixIDs2Sids_in_set_domain_sid(PyObject *py_obj, PyObject *value, void *closure)
    5723             : {
    5724           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(py_obj);
    5725           0 :         if (value == NULL) {
    5726           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_sid");
    5727           0 :                 return -1;
    5728             :         }
    5729           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    5730           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5731           0 :                 PyErr_NoMemory();
    5732           0 :                 return -1;
    5733             :         }
    5734           0 :         object->in.domain_sid = *(struct dom_sid *)pytalloc_get_ptr(value);
    5735           0 :         return 0;
    5736             : }
    5737             : 
    5738           0 : static PyObject *py_wbint_UnixIDs2Sids_in_get_num_ids(PyObject *obj, void *closure)
    5739             : {
    5740           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(obj);
    5741             :         PyObject *py_num_ids;
    5742           0 :         py_num_ids = PyLong_FromUnsignedLongLong((uint32_t)object->in.num_ids);
    5743           0 :         return py_num_ids;
    5744             : }
    5745             : 
    5746           0 : static int py_wbint_UnixIDs2Sids_in_set_num_ids(PyObject *py_obj, PyObject *value, void *closure)
    5747             : {
    5748           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(py_obj);
    5749           0 :         if (value == NULL) {
    5750           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.num_ids");
    5751           0 :                 return -1;
    5752             :         }
    5753             :         {
    5754           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.num_ids));
    5755           0 :                 if (PyLong_Check(value)) {
    5756             :                         unsigned long long test_var;
    5757           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5758           0 :                         if (PyErr_Occurred() != NULL) {
    5759           0 :                                 return -1;
    5760             :                         }
    5761           0 :                         if (test_var > uint_max) {
    5762           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5763             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5764           0 :                                 return -1;
    5765             :                         }
    5766           0 :                         object->in.num_ids = test_var;
    5767             :                 } else {
    5768           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5769             :                           PyLong_Type.tp_name);
    5770           0 :                         return -1;
    5771             :                 }
    5772             :         }
    5773           0 :         return 0;
    5774             : }
    5775             : 
    5776           0 : static PyObject *py_wbint_UnixIDs2Sids_in_get_xids(PyObject *obj, void *closure)
    5777             : {
    5778           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(obj);
    5779             :         PyObject *py_xids;
    5780           0 :         py_xids = PyList_New(object->in.num_ids);
    5781           0 :         if (py_xids == NULL) {
    5782           0 :                 return NULL;
    5783             :         }
    5784             :         {
    5785             :                 int xids_cntr_0;
    5786           0 :                 for (xids_cntr_0 = 0; xids_cntr_0 < (object->in.num_ids); xids_cntr_0++) {
    5787             :                         PyObject *py_xids_0;
    5788           0 :                         py_xids_0 = pytalloc_reference_ex(unixid_Type, object->in.xids, &object->in.xids[xids_cntr_0]);
    5789           0 :                         PyList_SetItem(py_xids, xids_cntr_0, py_xids_0);
    5790             :                 }
    5791             :         }
    5792           0 :         return py_xids;
    5793             : }
    5794             : 
    5795           0 : static int py_wbint_UnixIDs2Sids_in_set_xids(PyObject *py_obj, PyObject *value, void *closure)
    5796             : {
    5797           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(py_obj);
    5798           0 :         if (value == NULL) {
    5799           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.xids");
    5800           0 :                 return -1;
    5801             :         }
    5802           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5803             :         {
    5804             :                 int xids_cntr_0;
    5805           0 :                 object->in.xids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.xids, PyList_GET_SIZE(value));
    5806           0 :                 if (!object->in.xids) { return -1;; }
    5807           0 :                 talloc_set_name_const(object->in.xids, "ARRAY: object->in.xids");
    5808           0 :                 for (xids_cntr_0 = 0; xids_cntr_0 < PyList_GET_SIZE(value); xids_cntr_0++) {
    5809           0 :                         if (PyList_GET_ITEM(value, xids_cntr_0) == NULL) {
    5810           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.xids[xids_cntr_0]");
    5811           0 :                                 return -1;
    5812             :                         }
    5813           0 :                         PY_CHECK_TYPE(unixid_Type, PyList_GET_ITEM(value, xids_cntr_0), return -1;);
    5814           0 :                         if (talloc_reference(object->in.xids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, xids_cntr_0))) == NULL) {
    5815           0 :                                 PyErr_NoMemory();
    5816           0 :                                 return -1;
    5817             :                         }
    5818           0 :                         object->in.xids[xids_cntr_0] = *(struct unixid *)pytalloc_get_ptr(PyList_GET_ITEM(value, xids_cntr_0));
    5819             :                 }
    5820             :         }
    5821           0 :         return 0;
    5822             : }
    5823             : 
    5824           0 : static PyObject *py_wbint_UnixIDs2Sids_out_get_xids(PyObject *obj, void *closure)
    5825             : {
    5826           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(obj);
    5827             :         PyObject *py_xids;
    5828           0 :         py_xids = PyList_New(object->in.num_ids);
    5829           0 :         if (py_xids == NULL) {
    5830           0 :                 return NULL;
    5831             :         }
    5832             :         {
    5833             :                 int xids_cntr_0;
    5834           0 :                 for (xids_cntr_0 = 0; xids_cntr_0 < (object->in.num_ids); xids_cntr_0++) {
    5835             :                         PyObject *py_xids_0;
    5836           0 :                         py_xids_0 = pytalloc_reference_ex(unixid_Type, object->out.xids, &object->out.xids[xids_cntr_0]);
    5837           0 :                         PyList_SetItem(py_xids, xids_cntr_0, py_xids_0);
    5838             :                 }
    5839             :         }
    5840           0 :         return py_xids;
    5841             : }
    5842             : 
    5843           0 : static int py_wbint_UnixIDs2Sids_out_set_xids(PyObject *py_obj, PyObject *value, void *closure)
    5844             : {
    5845           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(py_obj);
    5846           0 :         if (value == NULL) {
    5847           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.xids");
    5848           0 :                 return -1;
    5849             :         }
    5850           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5851             :         {
    5852             :                 int xids_cntr_0;
    5853           0 :                 object->out.xids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.xids, PyList_GET_SIZE(value));
    5854           0 :                 if (!object->out.xids) { return -1;; }
    5855           0 :                 talloc_set_name_const(object->out.xids, "ARRAY: object->out.xids");
    5856           0 :                 for (xids_cntr_0 = 0; xids_cntr_0 < PyList_GET_SIZE(value); xids_cntr_0++) {
    5857           0 :                         if (PyList_GET_ITEM(value, xids_cntr_0) == NULL) {
    5858           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.xids[xids_cntr_0]");
    5859           0 :                                 return -1;
    5860             :                         }
    5861           0 :                         PY_CHECK_TYPE(unixid_Type, PyList_GET_ITEM(value, xids_cntr_0), return -1;);
    5862           0 :                         if (talloc_reference(object->out.xids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, xids_cntr_0))) == NULL) {
    5863           0 :                                 PyErr_NoMemory();
    5864           0 :                                 return -1;
    5865             :                         }
    5866           0 :                         object->out.xids[xids_cntr_0] = *(struct unixid *)pytalloc_get_ptr(PyList_GET_ITEM(value, xids_cntr_0));
    5867             :                 }
    5868             :         }
    5869           0 :         return 0;
    5870             : }
    5871             : 
    5872           0 : static PyObject *py_wbint_UnixIDs2Sids_out_get_sids(PyObject *obj, void *closure)
    5873             : {
    5874           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(obj);
    5875             :         PyObject *py_sids;
    5876           0 :         py_sids = PyList_New(object->in.num_ids);
    5877           0 :         if (py_sids == NULL) {
    5878           0 :                 return NULL;
    5879             :         }
    5880             :         {
    5881             :                 int sids_cntr_0;
    5882           0 :                 for (sids_cntr_0 = 0; sids_cntr_0 < (object->in.num_ids); sids_cntr_0++) {
    5883             :                         PyObject *py_sids_0;
    5884           0 :                         py_sids_0 = pytalloc_reference_ex(dom_sid_Type, object->out.sids, &object->out.sids[sids_cntr_0]);
    5885           0 :                         PyList_SetItem(py_sids, sids_cntr_0, py_sids_0);
    5886             :                 }
    5887             :         }
    5888           0 :         return py_sids;
    5889             : }
    5890             : 
    5891           0 : static int py_wbint_UnixIDs2Sids_out_set_sids(PyObject *py_obj, PyObject *value, void *closure)
    5892             : {
    5893           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(py_obj);
    5894           0 :         if (value == NULL) {
    5895           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.sids");
    5896           0 :                 return -1;
    5897             :         }
    5898           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5899             :         {
    5900             :                 int sids_cntr_0;
    5901           0 :                 object->out.sids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sids, PyList_GET_SIZE(value));
    5902           0 :                 if (!object->out.sids) { return -1;; }
    5903           0 :                 talloc_set_name_const(object->out.sids, "ARRAY: object->out.sids");
    5904           0 :                 for (sids_cntr_0 = 0; sids_cntr_0 < PyList_GET_SIZE(value); sids_cntr_0++) {
    5905           0 :                         if (PyList_GET_ITEM(value, sids_cntr_0) == NULL) {
    5906           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.sids[sids_cntr_0]");
    5907           0 :                                 return -1;
    5908             :                         }
    5909           0 :                         PY_CHECK_TYPE(dom_sid_Type, PyList_GET_ITEM(value, sids_cntr_0), return -1;);
    5910           0 :                         if (talloc_reference(object->out.sids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sids_cntr_0))) == NULL) {
    5911           0 :                                 PyErr_NoMemory();
    5912           0 :                                 return -1;
    5913             :                         }
    5914           0 :                         object->out.sids[sids_cntr_0] = *(struct dom_sid *)pytalloc_get_ptr(PyList_GET_ITEM(value, sids_cntr_0));
    5915             :                 }
    5916             :         }
    5917           0 :         return 0;
    5918             : }
    5919             : 
    5920           0 : static PyObject *py_wbint_UnixIDs2Sids_get_result(PyObject *obj, void *closure)
    5921             : {
    5922           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(obj);
    5923             :         PyObject *py_result;
    5924           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    5925           0 :         return py_result;
    5926             : }
    5927             : 
    5928           0 : static int py_wbint_UnixIDs2Sids_set_result(PyObject *py_obj, PyObject *value, void *closure)
    5929             : {
    5930           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(py_obj);
    5931           0 :         if (value == NULL) {
    5932           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    5933           0 :                 return -1;
    5934             :         }
    5935           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    5936           0 :         return 0;
    5937             : }
    5938             : 
    5939             : static PyGetSetDef py_wbint_UnixIDs2Sids_getsetters[] = {
    5940             :         {
    5941             :                 .name = discard_const_p(char, "in_domain_name"),
    5942             :                 .get = py_wbint_UnixIDs2Sids_in_get_domain_name,
    5943             :                 .set = py_wbint_UnixIDs2Sids_in_set_domain_name,
    5944             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    5945             :         },
    5946             :         {
    5947             :                 .name = discard_const_p(char, "in_domain_sid"),
    5948             :                 .get = py_wbint_UnixIDs2Sids_in_get_domain_sid,
    5949             :                 .set = py_wbint_UnixIDs2Sids_in_set_domain_sid,
    5950             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
    5951             :         },
    5952             :         {
    5953             :                 .name = discard_const_p(char, "in_num_ids"),
    5954             :                 .get = py_wbint_UnixIDs2Sids_in_get_num_ids,
    5955             :                 .set = py_wbint_UnixIDs2Sids_in_set_num_ids,
    5956             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5957             :         },
    5958             :         {
    5959             :                 .name = discard_const_p(char, "in_xids"),
    5960             :                 .get = py_wbint_UnixIDs2Sids_in_get_xids,
    5961             :                 .set = py_wbint_UnixIDs2Sids_in_set_xids,
    5962             :                 .doc = discard_const_p(char, "PIDL-generated element of base type unixid")
    5963             :         },
    5964             :         {
    5965             :                 .name = discard_const_p(char, "out_xids"),
    5966             :                 .get = py_wbint_UnixIDs2Sids_out_get_xids,
    5967             :                 .set = py_wbint_UnixIDs2Sids_out_set_xids,
    5968             :                 .doc = discard_const_p(char, "PIDL-generated element of base type unixid")
    5969             :         },
    5970             :         {
    5971             :                 .name = discard_const_p(char, "out_sids"),
    5972             :                 .get = py_wbint_UnixIDs2Sids_out_get_sids,
    5973             :                 .set = py_wbint_UnixIDs2Sids_out_set_sids,
    5974             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
    5975             :         },
    5976             :         {
    5977             :                 .name = discard_const_p(char, "result"),
    5978             :                 .get = py_wbint_UnixIDs2Sids_get_result,
    5979             :                 .set = py_wbint_UnixIDs2Sids_set_result,
    5980             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    5981             :         },
    5982             :         { .name = NULL }
    5983             : };
    5984             : 
    5985           0 : static PyObject *py_wbint_UnixIDs2Sids_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5986             : {
    5987           0 :         PyObject *self = pytalloc_new(struct wbint_UnixIDs2Sids, type);
    5988           0 :         return self;
    5989             : }
    5990             : 
    5991           0 : static PyObject *py_wbint_UnixIDs2Sids_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    5992             : {
    5993             : 
    5994             : 
    5995           0 :         return PyLong_FromLong(5);
    5996             : }
    5997             : 
    5998           0 : static PyObject *py_wbint_UnixIDs2Sids_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
    5999             : {
    6000           0 :         const struct ndr_interface_call *call = NULL;
    6001           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(py_obj);
    6002           0 :         PyObject *ret = NULL;
    6003           0 :         struct ndr_push *push = NULL;
    6004             :         DATA_BLOB blob;
    6005             :         enum ndr_err_code err;
    6006             : 
    6007           0 :         if (ndr_table_winbind.num_calls < 6) {
    6008           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_UnixIDs2Sids_ndr_pack");
    6009           0 :                 return NULL;
    6010             :         }
    6011           0 :         call = &ndr_table_winbind.calls[5];
    6012             : 
    6013           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    6014           0 :         if (push == NULL) {
    6015           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6016           0 :                 return NULL;
    6017             :         }
    6018             : 
    6019           0 :         push->flags |= ndr_push_flags;
    6020             : 
    6021           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    6022           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6023           0 :                 TALLOC_FREE(push);
    6024           0 :                 PyErr_SetNdrError(err);
    6025           0 :                 return NULL;
    6026             :         }
    6027           0 :         blob = ndr_push_blob(push);
    6028           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6029           0 :         TALLOC_FREE(push);
    6030           0 :         return ret;
    6031             : }
    6032             : 
    6033           0 : static PyObject *py_wbint_UnixIDs2Sids_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6034             : {
    6035           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    6036           0 :         PyObject *bigendian_obj = NULL;
    6037           0 :         PyObject *ndr64_obj = NULL;
    6038           0 :         uint32_t ndr_push_flags = 0;
    6039             : 
    6040           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    6041             :                 discard_const_p(char *, kwnames),
    6042             :                 &bigendian_obj,
    6043             :                 &ndr64_obj)) {
    6044           0 :                 return NULL;
    6045             :         }
    6046             : 
    6047           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    6048           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    6049             :         }
    6050           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    6051           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    6052             :         }
    6053             : 
    6054           0 :         return py_wbint_UnixIDs2Sids_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    6055             : }
    6056             : 
    6057           0 : static PyObject *py_wbint_UnixIDs2Sids_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6058             : {
    6059           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    6060           0 :         PyObject *bigendian_obj = NULL;
    6061           0 :         PyObject *ndr64_obj = NULL;
    6062           0 :         uint32_t ndr_push_flags = 0;
    6063             : 
    6064           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    6065             :                 discard_const_p(char *, kwnames),
    6066             :                 &bigendian_obj,
    6067             :                 &ndr64_obj)) {
    6068           0 :                 return NULL;
    6069             :         }
    6070             : 
    6071           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    6072           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    6073             :         }
    6074           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    6075           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    6076             :         }
    6077             : 
    6078           0 :         return py_wbint_UnixIDs2Sids_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    6079             : }
    6080             : 
    6081           0 : static PyObject *py_wbint_UnixIDs2Sids_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
    6082             : {
    6083           0 :         const struct ndr_interface_call *call = NULL;
    6084           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(py_obj);
    6085           0 :         struct ndr_pull *pull = NULL;
    6086             :         enum ndr_err_code err;
    6087             : 
    6088           0 :         if (ndr_table_winbind.num_calls < 6) {
    6089           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_UnixIDs2Sids_ndr_unpack");
    6090           0 :                 return NULL;
    6091             :         }
    6092           0 :         call = &ndr_table_winbind.calls[5];
    6093             : 
    6094           0 :         pull = ndr_pull_init_blob(blob, object);
    6095           0 :         if (pull == NULL) {
    6096           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6097           0 :                 return NULL;
    6098             :         }
    6099             : 
    6100           0 :         pull->flags |= ndr_pull_flags;
    6101             : 
    6102           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    6103           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6104           0 :                 TALLOC_FREE(pull);
    6105           0 :                 PyErr_SetNdrError(err);
    6106           0 :                 return NULL;
    6107             :         }
    6108           0 :         if (!allow_remaining) {
    6109             :                 uint32_t highest_ofs;
    6110             : 
    6111           0 :                 if (pull->offset > pull->relative_highest_offset) {
    6112           0 :                         highest_ofs = pull->offset;
    6113             :                 } else {
    6114           0 :                         highest_ofs = pull->relative_highest_offset;
    6115             :                 }
    6116           0 :                 if (highest_ofs < pull->data_size) {
    6117           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    6118             :                                 "not all bytes consumed ofs[%u] size[%u]",
    6119             :                                 highest_ofs, pull->data_size);
    6120           0 :                         TALLOC_FREE(pull);
    6121           0 :                         PyErr_SetNdrError(err);
    6122           0 :                         return NULL;
    6123             :                 }
    6124             :         }
    6125             : 
    6126           0 :         TALLOC_FREE(pull);
    6127           0 :         Py_RETURN_NONE;
    6128             : }
    6129             : 
    6130           0 : static PyObject *py_wbint_UnixIDs2Sids_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6131             : {
    6132             :         DATA_BLOB blob;
    6133           0 :         Py_ssize_t blob_length = 0;
    6134           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    6135           0 :         PyObject *bigendian_obj = NULL;
    6136           0 :         PyObject *ndr64_obj = NULL;
    6137           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    6138           0 :         PyObject *allow_remaining_obj = NULL;
    6139           0 :         bool allow_remaining = false;
    6140             : 
    6141           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    6142             :                 discard_const_p(char *, kwnames),
    6143             :                 &blob.data, &blob_length,
    6144             :                 &bigendian_obj,
    6145             :                 &ndr64_obj,
    6146             :                 &allow_remaining_obj)) {
    6147           0 :                 return NULL;
    6148             :         }
    6149           0 :         blob.length = blob_length;
    6150             : 
    6151           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    6152           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    6153             :         }
    6154           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    6155           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    6156             :         }
    6157             : 
    6158           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6159           0 :                 allow_remaining = true;
    6160             :         }
    6161             : 
    6162           0 :         return py_wbint_UnixIDs2Sids_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    6163             : }
    6164             : 
    6165           0 : static PyObject *py_wbint_UnixIDs2Sids_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6166             : {
    6167             :         DATA_BLOB blob;
    6168           0 :         Py_ssize_t blob_length = 0;
    6169           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    6170           0 :         PyObject *bigendian_obj = NULL;
    6171           0 :         PyObject *ndr64_obj = NULL;
    6172           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    6173           0 :         PyObject *allow_remaining_obj = NULL;
    6174           0 :         bool allow_remaining = false;
    6175             : 
    6176           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    6177             :                 discard_const_p(char *, kwnames),
    6178             :                 &blob.data, &blob_length,
    6179             :                 &bigendian_obj,
    6180             :                 &ndr64_obj,
    6181             :                 &allow_remaining_obj)) {
    6182           0 :                 return NULL;
    6183             :         }
    6184           0 :         blob.length = blob_length;
    6185             : 
    6186           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    6187           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    6188             :         }
    6189           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    6190           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    6191             :         }
    6192             : 
    6193           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6194           0 :                 allow_remaining = true;
    6195             :         }
    6196             : 
    6197           0 :         return py_wbint_UnixIDs2Sids_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    6198             : }
    6199             : 
    6200           0 : static PyObject *py_wbint_UnixIDs2Sids_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
    6201             : {
    6202           0 :         const struct ndr_interface_call *call = NULL;
    6203           0 :         struct wbint_UnixIDs2Sids *object = (struct wbint_UnixIDs2Sids *)pytalloc_get_ptr(py_obj);
    6204             :         PyObject *ret;
    6205             :         char *retstr;
    6206             : 
    6207           0 :         if (ndr_table_winbind.num_calls < 6) {
    6208           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_UnixIDs2Sids_ndr_print");
    6209           0 :                 return NULL;
    6210             :         }
    6211           0 :         call = &ndr_table_winbind.calls[5];
    6212             : 
    6213           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    6214           0 :         ret = PyUnicode_FromString(retstr);
    6215           0 :         TALLOC_FREE(retstr);
    6216             : 
    6217           0 :         return ret;
    6218             : }
    6219             : 
    6220           0 : static PyObject *py_wbint_UnixIDs2Sids_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6221             : {
    6222           0 :         return py_wbint_UnixIDs2Sids_ndr_print(py_obj, "wbint_UnixIDs2Sids_in", NDR_IN);
    6223             : }
    6224             : 
    6225           0 : static PyObject *py_wbint_UnixIDs2Sids_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6226             : {
    6227           0 :         return py_wbint_UnixIDs2Sids_ndr_print(py_obj, "wbint_UnixIDs2Sids_out", NDR_OUT);
    6228             : }
    6229             : 
    6230             : static PyMethodDef py_wbint_UnixIDs2Sids_methods[] = {
    6231             :         { "opnum", (PyCFunction)py_wbint_UnixIDs2Sids_ndr_opnum, METH_NOARGS|METH_CLASS,
    6232             :                 "winbind.wbint_UnixIDs2Sids.opnum() -> 5 (0x05) " },
    6233             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_UnixIDs2Sids_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    6234             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    6235             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_UnixIDs2Sids_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    6236             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    6237             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_UnixIDs2Sids_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    6238             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    6239             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_UnixIDs2Sids_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    6240             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    6241             :         { "__ndr_print_in__", (PyCFunction)py_wbint_UnixIDs2Sids_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    6242             :         { "__ndr_print_out__", (PyCFunction)py_wbint_UnixIDs2Sids_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    6243             :         { NULL, NULL, 0, NULL }
    6244             : };
    6245             : 
    6246             : 
    6247             : static PyTypeObject wbint_UnixIDs2Sids_Type = {
    6248             :         PyVarObject_HEAD_INIT(NULL, 0)
    6249             :         .tp_name = "winbind.wbint_UnixIDs2Sids",
    6250             :         .tp_getset = py_wbint_UnixIDs2Sids_getsetters,
    6251             :         .tp_methods = py_wbint_UnixIDs2Sids_methods,
    6252             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6253             :         .tp_new = py_wbint_UnixIDs2Sids_new,
    6254             : };
    6255             : 
    6256           0 : static bool pack_py_wbint_UnixIDs2Sids_args_in(PyObject *args, PyObject *kwargs, struct wbint_UnixIDs2Sids *r)
    6257             : {
    6258             :         PyObject *py_domain_name;
    6259             :         PyObject *py_domain_sid;
    6260             :         PyObject *py_num_ids;
    6261             :         PyObject *py_xids;
    6262           0 :         const char *kwnames[] = {
    6263             :                 "domain_name", "domain_sid", "num_ids", "xids", NULL
    6264             :         };
    6265             : 
    6266           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)) {
    6267           0 :                 return false;
    6268             :         }
    6269             : 
    6270           0 :         if (py_domain_name == NULL) {
    6271           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_name");
    6272           0 :                 return false;
    6273             :         }
    6274           0 :         r->in.domain_name = talloc_ptrtype(r, r->in.domain_name);
    6275           0 :         if (r->in.domain_name == NULL) {
    6276           0 :                 PyErr_NoMemory();
    6277           0 :                 return false;
    6278             :         }
    6279             :         {
    6280             :                 const char *test_str;
    6281             :                 const char *talloc_str;
    6282           0 :                 PyObject *unicode = NULL;
    6283           0 :                 if (PyUnicode_Check(py_domain_name)) {
    6284           0 :                         unicode = PyUnicode_AsEncodedString(py_domain_name, "utf-8", "ignore");
    6285           0 :                         if (unicode == NULL) {
    6286           0 :                                 PyErr_NoMemory();
    6287           0 :                                 return false;
    6288             :                         }
    6289           0 :                         test_str = PyBytes_AS_STRING(unicode);
    6290           0 :                 } else if (PyBytes_Check(py_domain_name)) {
    6291           0 :                         test_str = PyBytes_AS_STRING(py_domain_name);
    6292             :                 } else {
    6293           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain_name)->tp_name);
    6294           0 :                         return false;
    6295             :                 }
    6296           0 :                 talloc_str = talloc_strdup(r, test_str);
    6297           0 :                 if (unicode != NULL) {
    6298           0 :                         Py_DECREF(unicode);
    6299             :                 }
    6300           0 :                 if (talloc_str == NULL) {
    6301           0 :                         PyErr_NoMemory();
    6302           0 :                         return false;
    6303             :                 }
    6304           0 :                 r->in.domain_name = talloc_str;
    6305             :         }
    6306           0 :         if (py_domain_sid == NULL) {
    6307           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_sid");
    6308           0 :                 return false;
    6309             :         }
    6310           0 :         PY_CHECK_TYPE(dom_sid_Type, py_domain_sid, return false;);
    6311           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_sid)) == NULL) {
    6312           0 :                 PyErr_NoMemory();
    6313           0 :                 return false;
    6314             :         }
    6315           0 :         r->in.domain_sid = *(struct dom_sid *)pytalloc_get_ptr(py_domain_sid);
    6316           0 :         if (py_num_ids == NULL) {
    6317           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.num_ids");
    6318           0 :                 return false;
    6319             :         }
    6320             :         {
    6321           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.num_ids));
    6322           0 :                 if (PyLong_Check(py_num_ids)) {
    6323             :                         unsigned long long test_var;
    6324           0 :                         test_var = PyLong_AsUnsignedLongLong(py_num_ids);
    6325           0 :                         if (PyErr_Occurred() != NULL) {
    6326           0 :                                 return false;
    6327             :                         }
    6328           0 :                         if (test_var > uint_max) {
    6329           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6330             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6331           0 :                                 return false;
    6332             :                         }
    6333           0 :                         r->in.num_ids = test_var;
    6334             :                 } else {
    6335           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6336             :                           PyLong_Type.tp_name);
    6337           0 :                         return false;
    6338             :                 }
    6339             :         }
    6340           0 :         if (py_xids == NULL) {
    6341           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.xids");
    6342           0 :                 return false;
    6343             :         }
    6344           0 :         PY_CHECK_TYPE(&PyList_Type, py_xids, return false;);
    6345             :         {
    6346             :                 int xids_cntr_0;
    6347           0 :                 r->in.xids = talloc_array_ptrtype(r, r->in.xids, PyList_GET_SIZE(py_xids));
    6348           0 :                 if (!r->in.xids) { return false;; }
    6349           0 :                 talloc_set_name_const(r->in.xids, "ARRAY: r->in.xids");
    6350           0 :                 for (xids_cntr_0 = 0; xids_cntr_0 < PyList_GET_SIZE(py_xids); xids_cntr_0++) {
    6351           0 :                         if (PyList_GET_ITEM(py_xids, xids_cntr_0) == NULL) {
    6352           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.xids[xids_cntr_0]");
    6353           0 :                                 return false;
    6354             :                         }
    6355           0 :                         PY_CHECK_TYPE(unixid_Type, PyList_GET_ITEM(py_xids, xids_cntr_0), return false;);
    6356           0 :                         if (talloc_reference(r->in.xids, pytalloc_get_mem_ctx(PyList_GET_ITEM(py_xids, xids_cntr_0))) == NULL) {
    6357           0 :                                 PyErr_NoMemory();
    6358           0 :                                 return false;
    6359             :                         }
    6360           0 :                         r->in.xids[xids_cntr_0] = *(struct unixid *)pytalloc_get_ptr(PyList_GET_ITEM(py_xids, xids_cntr_0));
    6361             :                 }
    6362             :         }
    6363           0 :         return true;
    6364             : }
    6365             : 
    6366           0 : static PyObject *unpack_py_wbint_UnixIDs2Sids_args_out(struct wbint_UnixIDs2Sids *r)
    6367             : {
    6368             :         PyObject *result;
    6369             :         PyObject *py_xids;
    6370             :         PyObject *py_sids;
    6371           0 :         result = PyTuple_New(2);
    6372           0 :         py_xids = PyList_New(r->in.num_ids);
    6373           0 :         if (py_xids == NULL) {
    6374           0 :                 return NULL;
    6375             :         }
    6376             :         {
    6377             :                 int xids_cntr_0;
    6378           0 :                 for (xids_cntr_0 = 0; xids_cntr_0 < (r->in.num_ids); xids_cntr_0++) {
    6379             :                         PyObject *py_xids_0;
    6380           0 :                         py_xids_0 = pytalloc_reference_ex(unixid_Type, r->out.xids, &r->out.xids[xids_cntr_0]);
    6381           0 :                         PyList_SetItem(py_xids, xids_cntr_0, py_xids_0);
    6382             :                 }
    6383             :         }
    6384           0 :         PyTuple_SetItem(result, 0, py_xids);
    6385           0 :         py_sids = PyList_New(r->in.num_ids);
    6386           0 :         if (py_sids == NULL) {
    6387           0 :                 return NULL;
    6388             :         }
    6389             :         {
    6390             :                 int sids_cntr_0;
    6391           0 :                 for (sids_cntr_0 = 0; sids_cntr_0 < (r->in.num_ids); sids_cntr_0++) {
    6392             :                         PyObject *py_sids_0;
    6393           0 :                         py_sids_0 = pytalloc_reference_ex(dom_sid_Type, r->out.sids, &r->out.sids[sids_cntr_0]);
    6394           0 :                         PyList_SetItem(py_sids, sids_cntr_0, py_sids_0);
    6395             :                 }
    6396             :         }
    6397           0 :         PyTuple_SetItem(result, 1, py_sids);
    6398           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    6399           0 :                 PyErr_SetNTSTATUS(r->out.result);
    6400           0 :                 return NULL;
    6401             :         }
    6402             : 
    6403           0 :         return result;
    6404             : }
    6405             : 
    6406             : 
    6407           0 : static PyObject *py_wbint_AllocateUid_out_get_uid(PyObject *obj, void *closure)
    6408             : {
    6409           0 :         struct wbint_AllocateUid *object = (struct wbint_AllocateUid *)pytalloc_get_ptr(obj);
    6410             :         PyObject *py_uid;
    6411           0 :         if (object->out.uid == NULL) {
    6412           0 :                 Py_RETURN_NONE;
    6413             :         }
    6414           0 :         py_uid = PyLong_FromUnsignedLongLong(*object->out.uid);
    6415           0 :         return py_uid;
    6416             : }
    6417             : 
    6418           0 : static int py_wbint_AllocateUid_out_set_uid(PyObject *py_obj, PyObject *value, void *closure)
    6419             : {
    6420           0 :         struct wbint_AllocateUid *object = (struct wbint_AllocateUid *)pytalloc_get_ptr(py_obj);
    6421           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.uid));
    6422           0 :         if (value == NULL) {
    6423           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.uid");
    6424           0 :                 return -1;
    6425             :         }
    6426           0 :         object->out.uid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.uid);
    6427           0 :         if (object->out.uid == NULL) {
    6428           0 :                 PyErr_NoMemory();
    6429           0 :                 return -1;
    6430             :         }
    6431             :         {
    6432           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.uid));
    6433           0 :                 if (PyLong_Check(value)) {
    6434             :                         unsigned long long test_var;
    6435           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6436           0 :                         if (PyErr_Occurred() != NULL) {
    6437           0 :                                 return -1;
    6438             :                         }
    6439           0 :                         if (test_var > uint_max) {
    6440           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6441             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6442           0 :                                 return -1;
    6443             :                         }
    6444           0 :                         *object->out.uid = test_var;
    6445             :                 } else {
    6446           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6447             :                           PyLong_Type.tp_name);
    6448           0 :                         return -1;
    6449             :                 }
    6450             :         }
    6451           0 :         return 0;
    6452             : }
    6453             : 
    6454           0 : static PyObject *py_wbint_AllocateUid_get_result(PyObject *obj, void *closure)
    6455             : {
    6456           0 :         struct wbint_AllocateUid *object = (struct wbint_AllocateUid *)pytalloc_get_ptr(obj);
    6457             :         PyObject *py_result;
    6458           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    6459           0 :         return py_result;
    6460             : }
    6461             : 
    6462           0 : static int py_wbint_AllocateUid_set_result(PyObject *py_obj, PyObject *value, void *closure)
    6463             : {
    6464           0 :         struct wbint_AllocateUid *object = (struct wbint_AllocateUid *)pytalloc_get_ptr(py_obj);
    6465           0 :         if (value == NULL) {
    6466           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    6467           0 :                 return -1;
    6468             :         }
    6469           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    6470           0 :         return 0;
    6471             : }
    6472             : 
    6473             : static PyGetSetDef py_wbint_AllocateUid_getsetters[] = {
    6474             :         {
    6475             :                 .name = discard_const_p(char, "out_uid"),
    6476             :                 .get = py_wbint_AllocateUid_out_get_uid,
    6477             :                 .set = py_wbint_AllocateUid_out_set_uid,
    6478             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
    6479             :         },
    6480             :         {
    6481             :                 .name = discard_const_p(char, "result"),
    6482             :                 .get = py_wbint_AllocateUid_get_result,
    6483             :                 .set = py_wbint_AllocateUid_set_result,
    6484             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    6485             :         },
    6486             :         { .name = NULL }
    6487             : };
    6488             : 
    6489           0 : static PyObject *py_wbint_AllocateUid_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6490             : {
    6491           0 :         PyObject *self = pytalloc_new(struct wbint_AllocateUid, type);
    6492           0 :         struct wbint_AllocateUid *_self = (struct wbint_AllocateUid *)pytalloc_get_ptr(self);
    6493           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    6494           0 :         _self->out.uid = talloc_zero(mem_ctx, uint64_t);
    6495           0 :         return self;
    6496             : }
    6497             : 
    6498           0 : static PyObject *py_wbint_AllocateUid_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    6499             : {
    6500             : 
    6501             : 
    6502           0 :         return PyLong_FromLong(6);
    6503             : }
    6504             : 
    6505           0 : static PyObject *py_wbint_AllocateUid_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
    6506             : {
    6507           0 :         const struct ndr_interface_call *call = NULL;
    6508           0 :         struct wbint_AllocateUid *object = (struct wbint_AllocateUid *)pytalloc_get_ptr(py_obj);
    6509           0 :         PyObject *ret = NULL;
    6510           0 :         struct ndr_push *push = NULL;
    6511             :         DATA_BLOB blob;
    6512             :         enum ndr_err_code err;
    6513             : 
    6514           0 :         if (ndr_table_winbind.num_calls < 7) {
    6515           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_AllocateUid_ndr_pack");
    6516           0 :                 return NULL;
    6517             :         }
    6518           0 :         call = &ndr_table_winbind.calls[6];
    6519             : 
    6520           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    6521           0 :         if (push == NULL) {
    6522           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6523           0 :                 return NULL;
    6524             :         }
    6525             : 
    6526           0 :         push->flags |= ndr_push_flags;
    6527             : 
    6528           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    6529           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6530           0 :                 TALLOC_FREE(push);
    6531           0 :                 PyErr_SetNdrError(err);
    6532           0 :                 return NULL;
    6533             :         }
    6534           0 :         blob = ndr_push_blob(push);
    6535           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6536           0 :         TALLOC_FREE(push);
    6537           0 :         return ret;
    6538             : }
    6539             : 
    6540           0 : static PyObject *py_wbint_AllocateUid_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6541             : {
    6542           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    6543           0 :         PyObject *bigendian_obj = NULL;
    6544           0 :         PyObject *ndr64_obj = NULL;
    6545           0 :         uint32_t ndr_push_flags = 0;
    6546             : 
    6547           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    6548             :                 discard_const_p(char *, kwnames),
    6549             :                 &bigendian_obj,
    6550             :                 &ndr64_obj)) {
    6551           0 :                 return NULL;
    6552             :         }
    6553             : 
    6554           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    6555           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    6556             :         }
    6557           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    6558           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    6559             :         }
    6560             : 
    6561           0 :         return py_wbint_AllocateUid_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    6562             : }
    6563             : 
    6564           0 : static PyObject *py_wbint_AllocateUid_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6565             : {
    6566           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    6567           0 :         PyObject *bigendian_obj = NULL;
    6568           0 :         PyObject *ndr64_obj = NULL;
    6569           0 :         uint32_t ndr_push_flags = 0;
    6570             : 
    6571           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    6572             :                 discard_const_p(char *, kwnames),
    6573             :                 &bigendian_obj,
    6574             :                 &ndr64_obj)) {
    6575           0 :                 return NULL;
    6576             :         }
    6577             : 
    6578           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    6579           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    6580             :         }
    6581           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    6582           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    6583             :         }
    6584             : 
    6585           0 :         return py_wbint_AllocateUid_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    6586             : }
    6587             : 
    6588           0 : static PyObject *py_wbint_AllocateUid_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
    6589             : {
    6590           0 :         const struct ndr_interface_call *call = NULL;
    6591           0 :         struct wbint_AllocateUid *object = (struct wbint_AllocateUid *)pytalloc_get_ptr(py_obj);
    6592           0 :         struct ndr_pull *pull = NULL;
    6593             :         enum ndr_err_code err;
    6594             : 
    6595           0 :         if (ndr_table_winbind.num_calls < 7) {
    6596           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_AllocateUid_ndr_unpack");
    6597           0 :                 return NULL;
    6598             :         }
    6599           0 :         call = &ndr_table_winbind.calls[6];
    6600             : 
    6601           0 :         pull = ndr_pull_init_blob(blob, object);
    6602           0 :         if (pull == NULL) {
    6603           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6604           0 :                 return NULL;
    6605             :         }
    6606             : 
    6607           0 :         pull->flags |= ndr_pull_flags;
    6608             : 
    6609           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    6610           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6611           0 :                 TALLOC_FREE(pull);
    6612           0 :                 PyErr_SetNdrError(err);
    6613           0 :                 return NULL;
    6614             :         }
    6615           0 :         if (!allow_remaining) {
    6616             :                 uint32_t highest_ofs;
    6617             : 
    6618           0 :                 if (pull->offset > pull->relative_highest_offset) {
    6619           0 :                         highest_ofs = pull->offset;
    6620             :                 } else {
    6621           0 :                         highest_ofs = pull->relative_highest_offset;
    6622             :                 }
    6623           0 :                 if (highest_ofs < pull->data_size) {
    6624           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    6625             :                                 "not all bytes consumed ofs[%u] size[%u]",
    6626             :                                 highest_ofs, pull->data_size);
    6627           0 :                         TALLOC_FREE(pull);
    6628           0 :                         PyErr_SetNdrError(err);
    6629           0 :                         return NULL;
    6630             :                 }
    6631             :         }
    6632             : 
    6633           0 :         TALLOC_FREE(pull);
    6634           0 :         Py_RETURN_NONE;
    6635             : }
    6636             : 
    6637           0 : static PyObject *py_wbint_AllocateUid_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6638             : {
    6639             :         DATA_BLOB blob;
    6640           0 :         Py_ssize_t blob_length = 0;
    6641           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    6642           0 :         PyObject *bigendian_obj = NULL;
    6643           0 :         PyObject *ndr64_obj = NULL;
    6644           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    6645           0 :         PyObject *allow_remaining_obj = NULL;
    6646           0 :         bool allow_remaining = false;
    6647             : 
    6648           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    6649             :                 discard_const_p(char *, kwnames),
    6650             :                 &blob.data, &blob_length,
    6651             :                 &bigendian_obj,
    6652             :                 &ndr64_obj,
    6653             :                 &allow_remaining_obj)) {
    6654           0 :                 return NULL;
    6655             :         }
    6656           0 :         blob.length = blob_length;
    6657             : 
    6658           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    6659           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    6660             :         }
    6661           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    6662           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    6663             :         }
    6664             : 
    6665           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6666           0 :                 allow_remaining = true;
    6667             :         }
    6668             : 
    6669           0 :         return py_wbint_AllocateUid_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    6670             : }
    6671             : 
    6672           0 : static PyObject *py_wbint_AllocateUid_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6673             : {
    6674             :         DATA_BLOB blob;
    6675           0 :         Py_ssize_t blob_length = 0;
    6676           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    6677           0 :         PyObject *bigendian_obj = NULL;
    6678           0 :         PyObject *ndr64_obj = NULL;
    6679           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    6680           0 :         PyObject *allow_remaining_obj = NULL;
    6681           0 :         bool allow_remaining = false;
    6682             : 
    6683           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    6684             :                 discard_const_p(char *, kwnames),
    6685             :                 &blob.data, &blob_length,
    6686             :                 &bigendian_obj,
    6687             :                 &ndr64_obj,
    6688             :                 &allow_remaining_obj)) {
    6689           0 :                 return NULL;
    6690             :         }
    6691           0 :         blob.length = blob_length;
    6692             : 
    6693           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    6694           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    6695             :         }
    6696           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    6697           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    6698             :         }
    6699             : 
    6700           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6701           0 :                 allow_remaining = true;
    6702             :         }
    6703             : 
    6704           0 :         return py_wbint_AllocateUid_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    6705             : }
    6706             : 
    6707           0 : static PyObject *py_wbint_AllocateUid_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
    6708             : {
    6709           0 :         const struct ndr_interface_call *call = NULL;
    6710           0 :         struct wbint_AllocateUid *object = (struct wbint_AllocateUid *)pytalloc_get_ptr(py_obj);
    6711             :         PyObject *ret;
    6712             :         char *retstr;
    6713             : 
    6714           0 :         if (ndr_table_winbind.num_calls < 7) {
    6715           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_AllocateUid_ndr_print");
    6716           0 :                 return NULL;
    6717             :         }
    6718           0 :         call = &ndr_table_winbind.calls[6];
    6719             : 
    6720           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    6721           0 :         ret = PyUnicode_FromString(retstr);
    6722           0 :         TALLOC_FREE(retstr);
    6723             : 
    6724           0 :         return ret;
    6725             : }
    6726             : 
    6727           0 : static PyObject *py_wbint_AllocateUid_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6728             : {
    6729           0 :         return py_wbint_AllocateUid_ndr_print(py_obj, "wbint_AllocateUid_in", NDR_IN);
    6730             : }
    6731             : 
    6732           0 : static PyObject *py_wbint_AllocateUid_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6733             : {
    6734           0 :         return py_wbint_AllocateUid_ndr_print(py_obj, "wbint_AllocateUid_out", NDR_OUT);
    6735             : }
    6736             : 
    6737             : static PyMethodDef py_wbint_AllocateUid_methods[] = {
    6738             :         { "opnum", (PyCFunction)py_wbint_AllocateUid_ndr_opnum, METH_NOARGS|METH_CLASS,
    6739             :                 "winbind.wbint_AllocateUid.opnum() -> 6 (0x06) " },
    6740             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_AllocateUid_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    6741             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    6742             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_AllocateUid_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    6743             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    6744             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_AllocateUid_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    6745             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    6746             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_AllocateUid_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    6747             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    6748             :         { "__ndr_print_in__", (PyCFunction)py_wbint_AllocateUid_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    6749             :         { "__ndr_print_out__", (PyCFunction)py_wbint_AllocateUid_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    6750             :         { NULL, NULL, 0, NULL }
    6751             : };
    6752             : 
    6753             : 
    6754             : static PyTypeObject wbint_AllocateUid_Type = {
    6755             :         PyVarObject_HEAD_INIT(NULL, 0)
    6756             :         .tp_name = "winbind.wbint_AllocateUid",
    6757             :         .tp_getset = py_wbint_AllocateUid_getsetters,
    6758             :         .tp_methods = py_wbint_AllocateUid_methods,
    6759             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6760             :         .tp_new = py_wbint_AllocateUid_new,
    6761             : };
    6762             : 
    6763           0 : static bool pack_py_wbint_AllocateUid_args_in(PyObject *args, PyObject *kwargs, struct wbint_AllocateUid *r)
    6764             : {
    6765           0 :         const char *kwnames[] = {
    6766             :                 NULL
    6767             :         };
    6768             : 
    6769           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":wbint_AllocateUid", discard_const_p(char *, kwnames))) {
    6770           0 :                 return false;
    6771             :         }
    6772             : 
    6773           0 :         return true;
    6774             : }
    6775             : 
    6776           0 : static PyObject *unpack_py_wbint_AllocateUid_args_out(struct wbint_AllocateUid *r)
    6777             : {
    6778             :         PyObject *result;
    6779             :         PyObject *py_uid;
    6780           0 :         py_uid = PyLong_FromUnsignedLongLong(*r->out.uid);
    6781           0 :         result = py_uid;
    6782           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    6783           0 :                 PyErr_SetNTSTATUS(r->out.result);
    6784           0 :                 return NULL;
    6785             :         }
    6786             : 
    6787           0 :         return result;
    6788             : }
    6789             : 
    6790             : 
    6791           0 : static PyObject *py_wbint_AllocateGid_out_get_gid(PyObject *obj, void *closure)
    6792             : {
    6793           0 :         struct wbint_AllocateGid *object = (struct wbint_AllocateGid *)pytalloc_get_ptr(obj);
    6794             :         PyObject *py_gid;
    6795           0 :         if (object->out.gid == NULL) {
    6796           0 :                 Py_RETURN_NONE;
    6797             :         }
    6798           0 :         py_gid = PyLong_FromUnsignedLongLong(*object->out.gid);
    6799           0 :         return py_gid;
    6800             : }
    6801             : 
    6802           0 : static int py_wbint_AllocateGid_out_set_gid(PyObject *py_obj, PyObject *value, void *closure)
    6803             : {
    6804           0 :         struct wbint_AllocateGid *object = (struct wbint_AllocateGid *)pytalloc_get_ptr(py_obj);
    6805           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.gid));
    6806           0 :         if (value == NULL) {
    6807           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.gid");
    6808           0 :                 return -1;
    6809             :         }
    6810           0 :         object->out.gid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.gid);
    6811           0 :         if (object->out.gid == NULL) {
    6812           0 :                 PyErr_NoMemory();
    6813           0 :                 return -1;
    6814             :         }
    6815             :         {
    6816           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.gid));
    6817           0 :                 if (PyLong_Check(value)) {
    6818             :                         unsigned long long test_var;
    6819           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6820           0 :                         if (PyErr_Occurred() != NULL) {
    6821           0 :                                 return -1;
    6822             :                         }
    6823           0 :                         if (test_var > uint_max) {
    6824           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6825             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6826           0 :                                 return -1;
    6827             :                         }
    6828           0 :                         *object->out.gid = test_var;
    6829             :                 } else {
    6830           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6831             :                           PyLong_Type.tp_name);
    6832           0 :                         return -1;
    6833             :                 }
    6834             :         }
    6835           0 :         return 0;
    6836             : }
    6837             : 
    6838           0 : static PyObject *py_wbint_AllocateGid_get_result(PyObject *obj, void *closure)
    6839             : {
    6840           0 :         struct wbint_AllocateGid *object = (struct wbint_AllocateGid *)pytalloc_get_ptr(obj);
    6841             :         PyObject *py_result;
    6842           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    6843           0 :         return py_result;
    6844             : }
    6845             : 
    6846           0 : static int py_wbint_AllocateGid_set_result(PyObject *py_obj, PyObject *value, void *closure)
    6847             : {
    6848           0 :         struct wbint_AllocateGid *object = (struct wbint_AllocateGid *)pytalloc_get_ptr(py_obj);
    6849           0 :         if (value == NULL) {
    6850           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    6851           0 :                 return -1;
    6852             :         }
    6853           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    6854           0 :         return 0;
    6855             : }
    6856             : 
    6857             : static PyGetSetDef py_wbint_AllocateGid_getsetters[] = {
    6858             :         {
    6859             :                 .name = discard_const_p(char, "out_gid"),
    6860             :                 .get = py_wbint_AllocateGid_out_get_gid,
    6861             :                 .set = py_wbint_AllocateGid_out_set_gid,
    6862             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
    6863             :         },
    6864             :         {
    6865             :                 .name = discard_const_p(char, "result"),
    6866             :                 .get = py_wbint_AllocateGid_get_result,
    6867             :                 .set = py_wbint_AllocateGid_set_result,
    6868             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    6869             :         },
    6870             :         { .name = NULL }
    6871             : };
    6872             : 
    6873           0 : static PyObject *py_wbint_AllocateGid_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6874             : {
    6875           0 :         PyObject *self = pytalloc_new(struct wbint_AllocateGid, type);
    6876           0 :         struct wbint_AllocateGid *_self = (struct wbint_AllocateGid *)pytalloc_get_ptr(self);
    6877           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    6878           0 :         _self->out.gid = talloc_zero(mem_ctx, uint64_t);
    6879           0 :         return self;
    6880             : }
    6881             : 
    6882           0 : static PyObject *py_wbint_AllocateGid_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    6883             : {
    6884             : 
    6885             : 
    6886           0 :         return PyLong_FromLong(7);
    6887             : }
    6888             : 
    6889           0 : static PyObject *py_wbint_AllocateGid_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
    6890             : {
    6891           0 :         const struct ndr_interface_call *call = NULL;
    6892           0 :         struct wbint_AllocateGid *object = (struct wbint_AllocateGid *)pytalloc_get_ptr(py_obj);
    6893           0 :         PyObject *ret = NULL;
    6894           0 :         struct ndr_push *push = NULL;
    6895             :         DATA_BLOB blob;
    6896             :         enum ndr_err_code err;
    6897             : 
    6898           0 :         if (ndr_table_winbind.num_calls < 8) {
    6899           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_AllocateGid_ndr_pack");
    6900           0 :                 return NULL;
    6901             :         }
    6902           0 :         call = &ndr_table_winbind.calls[7];
    6903             : 
    6904           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    6905           0 :         if (push == NULL) {
    6906           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6907           0 :                 return NULL;
    6908             :         }
    6909             : 
    6910           0 :         push->flags |= ndr_push_flags;
    6911             : 
    6912           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    6913           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6914           0 :                 TALLOC_FREE(push);
    6915           0 :                 PyErr_SetNdrError(err);
    6916           0 :                 return NULL;
    6917             :         }
    6918           0 :         blob = ndr_push_blob(push);
    6919           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6920           0 :         TALLOC_FREE(push);
    6921           0 :         return ret;
    6922             : }
    6923             : 
    6924           0 : static PyObject *py_wbint_AllocateGid_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6925             : {
    6926           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    6927           0 :         PyObject *bigendian_obj = NULL;
    6928           0 :         PyObject *ndr64_obj = NULL;
    6929           0 :         uint32_t ndr_push_flags = 0;
    6930             : 
    6931           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    6932             :                 discard_const_p(char *, kwnames),
    6933             :                 &bigendian_obj,
    6934             :                 &ndr64_obj)) {
    6935           0 :                 return NULL;
    6936             :         }
    6937             : 
    6938           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    6939           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    6940             :         }
    6941           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    6942           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    6943             :         }
    6944             : 
    6945           0 :         return py_wbint_AllocateGid_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    6946             : }
    6947             : 
    6948           0 : static PyObject *py_wbint_AllocateGid_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6949             : {
    6950           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    6951           0 :         PyObject *bigendian_obj = NULL;
    6952           0 :         PyObject *ndr64_obj = NULL;
    6953           0 :         uint32_t ndr_push_flags = 0;
    6954             : 
    6955           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    6956             :                 discard_const_p(char *, kwnames),
    6957             :                 &bigendian_obj,
    6958             :                 &ndr64_obj)) {
    6959           0 :                 return NULL;
    6960             :         }
    6961             : 
    6962           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    6963           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    6964             :         }
    6965           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    6966           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    6967             :         }
    6968             : 
    6969           0 :         return py_wbint_AllocateGid_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    6970             : }
    6971             : 
    6972           0 : static PyObject *py_wbint_AllocateGid_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
    6973             : {
    6974           0 :         const struct ndr_interface_call *call = NULL;
    6975           0 :         struct wbint_AllocateGid *object = (struct wbint_AllocateGid *)pytalloc_get_ptr(py_obj);
    6976           0 :         struct ndr_pull *pull = NULL;
    6977             :         enum ndr_err_code err;
    6978             : 
    6979           0 :         if (ndr_table_winbind.num_calls < 8) {
    6980           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_AllocateGid_ndr_unpack");
    6981           0 :                 return NULL;
    6982             :         }
    6983           0 :         call = &ndr_table_winbind.calls[7];
    6984             : 
    6985           0 :         pull = ndr_pull_init_blob(blob, object);
    6986           0 :         if (pull == NULL) {
    6987           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6988           0 :                 return NULL;
    6989             :         }
    6990             : 
    6991           0 :         pull->flags |= ndr_pull_flags;
    6992             : 
    6993           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    6994           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6995           0 :                 TALLOC_FREE(pull);
    6996           0 :                 PyErr_SetNdrError(err);
    6997           0 :                 return NULL;
    6998             :         }
    6999           0 :         if (!allow_remaining) {
    7000             :                 uint32_t highest_ofs;
    7001             : 
    7002           0 :                 if (pull->offset > pull->relative_highest_offset) {
    7003           0 :                         highest_ofs = pull->offset;
    7004             :                 } else {
    7005           0 :                         highest_ofs = pull->relative_highest_offset;
    7006             :                 }
    7007           0 :                 if (highest_ofs < pull->data_size) {
    7008           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    7009             :                                 "not all bytes consumed ofs[%u] size[%u]",
    7010             :                                 highest_ofs, pull->data_size);
    7011           0 :                         TALLOC_FREE(pull);
    7012           0 :                         PyErr_SetNdrError(err);
    7013           0 :                         return NULL;
    7014             :                 }
    7015             :         }
    7016             : 
    7017           0 :         TALLOC_FREE(pull);
    7018           0 :         Py_RETURN_NONE;
    7019             : }
    7020             : 
    7021           0 : static PyObject *py_wbint_AllocateGid_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7022             : {
    7023             :         DATA_BLOB blob;
    7024           0 :         Py_ssize_t blob_length = 0;
    7025           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    7026           0 :         PyObject *bigendian_obj = NULL;
    7027           0 :         PyObject *ndr64_obj = NULL;
    7028           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    7029           0 :         PyObject *allow_remaining_obj = NULL;
    7030           0 :         bool allow_remaining = false;
    7031             : 
    7032           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    7033             :                 discard_const_p(char *, kwnames),
    7034             :                 &blob.data, &blob_length,
    7035             :                 &bigendian_obj,
    7036             :                 &ndr64_obj,
    7037             :                 &allow_remaining_obj)) {
    7038           0 :                 return NULL;
    7039             :         }
    7040           0 :         blob.length = blob_length;
    7041             : 
    7042           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    7043           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    7044             :         }
    7045           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    7046           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    7047             :         }
    7048             : 
    7049           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7050           0 :                 allow_remaining = true;
    7051             :         }
    7052             : 
    7053           0 :         return py_wbint_AllocateGid_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    7054             : }
    7055             : 
    7056           0 : static PyObject *py_wbint_AllocateGid_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7057             : {
    7058             :         DATA_BLOB blob;
    7059           0 :         Py_ssize_t blob_length = 0;
    7060           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    7061           0 :         PyObject *bigendian_obj = NULL;
    7062           0 :         PyObject *ndr64_obj = NULL;
    7063           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    7064           0 :         PyObject *allow_remaining_obj = NULL;
    7065           0 :         bool allow_remaining = false;
    7066             : 
    7067           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    7068             :                 discard_const_p(char *, kwnames),
    7069             :                 &blob.data, &blob_length,
    7070             :                 &bigendian_obj,
    7071             :                 &ndr64_obj,
    7072             :                 &allow_remaining_obj)) {
    7073           0 :                 return NULL;
    7074             :         }
    7075           0 :         blob.length = blob_length;
    7076             : 
    7077           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    7078           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    7079             :         }
    7080           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    7081           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    7082             :         }
    7083             : 
    7084           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7085           0 :                 allow_remaining = true;
    7086             :         }
    7087             : 
    7088           0 :         return py_wbint_AllocateGid_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    7089             : }
    7090             : 
    7091           0 : static PyObject *py_wbint_AllocateGid_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
    7092             : {
    7093           0 :         const struct ndr_interface_call *call = NULL;
    7094           0 :         struct wbint_AllocateGid *object = (struct wbint_AllocateGid *)pytalloc_get_ptr(py_obj);
    7095             :         PyObject *ret;
    7096             :         char *retstr;
    7097             : 
    7098           0 :         if (ndr_table_winbind.num_calls < 8) {
    7099           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_AllocateGid_ndr_print");
    7100           0 :                 return NULL;
    7101             :         }
    7102           0 :         call = &ndr_table_winbind.calls[7];
    7103             : 
    7104           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    7105           0 :         ret = PyUnicode_FromString(retstr);
    7106           0 :         TALLOC_FREE(retstr);
    7107             : 
    7108           0 :         return ret;
    7109             : }
    7110             : 
    7111           0 : static PyObject *py_wbint_AllocateGid_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7112             : {
    7113           0 :         return py_wbint_AllocateGid_ndr_print(py_obj, "wbint_AllocateGid_in", NDR_IN);
    7114             : }
    7115             : 
    7116           0 : static PyObject *py_wbint_AllocateGid_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7117             : {
    7118           0 :         return py_wbint_AllocateGid_ndr_print(py_obj, "wbint_AllocateGid_out", NDR_OUT);
    7119             : }
    7120             : 
    7121             : static PyMethodDef py_wbint_AllocateGid_methods[] = {
    7122             :         { "opnum", (PyCFunction)py_wbint_AllocateGid_ndr_opnum, METH_NOARGS|METH_CLASS,
    7123             :                 "winbind.wbint_AllocateGid.opnum() -> 7 (0x07) " },
    7124             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_AllocateGid_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    7125             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    7126             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_AllocateGid_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    7127             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    7128             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_AllocateGid_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    7129             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    7130             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_AllocateGid_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    7131             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    7132             :         { "__ndr_print_in__", (PyCFunction)py_wbint_AllocateGid_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    7133             :         { "__ndr_print_out__", (PyCFunction)py_wbint_AllocateGid_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    7134             :         { NULL, NULL, 0, NULL }
    7135             : };
    7136             : 
    7137             : 
    7138             : static PyTypeObject wbint_AllocateGid_Type = {
    7139             :         PyVarObject_HEAD_INIT(NULL, 0)
    7140             :         .tp_name = "winbind.wbint_AllocateGid",
    7141             :         .tp_getset = py_wbint_AllocateGid_getsetters,
    7142             :         .tp_methods = py_wbint_AllocateGid_methods,
    7143             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7144             :         .tp_new = py_wbint_AllocateGid_new,
    7145             : };
    7146             : 
    7147           0 : static bool pack_py_wbint_AllocateGid_args_in(PyObject *args, PyObject *kwargs, struct wbint_AllocateGid *r)
    7148             : {
    7149           0 :         const char *kwnames[] = {
    7150             :                 NULL
    7151             :         };
    7152             : 
    7153           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":wbint_AllocateGid", discard_const_p(char *, kwnames))) {
    7154           0 :                 return false;
    7155             :         }
    7156             : 
    7157           0 :         return true;
    7158             : }
    7159             : 
    7160           0 : static PyObject *unpack_py_wbint_AllocateGid_args_out(struct wbint_AllocateGid *r)
    7161             : {
    7162             :         PyObject *result;
    7163             :         PyObject *py_gid;
    7164           0 :         py_gid = PyLong_FromUnsignedLongLong(*r->out.gid);
    7165           0 :         result = py_gid;
    7166           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    7167           0 :                 PyErr_SetNTSTATUS(r->out.result);
    7168           0 :                 return NULL;
    7169             :         }
    7170             : 
    7171           0 :         return result;
    7172             : }
    7173             : 
    7174             : 
    7175           0 : static PyObject *py_wbint_GetNssInfo_in_get_info(PyObject *obj, void *closure)
    7176             : {
    7177           0 :         struct wbint_GetNssInfo *object = (struct wbint_GetNssInfo *)pytalloc_get_ptr(obj);
    7178             :         PyObject *py_info;
    7179           0 :         if (object->in.info == NULL) {
    7180           0 :                 Py_RETURN_NONE;
    7181             :         }
    7182           0 :         py_info = pytalloc_reference_ex(&wbint_userinfo_Type, object->in.info, object->in.info);
    7183           0 :         return py_info;
    7184             : }
    7185             : 
    7186           0 : static int py_wbint_GetNssInfo_in_set_info(PyObject *py_obj, PyObject *value, void *closure)
    7187             : {
    7188           0 :         struct wbint_GetNssInfo *object = (struct wbint_GetNssInfo *)pytalloc_get_ptr(py_obj);
    7189           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info));
    7190           0 :         if (value == NULL) {
    7191           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.info");
    7192           0 :                 return -1;
    7193             :         }
    7194           0 :         object->in.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info);
    7195           0 :         if (object->in.info == NULL) {
    7196           0 :                 PyErr_NoMemory();
    7197           0 :                 return -1;
    7198             :         }
    7199           0 :         PY_CHECK_TYPE(&wbint_userinfo_Type, value, return -1;);
    7200           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7201           0 :                 PyErr_NoMemory();
    7202           0 :                 return -1;
    7203             :         }
    7204           0 :         object->in.info = (struct wbint_userinfo *)pytalloc_get_ptr(value);
    7205           0 :         return 0;
    7206             : }
    7207             : 
    7208           0 : static PyObject *py_wbint_GetNssInfo_out_get_info(PyObject *obj, void *closure)
    7209             : {
    7210           0 :         struct wbint_GetNssInfo *object = (struct wbint_GetNssInfo *)pytalloc_get_ptr(obj);
    7211             :         PyObject *py_info;
    7212           0 :         if (object->out.info == NULL) {
    7213           0 :                 Py_RETURN_NONE;
    7214             :         }
    7215           0 :         py_info = pytalloc_reference_ex(&wbint_userinfo_Type, object->out.info, object->out.info);
    7216           0 :         return py_info;
    7217             : }
    7218             : 
    7219           0 : static int py_wbint_GetNssInfo_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
    7220             : {
    7221           0 :         struct wbint_GetNssInfo *object = (struct wbint_GetNssInfo *)pytalloc_get_ptr(py_obj);
    7222           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
    7223           0 :         if (value == NULL) {
    7224           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
    7225           0 :                 return -1;
    7226             :         }
    7227           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
    7228           0 :         if (object->out.info == NULL) {
    7229           0 :                 PyErr_NoMemory();
    7230           0 :                 return -1;
    7231             :         }
    7232           0 :         PY_CHECK_TYPE(&wbint_userinfo_Type, value, return -1;);
    7233           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7234           0 :                 PyErr_NoMemory();
    7235           0 :                 return -1;
    7236             :         }
    7237           0 :         object->out.info = (struct wbint_userinfo *)pytalloc_get_ptr(value);
    7238           0 :         return 0;
    7239             : }
    7240             : 
    7241           0 : static PyObject *py_wbint_GetNssInfo_get_result(PyObject *obj, void *closure)
    7242             : {
    7243           0 :         struct wbint_GetNssInfo *object = (struct wbint_GetNssInfo *)pytalloc_get_ptr(obj);
    7244             :         PyObject *py_result;
    7245           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    7246           0 :         return py_result;
    7247             : }
    7248             : 
    7249           0 : static int py_wbint_GetNssInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
    7250             : {
    7251           0 :         struct wbint_GetNssInfo *object = (struct wbint_GetNssInfo *)pytalloc_get_ptr(py_obj);
    7252           0 :         if (value == NULL) {
    7253           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    7254           0 :                 return -1;
    7255             :         }
    7256           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    7257           0 :         return 0;
    7258             : }
    7259             : 
    7260             : static PyGetSetDef py_wbint_GetNssInfo_getsetters[] = {
    7261             :         {
    7262             :                 .name = discard_const_p(char, "in_info"),
    7263             :                 .get = py_wbint_GetNssInfo_in_get_info,
    7264             :                 .set = py_wbint_GetNssInfo_in_set_info,
    7265             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_userinfo")
    7266             :         },
    7267             :         {
    7268             :                 .name = discard_const_p(char, "out_info"),
    7269             :                 .get = py_wbint_GetNssInfo_out_get_info,
    7270             :                 .set = py_wbint_GetNssInfo_out_set_info,
    7271             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_userinfo")
    7272             :         },
    7273             :         {
    7274             :                 .name = discard_const_p(char, "result"),
    7275             :                 .get = py_wbint_GetNssInfo_get_result,
    7276             :                 .set = py_wbint_GetNssInfo_set_result,
    7277             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    7278             :         },
    7279             :         { .name = NULL }
    7280             : };
    7281             : 
    7282           0 : static PyObject *py_wbint_GetNssInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7283             : {
    7284           0 :         PyObject *self = pytalloc_new(struct wbint_GetNssInfo, type);
    7285           0 :         struct wbint_GetNssInfo *_self = (struct wbint_GetNssInfo *)pytalloc_get_ptr(self);
    7286           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    7287           0 :         _self->in.info = talloc_zero(mem_ctx, struct wbint_userinfo);
    7288           0 :         _self->out.info = talloc_zero(mem_ctx, struct wbint_userinfo);
    7289           0 :         return self;
    7290             : }
    7291             : 
    7292           0 : static PyObject *py_wbint_GetNssInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    7293             : {
    7294             : 
    7295             : 
    7296           0 :         return PyLong_FromLong(8);
    7297             : }
    7298             : 
    7299           0 : static PyObject *py_wbint_GetNssInfo_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
    7300             : {
    7301           0 :         const struct ndr_interface_call *call = NULL;
    7302           0 :         struct wbint_GetNssInfo *object = (struct wbint_GetNssInfo *)pytalloc_get_ptr(py_obj);
    7303           0 :         PyObject *ret = NULL;
    7304           0 :         struct ndr_push *push = NULL;
    7305             :         DATA_BLOB blob;
    7306             :         enum ndr_err_code err;
    7307             : 
    7308           0 :         if (ndr_table_winbind.num_calls < 9) {
    7309           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_GetNssInfo_ndr_pack");
    7310           0 :                 return NULL;
    7311             :         }
    7312           0 :         call = &ndr_table_winbind.calls[8];
    7313             : 
    7314           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    7315           0 :         if (push == NULL) {
    7316           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7317           0 :                 return NULL;
    7318             :         }
    7319             : 
    7320           0 :         push->flags |= ndr_push_flags;
    7321             : 
    7322           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    7323           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7324           0 :                 TALLOC_FREE(push);
    7325           0 :                 PyErr_SetNdrError(err);
    7326           0 :                 return NULL;
    7327             :         }
    7328           0 :         blob = ndr_push_blob(push);
    7329           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    7330           0 :         TALLOC_FREE(push);
    7331           0 :         return ret;
    7332             : }
    7333             : 
    7334           0 : static PyObject *py_wbint_GetNssInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7335             : {
    7336           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    7337           0 :         PyObject *bigendian_obj = NULL;
    7338           0 :         PyObject *ndr64_obj = NULL;
    7339           0 :         uint32_t ndr_push_flags = 0;
    7340             : 
    7341           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    7342             :                 discard_const_p(char *, kwnames),
    7343             :                 &bigendian_obj,
    7344             :                 &ndr64_obj)) {
    7345           0 :                 return NULL;
    7346             :         }
    7347             : 
    7348           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    7349           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    7350             :         }
    7351           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    7352           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    7353             :         }
    7354             : 
    7355           0 :         return py_wbint_GetNssInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    7356             : }
    7357             : 
    7358           0 : static PyObject *py_wbint_GetNssInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7359             : {
    7360           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    7361           0 :         PyObject *bigendian_obj = NULL;
    7362           0 :         PyObject *ndr64_obj = NULL;
    7363           0 :         uint32_t ndr_push_flags = 0;
    7364             : 
    7365           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    7366             :                 discard_const_p(char *, kwnames),
    7367             :                 &bigendian_obj,
    7368             :                 &ndr64_obj)) {
    7369           0 :                 return NULL;
    7370             :         }
    7371             : 
    7372           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    7373           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    7374             :         }
    7375           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    7376           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    7377             :         }
    7378             : 
    7379           0 :         return py_wbint_GetNssInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    7380             : }
    7381             : 
    7382           0 : static PyObject *py_wbint_GetNssInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
    7383             : {
    7384           0 :         const struct ndr_interface_call *call = NULL;
    7385           0 :         struct wbint_GetNssInfo *object = (struct wbint_GetNssInfo *)pytalloc_get_ptr(py_obj);
    7386           0 :         struct ndr_pull *pull = NULL;
    7387             :         enum ndr_err_code err;
    7388             : 
    7389           0 :         if (ndr_table_winbind.num_calls < 9) {
    7390           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_GetNssInfo_ndr_unpack");
    7391           0 :                 return NULL;
    7392             :         }
    7393           0 :         call = &ndr_table_winbind.calls[8];
    7394             : 
    7395           0 :         pull = ndr_pull_init_blob(blob, object);
    7396           0 :         if (pull == NULL) {
    7397           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7398           0 :                 return NULL;
    7399             :         }
    7400             : 
    7401           0 :         pull->flags |= ndr_pull_flags;
    7402             : 
    7403           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    7404           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7405           0 :                 TALLOC_FREE(pull);
    7406           0 :                 PyErr_SetNdrError(err);
    7407           0 :                 return NULL;
    7408             :         }
    7409           0 :         if (!allow_remaining) {
    7410             :                 uint32_t highest_ofs;
    7411             : 
    7412           0 :                 if (pull->offset > pull->relative_highest_offset) {
    7413           0 :                         highest_ofs = pull->offset;
    7414             :                 } else {
    7415           0 :                         highest_ofs = pull->relative_highest_offset;
    7416             :                 }
    7417           0 :                 if (highest_ofs < pull->data_size) {
    7418           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    7419             :                                 "not all bytes consumed ofs[%u] size[%u]",
    7420             :                                 highest_ofs, pull->data_size);
    7421           0 :                         TALLOC_FREE(pull);
    7422           0 :                         PyErr_SetNdrError(err);
    7423           0 :                         return NULL;
    7424             :                 }
    7425             :         }
    7426             : 
    7427           0 :         TALLOC_FREE(pull);
    7428           0 :         Py_RETURN_NONE;
    7429             : }
    7430             : 
    7431           0 : static PyObject *py_wbint_GetNssInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7432             : {
    7433             :         DATA_BLOB blob;
    7434           0 :         Py_ssize_t blob_length = 0;
    7435           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    7436           0 :         PyObject *bigendian_obj = NULL;
    7437           0 :         PyObject *ndr64_obj = NULL;
    7438           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    7439           0 :         PyObject *allow_remaining_obj = NULL;
    7440           0 :         bool allow_remaining = false;
    7441             : 
    7442           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    7443             :                 discard_const_p(char *, kwnames),
    7444             :                 &blob.data, &blob_length,
    7445             :                 &bigendian_obj,
    7446             :                 &ndr64_obj,
    7447             :                 &allow_remaining_obj)) {
    7448           0 :                 return NULL;
    7449             :         }
    7450           0 :         blob.length = blob_length;
    7451             : 
    7452           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    7453           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    7454             :         }
    7455           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    7456           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    7457             :         }
    7458             : 
    7459           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7460           0 :                 allow_remaining = true;
    7461             :         }
    7462             : 
    7463           0 :         return py_wbint_GetNssInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    7464             : }
    7465             : 
    7466           0 : static PyObject *py_wbint_GetNssInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7467             : {
    7468             :         DATA_BLOB blob;
    7469           0 :         Py_ssize_t blob_length = 0;
    7470           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    7471           0 :         PyObject *bigendian_obj = NULL;
    7472           0 :         PyObject *ndr64_obj = NULL;
    7473           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    7474           0 :         PyObject *allow_remaining_obj = NULL;
    7475           0 :         bool allow_remaining = false;
    7476             : 
    7477           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    7478             :                 discard_const_p(char *, kwnames),
    7479             :                 &blob.data, &blob_length,
    7480             :                 &bigendian_obj,
    7481             :                 &ndr64_obj,
    7482             :                 &allow_remaining_obj)) {
    7483           0 :                 return NULL;
    7484             :         }
    7485           0 :         blob.length = blob_length;
    7486             : 
    7487           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    7488           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    7489             :         }
    7490           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    7491           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    7492             :         }
    7493             : 
    7494           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7495           0 :                 allow_remaining = true;
    7496             :         }
    7497             : 
    7498           0 :         return py_wbint_GetNssInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    7499             : }
    7500             : 
    7501           0 : static PyObject *py_wbint_GetNssInfo_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
    7502             : {
    7503           0 :         const struct ndr_interface_call *call = NULL;
    7504           0 :         struct wbint_GetNssInfo *object = (struct wbint_GetNssInfo *)pytalloc_get_ptr(py_obj);
    7505             :         PyObject *ret;
    7506             :         char *retstr;
    7507             : 
    7508           0 :         if (ndr_table_winbind.num_calls < 9) {
    7509           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_GetNssInfo_ndr_print");
    7510           0 :                 return NULL;
    7511             :         }
    7512           0 :         call = &ndr_table_winbind.calls[8];
    7513             : 
    7514           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    7515           0 :         ret = PyUnicode_FromString(retstr);
    7516           0 :         TALLOC_FREE(retstr);
    7517             : 
    7518           0 :         return ret;
    7519             : }
    7520             : 
    7521           0 : static PyObject *py_wbint_GetNssInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7522             : {
    7523           0 :         return py_wbint_GetNssInfo_ndr_print(py_obj, "wbint_GetNssInfo_in", NDR_IN);
    7524             : }
    7525             : 
    7526           0 : static PyObject *py_wbint_GetNssInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7527             : {
    7528           0 :         return py_wbint_GetNssInfo_ndr_print(py_obj, "wbint_GetNssInfo_out", NDR_OUT);
    7529             : }
    7530             : 
    7531             : static PyMethodDef py_wbint_GetNssInfo_methods[] = {
    7532             :         { "opnum", (PyCFunction)py_wbint_GetNssInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
    7533             :                 "winbind.wbint_GetNssInfo.opnum() -> 8 (0x08) " },
    7534             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_GetNssInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    7535             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    7536             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_GetNssInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    7537             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    7538             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_GetNssInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    7539             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    7540             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_GetNssInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    7541             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    7542             :         { "__ndr_print_in__", (PyCFunction)py_wbint_GetNssInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    7543             :         { "__ndr_print_out__", (PyCFunction)py_wbint_GetNssInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    7544             :         { NULL, NULL, 0, NULL }
    7545             : };
    7546             : 
    7547             : 
    7548             : static PyTypeObject wbint_GetNssInfo_Type = {
    7549             :         PyVarObject_HEAD_INIT(NULL, 0)
    7550             :         .tp_name = "winbind.wbint_GetNssInfo",
    7551             :         .tp_getset = py_wbint_GetNssInfo_getsetters,
    7552             :         .tp_methods = py_wbint_GetNssInfo_methods,
    7553             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7554             :         .tp_new = py_wbint_GetNssInfo_new,
    7555             : };
    7556             : 
    7557           0 : static bool pack_py_wbint_GetNssInfo_args_in(PyObject *args, PyObject *kwargs, struct wbint_GetNssInfo *r)
    7558             : {
    7559             :         PyObject *py_info;
    7560           0 :         const char *kwnames[] = {
    7561             :                 "info", NULL
    7562             :         };
    7563             : 
    7564           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:wbint_GetNssInfo", discard_const_p(char *, kwnames), &py_info)) {
    7565           0 :                 return false;
    7566             :         }
    7567             : 
    7568           0 :         if (py_info == NULL) {
    7569           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info");
    7570           0 :                 return false;
    7571             :         }
    7572           0 :         r->in.info = talloc_ptrtype(r, r->in.info);
    7573           0 :         if (r->in.info == NULL) {
    7574           0 :                 PyErr_NoMemory();
    7575           0 :                 return false;
    7576             :         }
    7577           0 :         PY_CHECK_TYPE(&wbint_userinfo_Type, py_info, return false;);
    7578           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info)) == NULL) {
    7579           0 :                 PyErr_NoMemory();
    7580           0 :                 return false;
    7581             :         }
    7582           0 :         r->in.info = (struct wbint_userinfo *)pytalloc_get_ptr(py_info);
    7583           0 :         return true;
    7584             : }
    7585             : 
    7586           0 : static PyObject *unpack_py_wbint_GetNssInfo_args_out(struct wbint_GetNssInfo *r)
    7587             : {
    7588             :         PyObject *result;
    7589             :         PyObject *py_info;
    7590           0 :         py_info = pytalloc_reference_ex(&wbint_userinfo_Type, r->out.info, r->out.info);
    7591           0 :         result = py_info;
    7592           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    7593           0 :                 PyErr_SetNTSTATUS(r->out.result);
    7594           0 :                 return NULL;
    7595             :         }
    7596             : 
    7597           0 :         return result;
    7598             : }
    7599             : 
    7600             : 
    7601           0 : static PyObject *py_wbint_LookupUserAliases_in_get_sids(PyObject *obj, void *closure)
    7602             : {
    7603           0 :         struct wbint_LookupUserAliases *object = (struct wbint_LookupUserAliases *)pytalloc_get_ptr(obj);
    7604             :         PyObject *py_sids;
    7605           0 :         if (object->in.sids == NULL) {
    7606           0 :                 Py_RETURN_NONE;
    7607             :         }
    7608           0 :         py_sids = pytalloc_reference_ex(&wbint_SidArray_Type, object->in.sids, object->in.sids);
    7609           0 :         return py_sids;
    7610             : }
    7611             : 
    7612           0 : static int py_wbint_LookupUserAliases_in_set_sids(PyObject *py_obj, PyObject *value, void *closure)
    7613             : {
    7614           0 :         struct wbint_LookupUserAliases *object = (struct wbint_LookupUserAliases *)pytalloc_get_ptr(py_obj);
    7615           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sids));
    7616           0 :         if (value == NULL) {
    7617           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.sids");
    7618           0 :                 return -1;
    7619             :         }
    7620           0 :         object->in.sids = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sids);
    7621           0 :         if (object->in.sids == NULL) {
    7622           0 :                 PyErr_NoMemory();
    7623           0 :                 return -1;
    7624             :         }
    7625           0 :         PY_CHECK_TYPE(&wbint_SidArray_Type, value, return -1;);
    7626           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7627           0 :                 PyErr_NoMemory();
    7628           0 :                 return -1;
    7629             :         }
    7630           0 :         object->in.sids = (struct wbint_SidArray *)pytalloc_get_ptr(value);
    7631           0 :         return 0;
    7632             : }
    7633             : 
    7634           0 : static PyObject *py_wbint_LookupUserAliases_out_get_rids(PyObject *obj, void *closure)
    7635             : {
    7636           0 :         struct wbint_LookupUserAliases *object = (struct wbint_LookupUserAliases *)pytalloc_get_ptr(obj);
    7637             :         PyObject *py_rids;
    7638           0 :         if (object->out.rids == NULL) {
    7639           0 :                 Py_RETURN_NONE;
    7640             :         }
    7641           0 :         py_rids = pytalloc_reference_ex(&wbint_RidArray_Type, object->out.rids, object->out.rids);
    7642           0 :         return py_rids;
    7643             : }
    7644             : 
    7645           0 : static int py_wbint_LookupUserAliases_out_set_rids(PyObject *py_obj, PyObject *value, void *closure)
    7646             : {
    7647           0 :         struct wbint_LookupUserAliases *object = (struct wbint_LookupUserAliases *)pytalloc_get_ptr(py_obj);
    7648           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.rids));
    7649           0 :         if (value == NULL) {
    7650           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.rids");
    7651           0 :                 return -1;
    7652             :         }
    7653           0 :         object->out.rids = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.rids);
    7654           0 :         if (object->out.rids == NULL) {
    7655           0 :                 PyErr_NoMemory();
    7656           0 :                 return -1;
    7657             :         }
    7658           0 :         PY_CHECK_TYPE(&wbint_RidArray_Type, value, return -1;);
    7659           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7660           0 :                 PyErr_NoMemory();
    7661           0 :                 return -1;
    7662             :         }
    7663           0 :         object->out.rids = (struct wbint_RidArray *)pytalloc_get_ptr(value);
    7664           0 :         return 0;
    7665             : }
    7666             : 
    7667           0 : static PyObject *py_wbint_LookupUserAliases_get_result(PyObject *obj, void *closure)
    7668             : {
    7669           0 :         struct wbint_LookupUserAliases *object = (struct wbint_LookupUserAliases *)pytalloc_get_ptr(obj);
    7670             :         PyObject *py_result;
    7671           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    7672           0 :         return py_result;
    7673             : }
    7674             : 
    7675           0 : static int py_wbint_LookupUserAliases_set_result(PyObject *py_obj, PyObject *value, void *closure)
    7676             : {
    7677           0 :         struct wbint_LookupUserAliases *object = (struct wbint_LookupUserAliases *)pytalloc_get_ptr(py_obj);
    7678           0 :         if (value == NULL) {
    7679           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    7680           0 :                 return -1;
    7681             :         }
    7682           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    7683           0 :         return 0;
    7684             : }
    7685             : 
    7686             : static PyGetSetDef py_wbint_LookupUserAliases_getsetters[] = {
    7687             :         {
    7688             :                 .name = discard_const_p(char, "in_sids"),
    7689             :                 .get = py_wbint_LookupUserAliases_in_get_sids,
    7690             :                 .set = py_wbint_LookupUserAliases_in_set_sids,
    7691             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_SidArray")
    7692             :         },
    7693             :         {
    7694             :                 .name = discard_const_p(char, "out_rids"),
    7695             :                 .get = py_wbint_LookupUserAliases_out_get_rids,
    7696             :                 .set = py_wbint_LookupUserAliases_out_set_rids,
    7697             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_RidArray")
    7698             :         },
    7699             :         {
    7700             :                 .name = discard_const_p(char, "result"),
    7701             :                 .get = py_wbint_LookupUserAliases_get_result,
    7702             :                 .set = py_wbint_LookupUserAliases_set_result,
    7703             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    7704             :         },
    7705             :         { .name = NULL }
    7706             : };
    7707             : 
    7708           0 : static PyObject *py_wbint_LookupUserAliases_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7709             : {
    7710           0 :         PyObject *self = pytalloc_new(struct wbint_LookupUserAliases, type);
    7711           0 :         struct wbint_LookupUserAliases *_self = (struct wbint_LookupUserAliases *)pytalloc_get_ptr(self);
    7712           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    7713           0 :         _self->in.sids = talloc_zero(mem_ctx, struct wbint_SidArray);
    7714           0 :         _self->out.rids = talloc_zero(mem_ctx, struct wbint_RidArray);
    7715           0 :         return self;
    7716             : }
    7717             : 
    7718           0 : static PyObject *py_wbint_LookupUserAliases_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    7719             : {
    7720             : 
    7721             : 
    7722           0 :         return PyLong_FromLong(9);
    7723             : }
    7724             : 
    7725           0 : static PyObject *py_wbint_LookupUserAliases_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
    7726             : {
    7727           0 :         const struct ndr_interface_call *call = NULL;
    7728           0 :         struct wbint_LookupUserAliases *object = (struct wbint_LookupUserAliases *)pytalloc_get_ptr(py_obj);
    7729           0 :         PyObject *ret = NULL;
    7730           0 :         struct ndr_push *push = NULL;
    7731             :         DATA_BLOB blob;
    7732             :         enum ndr_err_code err;
    7733             : 
    7734           0 :         if (ndr_table_winbind.num_calls < 10) {
    7735           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupUserAliases_ndr_pack");
    7736           0 :                 return NULL;
    7737             :         }
    7738           0 :         call = &ndr_table_winbind.calls[9];
    7739             : 
    7740           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    7741           0 :         if (push == NULL) {
    7742           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7743           0 :                 return NULL;
    7744             :         }
    7745             : 
    7746           0 :         push->flags |= ndr_push_flags;
    7747             : 
    7748           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    7749           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7750           0 :                 TALLOC_FREE(push);
    7751           0 :                 PyErr_SetNdrError(err);
    7752           0 :                 return NULL;
    7753             :         }
    7754           0 :         blob = ndr_push_blob(push);
    7755           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    7756           0 :         TALLOC_FREE(push);
    7757           0 :         return ret;
    7758             : }
    7759             : 
    7760           0 : static PyObject *py_wbint_LookupUserAliases_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7761             : {
    7762           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    7763           0 :         PyObject *bigendian_obj = NULL;
    7764           0 :         PyObject *ndr64_obj = NULL;
    7765           0 :         uint32_t ndr_push_flags = 0;
    7766             : 
    7767           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    7768             :                 discard_const_p(char *, kwnames),
    7769             :                 &bigendian_obj,
    7770             :                 &ndr64_obj)) {
    7771           0 :                 return NULL;
    7772             :         }
    7773             : 
    7774           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    7775           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    7776             :         }
    7777           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    7778           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    7779             :         }
    7780             : 
    7781           0 :         return py_wbint_LookupUserAliases_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    7782             : }
    7783             : 
    7784           0 : static PyObject *py_wbint_LookupUserAliases_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7785             : {
    7786           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    7787           0 :         PyObject *bigendian_obj = NULL;
    7788           0 :         PyObject *ndr64_obj = NULL;
    7789           0 :         uint32_t ndr_push_flags = 0;
    7790             : 
    7791           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    7792             :                 discard_const_p(char *, kwnames),
    7793             :                 &bigendian_obj,
    7794             :                 &ndr64_obj)) {
    7795           0 :                 return NULL;
    7796             :         }
    7797             : 
    7798           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    7799           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    7800             :         }
    7801           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    7802           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    7803             :         }
    7804             : 
    7805           0 :         return py_wbint_LookupUserAliases_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    7806             : }
    7807             : 
    7808           0 : static PyObject *py_wbint_LookupUserAliases_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
    7809             : {
    7810           0 :         const struct ndr_interface_call *call = NULL;
    7811           0 :         struct wbint_LookupUserAliases *object = (struct wbint_LookupUserAliases *)pytalloc_get_ptr(py_obj);
    7812           0 :         struct ndr_pull *pull = NULL;
    7813             :         enum ndr_err_code err;
    7814             : 
    7815           0 :         if (ndr_table_winbind.num_calls < 10) {
    7816           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupUserAliases_ndr_unpack");
    7817           0 :                 return NULL;
    7818             :         }
    7819           0 :         call = &ndr_table_winbind.calls[9];
    7820             : 
    7821           0 :         pull = ndr_pull_init_blob(blob, object);
    7822           0 :         if (pull == NULL) {
    7823           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7824           0 :                 return NULL;
    7825             :         }
    7826             : 
    7827           0 :         pull->flags |= ndr_pull_flags;
    7828             : 
    7829           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    7830           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7831           0 :                 TALLOC_FREE(pull);
    7832           0 :                 PyErr_SetNdrError(err);
    7833           0 :                 return NULL;
    7834             :         }
    7835           0 :         if (!allow_remaining) {
    7836             :                 uint32_t highest_ofs;
    7837             : 
    7838           0 :                 if (pull->offset > pull->relative_highest_offset) {
    7839           0 :                         highest_ofs = pull->offset;
    7840             :                 } else {
    7841           0 :                         highest_ofs = pull->relative_highest_offset;
    7842             :                 }
    7843           0 :                 if (highest_ofs < pull->data_size) {
    7844           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    7845             :                                 "not all bytes consumed ofs[%u] size[%u]",
    7846             :                                 highest_ofs, pull->data_size);
    7847           0 :                         TALLOC_FREE(pull);
    7848           0 :                         PyErr_SetNdrError(err);
    7849           0 :                         return NULL;
    7850             :                 }
    7851             :         }
    7852             : 
    7853           0 :         TALLOC_FREE(pull);
    7854           0 :         Py_RETURN_NONE;
    7855             : }
    7856             : 
    7857           0 : static PyObject *py_wbint_LookupUserAliases_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7858             : {
    7859             :         DATA_BLOB blob;
    7860           0 :         Py_ssize_t blob_length = 0;
    7861           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    7862           0 :         PyObject *bigendian_obj = NULL;
    7863           0 :         PyObject *ndr64_obj = NULL;
    7864           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    7865           0 :         PyObject *allow_remaining_obj = NULL;
    7866           0 :         bool allow_remaining = false;
    7867             : 
    7868           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    7869             :                 discard_const_p(char *, kwnames),
    7870             :                 &blob.data, &blob_length,
    7871             :                 &bigendian_obj,
    7872             :                 &ndr64_obj,
    7873             :                 &allow_remaining_obj)) {
    7874           0 :                 return NULL;
    7875             :         }
    7876           0 :         blob.length = blob_length;
    7877             : 
    7878           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    7879           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    7880             :         }
    7881           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    7882           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    7883             :         }
    7884             : 
    7885           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7886           0 :                 allow_remaining = true;
    7887             :         }
    7888             : 
    7889           0 :         return py_wbint_LookupUserAliases_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    7890             : }
    7891             : 
    7892           0 : static PyObject *py_wbint_LookupUserAliases_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7893             : {
    7894             :         DATA_BLOB blob;
    7895           0 :         Py_ssize_t blob_length = 0;
    7896           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    7897           0 :         PyObject *bigendian_obj = NULL;
    7898           0 :         PyObject *ndr64_obj = NULL;
    7899           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    7900           0 :         PyObject *allow_remaining_obj = NULL;
    7901           0 :         bool allow_remaining = false;
    7902             : 
    7903           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    7904             :                 discard_const_p(char *, kwnames),
    7905             :                 &blob.data, &blob_length,
    7906             :                 &bigendian_obj,
    7907             :                 &ndr64_obj,
    7908             :                 &allow_remaining_obj)) {
    7909           0 :                 return NULL;
    7910             :         }
    7911           0 :         blob.length = blob_length;
    7912             : 
    7913           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    7914           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    7915             :         }
    7916           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    7917           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    7918             :         }
    7919             : 
    7920           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7921           0 :                 allow_remaining = true;
    7922             :         }
    7923             : 
    7924           0 :         return py_wbint_LookupUserAliases_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    7925             : }
    7926             : 
    7927           0 : static PyObject *py_wbint_LookupUserAliases_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
    7928             : {
    7929           0 :         const struct ndr_interface_call *call = NULL;
    7930           0 :         struct wbint_LookupUserAliases *object = (struct wbint_LookupUserAliases *)pytalloc_get_ptr(py_obj);
    7931             :         PyObject *ret;
    7932             :         char *retstr;
    7933             : 
    7934           0 :         if (ndr_table_winbind.num_calls < 10) {
    7935           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupUserAliases_ndr_print");
    7936           0 :                 return NULL;
    7937             :         }
    7938           0 :         call = &ndr_table_winbind.calls[9];
    7939             : 
    7940           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    7941           0 :         ret = PyUnicode_FromString(retstr);
    7942           0 :         TALLOC_FREE(retstr);
    7943             : 
    7944           0 :         return ret;
    7945             : }
    7946             : 
    7947           0 : static PyObject *py_wbint_LookupUserAliases_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7948             : {
    7949           0 :         return py_wbint_LookupUserAliases_ndr_print(py_obj, "wbint_LookupUserAliases_in", NDR_IN);
    7950             : }
    7951             : 
    7952           0 : static PyObject *py_wbint_LookupUserAliases_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7953             : {
    7954           0 :         return py_wbint_LookupUserAliases_ndr_print(py_obj, "wbint_LookupUserAliases_out", NDR_OUT);
    7955             : }
    7956             : 
    7957             : static PyMethodDef py_wbint_LookupUserAliases_methods[] = {
    7958             :         { "opnum", (PyCFunction)py_wbint_LookupUserAliases_ndr_opnum, METH_NOARGS|METH_CLASS,
    7959             :                 "winbind.wbint_LookupUserAliases.opnum() -> 9 (0x09) " },
    7960             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupUserAliases_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    7961             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    7962             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupUserAliases_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    7963             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    7964             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupUserAliases_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    7965             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    7966             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupUserAliases_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    7967             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    7968             :         { "__ndr_print_in__", (PyCFunction)py_wbint_LookupUserAliases_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    7969             :         { "__ndr_print_out__", (PyCFunction)py_wbint_LookupUserAliases_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    7970             :         { NULL, NULL, 0, NULL }
    7971             : };
    7972             : 
    7973             : 
    7974             : static PyTypeObject wbint_LookupUserAliases_Type = {
    7975             :         PyVarObject_HEAD_INIT(NULL, 0)
    7976             :         .tp_name = "winbind.wbint_LookupUserAliases",
    7977             :         .tp_getset = py_wbint_LookupUserAliases_getsetters,
    7978             :         .tp_methods = py_wbint_LookupUserAliases_methods,
    7979             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7980             :         .tp_new = py_wbint_LookupUserAliases_new,
    7981             : };
    7982             : 
    7983           0 : static bool pack_py_wbint_LookupUserAliases_args_in(PyObject *args, PyObject *kwargs, struct wbint_LookupUserAliases *r)
    7984             : {
    7985             :         PyObject *py_sids;
    7986           0 :         const char *kwnames[] = {
    7987             :                 "sids", NULL
    7988             :         };
    7989             : 
    7990           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:wbint_LookupUserAliases", discard_const_p(char *, kwnames), &py_sids)) {
    7991           0 :                 return false;
    7992             :         }
    7993             : 
    7994           0 :         if (py_sids == NULL) {
    7995           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.sids");
    7996           0 :                 return false;
    7997             :         }
    7998           0 :         r->in.sids = talloc_ptrtype(r, r->in.sids);
    7999           0 :         if (r->in.sids == NULL) {
    8000           0 :                 PyErr_NoMemory();
    8001           0 :                 return false;
    8002             :         }
    8003           0 :         PY_CHECK_TYPE(&wbint_SidArray_Type, py_sids, return false;);
    8004           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_sids)) == NULL) {
    8005           0 :                 PyErr_NoMemory();
    8006           0 :                 return false;
    8007             :         }
    8008           0 :         r->in.sids = (struct wbint_SidArray *)pytalloc_get_ptr(py_sids);
    8009           0 :         return true;
    8010             : }
    8011             : 
    8012           0 : static PyObject *unpack_py_wbint_LookupUserAliases_args_out(struct wbint_LookupUserAliases *r)
    8013             : {
    8014             :         PyObject *result;
    8015             :         PyObject *py_rids;
    8016           0 :         py_rids = pytalloc_reference_ex(&wbint_RidArray_Type, r->out.rids, r->out.rids);
    8017           0 :         result = py_rids;
    8018           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    8019           0 :                 PyErr_SetNTSTATUS(r->out.result);
    8020           0 :                 return NULL;
    8021             :         }
    8022             : 
    8023           0 :         return result;
    8024             : }
    8025             : 
    8026             : 
    8027           0 : static PyObject *py_wbint_LookupUserGroups_in_get_sid(PyObject *obj, void *closure)
    8028             : {
    8029           0 :         struct wbint_LookupUserGroups *object = (struct wbint_LookupUserGroups *)pytalloc_get_ptr(obj);
    8030             :         PyObject *py_sid;
    8031           0 :         if (object->in.sid == NULL) {
    8032           0 :                 Py_RETURN_NONE;
    8033             :         }
    8034           0 :         py_sid = pytalloc_reference_ex(dom_sid_Type, object->in.sid, object->in.sid);
    8035           0 :         return py_sid;
    8036             : }
    8037             : 
    8038           0 : static int py_wbint_LookupUserGroups_in_set_sid(PyObject *py_obj, PyObject *value, void *closure)
    8039             : {
    8040           0 :         struct wbint_LookupUserGroups *object = (struct wbint_LookupUserGroups *)pytalloc_get_ptr(py_obj);
    8041           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sid));
    8042           0 :         if (value == NULL) {
    8043           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.sid");
    8044           0 :                 return -1;
    8045             :         }
    8046           0 :         object->in.sid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sid);
    8047           0 :         if (object->in.sid == NULL) {
    8048           0 :                 PyErr_NoMemory();
    8049           0 :                 return -1;
    8050             :         }
    8051           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    8052           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8053           0 :                 PyErr_NoMemory();
    8054           0 :                 return -1;
    8055             :         }
    8056           0 :         object->in.sid = (struct dom_sid *)pytalloc_get_ptr(value);
    8057           0 :         return 0;
    8058             : }
    8059             : 
    8060           0 : static PyObject *py_wbint_LookupUserGroups_out_get_sids(PyObject *obj, void *closure)
    8061             : {
    8062           0 :         struct wbint_LookupUserGroups *object = (struct wbint_LookupUserGroups *)pytalloc_get_ptr(obj);
    8063             :         PyObject *py_sids;
    8064           0 :         if (object->out.sids == NULL) {
    8065           0 :                 Py_RETURN_NONE;
    8066             :         }
    8067           0 :         py_sids = pytalloc_reference_ex(&wbint_SidArray_Type, object->out.sids, object->out.sids);
    8068           0 :         return py_sids;
    8069             : }
    8070             : 
    8071           0 : static int py_wbint_LookupUserGroups_out_set_sids(PyObject *py_obj, PyObject *value, void *closure)
    8072             : {
    8073           0 :         struct wbint_LookupUserGroups *object = (struct wbint_LookupUserGroups *)pytalloc_get_ptr(py_obj);
    8074           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sids));
    8075           0 :         if (value == NULL) {
    8076           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.sids");
    8077           0 :                 return -1;
    8078             :         }
    8079           0 :         object->out.sids = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sids);
    8080           0 :         if (object->out.sids == NULL) {
    8081           0 :                 PyErr_NoMemory();
    8082           0 :                 return -1;
    8083             :         }
    8084           0 :         PY_CHECK_TYPE(&wbint_SidArray_Type, value, return -1;);
    8085           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8086           0 :                 PyErr_NoMemory();
    8087           0 :                 return -1;
    8088             :         }
    8089           0 :         object->out.sids = (struct wbint_SidArray *)pytalloc_get_ptr(value);
    8090           0 :         return 0;
    8091             : }
    8092             : 
    8093           0 : static PyObject *py_wbint_LookupUserGroups_get_result(PyObject *obj, void *closure)
    8094             : {
    8095           0 :         struct wbint_LookupUserGroups *object = (struct wbint_LookupUserGroups *)pytalloc_get_ptr(obj);
    8096             :         PyObject *py_result;
    8097           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    8098           0 :         return py_result;
    8099             : }
    8100             : 
    8101           0 : static int py_wbint_LookupUserGroups_set_result(PyObject *py_obj, PyObject *value, void *closure)
    8102             : {
    8103           0 :         struct wbint_LookupUserGroups *object = (struct wbint_LookupUserGroups *)pytalloc_get_ptr(py_obj);
    8104           0 :         if (value == NULL) {
    8105           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    8106           0 :                 return -1;
    8107             :         }
    8108           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    8109           0 :         return 0;
    8110             : }
    8111             : 
    8112             : static PyGetSetDef py_wbint_LookupUserGroups_getsetters[] = {
    8113             :         {
    8114             :                 .name = discard_const_p(char, "in_sid"),
    8115             :                 .get = py_wbint_LookupUserGroups_in_get_sid,
    8116             :                 .set = py_wbint_LookupUserGroups_in_set_sid,
    8117             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
    8118             :         },
    8119             :         {
    8120             :                 .name = discard_const_p(char, "out_sids"),
    8121             :                 .get = py_wbint_LookupUserGroups_out_get_sids,
    8122             :                 .set = py_wbint_LookupUserGroups_out_set_sids,
    8123             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_SidArray")
    8124             :         },
    8125             :         {
    8126             :                 .name = discard_const_p(char, "result"),
    8127             :                 .get = py_wbint_LookupUserGroups_get_result,
    8128             :                 .set = py_wbint_LookupUserGroups_set_result,
    8129             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    8130             :         },
    8131             :         { .name = NULL }
    8132             : };
    8133             : 
    8134           0 : static PyObject *py_wbint_LookupUserGroups_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8135             : {
    8136           0 :         PyObject *self = pytalloc_new(struct wbint_LookupUserGroups, type);
    8137           0 :         struct wbint_LookupUserGroups *_self = (struct wbint_LookupUserGroups *)pytalloc_get_ptr(self);
    8138           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    8139           0 :         _self->in.sid = talloc_zero(mem_ctx, struct dom_sid);
    8140           0 :         _self->out.sids = talloc_zero(mem_ctx, struct wbint_SidArray);
    8141           0 :         return self;
    8142             : }
    8143             : 
    8144           0 : static PyObject *py_wbint_LookupUserGroups_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    8145             : {
    8146             : 
    8147             : 
    8148           0 :         return PyLong_FromLong(10);
    8149             : }
    8150             : 
    8151           0 : static PyObject *py_wbint_LookupUserGroups_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
    8152             : {
    8153           0 :         const struct ndr_interface_call *call = NULL;
    8154           0 :         struct wbint_LookupUserGroups *object = (struct wbint_LookupUserGroups *)pytalloc_get_ptr(py_obj);
    8155           0 :         PyObject *ret = NULL;
    8156           0 :         struct ndr_push *push = NULL;
    8157             :         DATA_BLOB blob;
    8158             :         enum ndr_err_code err;
    8159             : 
    8160           0 :         if (ndr_table_winbind.num_calls < 11) {
    8161           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupUserGroups_ndr_pack");
    8162           0 :                 return NULL;
    8163             :         }
    8164           0 :         call = &ndr_table_winbind.calls[10];
    8165             : 
    8166           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    8167           0 :         if (push == NULL) {
    8168           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    8169           0 :                 return NULL;
    8170             :         }
    8171             : 
    8172           0 :         push->flags |= ndr_push_flags;
    8173             : 
    8174           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    8175           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    8176           0 :                 TALLOC_FREE(push);
    8177           0 :                 PyErr_SetNdrError(err);
    8178           0 :                 return NULL;
    8179             :         }
    8180           0 :         blob = ndr_push_blob(push);
    8181           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    8182           0 :         TALLOC_FREE(push);
    8183           0 :         return ret;
    8184             : }
    8185             : 
    8186           0 : static PyObject *py_wbint_LookupUserGroups_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    8187             : {
    8188           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    8189           0 :         PyObject *bigendian_obj = NULL;
    8190           0 :         PyObject *ndr64_obj = NULL;
    8191           0 :         uint32_t ndr_push_flags = 0;
    8192             : 
    8193           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    8194             :                 discard_const_p(char *, kwnames),
    8195             :                 &bigendian_obj,
    8196             :                 &ndr64_obj)) {
    8197           0 :                 return NULL;
    8198             :         }
    8199             : 
    8200           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    8201           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    8202             :         }
    8203           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    8204           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    8205             :         }
    8206             : 
    8207           0 :         return py_wbint_LookupUserGroups_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    8208             : }
    8209             : 
    8210           0 : static PyObject *py_wbint_LookupUserGroups_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    8211             : {
    8212           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    8213           0 :         PyObject *bigendian_obj = NULL;
    8214           0 :         PyObject *ndr64_obj = NULL;
    8215           0 :         uint32_t ndr_push_flags = 0;
    8216             : 
    8217           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    8218             :                 discard_const_p(char *, kwnames),
    8219             :                 &bigendian_obj,
    8220             :                 &ndr64_obj)) {
    8221           0 :                 return NULL;
    8222             :         }
    8223             : 
    8224           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    8225           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    8226             :         }
    8227           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    8228           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    8229             :         }
    8230             : 
    8231           0 :         return py_wbint_LookupUserGroups_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    8232             : }
    8233             : 
    8234           0 : static PyObject *py_wbint_LookupUserGroups_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
    8235             : {
    8236           0 :         const struct ndr_interface_call *call = NULL;
    8237           0 :         struct wbint_LookupUserGroups *object = (struct wbint_LookupUserGroups *)pytalloc_get_ptr(py_obj);
    8238           0 :         struct ndr_pull *pull = NULL;
    8239             :         enum ndr_err_code err;
    8240             : 
    8241           0 :         if (ndr_table_winbind.num_calls < 11) {
    8242           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupUserGroups_ndr_unpack");
    8243           0 :                 return NULL;
    8244             :         }
    8245           0 :         call = &ndr_table_winbind.calls[10];
    8246             : 
    8247           0 :         pull = ndr_pull_init_blob(blob, object);
    8248           0 :         if (pull == NULL) {
    8249           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    8250           0 :                 return NULL;
    8251             :         }
    8252             : 
    8253           0 :         pull->flags |= ndr_pull_flags;
    8254             : 
    8255           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    8256           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    8257           0 :                 TALLOC_FREE(pull);
    8258           0 :                 PyErr_SetNdrError(err);
    8259           0 :                 return NULL;
    8260             :         }
    8261           0 :         if (!allow_remaining) {
    8262             :                 uint32_t highest_ofs;
    8263             : 
    8264           0 :                 if (pull->offset > pull->relative_highest_offset) {
    8265           0 :                         highest_ofs = pull->offset;
    8266             :                 } else {
    8267           0 :                         highest_ofs = pull->relative_highest_offset;
    8268             :                 }
    8269           0 :                 if (highest_ofs < pull->data_size) {
    8270           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    8271             :                                 "not all bytes consumed ofs[%u] size[%u]",
    8272             :                                 highest_ofs, pull->data_size);
    8273           0 :                         TALLOC_FREE(pull);
    8274           0 :                         PyErr_SetNdrError(err);
    8275           0 :                         return NULL;
    8276             :                 }
    8277             :         }
    8278             : 
    8279           0 :         TALLOC_FREE(pull);
    8280           0 :         Py_RETURN_NONE;
    8281             : }
    8282             : 
    8283           0 : static PyObject *py_wbint_LookupUserGroups_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    8284             : {
    8285             :         DATA_BLOB blob;
    8286           0 :         Py_ssize_t blob_length = 0;
    8287           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    8288           0 :         PyObject *bigendian_obj = NULL;
    8289           0 :         PyObject *ndr64_obj = NULL;
    8290           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    8291           0 :         PyObject *allow_remaining_obj = NULL;
    8292           0 :         bool allow_remaining = false;
    8293             : 
    8294           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    8295             :                 discard_const_p(char *, kwnames),
    8296             :                 &blob.data, &blob_length,
    8297             :                 &bigendian_obj,
    8298             :                 &ndr64_obj,
    8299             :                 &allow_remaining_obj)) {
    8300           0 :                 return NULL;
    8301             :         }
    8302           0 :         blob.length = blob_length;
    8303             : 
    8304           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    8305           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    8306             :         }
    8307           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    8308           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    8309             :         }
    8310             : 
    8311           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    8312           0 :                 allow_remaining = true;
    8313             :         }
    8314             : 
    8315           0 :         return py_wbint_LookupUserGroups_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    8316             : }
    8317             : 
    8318           0 : static PyObject *py_wbint_LookupUserGroups_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    8319             : {
    8320             :         DATA_BLOB blob;
    8321           0 :         Py_ssize_t blob_length = 0;
    8322           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    8323           0 :         PyObject *bigendian_obj = NULL;
    8324           0 :         PyObject *ndr64_obj = NULL;
    8325           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    8326           0 :         PyObject *allow_remaining_obj = NULL;
    8327           0 :         bool allow_remaining = false;
    8328             : 
    8329           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    8330             :                 discard_const_p(char *, kwnames),
    8331             :                 &blob.data, &blob_length,
    8332             :                 &bigendian_obj,
    8333             :                 &ndr64_obj,
    8334             :                 &allow_remaining_obj)) {
    8335           0 :                 return NULL;
    8336             :         }
    8337           0 :         blob.length = blob_length;
    8338             : 
    8339           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    8340           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    8341             :         }
    8342           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    8343           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    8344             :         }
    8345             : 
    8346           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    8347           0 :                 allow_remaining = true;
    8348             :         }
    8349             : 
    8350           0 :         return py_wbint_LookupUserGroups_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    8351             : }
    8352             : 
    8353           0 : static PyObject *py_wbint_LookupUserGroups_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
    8354             : {
    8355           0 :         const struct ndr_interface_call *call = NULL;
    8356           0 :         struct wbint_LookupUserGroups *object = (struct wbint_LookupUserGroups *)pytalloc_get_ptr(py_obj);
    8357             :         PyObject *ret;
    8358             :         char *retstr;
    8359             : 
    8360           0 :         if (ndr_table_winbind.num_calls < 11) {
    8361           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupUserGroups_ndr_print");
    8362           0 :                 return NULL;
    8363             :         }
    8364           0 :         call = &ndr_table_winbind.calls[10];
    8365             : 
    8366           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    8367           0 :         ret = PyUnicode_FromString(retstr);
    8368           0 :         TALLOC_FREE(retstr);
    8369             : 
    8370           0 :         return ret;
    8371             : }
    8372             : 
    8373           0 : static PyObject *py_wbint_LookupUserGroups_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    8374             : {
    8375           0 :         return py_wbint_LookupUserGroups_ndr_print(py_obj, "wbint_LookupUserGroups_in", NDR_IN);
    8376             : }
    8377             : 
    8378           0 : static PyObject *py_wbint_LookupUserGroups_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    8379             : {
    8380           0 :         return py_wbint_LookupUserGroups_ndr_print(py_obj, "wbint_LookupUserGroups_out", NDR_OUT);
    8381             : }
    8382             : 
    8383             : static PyMethodDef py_wbint_LookupUserGroups_methods[] = {
    8384             :         { "opnum", (PyCFunction)py_wbint_LookupUserGroups_ndr_opnum, METH_NOARGS|METH_CLASS,
    8385             :                 "winbind.wbint_LookupUserGroups.opnum() -> 10 (0x0a) " },
    8386             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupUserGroups_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    8387             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    8388             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupUserGroups_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    8389             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    8390             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupUserGroups_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    8391             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    8392             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupUserGroups_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    8393             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    8394             :         { "__ndr_print_in__", (PyCFunction)py_wbint_LookupUserGroups_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    8395             :         { "__ndr_print_out__", (PyCFunction)py_wbint_LookupUserGroups_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    8396             :         { NULL, NULL, 0, NULL }
    8397             : };
    8398             : 
    8399             : 
    8400             : static PyTypeObject wbint_LookupUserGroups_Type = {
    8401             :         PyVarObject_HEAD_INIT(NULL, 0)
    8402             :         .tp_name = "winbind.wbint_LookupUserGroups",
    8403             :         .tp_getset = py_wbint_LookupUserGroups_getsetters,
    8404             :         .tp_methods = py_wbint_LookupUserGroups_methods,
    8405             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    8406             :         .tp_new = py_wbint_LookupUserGroups_new,
    8407             : };
    8408             : 
    8409           0 : static bool pack_py_wbint_LookupUserGroups_args_in(PyObject *args, PyObject *kwargs, struct wbint_LookupUserGroups *r)
    8410             : {
    8411             :         PyObject *py_sid;
    8412           0 :         const char *kwnames[] = {
    8413             :                 "sid", NULL
    8414             :         };
    8415             : 
    8416           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:wbint_LookupUserGroups", discard_const_p(char *, kwnames), &py_sid)) {
    8417           0 :                 return false;
    8418             :         }
    8419             : 
    8420           0 :         if (py_sid == NULL) {
    8421           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.sid");
    8422           0 :                 return false;
    8423             :         }
    8424           0 :         r->in.sid = talloc_ptrtype(r, r->in.sid);
    8425           0 :         if (r->in.sid == NULL) {
    8426           0 :                 PyErr_NoMemory();
    8427           0 :                 return false;
    8428             :         }
    8429           0 :         PY_CHECK_TYPE(dom_sid_Type, py_sid, return false;);
    8430           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_sid)) == NULL) {
    8431           0 :                 PyErr_NoMemory();
    8432           0 :                 return false;
    8433             :         }
    8434           0 :         r->in.sid = (struct dom_sid *)pytalloc_get_ptr(py_sid);
    8435           0 :         return true;
    8436             : }
    8437             : 
    8438           0 : static PyObject *unpack_py_wbint_LookupUserGroups_args_out(struct wbint_LookupUserGroups *r)
    8439             : {
    8440             :         PyObject *result;
    8441             :         PyObject *py_sids;
    8442           0 :         py_sids = pytalloc_reference_ex(&wbint_SidArray_Type, r->out.sids, r->out.sids);
    8443           0 :         result = py_sids;
    8444           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    8445           0 :                 PyErr_SetNTSTATUS(r->out.result);
    8446           0 :                 return NULL;
    8447             :         }
    8448             : 
    8449           0 :         return result;
    8450             : }
    8451             : 
    8452             : 
    8453           0 : static PyObject *py_wbint_QuerySequenceNumber_out_get_sequence(PyObject *obj, void *closure)
    8454             : {
    8455           0 :         struct wbint_QuerySequenceNumber *object = (struct wbint_QuerySequenceNumber *)pytalloc_get_ptr(obj);
    8456             :         PyObject *py_sequence;
    8457           0 :         if (object->out.sequence == NULL) {
    8458           0 :                 Py_RETURN_NONE;
    8459             :         }
    8460           0 :         py_sequence = PyLong_FromUnsignedLongLong((uint32_t)*object->out.sequence);
    8461           0 :         return py_sequence;
    8462             : }
    8463             : 
    8464           0 : static int py_wbint_QuerySequenceNumber_out_set_sequence(PyObject *py_obj, PyObject *value, void *closure)
    8465             : {
    8466           0 :         struct wbint_QuerySequenceNumber *object = (struct wbint_QuerySequenceNumber *)pytalloc_get_ptr(py_obj);
    8467           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sequence));
    8468           0 :         if (value == NULL) {
    8469           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.sequence");
    8470           0 :                 return -1;
    8471             :         }
    8472           0 :         object->out.sequence = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sequence);
    8473           0 :         if (object->out.sequence == NULL) {
    8474           0 :                 PyErr_NoMemory();
    8475           0 :                 return -1;
    8476             :         }
    8477             :         {
    8478           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.sequence));
    8479           0 :                 if (PyLong_Check(value)) {
    8480             :                         unsigned long long test_var;
    8481           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8482           0 :                         if (PyErr_Occurred() != NULL) {
    8483           0 :                                 return -1;
    8484             :                         }
    8485           0 :                         if (test_var > uint_max) {
    8486           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8487             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8488           0 :                                 return -1;
    8489             :                         }
    8490           0 :                         *object->out.sequence = test_var;
    8491             :                 } else {
    8492           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8493             :                           PyLong_Type.tp_name);
    8494           0 :                         return -1;
    8495             :                 }
    8496             :         }
    8497           0 :         return 0;
    8498             : }
    8499             : 
    8500           0 : static PyObject *py_wbint_QuerySequenceNumber_get_result(PyObject *obj, void *closure)
    8501             : {
    8502           0 :         struct wbint_QuerySequenceNumber *object = (struct wbint_QuerySequenceNumber *)pytalloc_get_ptr(obj);
    8503             :         PyObject *py_result;
    8504           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    8505           0 :         return py_result;
    8506             : }
    8507             : 
    8508           0 : static int py_wbint_QuerySequenceNumber_set_result(PyObject *py_obj, PyObject *value, void *closure)
    8509             : {
    8510           0 :         struct wbint_QuerySequenceNumber *object = (struct wbint_QuerySequenceNumber *)pytalloc_get_ptr(py_obj);
    8511           0 :         if (value == NULL) {
    8512           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    8513           0 :                 return -1;
    8514             :         }
    8515           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    8516           0 :         return 0;
    8517             : }
    8518             : 
    8519             : static PyGetSetDef py_wbint_QuerySequenceNumber_getsetters[] = {
    8520             :         {
    8521             :                 .name = discard_const_p(char, "out_sequence"),
    8522             :                 .get = py_wbint_QuerySequenceNumber_out_get_sequence,
    8523             :                 .set = py_wbint_QuerySequenceNumber_out_set_sequence,
    8524             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8525             :         },
    8526             :         {
    8527             :                 .name = discard_const_p(char, "result"),
    8528             :                 .get = py_wbint_QuerySequenceNumber_get_result,
    8529             :                 .set = py_wbint_QuerySequenceNumber_set_result,
    8530             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    8531             :         },
    8532             :         { .name = NULL }
    8533             : };
    8534             : 
    8535           0 : static PyObject *py_wbint_QuerySequenceNumber_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8536             : {
    8537           0 :         PyObject *self = pytalloc_new(struct wbint_QuerySequenceNumber, type);
    8538           0 :         struct wbint_QuerySequenceNumber *_self = (struct wbint_QuerySequenceNumber *)pytalloc_get_ptr(self);
    8539           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    8540           0 :         _self->out.sequence = talloc_zero(mem_ctx, uint32_t);
    8541           0 :         return self;
    8542             : }
    8543             : 
    8544           0 : static PyObject *py_wbint_QuerySequenceNumber_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    8545             : {
    8546             : 
    8547             : 
    8548           0 :         return PyLong_FromLong(11);
    8549             : }
    8550             : 
    8551           0 : static PyObject *py_wbint_QuerySequenceNumber_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
    8552             : {
    8553           0 :         const struct ndr_interface_call *call = NULL;
    8554           0 :         struct wbint_QuerySequenceNumber *object = (struct wbint_QuerySequenceNumber *)pytalloc_get_ptr(py_obj);
    8555           0 :         PyObject *ret = NULL;
    8556           0 :         struct ndr_push *push = NULL;
    8557             :         DATA_BLOB blob;
    8558             :         enum ndr_err_code err;
    8559             : 
    8560           0 :         if (ndr_table_winbind.num_calls < 12) {
    8561           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_QuerySequenceNumber_ndr_pack");
    8562           0 :                 return NULL;
    8563             :         }
    8564           0 :         call = &ndr_table_winbind.calls[11];
    8565             : 
    8566           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    8567           0 :         if (push == NULL) {
    8568           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    8569           0 :                 return NULL;
    8570             :         }
    8571             : 
    8572           0 :         push->flags |= ndr_push_flags;
    8573             : 
    8574           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    8575           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    8576           0 :                 TALLOC_FREE(push);
    8577           0 :                 PyErr_SetNdrError(err);
    8578           0 :                 return NULL;
    8579             :         }
    8580           0 :         blob = ndr_push_blob(push);
    8581           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    8582           0 :         TALLOC_FREE(push);
    8583           0 :         return ret;
    8584             : }
    8585             : 
    8586           0 : static PyObject *py_wbint_QuerySequenceNumber_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    8587             : {
    8588           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    8589           0 :         PyObject *bigendian_obj = NULL;
    8590           0 :         PyObject *ndr64_obj = NULL;
    8591           0 :         uint32_t ndr_push_flags = 0;
    8592             : 
    8593           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    8594             :                 discard_const_p(char *, kwnames),
    8595             :                 &bigendian_obj,
    8596             :                 &ndr64_obj)) {
    8597           0 :                 return NULL;
    8598             :         }
    8599             : 
    8600           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    8601           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    8602             :         }
    8603           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    8604           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    8605             :         }
    8606             : 
    8607           0 :         return py_wbint_QuerySequenceNumber_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    8608             : }
    8609             : 
    8610           0 : static PyObject *py_wbint_QuerySequenceNumber_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    8611             : {
    8612           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    8613           0 :         PyObject *bigendian_obj = NULL;
    8614           0 :         PyObject *ndr64_obj = NULL;
    8615           0 :         uint32_t ndr_push_flags = 0;
    8616             : 
    8617           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    8618             :                 discard_const_p(char *, kwnames),
    8619             :                 &bigendian_obj,
    8620             :                 &ndr64_obj)) {
    8621           0 :                 return NULL;
    8622             :         }
    8623             : 
    8624           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    8625           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    8626             :         }
    8627           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    8628           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    8629             :         }
    8630             : 
    8631           0 :         return py_wbint_QuerySequenceNumber_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    8632             : }
    8633             : 
    8634           0 : static PyObject *py_wbint_QuerySequenceNumber_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
    8635             : {
    8636           0 :         const struct ndr_interface_call *call = NULL;
    8637           0 :         struct wbint_QuerySequenceNumber *object = (struct wbint_QuerySequenceNumber *)pytalloc_get_ptr(py_obj);
    8638           0 :         struct ndr_pull *pull = NULL;
    8639             :         enum ndr_err_code err;
    8640             : 
    8641           0 :         if (ndr_table_winbind.num_calls < 12) {
    8642           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_QuerySequenceNumber_ndr_unpack");
    8643           0 :                 return NULL;
    8644             :         }
    8645           0 :         call = &ndr_table_winbind.calls[11];
    8646             : 
    8647           0 :         pull = ndr_pull_init_blob(blob, object);
    8648           0 :         if (pull == NULL) {
    8649           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    8650           0 :                 return NULL;
    8651             :         }
    8652             : 
    8653           0 :         pull->flags |= ndr_pull_flags;
    8654             : 
    8655           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    8656           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    8657           0 :                 TALLOC_FREE(pull);
    8658           0 :                 PyErr_SetNdrError(err);
    8659           0 :                 return NULL;
    8660             :         }
    8661           0 :         if (!allow_remaining) {
    8662             :                 uint32_t highest_ofs;
    8663             : 
    8664           0 :                 if (pull->offset > pull->relative_highest_offset) {
    8665           0 :                         highest_ofs = pull->offset;
    8666             :                 } else {
    8667           0 :                         highest_ofs = pull->relative_highest_offset;
    8668             :                 }
    8669           0 :                 if (highest_ofs < pull->data_size) {
    8670           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    8671             :                                 "not all bytes consumed ofs[%u] size[%u]",
    8672             :                                 highest_ofs, pull->data_size);
    8673           0 :                         TALLOC_FREE(pull);
    8674           0 :                         PyErr_SetNdrError(err);
    8675           0 :                         return NULL;
    8676             :                 }
    8677             :         }
    8678             : 
    8679           0 :         TALLOC_FREE(pull);
    8680           0 :         Py_RETURN_NONE;
    8681             : }
    8682             : 
    8683           0 : static PyObject *py_wbint_QuerySequenceNumber_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    8684             : {
    8685             :         DATA_BLOB blob;
    8686           0 :         Py_ssize_t blob_length = 0;
    8687           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    8688           0 :         PyObject *bigendian_obj = NULL;
    8689           0 :         PyObject *ndr64_obj = NULL;
    8690           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    8691           0 :         PyObject *allow_remaining_obj = NULL;
    8692           0 :         bool allow_remaining = false;
    8693             : 
    8694           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    8695             :                 discard_const_p(char *, kwnames),
    8696             :                 &blob.data, &blob_length,
    8697             :                 &bigendian_obj,
    8698             :                 &ndr64_obj,
    8699             :                 &allow_remaining_obj)) {
    8700           0 :                 return NULL;
    8701             :         }
    8702           0 :         blob.length = blob_length;
    8703             : 
    8704           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    8705           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    8706             :         }
    8707           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    8708           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    8709             :         }
    8710             : 
    8711           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    8712           0 :                 allow_remaining = true;
    8713             :         }
    8714             : 
    8715           0 :         return py_wbint_QuerySequenceNumber_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    8716             : }
    8717             : 
    8718           0 : static PyObject *py_wbint_QuerySequenceNumber_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    8719             : {
    8720             :         DATA_BLOB blob;
    8721           0 :         Py_ssize_t blob_length = 0;
    8722           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    8723           0 :         PyObject *bigendian_obj = NULL;
    8724           0 :         PyObject *ndr64_obj = NULL;
    8725           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    8726           0 :         PyObject *allow_remaining_obj = NULL;
    8727           0 :         bool allow_remaining = false;
    8728             : 
    8729           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    8730             :                 discard_const_p(char *, kwnames),
    8731             :                 &blob.data, &blob_length,
    8732             :                 &bigendian_obj,
    8733             :                 &ndr64_obj,
    8734             :                 &allow_remaining_obj)) {
    8735           0 :                 return NULL;
    8736             :         }
    8737           0 :         blob.length = blob_length;
    8738             : 
    8739           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    8740           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    8741             :         }
    8742           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    8743           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    8744             :         }
    8745             : 
    8746           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    8747           0 :                 allow_remaining = true;
    8748             :         }
    8749             : 
    8750           0 :         return py_wbint_QuerySequenceNumber_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    8751             : }
    8752             : 
    8753           0 : static PyObject *py_wbint_QuerySequenceNumber_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
    8754             : {
    8755           0 :         const struct ndr_interface_call *call = NULL;
    8756           0 :         struct wbint_QuerySequenceNumber *object = (struct wbint_QuerySequenceNumber *)pytalloc_get_ptr(py_obj);
    8757             :         PyObject *ret;
    8758             :         char *retstr;
    8759             : 
    8760           0 :         if (ndr_table_winbind.num_calls < 12) {
    8761           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_QuerySequenceNumber_ndr_print");
    8762           0 :                 return NULL;
    8763             :         }
    8764           0 :         call = &ndr_table_winbind.calls[11];
    8765             : 
    8766           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    8767           0 :         ret = PyUnicode_FromString(retstr);
    8768           0 :         TALLOC_FREE(retstr);
    8769             : 
    8770           0 :         return ret;
    8771             : }
    8772             : 
    8773           0 : static PyObject *py_wbint_QuerySequenceNumber_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    8774             : {
    8775           0 :         return py_wbint_QuerySequenceNumber_ndr_print(py_obj, "wbint_QuerySequenceNumber_in", NDR_IN);
    8776             : }
    8777             : 
    8778           0 : static PyObject *py_wbint_QuerySequenceNumber_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    8779             : {
    8780           0 :         return py_wbint_QuerySequenceNumber_ndr_print(py_obj, "wbint_QuerySequenceNumber_out", NDR_OUT);
    8781             : }
    8782             : 
    8783             : static PyMethodDef py_wbint_QuerySequenceNumber_methods[] = {
    8784             :         { "opnum", (PyCFunction)py_wbint_QuerySequenceNumber_ndr_opnum, METH_NOARGS|METH_CLASS,
    8785             :                 "winbind.wbint_QuerySequenceNumber.opnum() -> 11 (0x0b) " },
    8786             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QuerySequenceNumber_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    8787             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    8788             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QuerySequenceNumber_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    8789             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    8790             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QuerySequenceNumber_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    8791             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    8792             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QuerySequenceNumber_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    8793             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    8794             :         { "__ndr_print_in__", (PyCFunction)py_wbint_QuerySequenceNumber_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    8795             :         { "__ndr_print_out__", (PyCFunction)py_wbint_QuerySequenceNumber_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    8796             :         { NULL, NULL, 0, NULL }
    8797             : };
    8798             : 
    8799             : 
    8800             : static PyTypeObject wbint_QuerySequenceNumber_Type = {
    8801             :         PyVarObject_HEAD_INIT(NULL, 0)
    8802             :         .tp_name = "winbind.wbint_QuerySequenceNumber",
    8803             :         .tp_getset = py_wbint_QuerySequenceNumber_getsetters,
    8804             :         .tp_methods = py_wbint_QuerySequenceNumber_methods,
    8805             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    8806             :         .tp_new = py_wbint_QuerySequenceNumber_new,
    8807             : };
    8808             : 
    8809           0 : static bool pack_py_wbint_QuerySequenceNumber_args_in(PyObject *args, PyObject *kwargs, struct wbint_QuerySequenceNumber *r)
    8810             : {
    8811           0 :         const char *kwnames[] = {
    8812             :                 NULL
    8813             :         };
    8814             : 
    8815           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":wbint_QuerySequenceNumber", discard_const_p(char *, kwnames))) {
    8816           0 :                 return false;
    8817             :         }
    8818             : 
    8819           0 :         return true;
    8820             : }
    8821             : 
    8822           0 : static PyObject *unpack_py_wbint_QuerySequenceNumber_args_out(struct wbint_QuerySequenceNumber *r)
    8823             : {
    8824             :         PyObject *result;
    8825             :         PyObject *py_sequence;
    8826           0 :         py_sequence = PyLong_FromUnsignedLongLong((uint32_t)*r->out.sequence);
    8827           0 :         result = py_sequence;
    8828           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    8829           0 :                 PyErr_SetNTSTATUS(r->out.result);
    8830           0 :                 return NULL;
    8831             :         }
    8832             : 
    8833           0 :         return result;
    8834             : }
    8835             : 
    8836             : 
    8837           0 : static PyObject *py_wbint_LookupGroupMembers_in_get_sid(PyObject *obj, void *closure)
    8838             : {
    8839           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(obj);
    8840             :         PyObject *py_sid;
    8841           0 :         if (object->in.sid == NULL) {
    8842           0 :                 Py_RETURN_NONE;
    8843             :         }
    8844           0 :         py_sid = pytalloc_reference_ex(dom_sid_Type, object->in.sid, object->in.sid);
    8845           0 :         return py_sid;
    8846             : }
    8847             : 
    8848           0 : static int py_wbint_LookupGroupMembers_in_set_sid(PyObject *py_obj, PyObject *value, void *closure)
    8849             : {
    8850           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(py_obj);
    8851           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sid));
    8852           0 :         if (value == NULL) {
    8853           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.sid");
    8854           0 :                 return -1;
    8855             :         }
    8856           0 :         object->in.sid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sid);
    8857           0 :         if (object->in.sid == NULL) {
    8858           0 :                 PyErr_NoMemory();
    8859           0 :                 return -1;
    8860             :         }
    8861           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    8862           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8863           0 :                 PyErr_NoMemory();
    8864           0 :                 return -1;
    8865             :         }
    8866           0 :         object->in.sid = (struct dom_sid *)pytalloc_get_ptr(value);
    8867           0 :         return 0;
    8868             : }
    8869             : 
    8870           0 : static PyObject *py_wbint_LookupGroupMembers_in_get_type(PyObject *obj, void *closure)
    8871             : {
    8872           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(obj);
    8873             :         PyObject *py_type;
    8874           0 :         py_type = PyLong_FromLong((uint16_t)object->in.type);
    8875           0 :         return py_type;
    8876             : }
    8877             : 
    8878           0 : static int py_wbint_LookupGroupMembers_in_set_type(PyObject *py_obj, PyObject *value, void *closure)
    8879             : {
    8880           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(py_obj);
    8881           0 :         if (value == NULL) {
    8882           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.type");
    8883           0 :                 return -1;
    8884             :         }
    8885             :         {
    8886           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.type));
    8887           0 :                 if (PyLong_Check(value)) {
    8888             :                         unsigned long long test_var;
    8889           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8890           0 :                         if (PyErr_Occurred() != NULL) {
    8891           0 :                                 return -1;
    8892             :                         }
    8893           0 :                         if (test_var > uint_max) {
    8894           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8895             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8896           0 :                                 return -1;
    8897             :                         }
    8898           0 :                         object->in.type = test_var;
    8899             :                 } else {
    8900           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8901             :                           PyLong_Type.tp_name);
    8902           0 :                         return -1;
    8903             :                 }
    8904             :         }
    8905           0 :         return 0;
    8906             : }
    8907             : 
    8908           0 : static PyObject *py_wbint_LookupGroupMembers_out_get_members(PyObject *obj, void *closure)
    8909             : {
    8910           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(obj);
    8911             :         PyObject *py_members;
    8912           0 :         if (object->out.members == NULL) {
    8913           0 :                 Py_RETURN_NONE;
    8914             :         }
    8915           0 :         py_members = pytalloc_reference_ex(&wbint_Principals_Type, object->out.members, object->out.members);
    8916           0 :         return py_members;
    8917             : }
    8918             : 
    8919           0 : static int py_wbint_LookupGroupMembers_out_set_members(PyObject *py_obj, PyObject *value, void *closure)
    8920             : {
    8921           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(py_obj);
    8922           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.members));
    8923           0 :         if (value == NULL) {
    8924           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.members");
    8925           0 :                 return -1;
    8926             :         }
    8927           0 :         object->out.members = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.members);
    8928           0 :         if (object->out.members == NULL) {
    8929           0 :                 PyErr_NoMemory();
    8930           0 :                 return -1;
    8931             :         }
    8932           0 :         PY_CHECK_TYPE(&wbint_Principals_Type, value, return -1;);
    8933           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8934           0 :                 PyErr_NoMemory();
    8935           0 :                 return -1;
    8936             :         }
    8937           0 :         object->out.members = (struct wbint_Principals *)pytalloc_get_ptr(value);
    8938           0 :         return 0;
    8939             : }
    8940             : 
    8941           0 : static PyObject *py_wbint_LookupGroupMembers_get_result(PyObject *obj, void *closure)
    8942             : {
    8943           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(obj);
    8944             :         PyObject *py_result;
    8945           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    8946           0 :         return py_result;
    8947             : }
    8948             : 
    8949           0 : static int py_wbint_LookupGroupMembers_set_result(PyObject *py_obj, PyObject *value, void *closure)
    8950             : {
    8951           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(py_obj);
    8952           0 :         if (value == NULL) {
    8953           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    8954           0 :                 return -1;
    8955             :         }
    8956           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    8957           0 :         return 0;
    8958             : }
    8959             : 
    8960             : static PyGetSetDef py_wbint_LookupGroupMembers_getsetters[] = {
    8961             :         {
    8962             :                 .name = discard_const_p(char, "in_sid"),
    8963             :                 .get = py_wbint_LookupGroupMembers_in_get_sid,
    8964             :                 .set = py_wbint_LookupGroupMembers_in_set_sid,
    8965             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
    8966             :         },
    8967             :         {
    8968             :                 .name = discard_const_p(char, "in_type"),
    8969             :                 .get = py_wbint_LookupGroupMembers_in_get_type,
    8970             :                 .set = py_wbint_LookupGroupMembers_in_set_type,
    8971             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_SidType")
    8972             :         },
    8973             :         {
    8974             :                 .name = discard_const_p(char, "out_members"),
    8975             :                 .get = py_wbint_LookupGroupMembers_out_get_members,
    8976             :                 .set = py_wbint_LookupGroupMembers_out_set_members,
    8977             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_Principals")
    8978             :         },
    8979             :         {
    8980             :                 .name = discard_const_p(char, "result"),
    8981             :                 .get = py_wbint_LookupGroupMembers_get_result,
    8982             :                 .set = py_wbint_LookupGroupMembers_set_result,
    8983             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    8984             :         },
    8985             :         { .name = NULL }
    8986             : };
    8987             : 
    8988           0 : static PyObject *py_wbint_LookupGroupMembers_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8989             : {
    8990           0 :         PyObject *self = pytalloc_new(struct wbint_LookupGroupMembers, type);
    8991           0 :         struct wbint_LookupGroupMembers *_self = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(self);
    8992           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    8993           0 :         _self->in.sid = talloc_zero(mem_ctx, struct dom_sid);
    8994           0 :         _self->out.members = talloc_zero(mem_ctx, struct wbint_Principals);
    8995           0 :         return self;
    8996             : }
    8997             : 
    8998           0 : static PyObject *py_wbint_LookupGroupMembers_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    8999             : {
    9000             : 
    9001             : 
    9002           0 :         return PyLong_FromLong(12);
    9003             : }
    9004             : 
    9005           0 : static PyObject *py_wbint_LookupGroupMembers_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
    9006             : {
    9007           0 :         const struct ndr_interface_call *call = NULL;
    9008           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(py_obj);
    9009           0 :         PyObject *ret = NULL;
    9010           0 :         struct ndr_push *push = NULL;
    9011             :         DATA_BLOB blob;
    9012             :         enum ndr_err_code err;
    9013             : 
    9014           0 :         if (ndr_table_winbind.num_calls < 13) {
    9015           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupGroupMembers_ndr_pack");
    9016           0 :                 return NULL;
    9017             :         }
    9018           0 :         call = &ndr_table_winbind.calls[12];
    9019             : 
    9020           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    9021           0 :         if (push == NULL) {
    9022           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    9023           0 :                 return NULL;
    9024             :         }
    9025             : 
    9026           0 :         push->flags |= ndr_push_flags;
    9027             : 
    9028           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    9029           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    9030           0 :                 TALLOC_FREE(push);
    9031           0 :                 PyErr_SetNdrError(err);
    9032           0 :                 return NULL;
    9033             :         }
    9034           0 :         blob = ndr_push_blob(push);
    9035           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    9036           0 :         TALLOC_FREE(push);
    9037           0 :         return ret;
    9038             : }
    9039             : 
    9040           0 : static PyObject *py_wbint_LookupGroupMembers_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9041             : {
    9042           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    9043           0 :         PyObject *bigendian_obj = NULL;
    9044           0 :         PyObject *ndr64_obj = NULL;
    9045           0 :         uint32_t ndr_push_flags = 0;
    9046             : 
    9047           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    9048             :                 discard_const_p(char *, kwnames),
    9049             :                 &bigendian_obj,
    9050             :                 &ndr64_obj)) {
    9051           0 :                 return NULL;
    9052             :         }
    9053             : 
    9054           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9055           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    9056             :         }
    9057           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9058           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    9059             :         }
    9060             : 
    9061           0 :         return py_wbint_LookupGroupMembers_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    9062             : }
    9063             : 
    9064           0 : static PyObject *py_wbint_LookupGroupMembers_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9065             : {
    9066           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    9067           0 :         PyObject *bigendian_obj = NULL;
    9068           0 :         PyObject *ndr64_obj = NULL;
    9069           0 :         uint32_t ndr_push_flags = 0;
    9070             : 
    9071           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    9072             :                 discard_const_p(char *, kwnames),
    9073             :                 &bigendian_obj,
    9074             :                 &ndr64_obj)) {
    9075           0 :                 return NULL;
    9076             :         }
    9077             : 
    9078           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9079           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    9080             :         }
    9081           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9082           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    9083             :         }
    9084             : 
    9085           0 :         return py_wbint_LookupGroupMembers_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    9086             : }
    9087             : 
    9088           0 : static PyObject *py_wbint_LookupGroupMembers_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
    9089             : {
    9090           0 :         const struct ndr_interface_call *call = NULL;
    9091           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(py_obj);
    9092           0 :         struct ndr_pull *pull = NULL;
    9093             :         enum ndr_err_code err;
    9094             : 
    9095           0 :         if (ndr_table_winbind.num_calls < 13) {
    9096           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupGroupMembers_ndr_unpack");
    9097           0 :                 return NULL;
    9098             :         }
    9099           0 :         call = &ndr_table_winbind.calls[12];
    9100             : 
    9101           0 :         pull = ndr_pull_init_blob(blob, object);
    9102           0 :         if (pull == NULL) {
    9103           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    9104           0 :                 return NULL;
    9105             :         }
    9106             : 
    9107           0 :         pull->flags |= ndr_pull_flags;
    9108             : 
    9109           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    9110           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    9111           0 :                 TALLOC_FREE(pull);
    9112           0 :                 PyErr_SetNdrError(err);
    9113           0 :                 return NULL;
    9114             :         }
    9115           0 :         if (!allow_remaining) {
    9116             :                 uint32_t highest_ofs;
    9117             : 
    9118           0 :                 if (pull->offset > pull->relative_highest_offset) {
    9119           0 :                         highest_ofs = pull->offset;
    9120             :                 } else {
    9121           0 :                         highest_ofs = pull->relative_highest_offset;
    9122             :                 }
    9123           0 :                 if (highest_ofs < pull->data_size) {
    9124           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    9125             :                                 "not all bytes consumed ofs[%u] size[%u]",
    9126             :                                 highest_ofs, pull->data_size);
    9127           0 :                         TALLOC_FREE(pull);
    9128           0 :                         PyErr_SetNdrError(err);
    9129           0 :                         return NULL;
    9130             :                 }
    9131             :         }
    9132             : 
    9133           0 :         TALLOC_FREE(pull);
    9134           0 :         Py_RETURN_NONE;
    9135             : }
    9136             : 
    9137           0 : static PyObject *py_wbint_LookupGroupMembers_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9138             : {
    9139             :         DATA_BLOB blob;
    9140           0 :         Py_ssize_t blob_length = 0;
    9141           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    9142           0 :         PyObject *bigendian_obj = NULL;
    9143           0 :         PyObject *ndr64_obj = NULL;
    9144           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    9145           0 :         PyObject *allow_remaining_obj = NULL;
    9146           0 :         bool allow_remaining = false;
    9147             : 
    9148           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    9149             :                 discard_const_p(char *, kwnames),
    9150             :                 &blob.data, &blob_length,
    9151             :                 &bigendian_obj,
    9152             :                 &ndr64_obj,
    9153             :                 &allow_remaining_obj)) {
    9154           0 :                 return NULL;
    9155             :         }
    9156           0 :         blob.length = blob_length;
    9157             : 
    9158           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9159           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    9160             :         }
    9161           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9162           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    9163             :         }
    9164             : 
    9165           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    9166           0 :                 allow_remaining = true;
    9167             :         }
    9168             : 
    9169           0 :         return py_wbint_LookupGroupMembers_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    9170             : }
    9171             : 
    9172           0 : static PyObject *py_wbint_LookupGroupMembers_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9173             : {
    9174             :         DATA_BLOB blob;
    9175           0 :         Py_ssize_t blob_length = 0;
    9176           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    9177           0 :         PyObject *bigendian_obj = NULL;
    9178           0 :         PyObject *ndr64_obj = NULL;
    9179           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    9180           0 :         PyObject *allow_remaining_obj = NULL;
    9181           0 :         bool allow_remaining = false;
    9182             : 
    9183           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    9184             :                 discard_const_p(char *, kwnames),
    9185             :                 &blob.data, &blob_length,
    9186             :                 &bigendian_obj,
    9187             :                 &ndr64_obj,
    9188             :                 &allow_remaining_obj)) {
    9189           0 :                 return NULL;
    9190             :         }
    9191           0 :         blob.length = blob_length;
    9192             : 
    9193           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9194           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    9195             :         }
    9196           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9197           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    9198             :         }
    9199             : 
    9200           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    9201           0 :                 allow_remaining = true;
    9202             :         }
    9203             : 
    9204           0 :         return py_wbint_LookupGroupMembers_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    9205             : }
    9206             : 
    9207           0 : static PyObject *py_wbint_LookupGroupMembers_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
    9208             : {
    9209           0 :         const struct ndr_interface_call *call = NULL;
    9210           0 :         struct wbint_LookupGroupMembers *object = (struct wbint_LookupGroupMembers *)pytalloc_get_ptr(py_obj);
    9211             :         PyObject *ret;
    9212             :         char *retstr;
    9213             : 
    9214           0 :         if (ndr_table_winbind.num_calls < 13) {
    9215           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupGroupMembers_ndr_print");
    9216           0 :                 return NULL;
    9217             :         }
    9218           0 :         call = &ndr_table_winbind.calls[12];
    9219             : 
    9220           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    9221           0 :         ret = PyUnicode_FromString(retstr);
    9222           0 :         TALLOC_FREE(retstr);
    9223             : 
    9224           0 :         return ret;
    9225             : }
    9226             : 
    9227           0 : static PyObject *py_wbint_LookupGroupMembers_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    9228             : {
    9229           0 :         return py_wbint_LookupGroupMembers_ndr_print(py_obj, "wbint_LookupGroupMembers_in", NDR_IN);
    9230             : }
    9231             : 
    9232           0 : static PyObject *py_wbint_LookupGroupMembers_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    9233             : {
    9234           0 :         return py_wbint_LookupGroupMembers_ndr_print(py_obj, "wbint_LookupGroupMembers_out", NDR_OUT);
    9235             : }
    9236             : 
    9237             : static PyMethodDef py_wbint_LookupGroupMembers_methods[] = {
    9238             :         { "opnum", (PyCFunction)py_wbint_LookupGroupMembers_ndr_opnum, METH_NOARGS|METH_CLASS,
    9239             :                 "winbind.wbint_LookupGroupMembers.opnum() -> 12 (0x0c) " },
    9240             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupGroupMembers_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    9241             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    9242             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupGroupMembers_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    9243             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    9244             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupGroupMembers_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    9245             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    9246             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupGroupMembers_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    9247             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    9248             :         { "__ndr_print_in__", (PyCFunction)py_wbint_LookupGroupMembers_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    9249             :         { "__ndr_print_out__", (PyCFunction)py_wbint_LookupGroupMembers_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    9250             :         { NULL, NULL, 0, NULL }
    9251             : };
    9252             : 
    9253             : 
    9254             : static PyTypeObject wbint_LookupGroupMembers_Type = {
    9255             :         PyVarObject_HEAD_INIT(NULL, 0)
    9256             :         .tp_name = "winbind.wbint_LookupGroupMembers",
    9257             :         .tp_getset = py_wbint_LookupGroupMembers_getsetters,
    9258             :         .tp_methods = py_wbint_LookupGroupMembers_methods,
    9259             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9260             :         .tp_new = py_wbint_LookupGroupMembers_new,
    9261             : };
    9262             : 
    9263           0 : static bool pack_py_wbint_LookupGroupMembers_args_in(PyObject *args, PyObject *kwargs, struct wbint_LookupGroupMembers *r)
    9264             : {
    9265             :         PyObject *py_sid;
    9266             :         PyObject *py_type;
    9267           0 :         const char *kwnames[] = {
    9268             :                 "sid", "type", NULL
    9269             :         };
    9270             : 
    9271           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:wbint_LookupGroupMembers", discard_const_p(char *, kwnames), &py_sid, &py_type)) {
    9272           0 :                 return false;
    9273             :         }
    9274             : 
    9275           0 :         if (py_sid == NULL) {
    9276           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.sid");
    9277           0 :                 return false;
    9278             :         }
    9279           0 :         r->in.sid = talloc_ptrtype(r, r->in.sid);
    9280           0 :         if (r->in.sid == NULL) {
    9281           0 :                 PyErr_NoMemory();
    9282           0 :                 return false;
    9283             :         }
    9284           0 :         PY_CHECK_TYPE(dom_sid_Type, py_sid, return false;);
    9285           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_sid)) == NULL) {
    9286           0 :                 PyErr_NoMemory();
    9287           0 :                 return false;
    9288             :         }
    9289           0 :         r->in.sid = (struct dom_sid *)pytalloc_get_ptr(py_sid);
    9290           0 :         if (py_type == NULL) {
    9291           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.type");
    9292           0 :                 return false;
    9293             :         }
    9294             :         {
    9295           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.type));
    9296           0 :                 if (PyLong_Check(py_type)) {
    9297             :                         unsigned long long test_var;
    9298           0 :                         test_var = PyLong_AsUnsignedLongLong(py_type);
    9299           0 :                         if (PyErr_Occurred() != NULL) {
    9300           0 :                                 return false;
    9301             :                         }
    9302           0 :                         if (test_var > uint_max) {
    9303           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9304             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9305           0 :                                 return false;
    9306             :                         }
    9307           0 :                         r->in.type = test_var;
    9308             :                 } else {
    9309           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9310             :                           PyLong_Type.tp_name);
    9311           0 :                         return false;
    9312             :                 }
    9313             :         }
    9314           0 :         return true;
    9315             : }
    9316             : 
    9317           0 : static PyObject *unpack_py_wbint_LookupGroupMembers_args_out(struct wbint_LookupGroupMembers *r)
    9318             : {
    9319             :         PyObject *result;
    9320             :         PyObject *py_members;
    9321           0 :         py_members = pytalloc_reference_ex(&wbint_Principals_Type, r->out.members, r->out.members);
    9322           0 :         result = py_members;
    9323           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    9324           0 :                 PyErr_SetNTSTATUS(r->out.result);
    9325           0 :                 return NULL;
    9326             :         }
    9327             : 
    9328           0 :         return result;
    9329             : }
    9330             : 
    9331             : 
    9332           0 : static PyObject *py_wbint_QueryGroupList_out_get_groups(PyObject *obj, void *closure)
    9333             : {
    9334           0 :         struct wbint_QueryGroupList *object = (struct wbint_QueryGroupList *)pytalloc_get_ptr(obj);
    9335             :         PyObject *py_groups;
    9336           0 :         if (object->out.groups == NULL) {
    9337           0 :                 Py_RETURN_NONE;
    9338             :         }
    9339           0 :         py_groups = pytalloc_reference_ex(&wbint_Principals_Type, object->out.groups, object->out.groups);
    9340           0 :         return py_groups;
    9341             : }
    9342             : 
    9343           0 : static int py_wbint_QueryGroupList_out_set_groups(PyObject *py_obj, PyObject *value, void *closure)
    9344             : {
    9345           0 :         struct wbint_QueryGroupList *object = (struct wbint_QueryGroupList *)pytalloc_get_ptr(py_obj);
    9346           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.groups));
    9347           0 :         if (value == NULL) {
    9348           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.groups");
    9349           0 :                 return -1;
    9350             :         }
    9351           0 :         object->out.groups = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.groups);
    9352           0 :         if (object->out.groups == NULL) {
    9353           0 :                 PyErr_NoMemory();
    9354           0 :                 return -1;
    9355             :         }
    9356           0 :         PY_CHECK_TYPE(&wbint_Principals_Type, value, return -1;);
    9357           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9358           0 :                 PyErr_NoMemory();
    9359           0 :                 return -1;
    9360             :         }
    9361           0 :         object->out.groups = (struct wbint_Principals *)pytalloc_get_ptr(value);
    9362           0 :         return 0;
    9363             : }
    9364             : 
    9365           0 : static PyObject *py_wbint_QueryGroupList_get_result(PyObject *obj, void *closure)
    9366             : {
    9367           0 :         struct wbint_QueryGroupList *object = (struct wbint_QueryGroupList *)pytalloc_get_ptr(obj);
    9368             :         PyObject *py_result;
    9369           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    9370           0 :         return py_result;
    9371             : }
    9372             : 
    9373           0 : static int py_wbint_QueryGroupList_set_result(PyObject *py_obj, PyObject *value, void *closure)
    9374             : {
    9375           0 :         struct wbint_QueryGroupList *object = (struct wbint_QueryGroupList *)pytalloc_get_ptr(py_obj);
    9376           0 :         if (value == NULL) {
    9377           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    9378           0 :                 return -1;
    9379             :         }
    9380           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    9381           0 :         return 0;
    9382             : }
    9383             : 
    9384             : static PyGetSetDef py_wbint_QueryGroupList_getsetters[] = {
    9385             :         {
    9386             :                 .name = discard_const_p(char, "out_groups"),
    9387             :                 .get = py_wbint_QueryGroupList_out_get_groups,
    9388             :                 .set = py_wbint_QueryGroupList_out_set_groups,
    9389             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_Principals")
    9390             :         },
    9391             :         {
    9392             :                 .name = discard_const_p(char, "result"),
    9393             :                 .get = py_wbint_QueryGroupList_get_result,
    9394             :                 .set = py_wbint_QueryGroupList_set_result,
    9395             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    9396             :         },
    9397             :         { .name = NULL }
    9398             : };
    9399             : 
    9400           0 : static PyObject *py_wbint_QueryGroupList_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9401             : {
    9402           0 :         PyObject *self = pytalloc_new(struct wbint_QueryGroupList, type);
    9403           0 :         struct wbint_QueryGroupList *_self = (struct wbint_QueryGroupList *)pytalloc_get_ptr(self);
    9404           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    9405           0 :         _self->out.groups = talloc_zero(mem_ctx, struct wbint_Principals);
    9406           0 :         return self;
    9407             : }
    9408             : 
    9409           0 : static PyObject *py_wbint_QueryGroupList_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    9410             : {
    9411             : 
    9412             : 
    9413           0 :         return PyLong_FromLong(13);
    9414             : }
    9415             : 
    9416           0 : static PyObject *py_wbint_QueryGroupList_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
    9417             : {
    9418           0 :         const struct ndr_interface_call *call = NULL;
    9419           0 :         struct wbint_QueryGroupList *object = (struct wbint_QueryGroupList *)pytalloc_get_ptr(py_obj);
    9420           0 :         PyObject *ret = NULL;
    9421           0 :         struct ndr_push *push = NULL;
    9422             :         DATA_BLOB blob;
    9423             :         enum ndr_err_code err;
    9424             : 
    9425           0 :         if (ndr_table_winbind.num_calls < 14) {
    9426           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_QueryGroupList_ndr_pack");
    9427           0 :                 return NULL;
    9428             :         }
    9429           0 :         call = &ndr_table_winbind.calls[13];
    9430             : 
    9431           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    9432           0 :         if (push == NULL) {
    9433           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    9434           0 :                 return NULL;
    9435             :         }
    9436             : 
    9437           0 :         push->flags |= ndr_push_flags;
    9438             : 
    9439           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    9440           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    9441           0 :                 TALLOC_FREE(push);
    9442           0 :                 PyErr_SetNdrError(err);
    9443           0 :                 return NULL;
    9444             :         }
    9445           0 :         blob = ndr_push_blob(push);
    9446           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    9447           0 :         TALLOC_FREE(push);
    9448           0 :         return ret;
    9449             : }
    9450             : 
    9451           0 : static PyObject *py_wbint_QueryGroupList_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9452             : {
    9453           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    9454           0 :         PyObject *bigendian_obj = NULL;
    9455           0 :         PyObject *ndr64_obj = NULL;
    9456           0 :         uint32_t ndr_push_flags = 0;
    9457             : 
    9458           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    9459             :                 discard_const_p(char *, kwnames),
    9460             :                 &bigendian_obj,
    9461             :                 &ndr64_obj)) {
    9462           0 :                 return NULL;
    9463             :         }
    9464             : 
    9465           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9466           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    9467             :         }
    9468           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9469           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    9470             :         }
    9471             : 
    9472           0 :         return py_wbint_QueryGroupList_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    9473             : }
    9474             : 
    9475           0 : static PyObject *py_wbint_QueryGroupList_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9476             : {
    9477           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    9478           0 :         PyObject *bigendian_obj = NULL;
    9479           0 :         PyObject *ndr64_obj = NULL;
    9480           0 :         uint32_t ndr_push_flags = 0;
    9481             : 
    9482           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    9483             :                 discard_const_p(char *, kwnames),
    9484             :                 &bigendian_obj,
    9485             :                 &ndr64_obj)) {
    9486           0 :                 return NULL;
    9487             :         }
    9488             : 
    9489           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9490           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    9491             :         }
    9492           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9493           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    9494             :         }
    9495             : 
    9496           0 :         return py_wbint_QueryGroupList_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    9497             : }
    9498             : 
    9499           0 : static PyObject *py_wbint_QueryGroupList_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
    9500             : {
    9501           0 :         const struct ndr_interface_call *call = NULL;
    9502           0 :         struct wbint_QueryGroupList *object = (struct wbint_QueryGroupList *)pytalloc_get_ptr(py_obj);
    9503           0 :         struct ndr_pull *pull = NULL;
    9504             :         enum ndr_err_code err;
    9505             : 
    9506           0 :         if (ndr_table_winbind.num_calls < 14) {
    9507           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_QueryGroupList_ndr_unpack");
    9508           0 :                 return NULL;
    9509             :         }
    9510           0 :         call = &ndr_table_winbind.calls[13];
    9511             : 
    9512           0 :         pull = ndr_pull_init_blob(blob, object);
    9513           0 :         if (pull == NULL) {
    9514           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    9515           0 :                 return NULL;
    9516             :         }
    9517             : 
    9518           0 :         pull->flags |= ndr_pull_flags;
    9519             : 
    9520           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    9521           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    9522           0 :                 TALLOC_FREE(pull);
    9523           0 :                 PyErr_SetNdrError(err);
    9524           0 :                 return NULL;
    9525             :         }
    9526           0 :         if (!allow_remaining) {
    9527             :                 uint32_t highest_ofs;
    9528             : 
    9529           0 :                 if (pull->offset > pull->relative_highest_offset) {
    9530           0 :                         highest_ofs = pull->offset;
    9531             :                 } else {
    9532           0 :                         highest_ofs = pull->relative_highest_offset;
    9533             :                 }
    9534           0 :                 if (highest_ofs < pull->data_size) {
    9535           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    9536             :                                 "not all bytes consumed ofs[%u] size[%u]",
    9537             :                                 highest_ofs, pull->data_size);
    9538           0 :                         TALLOC_FREE(pull);
    9539           0 :                         PyErr_SetNdrError(err);
    9540           0 :                         return NULL;
    9541             :                 }
    9542             :         }
    9543             : 
    9544           0 :         TALLOC_FREE(pull);
    9545           0 :         Py_RETURN_NONE;
    9546             : }
    9547             : 
    9548           0 : static PyObject *py_wbint_QueryGroupList_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9549             : {
    9550             :         DATA_BLOB blob;
    9551           0 :         Py_ssize_t blob_length = 0;
    9552           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    9553           0 :         PyObject *bigendian_obj = NULL;
    9554           0 :         PyObject *ndr64_obj = NULL;
    9555           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    9556           0 :         PyObject *allow_remaining_obj = NULL;
    9557           0 :         bool allow_remaining = false;
    9558             : 
    9559           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    9560             :                 discard_const_p(char *, kwnames),
    9561             :                 &blob.data, &blob_length,
    9562             :                 &bigendian_obj,
    9563             :                 &ndr64_obj,
    9564             :                 &allow_remaining_obj)) {
    9565           0 :                 return NULL;
    9566             :         }
    9567           0 :         blob.length = blob_length;
    9568             : 
    9569           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9570           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    9571             :         }
    9572           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9573           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    9574             :         }
    9575             : 
    9576           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    9577           0 :                 allow_remaining = true;
    9578             :         }
    9579             : 
    9580           0 :         return py_wbint_QueryGroupList_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    9581             : }
    9582             : 
    9583           0 : static PyObject *py_wbint_QueryGroupList_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9584             : {
    9585             :         DATA_BLOB blob;
    9586           0 :         Py_ssize_t blob_length = 0;
    9587           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    9588           0 :         PyObject *bigendian_obj = NULL;
    9589           0 :         PyObject *ndr64_obj = NULL;
    9590           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    9591           0 :         PyObject *allow_remaining_obj = NULL;
    9592           0 :         bool allow_remaining = false;
    9593             : 
    9594           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    9595             :                 discard_const_p(char *, kwnames),
    9596             :                 &blob.data, &blob_length,
    9597             :                 &bigendian_obj,
    9598             :                 &ndr64_obj,
    9599             :                 &allow_remaining_obj)) {
    9600           0 :                 return NULL;
    9601             :         }
    9602           0 :         blob.length = blob_length;
    9603             : 
    9604           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9605           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    9606             :         }
    9607           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9608           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    9609             :         }
    9610             : 
    9611           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    9612           0 :                 allow_remaining = true;
    9613             :         }
    9614             : 
    9615           0 :         return py_wbint_QueryGroupList_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    9616             : }
    9617             : 
    9618           0 : static PyObject *py_wbint_QueryGroupList_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
    9619             : {
    9620           0 :         const struct ndr_interface_call *call = NULL;
    9621           0 :         struct wbint_QueryGroupList *object = (struct wbint_QueryGroupList *)pytalloc_get_ptr(py_obj);
    9622             :         PyObject *ret;
    9623             :         char *retstr;
    9624             : 
    9625           0 :         if (ndr_table_winbind.num_calls < 14) {
    9626           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_QueryGroupList_ndr_print");
    9627           0 :                 return NULL;
    9628             :         }
    9629           0 :         call = &ndr_table_winbind.calls[13];
    9630             : 
    9631           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
    9632           0 :         ret = PyUnicode_FromString(retstr);
    9633           0 :         TALLOC_FREE(retstr);
    9634             : 
    9635           0 :         return ret;
    9636             : }
    9637             : 
    9638           0 : static PyObject *py_wbint_QueryGroupList_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    9639             : {
    9640           0 :         return py_wbint_QueryGroupList_ndr_print(py_obj, "wbint_QueryGroupList_in", NDR_IN);
    9641             : }
    9642             : 
    9643           0 : static PyObject *py_wbint_QueryGroupList_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    9644             : {
    9645           0 :         return py_wbint_QueryGroupList_ndr_print(py_obj, "wbint_QueryGroupList_out", NDR_OUT);
    9646             : }
    9647             : 
    9648             : static PyMethodDef py_wbint_QueryGroupList_methods[] = {
    9649             :         { "opnum", (PyCFunction)py_wbint_QueryGroupList_ndr_opnum, METH_NOARGS|METH_CLASS,
    9650             :                 "winbind.wbint_QueryGroupList.opnum() -> 13 (0x0d) " },
    9651             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QueryGroupList_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
    9652             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
    9653             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QueryGroupList_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
    9654             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
    9655             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QueryGroupList_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
    9656             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
    9657             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QueryGroupList_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
    9658             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
    9659             :         { "__ndr_print_in__", (PyCFunction)py_wbint_QueryGroupList_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
    9660             :         { "__ndr_print_out__", (PyCFunction)py_wbint_QueryGroupList_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
    9661             :         { NULL, NULL, 0, NULL }
    9662             : };
    9663             : 
    9664             : 
    9665             : static PyTypeObject wbint_QueryGroupList_Type = {
    9666             :         PyVarObject_HEAD_INIT(NULL, 0)
    9667             :         .tp_name = "winbind.wbint_QueryGroupList",
    9668             :         .tp_getset = py_wbint_QueryGroupList_getsetters,
    9669             :         .tp_methods = py_wbint_QueryGroupList_methods,
    9670             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9671             :         .tp_new = py_wbint_QueryGroupList_new,
    9672             : };
    9673             : 
    9674           0 : static bool pack_py_wbint_QueryGroupList_args_in(PyObject *args, PyObject *kwargs, struct wbint_QueryGroupList *r)
    9675             : {
    9676           0 :         const char *kwnames[] = {
    9677             :                 NULL
    9678             :         };
    9679             : 
    9680           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":wbint_QueryGroupList", discard_const_p(char *, kwnames))) {
    9681           0 :                 return false;
    9682             :         }
    9683             : 
    9684           0 :         return true;
    9685             : }
    9686             : 
    9687           0 : static PyObject *unpack_py_wbint_QueryGroupList_args_out(struct wbint_QueryGroupList *r)
    9688             : {
    9689             :         PyObject *result;
    9690             :         PyObject *py_groups;
    9691           0 :         py_groups = pytalloc_reference_ex(&wbint_Principals_Type, r->out.groups, r->out.groups);
    9692           0 :         result = py_groups;
    9693           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
    9694           0 :                 PyErr_SetNTSTATUS(r->out.result);
    9695           0 :                 return NULL;
    9696             :         }
    9697             : 
    9698           0 :         return result;
    9699             : }
    9700             : 
    9701             : 
    9702           0 : static PyObject *py_wbint_QueryUserRidList_out_get_rids(PyObject *obj, void *closure)
    9703             : {
    9704           0 :         struct wbint_QueryUserRidList *object = (struct wbint_QueryUserRidList *)pytalloc_get_ptr(obj);
    9705             :         PyObject *py_rids;
    9706           0 :         if (object->out.rids == NULL) {
    9707           0 :                 Py_RETURN_NONE;
    9708             :         }
    9709           0 :         py_rids = pytalloc_reference_ex(&wbint_RidArray_Type, object->out.rids, object->out.rids);
    9710           0 :         return py_rids;
    9711             : }
    9712             : 
    9713           0 : static int py_wbint_QueryUserRidList_out_set_rids(PyObject *py_obj, PyObject *value, void *closure)
    9714             : {
    9715           0 :         struct wbint_QueryUserRidList *object = (struct wbint_QueryUserRidList *)pytalloc_get_ptr(py_obj);
    9716           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.rids));
    9717           0 :         if (value == NULL) {
    9718           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.rids");
    9719           0 :                 return -1;
    9720             :         }
    9721           0 :         object->out.rids = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.rids);
    9722           0 :         if (object->out.rids == NULL) {
    9723           0 :                 PyErr_NoMemory();
    9724           0 :                 return -1;
    9725             :         }
    9726           0 :         PY_CHECK_TYPE(&wbint_RidArray_Type, value, return -1;);
    9727           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9728           0 :                 PyErr_NoMemory();
    9729           0 :                 return -1;
    9730             :         }
    9731           0 :         object->out.rids = (struct wbint_RidArray *)pytalloc_get_ptr(value);
    9732           0 :         return 0;
    9733             : }
    9734             : 
    9735           0 : static PyObject *py_wbint_QueryUserRidList_get_result(PyObject *obj, void *closure)
    9736             : {
    9737           0 :         struct wbint_QueryUserRidList *object = (struct wbint_QueryUserRidList *)pytalloc_get_ptr(obj);
    9738             :         PyObject *py_result;
    9739           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
    9740           0 :         return py_result;
    9741             : }
    9742             : 
    9743           0 : static int py_wbint_QueryUserRidList_set_result(PyObject *py_obj, PyObject *value, void *closure)
    9744             : {
    9745           0 :         struct wbint_QueryUserRidList *object = (struct wbint_QueryUserRidList *)pytalloc_get_ptr(py_obj);
    9746           0 :         if (value == NULL) {
    9747           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
    9748           0 :                 return -1;
    9749             :         }
    9750           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
    9751           0 :         return 0;
    9752             : }
    9753             : 
    9754             : static PyGetSetDef py_wbint_QueryUserRidList_getsetters[] = {
    9755             :         {
    9756             :                 .name = discard_const_p(char, "out_rids"),
    9757             :                 .get = py_wbint_QueryUserRidList_out_get_rids,
    9758             :                 .set = py_wbint_QueryUserRidList_out_set_rids,
    9759             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_RidArray")
    9760             :         },
    9761             :         {
    9762             :                 .name = discard_const_p(char, "result"),
    9763             :                 .get = py_wbint_QueryUserRidList_get_result,
    9764             :                 .set = py_wbint_QueryUserRidList_set_result,
    9765             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
    9766             :         },
    9767             :         { .name = NULL }
    9768             : };
    9769             : 
    9770           0 : static PyObject *py_wbint_QueryUserRidList_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9771             : {
    9772           0 :         PyObject *self = pytalloc_new(struct wbint_QueryUserRidList, type);
    9773           0 :         struct wbint_QueryUserRidList *_self = (struct wbint_QueryUserRidList *)pytalloc_get_ptr(self);
    9774           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
    9775           0 :         _self->out.rids = talloc_zero(mem_ctx, struct wbint_RidArray);
    9776           0 :         return self;
    9777             : }
    9778             : 
    9779           0 : static PyObject *py_wbint_QueryUserRidList_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
    9780             : {
    9781             : 
    9782             : 
    9783           0 :         return PyLong_FromLong(14);
    9784             : }
    9785             : 
    9786           0 : static PyObject *py_wbint_QueryUserRidList_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
    9787             : {
    9788           0 :         const struct ndr_interface_call *call = NULL;
    9789           0 :         struct wbint_QueryUserRidList *object = (struct wbint_QueryUserRidList *)pytalloc_get_ptr(py_obj);
    9790           0 :         PyObject *ret = NULL;
    9791           0 :         struct ndr_push *push = NULL;
    9792             :         DATA_BLOB blob;
    9793             :         enum ndr_err_code err;
    9794             : 
    9795           0 :         if (ndr_table_winbind.num_calls < 15) {
    9796           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_QueryUserRidList_ndr_pack");
    9797           0 :                 return NULL;
    9798             :         }
    9799           0 :         call = &ndr_table_winbind.calls[14];
    9800             : 
    9801           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
    9802           0 :         if (push == NULL) {
    9803           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    9804           0 :                 return NULL;
    9805             :         }
    9806             : 
    9807           0 :         push->flags |= ndr_push_flags;
    9808             : 
    9809           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
    9810           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    9811           0 :                 TALLOC_FREE(push);
    9812           0 :                 PyErr_SetNdrError(err);
    9813           0 :                 return NULL;
    9814             :         }
    9815           0 :         blob = ndr_push_blob(push);
    9816           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    9817           0 :         TALLOC_FREE(push);
    9818           0 :         return ret;
    9819             : }
    9820             : 
    9821           0 : static PyObject *py_wbint_QueryUserRidList_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9822             : {
    9823           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    9824           0 :         PyObject *bigendian_obj = NULL;
    9825           0 :         PyObject *ndr64_obj = NULL;
    9826           0 :         uint32_t ndr_push_flags = 0;
    9827             : 
    9828           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
    9829             :                 discard_const_p(char *, kwnames),
    9830             :                 &bigendian_obj,
    9831             :                 &ndr64_obj)) {
    9832           0 :                 return NULL;
    9833             :         }
    9834             : 
    9835           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9836           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    9837             :         }
    9838           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9839           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    9840             :         }
    9841             : 
    9842           0 :         return py_wbint_QueryUserRidList_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
    9843             : }
    9844             : 
    9845           0 : static PyObject *py_wbint_QueryUserRidList_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9846             : {
    9847           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
    9848           0 :         PyObject *bigendian_obj = NULL;
    9849           0 :         PyObject *ndr64_obj = NULL;
    9850           0 :         uint32_t ndr_push_flags = 0;
    9851             : 
    9852           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
    9853             :                 discard_const_p(char *, kwnames),
    9854             :                 &bigendian_obj,
    9855             :                 &ndr64_obj)) {
    9856           0 :                 return NULL;
    9857             :         }
    9858             : 
    9859           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9860           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
    9861             :         }
    9862           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9863           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
    9864             :         }
    9865             : 
    9866           0 :         return py_wbint_QueryUserRidList_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
    9867             : }
    9868             : 
    9869           0 : static PyObject *py_wbint_QueryUserRidList_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
    9870             : {
    9871           0 :         const struct ndr_interface_call *call = NULL;
    9872           0 :         struct wbint_QueryUserRidList *object = (struct wbint_QueryUserRidList *)pytalloc_get_ptr(py_obj);
    9873           0 :         struct ndr_pull *pull = NULL;
    9874             :         enum ndr_err_code err;
    9875             : 
    9876           0 :         if (ndr_table_winbind.num_calls < 15) {
    9877           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_QueryUserRidList_ndr_unpack");
    9878           0 :                 return NULL;
    9879             :         }
    9880           0 :         call = &ndr_table_winbind.calls[14];
    9881             : 
    9882           0 :         pull = ndr_pull_init_blob(blob, object);
    9883           0 :         if (pull == NULL) {
    9884           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    9885           0 :                 return NULL;
    9886             :         }
    9887             : 
    9888           0 :         pull->flags |= ndr_pull_flags;
    9889             : 
    9890           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
    9891           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    9892           0 :                 TALLOC_FREE(pull);
    9893           0 :                 PyErr_SetNdrError(err);
    9894           0 :                 return NULL;
    9895             :         }
    9896           0 :         if (!allow_remaining) {
    9897             :                 uint32_t highest_ofs;
    9898             : 
    9899           0 :                 if (pull->offset > pull->relative_highest_offset) {
    9900           0 :                         highest_ofs = pull->offset;
    9901             :                 } else {
    9902           0 :                         highest_ofs = pull->relative_highest_offset;
    9903             :                 }
    9904           0 :                 if (highest_ofs < pull->data_size) {
    9905           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
    9906             :                                 "not all bytes consumed ofs[%u] size[%u]",
    9907             :                                 highest_ofs, pull->data_size);
    9908           0 :                         TALLOC_FREE(pull);
    9909           0 :                         PyErr_SetNdrError(err);
    9910           0 :                         return NULL;
    9911             :                 }
    9912             :         }
    9913             : 
    9914           0 :         TALLOC_FREE(pull);
    9915           0 :         Py_RETURN_NONE;
    9916             : }
    9917             : 
    9918           0 : static PyObject *py_wbint_QueryUserRidList_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9919             : {
    9920             :         DATA_BLOB blob;
    9921           0 :         Py_ssize_t blob_length = 0;
    9922           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    9923           0 :         PyObject *bigendian_obj = NULL;
    9924           0 :         PyObject *ndr64_obj = NULL;
    9925           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    9926           0 :         PyObject *allow_remaining_obj = NULL;
    9927           0 :         bool allow_remaining = false;
    9928             : 
    9929           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
    9930             :                 discard_const_p(char *, kwnames),
    9931             :                 &blob.data, &blob_length,
    9932             :                 &bigendian_obj,
    9933             :                 &ndr64_obj,
    9934             :                 &allow_remaining_obj)) {
    9935           0 :                 return NULL;
    9936             :         }
    9937           0 :         blob.length = blob_length;
    9938             : 
    9939           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9940           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    9941             :         }
    9942           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9943           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    9944             :         }
    9945             : 
    9946           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    9947           0 :                 allow_remaining = true;
    9948             :         }
    9949             : 
    9950           0 :         return py_wbint_QueryUserRidList_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
    9951             : }
    9952             : 
    9953           0 : static PyObject *py_wbint_QueryUserRidList_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9954             : {
    9955             :         DATA_BLOB blob;
    9956           0 :         Py_ssize_t blob_length = 0;
    9957           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
    9958           0 :         PyObject *bigendian_obj = NULL;
    9959           0 :         PyObject *ndr64_obj = NULL;
    9960           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
    9961           0 :         PyObject *allow_remaining_obj = NULL;
    9962           0 :         bool allow_remaining = false;
    9963             : 
    9964           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
    9965             :                 discard_const_p(char *, kwnames),
    9966             :                 &blob.data, &blob_length,
    9967             :                 &bigendian_obj,
    9968             :                 &ndr64_obj,
    9969             :                 &allow_remaining_obj)) {
    9970           0 :                 return NULL;
    9971             :         }
    9972           0 :         blob.length = blob_length;
    9973             : 
    9974           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
    9975           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
    9976             :         }
    9977           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
    9978           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
    9979             :         }
    9980             : 
    9981           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    9982           0 :                 allow_remaining = true;
    9983             :         }
    9984             : 
    9985           0 :         return py_wbint_QueryUserRidList_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
    9986             : }
    9987             : 
    9988           0 : static PyObject *py_wbint_QueryUserRidList_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
    9989             : {
    9990           0 :         const struct ndr_interface_call *call = NULL;
    9991           0 :         struct wbint_QueryUserRidList *object = (struct wbint_QueryUserRidList *)pytalloc_get_ptr(py_obj);
    9992             :         PyObject *ret;
    9993             :         char *retstr;
    9994             : 
    9995           0 :         if (ndr_table_winbind.num_calls < 15) {
    9996           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_QueryUserRidList_ndr_print");
    9997           0 :                 return NULL;
    9998             :         }
    9999           0 :         call = &ndr_table_winbind.calls[14];
   10000             : 
   10001           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   10002           0 :         ret = PyUnicode_FromString(retstr);
   10003           0 :         TALLOC_FREE(retstr);
   10004             : 
   10005           0 :         return ret;
   10006             : }
   10007             : 
   10008           0 : static PyObject *py_wbint_QueryUserRidList_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   10009             : {
   10010           0 :         return py_wbint_QueryUserRidList_ndr_print(py_obj, "wbint_QueryUserRidList_in", NDR_IN);
   10011             : }
   10012             : 
   10013           0 : static PyObject *py_wbint_QueryUserRidList_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   10014             : {
   10015           0 :         return py_wbint_QueryUserRidList_ndr_print(py_obj, "wbint_QueryUserRidList_out", NDR_OUT);
   10016             : }
   10017             : 
   10018             : static PyMethodDef py_wbint_QueryUserRidList_methods[] = {
   10019             :         { "opnum", (PyCFunction)py_wbint_QueryUserRidList_ndr_opnum, METH_NOARGS|METH_CLASS,
   10020             :                 "winbind.wbint_QueryUserRidList.opnum() -> 14 (0x0e) " },
   10021             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QueryUserRidList_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   10022             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   10023             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QueryUserRidList_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   10024             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   10025             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QueryUserRidList_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   10026             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   10027             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_QueryUserRidList_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   10028             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   10029             :         { "__ndr_print_in__", (PyCFunction)py_wbint_QueryUserRidList_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   10030             :         { "__ndr_print_out__", (PyCFunction)py_wbint_QueryUserRidList_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   10031             :         { NULL, NULL, 0, NULL }
   10032             : };
   10033             : 
   10034             : 
   10035             : static PyTypeObject wbint_QueryUserRidList_Type = {
   10036             :         PyVarObject_HEAD_INIT(NULL, 0)
   10037             :         .tp_name = "winbind.wbint_QueryUserRidList",
   10038             :         .tp_getset = py_wbint_QueryUserRidList_getsetters,
   10039             :         .tp_methods = py_wbint_QueryUserRidList_methods,
   10040             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10041             :         .tp_new = py_wbint_QueryUserRidList_new,
   10042             : };
   10043             : 
   10044           0 : static bool pack_py_wbint_QueryUserRidList_args_in(PyObject *args, PyObject *kwargs, struct wbint_QueryUserRidList *r)
   10045             : {
   10046           0 :         const char *kwnames[] = {
   10047             :                 NULL
   10048             :         };
   10049             : 
   10050           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":wbint_QueryUserRidList", discard_const_p(char *, kwnames))) {
   10051           0 :                 return false;
   10052             :         }
   10053             : 
   10054           0 :         return true;
   10055             : }
   10056             : 
   10057           0 : static PyObject *unpack_py_wbint_QueryUserRidList_args_out(struct wbint_QueryUserRidList *r)
   10058             : {
   10059             :         PyObject *result;
   10060             :         PyObject *py_rids;
   10061           0 :         py_rids = pytalloc_reference_ex(&wbint_RidArray_Type, r->out.rids, r->out.rids);
   10062           0 :         result = py_rids;
   10063           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   10064           0 :                 PyErr_SetNTSTATUS(r->out.result);
   10065           0 :                 return NULL;
   10066             :         }
   10067             : 
   10068           0 :         return result;
   10069             : }
   10070             : 
   10071             : 
   10072           0 : static PyObject *py_wbint_DsGetDcName_in_get_domain_name(PyObject *obj, void *closure)
   10073             : {
   10074           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(obj);
   10075             :         PyObject *py_domain_name;
   10076           0 :         if (object->in.domain_name == NULL) {
   10077           0 :                 Py_RETURN_NONE;
   10078             :         }
   10079           0 :         if (object->in.domain_name == NULL) {
   10080           0 :                 py_domain_name = Py_None;
   10081           0 :                 Py_INCREF(py_domain_name);
   10082             :         } else {
   10083           0 :                 py_domain_name = PyUnicode_Decode(object->in.domain_name, strlen(object->in.domain_name), "utf-8", "ignore");
   10084             :         }
   10085           0 :         return py_domain_name;
   10086             : }
   10087             : 
   10088           0 : static int py_wbint_DsGetDcName_in_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   10089             : {
   10090           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(py_obj);
   10091           0 :         if (value == NULL) {
   10092           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_name");
   10093           0 :                 return -1;
   10094             :         }
   10095           0 :         object->in.domain_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.domain_name);
   10096           0 :         if (object->in.domain_name == NULL) {
   10097           0 :                 PyErr_NoMemory();
   10098           0 :                 return -1;
   10099             :         }
   10100             :         {
   10101             :                 const char *test_str;
   10102             :                 const char *talloc_str;
   10103           0 :                 PyObject *unicode = NULL;
   10104           0 :                 if (PyUnicode_Check(value)) {
   10105           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   10106           0 :                         if (unicode == NULL) {
   10107           0 :                                 PyErr_NoMemory();
   10108           0 :                                 return -1;
   10109             :                         }
   10110           0 :                         test_str = PyBytes_AS_STRING(unicode);
   10111           0 :                 } else if (PyBytes_Check(value)) {
   10112           0 :                         test_str = PyBytes_AS_STRING(value);
   10113             :                 } else {
   10114           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   10115           0 :                         return -1;
   10116             :                 }
   10117           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   10118           0 :                 if (unicode != NULL) {
   10119           0 :                         Py_DECREF(unicode);
   10120             :                 }
   10121           0 :                 if (talloc_str == NULL) {
   10122           0 :                         PyErr_NoMemory();
   10123           0 :                         return -1;
   10124             :                 }
   10125           0 :                 object->in.domain_name = talloc_str;
   10126             :         }
   10127           0 :         return 0;
   10128             : }
   10129             : 
   10130           0 : static PyObject *py_wbint_DsGetDcName_in_get_domain_guid(PyObject *obj, void *closure)
   10131             : {
   10132           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(obj);
   10133             :         PyObject *py_domain_guid;
   10134           0 :         if (object->in.domain_guid == NULL) {
   10135           0 :                 Py_RETURN_NONE;
   10136             :         }
   10137           0 :         if (object->in.domain_guid == NULL) {
   10138           0 :                 py_domain_guid = Py_None;
   10139           0 :                 Py_INCREF(py_domain_guid);
   10140             :         } else {
   10141           0 :                 py_domain_guid = pytalloc_reference_ex(GUID_Type, object->in.domain_guid, object->in.domain_guid);
   10142             :         }
   10143           0 :         return py_domain_guid;
   10144             : }
   10145             : 
   10146           0 : static int py_wbint_DsGetDcName_in_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
   10147             : {
   10148           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(py_obj);
   10149           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domain_guid));
   10150           0 :         if (value == NULL) {
   10151           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_guid");
   10152           0 :                 return -1;
   10153             :         }
   10154           0 :         if (value == Py_None) {
   10155           0 :                 object->in.domain_guid = NULL;
   10156             :         } else {
   10157           0 :                 object->in.domain_guid = NULL;
   10158           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
   10159           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10160           0 :                         PyErr_NoMemory();
   10161           0 :                         return -1;
   10162             :                 }
   10163           0 :                 object->in.domain_guid = (struct GUID *)pytalloc_get_ptr(value);
   10164             :         }
   10165           0 :         return 0;
   10166             : }
   10167             : 
   10168           0 : static PyObject *py_wbint_DsGetDcName_in_get_site_name(PyObject *obj, void *closure)
   10169             : {
   10170           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(obj);
   10171             :         PyObject *py_site_name;
   10172           0 :         if (object->in.site_name == NULL) {
   10173           0 :                 Py_RETURN_NONE;
   10174             :         }
   10175           0 :         if (object->in.site_name == NULL) {
   10176           0 :                 py_site_name = Py_None;
   10177           0 :                 Py_INCREF(py_site_name);
   10178             :         } else {
   10179           0 :                 if (object->in.site_name == NULL) {
   10180           0 :                         py_site_name = Py_None;
   10181           0 :                         Py_INCREF(py_site_name);
   10182             :                 } else {
   10183           0 :                         py_site_name = PyUnicode_Decode(object->in.site_name, strlen(object->in.site_name), "utf-8", "ignore");
   10184             :                 }
   10185             :         }
   10186           0 :         return py_site_name;
   10187             : }
   10188             : 
   10189           0 : static int py_wbint_DsGetDcName_in_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
   10190             : {
   10191           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(py_obj);
   10192           0 :         if (value == NULL) {
   10193           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.site_name");
   10194           0 :                 return -1;
   10195             :         }
   10196           0 :         if (value == Py_None) {
   10197           0 :                 object->in.site_name = NULL;
   10198             :         } else {
   10199           0 :                 object->in.site_name = NULL;
   10200             :                 {
   10201             :                         const char *test_str;
   10202             :                         const char *talloc_str;
   10203           0 :                         PyObject *unicode = NULL;
   10204           0 :                         if (PyUnicode_Check(value)) {
   10205           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   10206           0 :                                 if (unicode == NULL) {
   10207           0 :                                         PyErr_NoMemory();
   10208           0 :                                         return -1;
   10209             :                                 }
   10210           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   10211           0 :                         } else if (PyBytes_Check(value)) {
   10212           0 :                                 test_str = PyBytes_AS_STRING(value);
   10213             :                         } else {
   10214           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   10215           0 :                                 return -1;
   10216             :                         }
   10217           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   10218           0 :                         if (unicode != NULL) {
   10219           0 :                                 Py_DECREF(unicode);
   10220             :                         }
   10221           0 :                         if (talloc_str == NULL) {
   10222           0 :                                 PyErr_NoMemory();
   10223           0 :                                 return -1;
   10224             :                         }
   10225           0 :                         object->in.site_name = talloc_str;
   10226             :                 }
   10227             :         }
   10228           0 :         return 0;
   10229             : }
   10230             : 
   10231           0 : static PyObject *py_wbint_DsGetDcName_in_get_flags(PyObject *obj, void *closure)
   10232             : {
   10233           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(obj);
   10234             :         PyObject *py_flags;
   10235           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   10236           0 :         return py_flags;
   10237             : }
   10238             : 
   10239           0 : static int py_wbint_DsGetDcName_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   10240             : {
   10241           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(py_obj);
   10242           0 :         if (value == NULL) {
   10243           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   10244           0 :                 return -1;
   10245             :         }
   10246             :         {
   10247           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   10248           0 :                 if (PyLong_Check(value)) {
   10249             :                         unsigned long long test_var;
   10250           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10251           0 :                         if (PyErr_Occurred() != NULL) {
   10252           0 :                                 return -1;
   10253             :                         }
   10254           0 :                         if (test_var > uint_max) {
   10255           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10256             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10257           0 :                                 return -1;
   10258             :                         }
   10259           0 :                         object->in.flags = test_var;
   10260             :                 } else {
   10261           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10262             :                           PyLong_Type.tp_name);
   10263           0 :                         return -1;
   10264             :                 }
   10265             :         }
   10266           0 :         return 0;
   10267             : }
   10268             : 
   10269           0 : static PyObject *py_wbint_DsGetDcName_out_get_dc_info(PyObject *obj, void *closure)
   10270             : {
   10271           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(obj);
   10272             :         PyObject *py_dc_info;
   10273           0 :         if (object->out.dc_info == NULL) {
   10274           0 :                 Py_RETURN_NONE;
   10275             :         }
   10276           0 :         if (*object->out.dc_info == NULL) {
   10277           0 :                 py_dc_info = Py_None;
   10278           0 :                 Py_INCREF(py_dc_info);
   10279             :         } else {
   10280           0 :                 py_dc_info = pytalloc_reference_ex(netr_DsRGetDCNameInfo_Type, *object->out.dc_info, *object->out.dc_info);
   10281             :         }
   10282           0 :         return py_dc_info;
   10283             : }
   10284             : 
   10285           0 : static int py_wbint_DsGetDcName_out_set_dc_info(PyObject *py_obj, PyObject *value, void *closure)
   10286             : {
   10287           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(py_obj);
   10288           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dc_info));
   10289           0 :         if (value == NULL) {
   10290           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.dc_info");
   10291           0 :                 return -1;
   10292             :         }
   10293           0 :         object->out.dc_info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dc_info);
   10294           0 :         if (object->out.dc_info == NULL) {
   10295           0 :                 PyErr_NoMemory();
   10296           0 :                 return -1;
   10297             :         }
   10298           0 :         if (value == Py_None) {
   10299           0 :                 *object->out.dc_info = NULL;
   10300             :         } else {
   10301           0 :                 *object->out.dc_info = NULL;
   10302           0 :                 PY_CHECK_TYPE(netr_DsRGetDCNameInfo_Type, value, return -1;);
   10303           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10304           0 :                         PyErr_NoMemory();
   10305           0 :                         return -1;
   10306             :                 }
   10307           0 :                 *object->out.dc_info = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(value);
   10308             :         }
   10309           0 :         return 0;
   10310             : }
   10311             : 
   10312           0 : static PyObject *py_wbint_DsGetDcName_get_result(PyObject *obj, void *closure)
   10313             : {
   10314           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(obj);
   10315             :         PyObject *py_result;
   10316           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   10317           0 :         return py_result;
   10318             : }
   10319             : 
   10320           0 : static int py_wbint_DsGetDcName_set_result(PyObject *py_obj, PyObject *value, void *closure)
   10321             : {
   10322           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(py_obj);
   10323           0 :         if (value == NULL) {
   10324           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   10325           0 :                 return -1;
   10326             :         }
   10327           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   10328           0 :         return 0;
   10329             : }
   10330             : 
   10331             : static PyGetSetDef py_wbint_DsGetDcName_getsetters[] = {
   10332             :         {
   10333             :                 .name = discard_const_p(char, "in_domain_name"),
   10334             :                 .get = py_wbint_DsGetDcName_in_get_domain_name,
   10335             :                 .set = py_wbint_DsGetDcName_in_set_domain_name,
   10336             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   10337             :         },
   10338             :         {
   10339             :                 .name = discard_const_p(char, "in_domain_guid"),
   10340             :                 .get = py_wbint_DsGetDcName_in_get_domain_guid,
   10341             :                 .set = py_wbint_DsGetDcName_in_set_domain_guid,
   10342             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   10343             :         },
   10344             :         {
   10345             :                 .name = discard_const_p(char, "in_site_name"),
   10346             :                 .get = py_wbint_DsGetDcName_in_get_site_name,
   10347             :                 .set = py_wbint_DsGetDcName_in_set_site_name,
   10348             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   10349             :         },
   10350             :         {
   10351             :                 .name = discard_const_p(char, "in_flags"),
   10352             :                 .get = py_wbint_DsGetDcName_in_get_flags,
   10353             :                 .set = py_wbint_DsGetDcName_in_set_flags,
   10354             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10355             :         },
   10356             :         {
   10357             :                 .name = discard_const_p(char, "out_dc_info"),
   10358             :                 .get = py_wbint_DsGetDcName_out_get_dc_info,
   10359             :                 .set = py_wbint_DsGetDcName_out_set_dc_info,
   10360             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCNameInfo")
   10361             :         },
   10362             :         {
   10363             :                 .name = discard_const_p(char, "result"),
   10364             :                 .get = py_wbint_DsGetDcName_get_result,
   10365             :                 .set = py_wbint_DsGetDcName_set_result,
   10366             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   10367             :         },
   10368             :         { .name = NULL }
   10369             : };
   10370             : 
   10371           0 : static PyObject *py_wbint_DsGetDcName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10372             : {
   10373           0 :         PyObject *self = pytalloc_new(struct wbint_DsGetDcName, type);
   10374           0 :         struct wbint_DsGetDcName *_self = (struct wbint_DsGetDcName *)pytalloc_get_ptr(self);
   10375           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   10376             :         /* a pointer to a NULL pointer */
   10377           0 :         _self->out.dc_info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo *);
   10378           0 :         return self;
   10379             : }
   10380             : 
   10381           0 : static PyObject *py_wbint_DsGetDcName_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   10382             : {
   10383             : 
   10384             : 
   10385           0 :         return PyLong_FromLong(15);
   10386             : }
   10387             : 
   10388           0 : static PyObject *py_wbint_DsGetDcName_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   10389             : {
   10390           0 :         const struct ndr_interface_call *call = NULL;
   10391           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(py_obj);
   10392           0 :         PyObject *ret = NULL;
   10393           0 :         struct ndr_push *push = NULL;
   10394             :         DATA_BLOB blob;
   10395             :         enum ndr_err_code err;
   10396             : 
   10397           0 :         if (ndr_table_winbind.num_calls < 16) {
   10398           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_DsGetDcName_ndr_pack");
   10399           0 :                 return NULL;
   10400             :         }
   10401           0 :         call = &ndr_table_winbind.calls[15];
   10402             : 
   10403           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   10404           0 :         if (push == NULL) {
   10405           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   10406           0 :                 return NULL;
   10407             :         }
   10408             : 
   10409           0 :         push->flags |= ndr_push_flags;
   10410             : 
   10411           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   10412           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10413           0 :                 TALLOC_FREE(push);
   10414           0 :                 PyErr_SetNdrError(err);
   10415           0 :                 return NULL;
   10416             :         }
   10417           0 :         blob = ndr_push_blob(push);
   10418           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   10419           0 :         TALLOC_FREE(push);
   10420           0 :         return ret;
   10421             : }
   10422             : 
   10423           0 : static PyObject *py_wbint_DsGetDcName_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   10424             : {
   10425           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   10426           0 :         PyObject *bigendian_obj = NULL;
   10427           0 :         PyObject *ndr64_obj = NULL;
   10428           0 :         uint32_t ndr_push_flags = 0;
   10429             : 
   10430           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   10431             :                 discard_const_p(char *, kwnames),
   10432             :                 &bigendian_obj,
   10433             :                 &ndr64_obj)) {
   10434           0 :                 return NULL;
   10435             :         }
   10436             : 
   10437           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   10438           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   10439             :         }
   10440           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   10441           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   10442             :         }
   10443             : 
   10444           0 :         return py_wbint_DsGetDcName_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   10445             : }
   10446             : 
   10447           0 : static PyObject *py_wbint_DsGetDcName_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   10448             : {
   10449           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   10450           0 :         PyObject *bigendian_obj = NULL;
   10451           0 :         PyObject *ndr64_obj = NULL;
   10452           0 :         uint32_t ndr_push_flags = 0;
   10453             : 
   10454           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   10455             :                 discard_const_p(char *, kwnames),
   10456             :                 &bigendian_obj,
   10457             :                 &ndr64_obj)) {
   10458           0 :                 return NULL;
   10459             :         }
   10460             : 
   10461           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   10462           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   10463             :         }
   10464           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   10465           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   10466             :         }
   10467             : 
   10468           0 :         return py_wbint_DsGetDcName_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   10469             : }
   10470             : 
   10471           0 : static PyObject *py_wbint_DsGetDcName_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   10472             : {
   10473           0 :         const struct ndr_interface_call *call = NULL;
   10474           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(py_obj);
   10475           0 :         struct ndr_pull *pull = NULL;
   10476             :         enum ndr_err_code err;
   10477             : 
   10478           0 :         if (ndr_table_winbind.num_calls < 16) {
   10479           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_DsGetDcName_ndr_unpack");
   10480           0 :                 return NULL;
   10481             :         }
   10482           0 :         call = &ndr_table_winbind.calls[15];
   10483             : 
   10484           0 :         pull = ndr_pull_init_blob(blob, object);
   10485           0 :         if (pull == NULL) {
   10486           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   10487           0 :                 return NULL;
   10488             :         }
   10489             : 
   10490           0 :         pull->flags |= ndr_pull_flags;
   10491             : 
   10492           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   10493           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10494           0 :                 TALLOC_FREE(pull);
   10495           0 :                 PyErr_SetNdrError(err);
   10496           0 :                 return NULL;
   10497             :         }
   10498           0 :         if (!allow_remaining) {
   10499             :                 uint32_t highest_ofs;
   10500             : 
   10501           0 :                 if (pull->offset > pull->relative_highest_offset) {
   10502           0 :                         highest_ofs = pull->offset;
   10503             :                 } else {
   10504           0 :                         highest_ofs = pull->relative_highest_offset;
   10505             :                 }
   10506           0 :                 if (highest_ofs < pull->data_size) {
   10507           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   10508             :                                 "not all bytes consumed ofs[%u] size[%u]",
   10509             :                                 highest_ofs, pull->data_size);
   10510           0 :                         TALLOC_FREE(pull);
   10511           0 :                         PyErr_SetNdrError(err);
   10512           0 :                         return NULL;
   10513             :                 }
   10514             :         }
   10515             : 
   10516           0 :         TALLOC_FREE(pull);
   10517           0 :         Py_RETURN_NONE;
   10518             : }
   10519             : 
   10520           0 : static PyObject *py_wbint_DsGetDcName_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   10521             : {
   10522             :         DATA_BLOB blob;
   10523           0 :         Py_ssize_t blob_length = 0;
   10524           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   10525           0 :         PyObject *bigendian_obj = NULL;
   10526           0 :         PyObject *ndr64_obj = NULL;
   10527           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   10528           0 :         PyObject *allow_remaining_obj = NULL;
   10529           0 :         bool allow_remaining = false;
   10530             : 
   10531           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   10532             :                 discard_const_p(char *, kwnames),
   10533             :                 &blob.data, &blob_length,
   10534             :                 &bigendian_obj,
   10535             :                 &ndr64_obj,
   10536             :                 &allow_remaining_obj)) {
   10537           0 :                 return NULL;
   10538             :         }
   10539           0 :         blob.length = blob_length;
   10540             : 
   10541           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   10542           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   10543             :         }
   10544           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   10545           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   10546             :         }
   10547             : 
   10548           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   10549           0 :                 allow_remaining = true;
   10550             :         }
   10551             : 
   10552           0 :         return py_wbint_DsGetDcName_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   10553             : }
   10554             : 
   10555           0 : static PyObject *py_wbint_DsGetDcName_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   10556             : {
   10557             :         DATA_BLOB blob;
   10558           0 :         Py_ssize_t blob_length = 0;
   10559           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   10560           0 :         PyObject *bigendian_obj = NULL;
   10561           0 :         PyObject *ndr64_obj = NULL;
   10562           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   10563           0 :         PyObject *allow_remaining_obj = NULL;
   10564           0 :         bool allow_remaining = false;
   10565             : 
   10566           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   10567             :                 discard_const_p(char *, kwnames),
   10568             :                 &blob.data, &blob_length,
   10569             :                 &bigendian_obj,
   10570             :                 &ndr64_obj,
   10571             :                 &allow_remaining_obj)) {
   10572           0 :                 return NULL;
   10573             :         }
   10574           0 :         blob.length = blob_length;
   10575             : 
   10576           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   10577           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   10578             :         }
   10579           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   10580           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   10581             :         }
   10582             : 
   10583           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   10584           0 :                 allow_remaining = true;
   10585             :         }
   10586             : 
   10587           0 :         return py_wbint_DsGetDcName_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   10588             : }
   10589             : 
   10590           0 : static PyObject *py_wbint_DsGetDcName_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   10591             : {
   10592           0 :         const struct ndr_interface_call *call = NULL;
   10593           0 :         struct wbint_DsGetDcName *object = (struct wbint_DsGetDcName *)pytalloc_get_ptr(py_obj);
   10594             :         PyObject *ret;
   10595             :         char *retstr;
   10596             : 
   10597           0 :         if (ndr_table_winbind.num_calls < 16) {
   10598           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_DsGetDcName_ndr_print");
   10599           0 :                 return NULL;
   10600             :         }
   10601           0 :         call = &ndr_table_winbind.calls[15];
   10602             : 
   10603           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   10604           0 :         ret = PyUnicode_FromString(retstr);
   10605           0 :         TALLOC_FREE(retstr);
   10606             : 
   10607           0 :         return ret;
   10608             : }
   10609             : 
   10610           0 : static PyObject *py_wbint_DsGetDcName_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   10611             : {
   10612           0 :         return py_wbint_DsGetDcName_ndr_print(py_obj, "wbint_DsGetDcName_in", NDR_IN);
   10613             : }
   10614             : 
   10615           0 : static PyObject *py_wbint_DsGetDcName_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   10616             : {
   10617           0 :         return py_wbint_DsGetDcName_ndr_print(py_obj, "wbint_DsGetDcName_out", NDR_OUT);
   10618             : }
   10619             : 
   10620             : static PyMethodDef py_wbint_DsGetDcName_methods[] = {
   10621             :         { "opnum", (PyCFunction)py_wbint_DsGetDcName_ndr_opnum, METH_NOARGS|METH_CLASS,
   10622             :                 "winbind.wbint_DsGetDcName.opnum() -> 15 (0x0f) " },
   10623             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_DsGetDcName_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   10624             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   10625             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_DsGetDcName_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   10626             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   10627             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_DsGetDcName_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   10628             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   10629             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_DsGetDcName_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   10630             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   10631             :         { "__ndr_print_in__", (PyCFunction)py_wbint_DsGetDcName_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   10632             :         { "__ndr_print_out__", (PyCFunction)py_wbint_DsGetDcName_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   10633             :         { NULL, NULL, 0, NULL }
   10634             : };
   10635             : 
   10636             : 
   10637             : static PyTypeObject wbint_DsGetDcName_Type = {
   10638             :         PyVarObject_HEAD_INIT(NULL, 0)
   10639             :         .tp_name = "winbind.wbint_DsGetDcName",
   10640             :         .tp_getset = py_wbint_DsGetDcName_getsetters,
   10641             :         .tp_methods = py_wbint_DsGetDcName_methods,
   10642             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10643             :         .tp_new = py_wbint_DsGetDcName_new,
   10644             : };
   10645             : 
   10646           0 : static bool pack_py_wbint_DsGetDcName_args_in(PyObject *args, PyObject *kwargs, struct wbint_DsGetDcName *r)
   10647             : {
   10648             :         PyObject *py_domain_name;
   10649             :         PyObject *py_domain_guid;
   10650             :         PyObject *py_site_name;
   10651             :         PyObject *py_flags;
   10652           0 :         const char *kwnames[] = {
   10653             :                 "domain_name", "domain_guid", "site_name", "flags", NULL
   10654             :         };
   10655             : 
   10656           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)) {
   10657           0 :                 return false;
   10658             :         }
   10659             : 
   10660           0 :         if (py_domain_name == NULL) {
   10661           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_name");
   10662           0 :                 return false;
   10663             :         }
   10664           0 :         r->in.domain_name = talloc_ptrtype(r, r->in.domain_name);
   10665           0 :         if (r->in.domain_name == NULL) {
   10666           0 :                 PyErr_NoMemory();
   10667           0 :                 return false;
   10668             :         }
   10669             :         {
   10670             :                 const char *test_str;
   10671             :                 const char *talloc_str;
   10672           0 :                 PyObject *unicode = NULL;
   10673           0 :                 if (PyUnicode_Check(py_domain_name)) {
   10674           0 :                         unicode = PyUnicode_AsEncodedString(py_domain_name, "utf-8", "ignore");
   10675           0 :                         if (unicode == NULL) {
   10676           0 :                                 PyErr_NoMemory();
   10677           0 :                                 return false;
   10678             :                         }
   10679           0 :                         test_str = PyBytes_AS_STRING(unicode);
   10680           0 :                 } else if (PyBytes_Check(py_domain_name)) {
   10681           0 :                         test_str = PyBytes_AS_STRING(py_domain_name);
   10682             :                 } else {
   10683           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain_name)->tp_name);
   10684           0 :                         return false;
   10685             :                 }
   10686           0 :                 talloc_str = talloc_strdup(r, test_str);
   10687           0 :                 if (unicode != NULL) {
   10688           0 :                         Py_DECREF(unicode);
   10689             :                 }
   10690           0 :                 if (talloc_str == NULL) {
   10691           0 :                         PyErr_NoMemory();
   10692           0 :                         return false;
   10693             :                 }
   10694           0 :                 r->in.domain_name = talloc_str;
   10695             :         }
   10696           0 :         if (py_domain_guid == NULL) {
   10697           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_guid");
   10698           0 :                 return false;
   10699             :         }
   10700           0 :         if (py_domain_guid == Py_None) {
   10701           0 :                 r->in.domain_guid = NULL;
   10702             :         } else {
   10703           0 :                 r->in.domain_guid = NULL;
   10704           0 :                 PY_CHECK_TYPE(GUID_Type, py_domain_guid, return false;);
   10705           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_guid)) == NULL) {
   10706           0 :                         PyErr_NoMemory();
   10707           0 :                         return false;
   10708             :                 }
   10709           0 :                 r->in.domain_guid = (struct GUID *)pytalloc_get_ptr(py_domain_guid);
   10710             :         }
   10711           0 :         if (py_site_name == NULL) {
   10712           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.site_name");
   10713           0 :                 return false;
   10714             :         }
   10715           0 :         if (py_site_name == Py_None) {
   10716           0 :                 r->in.site_name = NULL;
   10717             :         } else {
   10718           0 :                 r->in.site_name = NULL;
   10719             :                 {
   10720             :                         const char *test_str;
   10721             :                         const char *talloc_str;
   10722           0 :                         PyObject *unicode = NULL;
   10723           0 :                         if (PyUnicode_Check(py_site_name)) {
   10724           0 :                                 unicode = PyUnicode_AsEncodedString(py_site_name, "utf-8", "ignore");
   10725           0 :                                 if (unicode == NULL) {
   10726           0 :                                         PyErr_NoMemory();
   10727           0 :                                         return false;
   10728             :                                 }
   10729           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   10730           0 :                         } else if (PyBytes_Check(py_site_name)) {
   10731           0 :                                 test_str = PyBytes_AS_STRING(py_site_name);
   10732             :                         } else {
   10733           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_site_name)->tp_name);
   10734           0 :                                 return false;
   10735             :                         }
   10736           0 :                         talloc_str = talloc_strdup(r, test_str);
   10737           0 :                         if (unicode != NULL) {
   10738           0 :                                 Py_DECREF(unicode);
   10739             :                         }
   10740           0 :                         if (talloc_str == NULL) {
   10741           0 :                                 PyErr_NoMemory();
   10742           0 :                                 return false;
   10743             :                         }
   10744           0 :                         r->in.site_name = talloc_str;
   10745             :                 }
   10746             :         }
   10747           0 :         if (py_flags == NULL) {
   10748           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   10749           0 :                 return false;
   10750             :         }
   10751             :         {
   10752           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   10753           0 :                 if (PyLong_Check(py_flags)) {
   10754             :                         unsigned long long test_var;
   10755           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   10756           0 :                         if (PyErr_Occurred() != NULL) {
   10757           0 :                                 return false;
   10758             :                         }
   10759           0 :                         if (test_var > uint_max) {
   10760           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10761             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10762           0 :                                 return false;
   10763             :                         }
   10764           0 :                         r->in.flags = test_var;
   10765             :                 } else {
   10766           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10767             :                           PyLong_Type.tp_name);
   10768           0 :                         return false;
   10769             :                 }
   10770             :         }
   10771           0 :         return true;
   10772             : }
   10773             : 
   10774           0 : static PyObject *unpack_py_wbint_DsGetDcName_args_out(struct wbint_DsGetDcName *r)
   10775             : {
   10776             :         PyObject *result;
   10777             :         PyObject *py_dc_info;
   10778           0 :         if (*r->out.dc_info == NULL) {
   10779           0 :                 py_dc_info = Py_None;
   10780           0 :                 Py_INCREF(py_dc_info);
   10781             :         } else {
   10782           0 :                 py_dc_info = pytalloc_reference_ex(netr_DsRGetDCNameInfo_Type, *r->out.dc_info, *r->out.dc_info);
   10783             :         }
   10784           0 :         result = py_dc_info;
   10785           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   10786           0 :                 PyErr_SetNTSTATUS(r->out.result);
   10787           0 :                 return NULL;
   10788             :         }
   10789             : 
   10790           0 :         return result;
   10791             : }
   10792             : 
   10793             : 
   10794           0 : static PyObject *py_wbint_LookupRids_in_get_domain_sid(PyObject *obj, void *closure)
   10795             : {
   10796           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(obj);
   10797             :         PyObject *py_domain_sid;
   10798           0 :         if (object->in.domain_sid == NULL) {
   10799           0 :                 Py_RETURN_NONE;
   10800             :         }
   10801           0 :         py_domain_sid = pytalloc_reference_ex(dom_sid_Type, object->in.domain_sid, object->in.domain_sid);
   10802           0 :         return py_domain_sid;
   10803             : }
   10804             : 
   10805           0 : static int py_wbint_LookupRids_in_set_domain_sid(PyObject *py_obj, PyObject *value, void *closure)
   10806             : {
   10807           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(py_obj);
   10808           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domain_sid));
   10809           0 :         if (value == NULL) {
   10810           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_sid");
   10811           0 :                 return -1;
   10812             :         }
   10813           0 :         object->in.domain_sid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.domain_sid);
   10814           0 :         if (object->in.domain_sid == NULL) {
   10815           0 :                 PyErr_NoMemory();
   10816           0 :                 return -1;
   10817             :         }
   10818           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
   10819           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10820           0 :                 PyErr_NoMemory();
   10821           0 :                 return -1;
   10822             :         }
   10823           0 :         object->in.domain_sid = (struct dom_sid *)pytalloc_get_ptr(value);
   10824           0 :         return 0;
   10825             : }
   10826             : 
   10827           0 : static PyObject *py_wbint_LookupRids_in_get_rids(PyObject *obj, void *closure)
   10828             : {
   10829           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(obj);
   10830             :         PyObject *py_rids;
   10831           0 :         if (object->in.rids == NULL) {
   10832           0 :                 Py_RETURN_NONE;
   10833             :         }
   10834           0 :         py_rids = pytalloc_reference_ex(&wbint_RidArray_Type, object->in.rids, object->in.rids);
   10835           0 :         return py_rids;
   10836             : }
   10837             : 
   10838           0 : static int py_wbint_LookupRids_in_set_rids(PyObject *py_obj, PyObject *value, void *closure)
   10839             : {
   10840           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(py_obj);
   10841           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.rids));
   10842           0 :         if (value == NULL) {
   10843           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.rids");
   10844           0 :                 return -1;
   10845             :         }
   10846           0 :         object->in.rids = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.rids);
   10847           0 :         if (object->in.rids == NULL) {
   10848           0 :                 PyErr_NoMemory();
   10849           0 :                 return -1;
   10850             :         }
   10851           0 :         PY_CHECK_TYPE(&wbint_RidArray_Type, value, return -1;);
   10852           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10853           0 :                 PyErr_NoMemory();
   10854           0 :                 return -1;
   10855             :         }
   10856           0 :         object->in.rids = (struct wbint_RidArray *)pytalloc_get_ptr(value);
   10857           0 :         return 0;
   10858             : }
   10859             : 
   10860           0 : static PyObject *py_wbint_LookupRids_out_get_domain_name(PyObject *obj, void *closure)
   10861             : {
   10862           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(obj);
   10863             :         PyObject *py_domain_name;
   10864           0 :         if (object->out.domain_name == NULL) {
   10865           0 :                 Py_RETURN_NONE;
   10866             :         }
   10867           0 :         if (*object->out.domain_name == NULL) {
   10868           0 :                 py_domain_name = Py_None;
   10869           0 :                 Py_INCREF(py_domain_name);
   10870             :         } else {
   10871           0 :                 if (*object->out.domain_name == NULL) {
   10872           0 :                         py_domain_name = Py_None;
   10873           0 :                         Py_INCREF(py_domain_name);
   10874             :                 } else {
   10875           0 :                         py_domain_name = PyUnicode_Decode(*object->out.domain_name, strlen(*object->out.domain_name), "utf-8", "ignore");
   10876             :                 }
   10877             :         }
   10878           0 :         return py_domain_name;
   10879             : }
   10880             : 
   10881           0 : static int py_wbint_LookupRids_out_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   10882             : {
   10883           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(py_obj);
   10884           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.domain_name));
   10885           0 :         if (value == NULL) {
   10886           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.domain_name");
   10887           0 :                 return -1;
   10888             :         }
   10889           0 :         object->out.domain_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.domain_name);
   10890           0 :         if (object->out.domain_name == NULL) {
   10891           0 :                 PyErr_NoMemory();
   10892           0 :                 return -1;
   10893             :         }
   10894           0 :         if (value == Py_None) {
   10895           0 :                 *object->out.domain_name = NULL;
   10896             :         } else {
   10897           0 :                 *object->out.domain_name = NULL;
   10898             :                 {
   10899             :                         const char *test_str;
   10900             :                         const char *talloc_str;
   10901           0 :                         PyObject *unicode = NULL;
   10902           0 :                         if (PyUnicode_Check(value)) {
   10903           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   10904           0 :                                 if (unicode == NULL) {
   10905           0 :                                         PyErr_NoMemory();
   10906           0 :                                         return -1;
   10907             :                                 }
   10908           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   10909           0 :                         } else if (PyBytes_Check(value)) {
   10910           0 :                                 test_str = PyBytes_AS_STRING(value);
   10911             :                         } else {
   10912           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   10913           0 :                                 return -1;
   10914             :                         }
   10915           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   10916           0 :                         if (unicode != NULL) {
   10917           0 :                                 Py_DECREF(unicode);
   10918             :                         }
   10919           0 :                         if (talloc_str == NULL) {
   10920           0 :                                 PyErr_NoMemory();
   10921           0 :                                 return -1;
   10922             :                         }
   10923           0 :                         *object->out.domain_name = talloc_str;
   10924             :                 }
   10925             :         }
   10926           0 :         return 0;
   10927             : }
   10928             : 
   10929           0 : static PyObject *py_wbint_LookupRids_out_get_names(PyObject *obj, void *closure)
   10930             : {
   10931           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(obj);
   10932             :         PyObject *py_names;
   10933           0 :         if (object->out.names == NULL) {
   10934           0 :                 Py_RETURN_NONE;
   10935             :         }
   10936           0 :         py_names = pytalloc_reference_ex(&wbint_Principals_Type, object->out.names, object->out.names);
   10937           0 :         return py_names;
   10938             : }
   10939             : 
   10940           0 : static int py_wbint_LookupRids_out_set_names(PyObject *py_obj, PyObject *value, void *closure)
   10941             : {
   10942           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(py_obj);
   10943           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.names));
   10944           0 :         if (value == NULL) {
   10945           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.names");
   10946           0 :                 return -1;
   10947             :         }
   10948           0 :         object->out.names = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.names);
   10949           0 :         if (object->out.names == NULL) {
   10950           0 :                 PyErr_NoMemory();
   10951           0 :                 return -1;
   10952             :         }
   10953           0 :         PY_CHECK_TYPE(&wbint_Principals_Type, value, return -1;);
   10954           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10955           0 :                 PyErr_NoMemory();
   10956           0 :                 return -1;
   10957             :         }
   10958           0 :         object->out.names = (struct wbint_Principals *)pytalloc_get_ptr(value);
   10959           0 :         return 0;
   10960             : }
   10961             : 
   10962           0 : static PyObject *py_wbint_LookupRids_get_result(PyObject *obj, void *closure)
   10963             : {
   10964           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(obj);
   10965             :         PyObject *py_result;
   10966           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   10967           0 :         return py_result;
   10968             : }
   10969             : 
   10970           0 : static int py_wbint_LookupRids_set_result(PyObject *py_obj, PyObject *value, void *closure)
   10971             : {
   10972           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(py_obj);
   10973           0 :         if (value == NULL) {
   10974           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   10975           0 :                 return -1;
   10976             :         }
   10977           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   10978           0 :         return 0;
   10979             : }
   10980             : 
   10981             : static PyGetSetDef py_wbint_LookupRids_getsetters[] = {
   10982             :         {
   10983             :                 .name = discard_const_p(char, "in_domain_sid"),
   10984             :                 .get = py_wbint_LookupRids_in_get_domain_sid,
   10985             :                 .set = py_wbint_LookupRids_in_set_domain_sid,
   10986             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
   10987             :         },
   10988             :         {
   10989             :                 .name = discard_const_p(char, "in_rids"),
   10990             :                 .get = py_wbint_LookupRids_in_get_rids,
   10991             :                 .set = py_wbint_LookupRids_in_set_rids,
   10992             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_RidArray")
   10993             :         },
   10994             :         {
   10995             :                 .name = discard_const_p(char, "out_domain_name"),
   10996             :                 .get = py_wbint_LookupRids_out_get_domain_name,
   10997             :                 .set = py_wbint_LookupRids_out_set_domain_name,
   10998             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   10999             :         },
   11000             :         {
   11001             :                 .name = discard_const_p(char, "out_names"),
   11002             :                 .get = py_wbint_LookupRids_out_get_names,
   11003             :                 .set = py_wbint_LookupRids_out_set_names,
   11004             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_Principals")
   11005             :         },
   11006             :         {
   11007             :                 .name = discard_const_p(char, "result"),
   11008             :                 .get = py_wbint_LookupRids_get_result,
   11009             :                 .set = py_wbint_LookupRids_set_result,
   11010             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   11011             :         },
   11012             :         { .name = NULL }
   11013             : };
   11014             : 
   11015           0 : static PyObject *py_wbint_LookupRids_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11016             : {
   11017           0 :         PyObject *self = pytalloc_new(struct wbint_LookupRids, type);
   11018           0 :         struct wbint_LookupRids *_self = (struct wbint_LookupRids *)pytalloc_get_ptr(self);
   11019           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   11020           0 :         _self->in.domain_sid = talloc_zero(mem_ctx, struct dom_sid);
   11021           0 :         _self->in.rids = talloc_zero(mem_ctx, struct wbint_RidArray);
   11022           0 :         _self->out.names = talloc_zero(mem_ctx, struct wbint_Principals);
   11023           0 :         return self;
   11024             : }
   11025             : 
   11026           0 : static PyObject *py_wbint_LookupRids_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   11027             : {
   11028             : 
   11029             : 
   11030           0 :         return PyLong_FromLong(16);
   11031             : }
   11032             : 
   11033           0 : static PyObject *py_wbint_LookupRids_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   11034             : {
   11035           0 :         const struct ndr_interface_call *call = NULL;
   11036           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(py_obj);
   11037           0 :         PyObject *ret = NULL;
   11038           0 :         struct ndr_push *push = NULL;
   11039             :         DATA_BLOB blob;
   11040             :         enum ndr_err_code err;
   11041             : 
   11042           0 :         if (ndr_table_winbind.num_calls < 17) {
   11043           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupRids_ndr_pack");
   11044           0 :                 return NULL;
   11045             :         }
   11046           0 :         call = &ndr_table_winbind.calls[16];
   11047             : 
   11048           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   11049           0 :         if (push == NULL) {
   11050           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   11051           0 :                 return NULL;
   11052             :         }
   11053             : 
   11054           0 :         push->flags |= ndr_push_flags;
   11055             : 
   11056           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   11057           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11058           0 :                 TALLOC_FREE(push);
   11059           0 :                 PyErr_SetNdrError(err);
   11060           0 :                 return NULL;
   11061             :         }
   11062           0 :         blob = ndr_push_blob(push);
   11063           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   11064           0 :         TALLOC_FREE(push);
   11065           0 :         return ret;
   11066             : }
   11067             : 
   11068           0 : static PyObject *py_wbint_LookupRids_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11069             : {
   11070           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   11071           0 :         PyObject *bigendian_obj = NULL;
   11072           0 :         PyObject *ndr64_obj = NULL;
   11073           0 :         uint32_t ndr_push_flags = 0;
   11074             : 
   11075           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   11076             :                 discard_const_p(char *, kwnames),
   11077             :                 &bigendian_obj,
   11078             :                 &ndr64_obj)) {
   11079           0 :                 return NULL;
   11080             :         }
   11081             : 
   11082           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   11083           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   11084             :         }
   11085           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   11086           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   11087             :         }
   11088             : 
   11089           0 :         return py_wbint_LookupRids_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   11090             : }
   11091             : 
   11092           0 : static PyObject *py_wbint_LookupRids_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11093             : {
   11094           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   11095           0 :         PyObject *bigendian_obj = NULL;
   11096           0 :         PyObject *ndr64_obj = NULL;
   11097           0 :         uint32_t ndr_push_flags = 0;
   11098             : 
   11099           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   11100             :                 discard_const_p(char *, kwnames),
   11101             :                 &bigendian_obj,
   11102             :                 &ndr64_obj)) {
   11103           0 :                 return NULL;
   11104             :         }
   11105             : 
   11106           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   11107           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   11108             :         }
   11109           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   11110           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   11111             :         }
   11112             : 
   11113           0 :         return py_wbint_LookupRids_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   11114             : }
   11115             : 
   11116           0 : static PyObject *py_wbint_LookupRids_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   11117             : {
   11118           0 :         const struct ndr_interface_call *call = NULL;
   11119           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(py_obj);
   11120           0 :         struct ndr_pull *pull = NULL;
   11121             :         enum ndr_err_code err;
   11122             : 
   11123           0 :         if (ndr_table_winbind.num_calls < 17) {
   11124           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupRids_ndr_unpack");
   11125           0 :                 return NULL;
   11126             :         }
   11127           0 :         call = &ndr_table_winbind.calls[16];
   11128             : 
   11129           0 :         pull = ndr_pull_init_blob(blob, object);
   11130           0 :         if (pull == NULL) {
   11131           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   11132           0 :                 return NULL;
   11133             :         }
   11134             : 
   11135           0 :         pull->flags |= ndr_pull_flags;
   11136             : 
   11137           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   11138           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11139           0 :                 TALLOC_FREE(pull);
   11140           0 :                 PyErr_SetNdrError(err);
   11141           0 :                 return NULL;
   11142             :         }
   11143           0 :         if (!allow_remaining) {
   11144             :                 uint32_t highest_ofs;
   11145             : 
   11146           0 :                 if (pull->offset > pull->relative_highest_offset) {
   11147           0 :                         highest_ofs = pull->offset;
   11148             :                 } else {
   11149           0 :                         highest_ofs = pull->relative_highest_offset;
   11150             :                 }
   11151           0 :                 if (highest_ofs < pull->data_size) {
   11152           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   11153             :                                 "not all bytes consumed ofs[%u] size[%u]",
   11154             :                                 highest_ofs, pull->data_size);
   11155           0 :                         TALLOC_FREE(pull);
   11156           0 :                         PyErr_SetNdrError(err);
   11157           0 :                         return NULL;
   11158             :                 }
   11159             :         }
   11160             : 
   11161           0 :         TALLOC_FREE(pull);
   11162           0 :         Py_RETURN_NONE;
   11163             : }
   11164             : 
   11165           0 : static PyObject *py_wbint_LookupRids_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11166             : {
   11167             :         DATA_BLOB blob;
   11168           0 :         Py_ssize_t blob_length = 0;
   11169           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   11170           0 :         PyObject *bigendian_obj = NULL;
   11171           0 :         PyObject *ndr64_obj = NULL;
   11172           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   11173           0 :         PyObject *allow_remaining_obj = NULL;
   11174           0 :         bool allow_remaining = false;
   11175             : 
   11176           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   11177             :                 discard_const_p(char *, kwnames),
   11178             :                 &blob.data, &blob_length,
   11179             :                 &bigendian_obj,
   11180             :                 &ndr64_obj,
   11181             :                 &allow_remaining_obj)) {
   11182           0 :                 return NULL;
   11183             :         }
   11184           0 :         blob.length = blob_length;
   11185             : 
   11186           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   11187           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   11188             :         }
   11189           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   11190           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   11191             :         }
   11192             : 
   11193           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   11194           0 :                 allow_remaining = true;
   11195             :         }
   11196             : 
   11197           0 :         return py_wbint_LookupRids_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   11198             : }
   11199             : 
   11200           0 : static PyObject *py_wbint_LookupRids_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11201             : {
   11202             :         DATA_BLOB blob;
   11203           0 :         Py_ssize_t blob_length = 0;
   11204           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   11205           0 :         PyObject *bigendian_obj = NULL;
   11206           0 :         PyObject *ndr64_obj = NULL;
   11207           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   11208           0 :         PyObject *allow_remaining_obj = NULL;
   11209           0 :         bool allow_remaining = false;
   11210             : 
   11211           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   11212             :                 discard_const_p(char *, kwnames),
   11213             :                 &blob.data, &blob_length,
   11214             :                 &bigendian_obj,
   11215             :                 &ndr64_obj,
   11216             :                 &allow_remaining_obj)) {
   11217           0 :                 return NULL;
   11218             :         }
   11219           0 :         blob.length = blob_length;
   11220             : 
   11221           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   11222           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   11223             :         }
   11224           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   11225           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   11226             :         }
   11227             : 
   11228           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   11229           0 :                 allow_remaining = true;
   11230             :         }
   11231             : 
   11232           0 :         return py_wbint_LookupRids_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   11233             : }
   11234             : 
   11235           0 : static PyObject *py_wbint_LookupRids_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   11236             : {
   11237           0 :         const struct ndr_interface_call *call = NULL;
   11238           0 :         struct wbint_LookupRids *object = (struct wbint_LookupRids *)pytalloc_get_ptr(py_obj);
   11239             :         PyObject *ret;
   11240             :         char *retstr;
   11241             : 
   11242           0 :         if (ndr_table_winbind.num_calls < 17) {
   11243           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_LookupRids_ndr_print");
   11244           0 :                 return NULL;
   11245             :         }
   11246           0 :         call = &ndr_table_winbind.calls[16];
   11247             : 
   11248           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   11249           0 :         ret = PyUnicode_FromString(retstr);
   11250           0 :         TALLOC_FREE(retstr);
   11251             : 
   11252           0 :         return ret;
   11253             : }
   11254             : 
   11255           0 : static PyObject *py_wbint_LookupRids_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   11256             : {
   11257           0 :         return py_wbint_LookupRids_ndr_print(py_obj, "wbint_LookupRids_in", NDR_IN);
   11258             : }
   11259             : 
   11260           0 : static PyObject *py_wbint_LookupRids_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   11261             : {
   11262           0 :         return py_wbint_LookupRids_ndr_print(py_obj, "wbint_LookupRids_out", NDR_OUT);
   11263             : }
   11264             : 
   11265             : static PyMethodDef py_wbint_LookupRids_methods[] = {
   11266             :         { "opnum", (PyCFunction)py_wbint_LookupRids_ndr_opnum, METH_NOARGS|METH_CLASS,
   11267             :                 "winbind.wbint_LookupRids.opnum() -> 16 (0x10) " },
   11268             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupRids_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   11269             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   11270             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupRids_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   11271             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   11272             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupRids_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   11273             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   11274             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_LookupRids_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   11275             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   11276             :         { "__ndr_print_in__", (PyCFunction)py_wbint_LookupRids_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   11277             :         { "__ndr_print_out__", (PyCFunction)py_wbint_LookupRids_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   11278             :         { NULL, NULL, 0, NULL }
   11279             : };
   11280             : 
   11281             : 
   11282             : static PyTypeObject wbint_LookupRids_Type = {
   11283             :         PyVarObject_HEAD_INIT(NULL, 0)
   11284             :         .tp_name = "winbind.wbint_LookupRids",
   11285             :         .tp_getset = py_wbint_LookupRids_getsetters,
   11286             :         .tp_methods = py_wbint_LookupRids_methods,
   11287             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11288             :         .tp_new = py_wbint_LookupRids_new,
   11289             : };
   11290             : 
   11291           0 : static bool pack_py_wbint_LookupRids_args_in(PyObject *args, PyObject *kwargs, struct wbint_LookupRids *r)
   11292             : {
   11293             :         PyObject *py_domain_sid;
   11294             :         PyObject *py_rids;
   11295           0 :         const char *kwnames[] = {
   11296             :                 "domain_sid", "rids", NULL
   11297             :         };
   11298             : 
   11299           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:wbint_LookupRids", discard_const_p(char *, kwnames), &py_domain_sid, &py_rids)) {
   11300           0 :                 return false;
   11301             :         }
   11302             : 
   11303           0 :         if (py_domain_sid == NULL) {
   11304           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_sid");
   11305           0 :                 return false;
   11306             :         }
   11307           0 :         r->in.domain_sid = talloc_ptrtype(r, r->in.domain_sid);
   11308           0 :         if (r->in.domain_sid == NULL) {
   11309           0 :                 PyErr_NoMemory();
   11310           0 :                 return false;
   11311             :         }
   11312           0 :         PY_CHECK_TYPE(dom_sid_Type, py_domain_sid, return false;);
   11313           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_sid)) == NULL) {
   11314           0 :                 PyErr_NoMemory();
   11315           0 :                 return false;
   11316             :         }
   11317           0 :         r->in.domain_sid = (struct dom_sid *)pytalloc_get_ptr(py_domain_sid);
   11318           0 :         if (py_rids == NULL) {
   11319           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.rids");
   11320           0 :                 return false;
   11321             :         }
   11322           0 :         r->in.rids = talloc_ptrtype(r, r->in.rids);
   11323           0 :         if (r->in.rids == NULL) {
   11324           0 :                 PyErr_NoMemory();
   11325           0 :                 return false;
   11326             :         }
   11327           0 :         PY_CHECK_TYPE(&wbint_RidArray_Type, py_rids, return false;);
   11328           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_rids)) == NULL) {
   11329           0 :                 PyErr_NoMemory();
   11330           0 :                 return false;
   11331             :         }
   11332           0 :         r->in.rids = (struct wbint_RidArray *)pytalloc_get_ptr(py_rids);
   11333           0 :         return true;
   11334             : }
   11335             : 
   11336           0 : static PyObject *unpack_py_wbint_LookupRids_args_out(struct wbint_LookupRids *r)
   11337             : {
   11338             :         PyObject *result;
   11339             :         PyObject *py_domain_name;
   11340             :         PyObject *py_names;
   11341           0 :         result = PyTuple_New(2);
   11342           0 :         if (*r->out.domain_name == NULL) {
   11343           0 :                 py_domain_name = Py_None;
   11344           0 :                 Py_INCREF(py_domain_name);
   11345             :         } else {
   11346           0 :                 if (*r->out.domain_name == NULL) {
   11347           0 :                         py_domain_name = Py_None;
   11348           0 :                         Py_INCREF(py_domain_name);
   11349             :                 } else {
   11350           0 :                         py_domain_name = PyUnicode_Decode(*r->out.domain_name, strlen(*r->out.domain_name), "utf-8", "ignore");
   11351             :                 }
   11352             :         }
   11353           0 :         PyTuple_SetItem(result, 0, py_domain_name);
   11354           0 :         py_names = pytalloc_reference_ex(&wbint_Principals_Type, r->out.names, r->out.names);
   11355           0 :         PyTuple_SetItem(result, 1, py_names);
   11356           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   11357           0 :                 PyErr_SetNTSTATUS(r->out.result);
   11358           0 :                 return NULL;
   11359             :         }
   11360             : 
   11361           0 :         return result;
   11362             : }
   11363             : 
   11364             : 
   11365           0 : static PyObject *py_wbint_CheckMachineAccount_get_result(PyObject *obj, void *closure)
   11366             : {
   11367           0 :         struct wbint_CheckMachineAccount *object = (struct wbint_CheckMachineAccount *)pytalloc_get_ptr(obj);
   11368             :         PyObject *py_result;
   11369           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   11370           0 :         return py_result;
   11371             : }
   11372             : 
   11373           0 : static int py_wbint_CheckMachineAccount_set_result(PyObject *py_obj, PyObject *value, void *closure)
   11374             : {
   11375           0 :         struct wbint_CheckMachineAccount *object = (struct wbint_CheckMachineAccount *)pytalloc_get_ptr(py_obj);
   11376           0 :         if (value == NULL) {
   11377           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   11378           0 :                 return -1;
   11379             :         }
   11380           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   11381           0 :         return 0;
   11382             : }
   11383             : 
   11384             : static PyGetSetDef py_wbint_CheckMachineAccount_getsetters[] = {
   11385             :         {
   11386             :                 .name = discard_const_p(char, "result"),
   11387             :                 .get = py_wbint_CheckMachineAccount_get_result,
   11388             :                 .set = py_wbint_CheckMachineAccount_set_result,
   11389             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   11390             :         },
   11391             :         { .name = NULL }
   11392             : };
   11393             : 
   11394           0 : static PyObject *py_wbint_CheckMachineAccount_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11395             : {
   11396           0 :         PyObject *self = pytalloc_new(struct wbint_CheckMachineAccount, type);
   11397           0 :         return self;
   11398             : }
   11399             : 
   11400           0 : static PyObject *py_wbint_CheckMachineAccount_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   11401             : {
   11402             : 
   11403             : 
   11404           0 :         return PyLong_FromLong(17);
   11405             : }
   11406             : 
   11407           0 : static PyObject *py_wbint_CheckMachineAccount_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   11408             : {
   11409           0 :         const struct ndr_interface_call *call = NULL;
   11410           0 :         struct wbint_CheckMachineAccount *object = (struct wbint_CheckMachineAccount *)pytalloc_get_ptr(py_obj);
   11411           0 :         PyObject *ret = NULL;
   11412           0 :         struct ndr_push *push = NULL;
   11413             :         DATA_BLOB blob;
   11414             :         enum ndr_err_code err;
   11415             : 
   11416           0 :         if (ndr_table_winbind.num_calls < 18) {
   11417           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_CheckMachineAccount_ndr_pack");
   11418           0 :                 return NULL;
   11419             :         }
   11420           0 :         call = &ndr_table_winbind.calls[17];
   11421             : 
   11422           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   11423           0 :         if (push == NULL) {
   11424           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   11425           0 :                 return NULL;
   11426             :         }
   11427             : 
   11428           0 :         push->flags |= ndr_push_flags;
   11429             : 
   11430           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   11431           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11432           0 :                 TALLOC_FREE(push);
   11433           0 :                 PyErr_SetNdrError(err);
   11434           0 :                 return NULL;
   11435             :         }
   11436           0 :         blob = ndr_push_blob(push);
   11437           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   11438           0 :         TALLOC_FREE(push);
   11439           0 :         return ret;
   11440             : }
   11441             : 
   11442           0 : static PyObject *py_wbint_CheckMachineAccount_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11443             : {
   11444           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   11445           0 :         PyObject *bigendian_obj = NULL;
   11446           0 :         PyObject *ndr64_obj = NULL;
   11447           0 :         uint32_t ndr_push_flags = 0;
   11448             : 
   11449           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   11450             :                 discard_const_p(char *, kwnames),
   11451             :                 &bigendian_obj,
   11452             :                 &ndr64_obj)) {
   11453           0 :                 return NULL;
   11454             :         }
   11455             : 
   11456           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   11457           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   11458             :         }
   11459           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   11460           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   11461             :         }
   11462             : 
   11463           0 :         return py_wbint_CheckMachineAccount_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   11464             : }
   11465             : 
   11466           0 : static PyObject *py_wbint_CheckMachineAccount_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11467             : {
   11468           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   11469           0 :         PyObject *bigendian_obj = NULL;
   11470           0 :         PyObject *ndr64_obj = NULL;
   11471           0 :         uint32_t ndr_push_flags = 0;
   11472             : 
   11473           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   11474             :                 discard_const_p(char *, kwnames),
   11475             :                 &bigendian_obj,
   11476             :                 &ndr64_obj)) {
   11477           0 :                 return NULL;
   11478             :         }
   11479             : 
   11480           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   11481           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   11482             :         }
   11483           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   11484           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   11485             :         }
   11486             : 
   11487           0 :         return py_wbint_CheckMachineAccount_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   11488             : }
   11489             : 
   11490           0 : static PyObject *py_wbint_CheckMachineAccount_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   11491             : {
   11492           0 :         const struct ndr_interface_call *call = NULL;
   11493           0 :         struct wbint_CheckMachineAccount *object = (struct wbint_CheckMachineAccount *)pytalloc_get_ptr(py_obj);
   11494           0 :         struct ndr_pull *pull = NULL;
   11495             :         enum ndr_err_code err;
   11496             : 
   11497           0 :         if (ndr_table_winbind.num_calls < 18) {
   11498           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_CheckMachineAccount_ndr_unpack");
   11499           0 :                 return NULL;
   11500             :         }
   11501           0 :         call = &ndr_table_winbind.calls[17];
   11502             : 
   11503           0 :         pull = ndr_pull_init_blob(blob, object);
   11504           0 :         if (pull == NULL) {
   11505           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   11506           0 :                 return NULL;
   11507             :         }
   11508             : 
   11509           0 :         pull->flags |= ndr_pull_flags;
   11510             : 
   11511           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   11512           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11513           0 :                 TALLOC_FREE(pull);
   11514           0 :                 PyErr_SetNdrError(err);
   11515           0 :                 return NULL;
   11516             :         }
   11517           0 :         if (!allow_remaining) {
   11518             :                 uint32_t highest_ofs;
   11519             : 
   11520           0 :                 if (pull->offset > pull->relative_highest_offset) {
   11521           0 :                         highest_ofs = pull->offset;
   11522             :                 } else {
   11523           0 :                         highest_ofs = pull->relative_highest_offset;
   11524             :                 }
   11525           0 :                 if (highest_ofs < pull->data_size) {
   11526           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   11527             :                                 "not all bytes consumed ofs[%u] size[%u]",
   11528             :                                 highest_ofs, pull->data_size);
   11529           0 :                         TALLOC_FREE(pull);
   11530           0 :                         PyErr_SetNdrError(err);
   11531           0 :                         return NULL;
   11532             :                 }
   11533             :         }
   11534             : 
   11535           0 :         TALLOC_FREE(pull);
   11536           0 :         Py_RETURN_NONE;
   11537             : }
   11538             : 
   11539           0 : static PyObject *py_wbint_CheckMachineAccount_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11540             : {
   11541             :         DATA_BLOB blob;
   11542           0 :         Py_ssize_t blob_length = 0;
   11543           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   11544           0 :         PyObject *bigendian_obj = NULL;
   11545           0 :         PyObject *ndr64_obj = NULL;
   11546           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   11547           0 :         PyObject *allow_remaining_obj = NULL;
   11548           0 :         bool allow_remaining = false;
   11549             : 
   11550           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   11551             :                 discard_const_p(char *, kwnames),
   11552             :                 &blob.data, &blob_length,
   11553             :                 &bigendian_obj,
   11554             :                 &ndr64_obj,
   11555             :                 &allow_remaining_obj)) {
   11556           0 :                 return NULL;
   11557             :         }
   11558           0 :         blob.length = blob_length;
   11559             : 
   11560           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   11561           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   11562             :         }
   11563           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   11564           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   11565             :         }
   11566             : 
   11567           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   11568           0 :                 allow_remaining = true;
   11569             :         }
   11570             : 
   11571           0 :         return py_wbint_CheckMachineAccount_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   11572             : }
   11573             : 
   11574           0 : static PyObject *py_wbint_CheckMachineAccount_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11575             : {
   11576             :         DATA_BLOB blob;
   11577           0 :         Py_ssize_t blob_length = 0;
   11578           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   11579           0 :         PyObject *bigendian_obj = NULL;
   11580           0 :         PyObject *ndr64_obj = NULL;
   11581           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   11582           0 :         PyObject *allow_remaining_obj = NULL;
   11583           0 :         bool allow_remaining = false;
   11584             : 
   11585           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   11586             :                 discard_const_p(char *, kwnames),
   11587             :                 &blob.data, &blob_length,
   11588             :                 &bigendian_obj,
   11589             :                 &ndr64_obj,
   11590             :                 &allow_remaining_obj)) {
   11591           0 :                 return NULL;
   11592             :         }
   11593           0 :         blob.length = blob_length;
   11594             : 
   11595           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   11596           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   11597             :         }
   11598           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   11599           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   11600             :         }
   11601             : 
   11602           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   11603           0 :                 allow_remaining = true;
   11604             :         }
   11605             : 
   11606           0 :         return py_wbint_CheckMachineAccount_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   11607             : }
   11608             : 
   11609           0 : static PyObject *py_wbint_CheckMachineAccount_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   11610             : {
   11611           0 :         const struct ndr_interface_call *call = NULL;
   11612           0 :         struct wbint_CheckMachineAccount *object = (struct wbint_CheckMachineAccount *)pytalloc_get_ptr(py_obj);
   11613             :         PyObject *ret;
   11614             :         char *retstr;
   11615             : 
   11616           0 :         if (ndr_table_winbind.num_calls < 18) {
   11617           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_CheckMachineAccount_ndr_print");
   11618           0 :                 return NULL;
   11619             :         }
   11620           0 :         call = &ndr_table_winbind.calls[17];
   11621             : 
   11622           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   11623           0 :         ret = PyUnicode_FromString(retstr);
   11624           0 :         TALLOC_FREE(retstr);
   11625             : 
   11626           0 :         return ret;
   11627             : }
   11628             : 
   11629           0 : static PyObject *py_wbint_CheckMachineAccount_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   11630             : {
   11631           0 :         return py_wbint_CheckMachineAccount_ndr_print(py_obj, "wbint_CheckMachineAccount_in", NDR_IN);
   11632             : }
   11633             : 
   11634           0 : static PyObject *py_wbint_CheckMachineAccount_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   11635             : {
   11636           0 :         return py_wbint_CheckMachineAccount_ndr_print(py_obj, "wbint_CheckMachineAccount_out", NDR_OUT);
   11637             : }
   11638             : 
   11639             : static PyMethodDef py_wbint_CheckMachineAccount_methods[] = {
   11640             :         { "opnum", (PyCFunction)py_wbint_CheckMachineAccount_ndr_opnum, METH_NOARGS|METH_CLASS,
   11641             :                 "winbind.wbint_CheckMachineAccount.opnum() -> 17 (0x11) " },
   11642             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_CheckMachineAccount_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   11643             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   11644             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_CheckMachineAccount_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   11645             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   11646             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_CheckMachineAccount_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   11647             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   11648             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_CheckMachineAccount_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   11649             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   11650             :         { "__ndr_print_in__", (PyCFunction)py_wbint_CheckMachineAccount_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   11651             :         { "__ndr_print_out__", (PyCFunction)py_wbint_CheckMachineAccount_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   11652             :         { NULL, NULL, 0, NULL }
   11653             : };
   11654             : 
   11655             : 
   11656             : static PyTypeObject wbint_CheckMachineAccount_Type = {
   11657             :         PyVarObject_HEAD_INIT(NULL, 0)
   11658             :         .tp_name = "winbind.wbint_CheckMachineAccount",
   11659             :         .tp_getset = py_wbint_CheckMachineAccount_getsetters,
   11660             :         .tp_methods = py_wbint_CheckMachineAccount_methods,
   11661             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11662             :         .tp_new = py_wbint_CheckMachineAccount_new,
   11663             : };
   11664             : 
   11665           0 : static bool pack_py_wbint_CheckMachineAccount_args_in(PyObject *args, PyObject *kwargs, struct wbint_CheckMachineAccount *r)
   11666             : {
   11667           0 :         const char *kwnames[] = {
   11668             :                 NULL
   11669             :         };
   11670             : 
   11671           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":wbint_CheckMachineAccount", discard_const_p(char *, kwnames))) {
   11672           0 :                 return false;
   11673             :         }
   11674             : 
   11675           0 :         return true;
   11676             : }
   11677             : 
   11678           0 : static PyObject *unpack_py_wbint_CheckMachineAccount_args_out(struct wbint_CheckMachineAccount *r)
   11679             : {
   11680             :         PyObject *result;
   11681           0 :         result = Py_None;
   11682           0 :         Py_INCREF(result);
   11683           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   11684           0 :                 PyErr_SetNTSTATUS(r->out.result);
   11685           0 :                 return NULL;
   11686             :         }
   11687             : 
   11688           0 :         return result;
   11689             : }
   11690             : 
   11691             : 
   11692           0 : static PyObject *py_wbint_ChangeMachineAccount_get_result(PyObject *obj, void *closure)
   11693             : {
   11694           0 :         struct wbint_ChangeMachineAccount *object = (struct wbint_ChangeMachineAccount *)pytalloc_get_ptr(obj);
   11695             :         PyObject *py_result;
   11696           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   11697           0 :         return py_result;
   11698             : }
   11699             : 
   11700           0 : static int py_wbint_ChangeMachineAccount_set_result(PyObject *py_obj, PyObject *value, void *closure)
   11701             : {
   11702           0 :         struct wbint_ChangeMachineAccount *object = (struct wbint_ChangeMachineAccount *)pytalloc_get_ptr(py_obj);
   11703           0 :         if (value == NULL) {
   11704           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   11705           0 :                 return -1;
   11706             :         }
   11707           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   11708           0 :         return 0;
   11709             : }
   11710             : 
   11711             : static PyGetSetDef py_wbint_ChangeMachineAccount_getsetters[] = {
   11712             :         {
   11713             :                 .name = discard_const_p(char, "result"),
   11714             :                 .get = py_wbint_ChangeMachineAccount_get_result,
   11715             :                 .set = py_wbint_ChangeMachineAccount_set_result,
   11716             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   11717             :         },
   11718             :         { .name = NULL }
   11719             : };
   11720             : 
   11721           0 : static PyObject *py_wbint_ChangeMachineAccount_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11722             : {
   11723           0 :         PyObject *self = pytalloc_new(struct wbint_ChangeMachineAccount, type);
   11724           0 :         return self;
   11725             : }
   11726             : 
   11727           0 : static PyObject *py_wbint_ChangeMachineAccount_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   11728             : {
   11729             : 
   11730             : 
   11731           0 :         return PyLong_FromLong(18);
   11732             : }
   11733             : 
   11734           0 : static PyObject *py_wbint_ChangeMachineAccount_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   11735             : {
   11736           0 :         const struct ndr_interface_call *call = NULL;
   11737           0 :         struct wbint_ChangeMachineAccount *object = (struct wbint_ChangeMachineAccount *)pytalloc_get_ptr(py_obj);
   11738           0 :         PyObject *ret = NULL;
   11739           0 :         struct ndr_push *push = NULL;
   11740             :         DATA_BLOB blob;
   11741             :         enum ndr_err_code err;
   11742             : 
   11743           0 :         if (ndr_table_winbind.num_calls < 19) {
   11744           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_ChangeMachineAccount_ndr_pack");
   11745           0 :                 return NULL;
   11746             :         }
   11747           0 :         call = &ndr_table_winbind.calls[18];
   11748             : 
   11749           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   11750           0 :         if (push == NULL) {
   11751           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   11752           0 :                 return NULL;
   11753             :         }
   11754             : 
   11755           0 :         push->flags |= ndr_push_flags;
   11756             : 
   11757           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   11758           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11759           0 :                 TALLOC_FREE(push);
   11760           0 :                 PyErr_SetNdrError(err);
   11761           0 :                 return NULL;
   11762             :         }
   11763           0 :         blob = ndr_push_blob(push);
   11764           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   11765           0 :         TALLOC_FREE(push);
   11766           0 :         return ret;
   11767             : }
   11768             : 
   11769           0 : static PyObject *py_wbint_ChangeMachineAccount_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11770             : {
   11771           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   11772           0 :         PyObject *bigendian_obj = NULL;
   11773           0 :         PyObject *ndr64_obj = NULL;
   11774           0 :         uint32_t ndr_push_flags = 0;
   11775             : 
   11776           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   11777             :                 discard_const_p(char *, kwnames),
   11778             :                 &bigendian_obj,
   11779             :                 &ndr64_obj)) {
   11780           0 :                 return NULL;
   11781             :         }
   11782             : 
   11783           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   11784           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   11785             :         }
   11786           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   11787           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   11788             :         }
   11789             : 
   11790           0 :         return py_wbint_ChangeMachineAccount_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   11791             : }
   11792             : 
   11793           0 : static PyObject *py_wbint_ChangeMachineAccount_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11794             : {
   11795           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   11796           0 :         PyObject *bigendian_obj = NULL;
   11797           0 :         PyObject *ndr64_obj = NULL;
   11798           0 :         uint32_t ndr_push_flags = 0;
   11799             : 
   11800           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   11801             :                 discard_const_p(char *, kwnames),
   11802             :                 &bigendian_obj,
   11803             :                 &ndr64_obj)) {
   11804           0 :                 return NULL;
   11805             :         }
   11806             : 
   11807           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   11808           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   11809             :         }
   11810           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   11811           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   11812             :         }
   11813             : 
   11814           0 :         return py_wbint_ChangeMachineAccount_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   11815             : }
   11816             : 
   11817           0 : static PyObject *py_wbint_ChangeMachineAccount_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   11818             : {
   11819           0 :         const struct ndr_interface_call *call = NULL;
   11820           0 :         struct wbint_ChangeMachineAccount *object = (struct wbint_ChangeMachineAccount *)pytalloc_get_ptr(py_obj);
   11821           0 :         struct ndr_pull *pull = NULL;
   11822             :         enum ndr_err_code err;
   11823             : 
   11824           0 :         if (ndr_table_winbind.num_calls < 19) {
   11825           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_ChangeMachineAccount_ndr_unpack");
   11826           0 :                 return NULL;
   11827             :         }
   11828           0 :         call = &ndr_table_winbind.calls[18];
   11829             : 
   11830           0 :         pull = ndr_pull_init_blob(blob, object);
   11831           0 :         if (pull == NULL) {
   11832           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   11833           0 :                 return NULL;
   11834             :         }
   11835             : 
   11836           0 :         pull->flags |= ndr_pull_flags;
   11837             : 
   11838           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   11839           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11840           0 :                 TALLOC_FREE(pull);
   11841           0 :                 PyErr_SetNdrError(err);
   11842           0 :                 return NULL;
   11843             :         }
   11844           0 :         if (!allow_remaining) {
   11845             :                 uint32_t highest_ofs;
   11846             : 
   11847           0 :                 if (pull->offset > pull->relative_highest_offset) {
   11848           0 :                         highest_ofs = pull->offset;
   11849             :                 } else {
   11850           0 :                         highest_ofs = pull->relative_highest_offset;
   11851             :                 }
   11852           0 :                 if (highest_ofs < pull->data_size) {
   11853           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   11854             :                                 "not all bytes consumed ofs[%u] size[%u]",
   11855             :                                 highest_ofs, pull->data_size);
   11856           0 :                         TALLOC_FREE(pull);
   11857           0 :                         PyErr_SetNdrError(err);
   11858           0 :                         return NULL;
   11859             :                 }
   11860             :         }
   11861             : 
   11862           0 :         TALLOC_FREE(pull);
   11863           0 :         Py_RETURN_NONE;
   11864             : }
   11865             : 
   11866           0 : static PyObject *py_wbint_ChangeMachineAccount_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11867             : {
   11868             :         DATA_BLOB blob;
   11869           0 :         Py_ssize_t blob_length = 0;
   11870           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   11871           0 :         PyObject *bigendian_obj = NULL;
   11872           0 :         PyObject *ndr64_obj = NULL;
   11873           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   11874           0 :         PyObject *allow_remaining_obj = NULL;
   11875           0 :         bool allow_remaining = false;
   11876             : 
   11877           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   11878             :                 discard_const_p(char *, kwnames),
   11879             :                 &blob.data, &blob_length,
   11880             :                 &bigendian_obj,
   11881             :                 &ndr64_obj,
   11882             :                 &allow_remaining_obj)) {
   11883           0 :                 return NULL;
   11884             :         }
   11885           0 :         blob.length = blob_length;
   11886             : 
   11887           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   11888           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   11889             :         }
   11890           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   11891           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   11892             :         }
   11893             : 
   11894           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   11895           0 :                 allow_remaining = true;
   11896             :         }
   11897             : 
   11898           0 :         return py_wbint_ChangeMachineAccount_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   11899             : }
   11900             : 
   11901           0 : static PyObject *py_wbint_ChangeMachineAccount_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11902             : {
   11903             :         DATA_BLOB blob;
   11904           0 :         Py_ssize_t blob_length = 0;
   11905           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   11906           0 :         PyObject *bigendian_obj = NULL;
   11907           0 :         PyObject *ndr64_obj = NULL;
   11908           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   11909           0 :         PyObject *allow_remaining_obj = NULL;
   11910           0 :         bool allow_remaining = false;
   11911             : 
   11912           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   11913             :                 discard_const_p(char *, kwnames),
   11914             :                 &blob.data, &blob_length,
   11915             :                 &bigendian_obj,
   11916             :                 &ndr64_obj,
   11917             :                 &allow_remaining_obj)) {
   11918           0 :                 return NULL;
   11919             :         }
   11920           0 :         blob.length = blob_length;
   11921             : 
   11922           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   11923           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   11924             :         }
   11925           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   11926           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   11927             :         }
   11928             : 
   11929           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   11930           0 :                 allow_remaining = true;
   11931             :         }
   11932             : 
   11933           0 :         return py_wbint_ChangeMachineAccount_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   11934             : }
   11935             : 
   11936           0 : static PyObject *py_wbint_ChangeMachineAccount_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   11937             : {
   11938           0 :         const struct ndr_interface_call *call = NULL;
   11939           0 :         struct wbint_ChangeMachineAccount *object = (struct wbint_ChangeMachineAccount *)pytalloc_get_ptr(py_obj);
   11940             :         PyObject *ret;
   11941             :         char *retstr;
   11942             : 
   11943           0 :         if (ndr_table_winbind.num_calls < 19) {
   11944           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_ChangeMachineAccount_ndr_print");
   11945           0 :                 return NULL;
   11946             :         }
   11947           0 :         call = &ndr_table_winbind.calls[18];
   11948             : 
   11949           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   11950           0 :         ret = PyUnicode_FromString(retstr);
   11951           0 :         TALLOC_FREE(retstr);
   11952             : 
   11953           0 :         return ret;
   11954             : }
   11955             : 
   11956           0 : static PyObject *py_wbint_ChangeMachineAccount_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   11957             : {
   11958           0 :         return py_wbint_ChangeMachineAccount_ndr_print(py_obj, "wbint_ChangeMachineAccount_in", NDR_IN);
   11959             : }
   11960             : 
   11961           0 : static PyObject *py_wbint_ChangeMachineAccount_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   11962             : {
   11963           0 :         return py_wbint_ChangeMachineAccount_ndr_print(py_obj, "wbint_ChangeMachineAccount_out", NDR_OUT);
   11964             : }
   11965             : 
   11966             : static PyMethodDef py_wbint_ChangeMachineAccount_methods[] = {
   11967             :         { "opnum", (PyCFunction)py_wbint_ChangeMachineAccount_ndr_opnum, METH_NOARGS|METH_CLASS,
   11968             :                 "winbind.wbint_ChangeMachineAccount.opnum() -> 18 (0x12) " },
   11969             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_ChangeMachineAccount_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   11970             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   11971             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_ChangeMachineAccount_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   11972             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   11973             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_ChangeMachineAccount_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   11974             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   11975             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_ChangeMachineAccount_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   11976             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   11977             :         { "__ndr_print_in__", (PyCFunction)py_wbint_ChangeMachineAccount_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   11978             :         { "__ndr_print_out__", (PyCFunction)py_wbint_ChangeMachineAccount_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   11979             :         { NULL, NULL, 0, NULL }
   11980             : };
   11981             : 
   11982             : 
   11983             : static PyTypeObject wbint_ChangeMachineAccount_Type = {
   11984             :         PyVarObject_HEAD_INIT(NULL, 0)
   11985             :         .tp_name = "winbind.wbint_ChangeMachineAccount",
   11986             :         .tp_getset = py_wbint_ChangeMachineAccount_getsetters,
   11987             :         .tp_methods = py_wbint_ChangeMachineAccount_methods,
   11988             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11989             :         .tp_new = py_wbint_ChangeMachineAccount_new,
   11990             : };
   11991             : 
   11992           0 : static bool pack_py_wbint_ChangeMachineAccount_args_in(PyObject *args, PyObject *kwargs, struct wbint_ChangeMachineAccount *r)
   11993             : {
   11994           0 :         const char *kwnames[] = {
   11995             :                 NULL
   11996             :         };
   11997             : 
   11998           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":wbint_ChangeMachineAccount", discard_const_p(char *, kwnames))) {
   11999           0 :                 return false;
   12000             :         }
   12001             : 
   12002           0 :         return true;
   12003             : }
   12004             : 
   12005           0 : static PyObject *unpack_py_wbint_ChangeMachineAccount_args_out(struct wbint_ChangeMachineAccount *r)
   12006             : {
   12007             :         PyObject *result;
   12008           0 :         result = Py_None;
   12009           0 :         Py_INCREF(result);
   12010           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   12011           0 :                 PyErr_SetNTSTATUS(r->out.result);
   12012           0 :                 return NULL;
   12013             :         }
   12014             : 
   12015           0 :         return result;
   12016             : }
   12017             : 
   12018             : 
   12019           0 : static PyObject *py_wbint_PingDc_out_get_dcname(PyObject *obj, void *closure)
   12020             : {
   12021           0 :         struct wbint_PingDc *object = (struct wbint_PingDc *)pytalloc_get_ptr(obj);
   12022             :         PyObject *py_dcname;
   12023           0 :         if (object->out.dcname == NULL) {
   12024           0 :                 Py_RETURN_NONE;
   12025             :         }
   12026           0 :         if (*object->out.dcname == NULL) {
   12027           0 :                 py_dcname = Py_None;
   12028           0 :                 Py_INCREF(py_dcname);
   12029             :         } else {
   12030           0 :                 if (*object->out.dcname == NULL) {
   12031           0 :                         py_dcname = Py_None;
   12032           0 :                         Py_INCREF(py_dcname);
   12033             :                 } else {
   12034           0 :                         py_dcname = PyUnicode_Decode(*object->out.dcname, strlen(*object->out.dcname), "utf-8", "ignore");
   12035             :                 }
   12036             :         }
   12037           0 :         return py_dcname;
   12038             : }
   12039             : 
   12040           0 : static int py_wbint_PingDc_out_set_dcname(PyObject *py_obj, PyObject *value, void *closure)
   12041             : {
   12042           0 :         struct wbint_PingDc *object = (struct wbint_PingDc *)pytalloc_get_ptr(py_obj);
   12043           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dcname));
   12044           0 :         if (value == NULL) {
   12045           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.dcname");
   12046           0 :                 return -1;
   12047             :         }
   12048           0 :         object->out.dcname = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dcname);
   12049           0 :         if (object->out.dcname == NULL) {
   12050           0 :                 PyErr_NoMemory();
   12051           0 :                 return -1;
   12052             :         }
   12053           0 :         if (value == Py_None) {
   12054           0 :                 *object->out.dcname = NULL;
   12055             :         } else {
   12056           0 :                 *object->out.dcname = NULL;
   12057             :                 {
   12058             :                         const char *test_str;
   12059             :                         const char *talloc_str;
   12060           0 :                         PyObject *unicode = NULL;
   12061           0 :                         if (PyUnicode_Check(value)) {
   12062           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   12063           0 :                                 if (unicode == NULL) {
   12064           0 :                                         PyErr_NoMemory();
   12065           0 :                                         return -1;
   12066             :                                 }
   12067           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   12068           0 :                         } else if (PyBytes_Check(value)) {
   12069           0 :                                 test_str = PyBytes_AS_STRING(value);
   12070             :                         } else {
   12071           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   12072           0 :                                 return -1;
   12073             :                         }
   12074           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   12075           0 :                         if (unicode != NULL) {
   12076           0 :                                 Py_DECREF(unicode);
   12077             :                         }
   12078           0 :                         if (talloc_str == NULL) {
   12079           0 :                                 PyErr_NoMemory();
   12080           0 :                                 return -1;
   12081             :                         }
   12082           0 :                         *object->out.dcname = talloc_str;
   12083             :                 }
   12084             :         }
   12085           0 :         return 0;
   12086             : }
   12087             : 
   12088           0 : static PyObject *py_wbint_PingDc_get_result(PyObject *obj, void *closure)
   12089             : {
   12090           0 :         struct wbint_PingDc *object = (struct wbint_PingDc *)pytalloc_get_ptr(obj);
   12091             :         PyObject *py_result;
   12092           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   12093           0 :         return py_result;
   12094             : }
   12095             : 
   12096           0 : static int py_wbint_PingDc_set_result(PyObject *py_obj, PyObject *value, void *closure)
   12097             : {
   12098           0 :         struct wbint_PingDc *object = (struct wbint_PingDc *)pytalloc_get_ptr(py_obj);
   12099           0 :         if (value == NULL) {
   12100           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   12101           0 :                 return -1;
   12102             :         }
   12103           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   12104           0 :         return 0;
   12105             : }
   12106             : 
   12107             : static PyGetSetDef py_wbint_PingDc_getsetters[] = {
   12108             :         {
   12109             :                 .name = discard_const_p(char, "out_dcname"),
   12110             :                 .get = py_wbint_PingDc_out_get_dcname,
   12111             :                 .set = py_wbint_PingDc_out_set_dcname,
   12112             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   12113             :         },
   12114             :         {
   12115             :                 .name = discard_const_p(char, "result"),
   12116             :                 .get = py_wbint_PingDc_get_result,
   12117             :                 .set = py_wbint_PingDc_set_result,
   12118             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   12119             :         },
   12120             :         { .name = NULL }
   12121             : };
   12122             : 
   12123           0 : static PyObject *py_wbint_PingDc_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12124             : {
   12125           0 :         PyObject *self = pytalloc_new(struct wbint_PingDc, type);
   12126           0 :         return self;
   12127             : }
   12128             : 
   12129           0 : static PyObject *py_wbint_PingDc_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   12130             : {
   12131             : 
   12132             : 
   12133           0 :         return PyLong_FromLong(19);
   12134             : }
   12135             : 
   12136           0 : static PyObject *py_wbint_PingDc_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   12137             : {
   12138           0 :         const struct ndr_interface_call *call = NULL;
   12139           0 :         struct wbint_PingDc *object = (struct wbint_PingDc *)pytalloc_get_ptr(py_obj);
   12140           0 :         PyObject *ret = NULL;
   12141           0 :         struct ndr_push *push = NULL;
   12142             :         DATA_BLOB blob;
   12143             :         enum ndr_err_code err;
   12144             : 
   12145           0 :         if (ndr_table_winbind.num_calls < 20) {
   12146           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PingDc_ndr_pack");
   12147           0 :                 return NULL;
   12148             :         }
   12149           0 :         call = &ndr_table_winbind.calls[19];
   12150             : 
   12151           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   12152           0 :         if (push == NULL) {
   12153           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   12154           0 :                 return NULL;
   12155             :         }
   12156             : 
   12157           0 :         push->flags |= ndr_push_flags;
   12158             : 
   12159           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   12160           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   12161           0 :                 TALLOC_FREE(push);
   12162           0 :                 PyErr_SetNdrError(err);
   12163           0 :                 return NULL;
   12164             :         }
   12165           0 :         blob = ndr_push_blob(push);
   12166           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   12167           0 :         TALLOC_FREE(push);
   12168           0 :         return ret;
   12169             : }
   12170             : 
   12171           0 : static PyObject *py_wbint_PingDc_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   12172             : {
   12173           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   12174           0 :         PyObject *bigendian_obj = NULL;
   12175           0 :         PyObject *ndr64_obj = NULL;
   12176           0 :         uint32_t ndr_push_flags = 0;
   12177             : 
   12178           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   12179             :                 discard_const_p(char *, kwnames),
   12180             :                 &bigendian_obj,
   12181             :                 &ndr64_obj)) {
   12182           0 :                 return NULL;
   12183             :         }
   12184             : 
   12185           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   12186           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   12187             :         }
   12188           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   12189           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   12190             :         }
   12191             : 
   12192           0 :         return py_wbint_PingDc_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   12193             : }
   12194             : 
   12195           0 : static PyObject *py_wbint_PingDc_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   12196             : {
   12197           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   12198           0 :         PyObject *bigendian_obj = NULL;
   12199           0 :         PyObject *ndr64_obj = NULL;
   12200           0 :         uint32_t ndr_push_flags = 0;
   12201             : 
   12202           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   12203             :                 discard_const_p(char *, kwnames),
   12204             :                 &bigendian_obj,
   12205             :                 &ndr64_obj)) {
   12206           0 :                 return NULL;
   12207             :         }
   12208             : 
   12209           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   12210           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   12211             :         }
   12212           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   12213           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   12214             :         }
   12215             : 
   12216           0 :         return py_wbint_PingDc_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   12217             : }
   12218             : 
   12219           0 : static PyObject *py_wbint_PingDc_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   12220             : {
   12221           0 :         const struct ndr_interface_call *call = NULL;
   12222           0 :         struct wbint_PingDc *object = (struct wbint_PingDc *)pytalloc_get_ptr(py_obj);
   12223           0 :         struct ndr_pull *pull = NULL;
   12224             :         enum ndr_err_code err;
   12225             : 
   12226           0 :         if (ndr_table_winbind.num_calls < 20) {
   12227           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PingDc_ndr_unpack");
   12228           0 :                 return NULL;
   12229             :         }
   12230           0 :         call = &ndr_table_winbind.calls[19];
   12231             : 
   12232           0 :         pull = ndr_pull_init_blob(blob, object);
   12233           0 :         if (pull == NULL) {
   12234           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   12235           0 :                 return NULL;
   12236             :         }
   12237             : 
   12238           0 :         pull->flags |= ndr_pull_flags;
   12239             : 
   12240           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   12241           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   12242           0 :                 TALLOC_FREE(pull);
   12243           0 :                 PyErr_SetNdrError(err);
   12244           0 :                 return NULL;
   12245             :         }
   12246           0 :         if (!allow_remaining) {
   12247             :                 uint32_t highest_ofs;
   12248             : 
   12249           0 :                 if (pull->offset > pull->relative_highest_offset) {
   12250           0 :                         highest_ofs = pull->offset;
   12251             :                 } else {
   12252           0 :                         highest_ofs = pull->relative_highest_offset;
   12253             :                 }
   12254           0 :                 if (highest_ofs < pull->data_size) {
   12255           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   12256             :                                 "not all bytes consumed ofs[%u] size[%u]",
   12257             :                                 highest_ofs, pull->data_size);
   12258           0 :                         TALLOC_FREE(pull);
   12259           0 :                         PyErr_SetNdrError(err);
   12260           0 :                         return NULL;
   12261             :                 }
   12262             :         }
   12263             : 
   12264           0 :         TALLOC_FREE(pull);
   12265           0 :         Py_RETURN_NONE;
   12266             : }
   12267             : 
   12268           0 : static PyObject *py_wbint_PingDc_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   12269             : {
   12270             :         DATA_BLOB blob;
   12271           0 :         Py_ssize_t blob_length = 0;
   12272           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   12273           0 :         PyObject *bigendian_obj = NULL;
   12274           0 :         PyObject *ndr64_obj = NULL;
   12275           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   12276           0 :         PyObject *allow_remaining_obj = NULL;
   12277           0 :         bool allow_remaining = false;
   12278             : 
   12279           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   12280             :                 discard_const_p(char *, kwnames),
   12281             :                 &blob.data, &blob_length,
   12282             :                 &bigendian_obj,
   12283             :                 &ndr64_obj,
   12284             :                 &allow_remaining_obj)) {
   12285           0 :                 return NULL;
   12286             :         }
   12287           0 :         blob.length = blob_length;
   12288             : 
   12289           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   12290           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   12291             :         }
   12292           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   12293           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   12294             :         }
   12295             : 
   12296           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   12297           0 :                 allow_remaining = true;
   12298             :         }
   12299             : 
   12300           0 :         return py_wbint_PingDc_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   12301             : }
   12302             : 
   12303           0 : static PyObject *py_wbint_PingDc_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   12304             : {
   12305             :         DATA_BLOB blob;
   12306           0 :         Py_ssize_t blob_length = 0;
   12307           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   12308           0 :         PyObject *bigendian_obj = NULL;
   12309           0 :         PyObject *ndr64_obj = NULL;
   12310           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   12311           0 :         PyObject *allow_remaining_obj = NULL;
   12312           0 :         bool allow_remaining = false;
   12313             : 
   12314           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   12315             :                 discard_const_p(char *, kwnames),
   12316             :                 &blob.data, &blob_length,
   12317             :                 &bigendian_obj,
   12318             :                 &ndr64_obj,
   12319             :                 &allow_remaining_obj)) {
   12320           0 :                 return NULL;
   12321             :         }
   12322           0 :         blob.length = blob_length;
   12323             : 
   12324           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   12325           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   12326             :         }
   12327           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   12328           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   12329             :         }
   12330             : 
   12331           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   12332           0 :                 allow_remaining = true;
   12333             :         }
   12334             : 
   12335           0 :         return py_wbint_PingDc_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   12336             : }
   12337             : 
   12338           0 : static PyObject *py_wbint_PingDc_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   12339             : {
   12340           0 :         const struct ndr_interface_call *call = NULL;
   12341           0 :         struct wbint_PingDc *object = (struct wbint_PingDc *)pytalloc_get_ptr(py_obj);
   12342             :         PyObject *ret;
   12343             :         char *retstr;
   12344             : 
   12345           0 :         if (ndr_table_winbind.num_calls < 20) {
   12346           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PingDc_ndr_print");
   12347           0 :                 return NULL;
   12348             :         }
   12349           0 :         call = &ndr_table_winbind.calls[19];
   12350             : 
   12351           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   12352           0 :         ret = PyUnicode_FromString(retstr);
   12353           0 :         TALLOC_FREE(retstr);
   12354             : 
   12355           0 :         return ret;
   12356             : }
   12357             : 
   12358           0 : static PyObject *py_wbint_PingDc_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   12359             : {
   12360           0 :         return py_wbint_PingDc_ndr_print(py_obj, "wbint_PingDc_in", NDR_IN);
   12361             : }
   12362             : 
   12363           0 : static PyObject *py_wbint_PingDc_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   12364             : {
   12365           0 :         return py_wbint_PingDc_ndr_print(py_obj, "wbint_PingDc_out", NDR_OUT);
   12366             : }
   12367             : 
   12368             : static PyMethodDef py_wbint_PingDc_methods[] = {
   12369             :         { "opnum", (PyCFunction)py_wbint_PingDc_ndr_opnum, METH_NOARGS|METH_CLASS,
   12370             :                 "winbind.wbint_PingDc.opnum() -> 19 (0x13) " },
   12371             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PingDc_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   12372             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   12373             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PingDc_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   12374             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   12375             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PingDc_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   12376             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   12377             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PingDc_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   12378             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   12379             :         { "__ndr_print_in__", (PyCFunction)py_wbint_PingDc_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   12380             :         { "__ndr_print_out__", (PyCFunction)py_wbint_PingDc_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   12381             :         { NULL, NULL, 0, NULL }
   12382             : };
   12383             : 
   12384             : 
   12385             : static PyTypeObject wbint_PingDc_Type = {
   12386             :         PyVarObject_HEAD_INIT(NULL, 0)
   12387             :         .tp_name = "winbind.wbint_PingDc",
   12388             :         .tp_getset = py_wbint_PingDc_getsetters,
   12389             :         .tp_methods = py_wbint_PingDc_methods,
   12390             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12391             :         .tp_new = py_wbint_PingDc_new,
   12392             : };
   12393             : 
   12394           0 : static bool pack_py_wbint_PingDc_args_in(PyObject *args, PyObject *kwargs, struct wbint_PingDc *r)
   12395             : {
   12396           0 :         const char *kwnames[] = {
   12397             :                 NULL
   12398             :         };
   12399             : 
   12400           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":wbint_PingDc", discard_const_p(char *, kwnames))) {
   12401           0 :                 return false;
   12402             :         }
   12403             : 
   12404           0 :         return true;
   12405             : }
   12406             : 
   12407           0 : static PyObject *unpack_py_wbint_PingDc_args_out(struct wbint_PingDc *r)
   12408             : {
   12409             :         PyObject *result;
   12410             :         PyObject *py_dcname;
   12411           0 :         if (*r->out.dcname == NULL) {
   12412           0 :                 py_dcname = Py_None;
   12413           0 :                 Py_INCREF(py_dcname);
   12414             :         } else {
   12415           0 :                 if (*r->out.dcname == NULL) {
   12416           0 :                         py_dcname = Py_None;
   12417           0 :                         Py_INCREF(py_dcname);
   12418             :                 } else {
   12419           0 :                         py_dcname = PyUnicode_Decode(*r->out.dcname, strlen(*r->out.dcname), "utf-8", "ignore");
   12420             :                 }
   12421             :         }
   12422           0 :         result = py_dcname;
   12423           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   12424           0 :                 PyErr_SetNTSTATUS(r->out.result);
   12425           0 :                 return NULL;
   12426             :         }
   12427             : 
   12428           0 :         return result;
   12429             : }
   12430             : 
   12431             : 
   12432           0 : static PyObject *py_wbint_ListTrustedDomains_in_get_client_name(PyObject *obj, void *closure)
   12433             : {
   12434           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(obj);
   12435             :         PyObject *py_client_name;
   12436           0 :         if (object->in.client_name == NULL) {
   12437           0 :                 Py_RETURN_NONE;
   12438             :         }
   12439           0 :         if (object->in.client_name == NULL) {
   12440           0 :                 py_client_name = Py_None;
   12441           0 :                 Py_INCREF(py_client_name);
   12442             :         } else {
   12443           0 :                 py_client_name = PyUnicode_Decode(object->in.client_name, strlen(object->in.client_name), "utf-8", "ignore");
   12444             :         }
   12445           0 :         return py_client_name;
   12446             : }
   12447             : 
   12448           0 : static int py_wbint_ListTrustedDomains_in_set_client_name(PyObject *py_obj, PyObject *value, void *closure)
   12449             : {
   12450           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(py_obj);
   12451           0 :         if (value == NULL) {
   12452           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_name");
   12453           0 :                 return -1;
   12454             :         }
   12455           0 :         object->in.client_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.client_name);
   12456           0 :         if (object->in.client_name == NULL) {
   12457           0 :                 PyErr_NoMemory();
   12458           0 :                 return -1;
   12459             :         }
   12460             :         {
   12461             :                 const char *test_str;
   12462             :                 const char *talloc_str;
   12463           0 :                 PyObject *unicode = NULL;
   12464           0 :                 if (PyUnicode_Check(value)) {
   12465           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   12466           0 :                         if (unicode == NULL) {
   12467           0 :                                 PyErr_NoMemory();
   12468           0 :                                 return -1;
   12469             :                         }
   12470           0 :                         test_str = PyBytes_AS_STRING(unicode);
   12471           0 :                 } else if (PyBytes_Check(value)) {
   12472           0 :                         test_str = PyBytes_AS_STRING(value);
   12473             :                 } else {
   12474           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   12475           0 :                         return -1;
   12476             :                 }
   12477           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   12478           0 :                 if (unicode != NULL) {
   12479           0 :                         Py_DECREF(unicode);
   12480             :                 }
   12481           0 :                 if (talloc_str == NULL) {
   12482           0 :                         PyErr_NoMemory();
   12483           0 :                         return -1;
   12484             :                 }
   12485           0 :                 object->in.client_name = talloc_str;
   12486             :         }
   12487           0 :         return 0;
   12488             : }
   12489             : 
   12490           0 : static PyObject *py_wbint_ListTrustedDomains_in_get_client_pid(PyObject *obj, void *closure)
   12491             : {
   12492           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(obj);
   12493             :         PyObject *py_client_pid;
   12494           0 :         py_client_pid = PyLong_FromUnsignedLongLong(object->in.client_pid);
   12495           0 :         return py_client_pid;
   12496             : }
   12497             : 
   12498           0 : static int py_wbint_ListTrustedDomains_in_set_client_pid(PyObject *py_obj, PyObject *value, void *closure)
   12499             : {
   12500           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(py_obj);
   12501           0 :         if (value == NULL) {
   12502           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_pid");
   12503           0 :                 return -1;
   12504             :         }
   12505             :         {
   12506           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.client_pid));
   12507           0 :                 if (PyLong_Check(value)) {
   12508             :                         unsigned long long test_var;
   12509           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12510           0 :                         if (PyErr_Occurred() != NULL) {
   12511           0 :                                 return -1;
   12512             :                         }
   12513           0 :                         if (test_var > uint_max) {
   12514           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12515             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12516           0 :                                 return -1;
   12517             :                         }
   12518           0 :                         object->in.client_pid = test_var;
   12519             :                 } else {
   12520           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12521             :                           PyLong_Type.tp_name);
   12522           0 :                         return -1;
   12523             :                 }
   12524             :         }
   12525           0 :         return 0;
   12526             : }
   12527             : 
   12528           0 : static PyObject *py_wbint_ListTrustedDomains_out_get_domains(PyObject *obj, void *closure)
   12529             : {
   12530           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(obj);
   12531             :         PyObject *py_domains;
   12532           0 :         if (object->out.domains == NULL) {
   12533           0 :                 Py_RETURN_NONE;
   12534             :         }
   12535           0 :         py_domains = pytalloc_reference_ex(netr_DomainTrustList_Type, object->out.domains, object->out.domains);
   12536           0 :         return py_domains;
   12537             : }
   12538             : 
   12539           0 : static int py_wbint_ListTrustedDomains_out_set_domains(PyObject *py_obj, PyObject *value, void *closure)
   12540             : {
   12541           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(py_obj);
   12542           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.domains));
   12543           0 :         if (value == NULL) {
   12544           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.domains");
   12545           0 :                 return -1;
   12546             :         }
   12547           0 :         object->out.domains = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.domains);
   12548           0 :         if (object->out.domains == NULL) {
   12549           0 :                 PyErr_NoMemory();
   12550           0 :                 return -1;
   12551             :         }
   12552           0 :         PY_CHECK_TYPE(netr_DomainTrustList_Type, value, return -1;);
   12553           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12554           0 :                 PyErr_NoMemory();
   12555           0 :                 return -1;
   12556             :         }
   12557           0 :         object->out.domains = (struct netr_DomainTrustList *)pytalloc_get_ptr(value);
   12558           0 :         return 0;
   12559             : }
   12560             : 
   12561           0 : static PyObject *py_wbint_ListTrustedDomains_get_result(PyObject *obj, void *closure)
   12562             : {
   12563           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(obj);
   12564             :         PyObject *py_result;
   12565           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   12566           0 :         return py_result;
   12567             : }
   12568             : 
   12569           0 : static int py_wbint_ListTrustedDomains_set_result(PyObject *py_obj, PyObject *value, void *closure)
   12570             : {
   12571           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(py_obj);
   12572           0 :         if (value == NULL) {
   12573           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   12574           0 :                 return -1;
   12575             :         }
   12576           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   12577           0 :         return 0;
   12578             : }
   12579             : 
   12580             : static PyGetSetDef py_wbint_ListTrustedDomains_getsetters[] = {
   12581             :         {
   12582             :                 .name = discard_const_p(char, "in_client_name"),
   12583             :                 .get = py_wbint_ListTrustedDomains_in_get_client_name,
   12584             :                 .set = py_wbint_ListTrustedDomains_in_set_client_name,
   12585             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   12586             :         },
   12587             :         {
   12588             :                 .name = discard_const_p(char, "in_client_pid"),
   12589             :                 .get = py_wbint_ListTrustedDomains_in_get_client_pid,
   12590             :                 .set = py_wbint_ListTrustedDomains_in_set_client_pid,
   12591             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   12592             :         },
   12593             :         {
   12594             :                 .name = discard_const_p(char, "out_domains"),
   12595             :                 .get = py_wbint_ListTrustedDomains_out_get_domains,
   12596             :                 .set = py_wbint_ListTrustedDomains_out_set_domains,
   12597             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DomainTrustList")
   12598             :         },
   12599             :         {
   12600             :                 .name = discard_const_p(char, "result"),
   12601             :                 .get = py_wbint_ListTrustedDomains_get_result,
   12602             :                 .set = py_wbint_ListTrustedDomains_set_result,
   12603             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   12604             :         },
   12605             :         { .name = NULL }
   12606             : };
   12607             : 
   12608           0 : static PyObject *py_wbint_ListTrustedDomains_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12609             : {
   12610           0 :         PyObject *self = pytalloc_new(struct wbint_ListTrustedDomains, type);
   12611           0 :         struct wbint_ListTrustedDomains *_self = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(self);
   12612           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   12613           0 :         _self->out.domains = talloc_zero(mem_ctx, struct netr_DomainTrustList);
   12614           0 :         return self;
   12615             : }
   12616             : 
   12617           0 : static PyObject *py_wbint_ListTrustedDomains_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   12618             : {
   12619             : 
   12620             : 
   12621           0 :         return PyLong_FromLong(20);
   12622             : }
   12623             : 
   12624           0 : static PyObject *py_wbint_ListTrustedDomains_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   12625             : {
   12626           0 :         const struct ndr_interface_call *call = NULL;
   12627           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(py_obj);
   12628           0 :         PyObject *ret = NULL;
   12629           0 :         struct ndr_push *push = NULL;
   12630             :         DATA_BLOB blob;
   12631             :         enum ndr_err_code err;
   12632             : 
   12633           0 :         if (ndr_table_winbind.num_calls < 21) {
   12634           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_ListTrustedDomains_ndr_pack");
   12635           0 :                 return NULL;
   12636             :         }
   12637           0 :         call = &ndr_table_winbind.calls[20];
   12638             : 
   12639           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   12640           0 :         if (push == NULL) {
   12641           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   12642           0 :                 return NULL;
   12643             :         }
   12644             : 
   12645           0 :         push->flags |= ndr_push_flags;
   12646             : 
   12647           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   12648           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   12649           0 :                 TALLOC_FREE(push);
   12650           0 :                 PyErr_SetNdrError(err);
   12651           0 :                 return NULL;
   12652             :         }
   12653           0 :         blob = ndr_push_blob(push);
   12654           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   12655           0 :         TALLOC_FREE(push);
   12656           0 :         return ret;
   12657             : }
   12658             : 
   12659           0 : static PyObject *py_wbint_ListTrustedDomains_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   12660             : {
   12661           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   12662           0 :         PyObject *bigendian_obj = NULL;
   12663           0 :         PyObject *ndr64_obj = NULL;
   12664           0 :         uint32_t ndr_push_flags = 0;
   12665             : 
   12666           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   12667             :                 discard_const_p(char *, kwnames),
   12668             :                 &bigendian_obj,
   12669             :                 &ndr64_obj)) {
   12670           0 :                 return NULL;
   12671             :         }
   12672             : 
   12673           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   12674           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   12675             :         }
   12676           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   12677           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   12678             :         }
   12679             : 
   12680           0 :         return py_wbint_ListTrustedDomains_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   12681             : }
   12682             : 
   12683           0 : static PyObject *py_wbint_ListTrustedDomains_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   12684             : {
   12685           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   12686           0 :         PyObject *bigendian_obj = NULL;
   12687           0 :         PyObject *ndr64_obj = NULL;
   12688           0 :         uint32_t ndr_push_flags = 0;
   12689             : 
   12690           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   12691             :                 discard_const_p(char *, kwnames),
   12692             :                 &bigendian_obj,
   12693             :                 &ndr64_obj)) {
   12694           0 :                 return NULL;
   12695             :         }
   12696             : 
   12697           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   12698           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   12699             :         }
   12700           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   12701           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   12702             :         }
   12703             : 
   12704           0 :         return py_wbint_ListTrustedDomains_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   12705             : }
   12706             : 
   12707           0 : static PyObject *py_wbint_ListTrustedDomains_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   12708             : {
   12709           0 :         const struct ndr_interface_call *call = NULL;
   12710           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(py_obj);
   12711           0 :         struct ndr_pull *pull = NULL;
   12712             :         enum ndr_err_code err;
   12713             : 
   12714           0 :         if (ndr_table_winbind.num_calls < 21) {
   12715           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_ListTrustedDomains_ndr_unpack");
   12716           0 :                 return NULL;
   12717             :         }
   12718           0 :         call = &ndr_table_winbind.calls[20];
   12719             : 
   12720           0 :         pull = ndr_pull_init_blob(blob, object);
   12721           0 :         if (pull == NULL) {
   12722           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   12723           0 :                 return NULL;
   12724             :         }
   12725             : 
   12726           0 :         pull->flags |= ndr_pull_flags;
   12727             : 
   12728           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   12729           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   12730           0 :                 TALLOC_FREE(pull);
   12731           0 :                 PyErr_SetNdrError(err);
   12732           0 :                 return NULL;
   12733             :         }
   12734           0 :         if (!allow_remaining) {
   12735             :                 uint32_t highest_ofs;
   12736             : 
   12737           0 :                 if (pull->offset > pull->relative_highest_offset) {
   12738           0 :                         highest_ofs = pull->offset;
   12739             :                 } else {
   12740           0 :                         highest_ofs = pull->relative_highest_offset;
   12741             :                 }
   12742           0 :                 if (highest_ofs < pull->data_size) {
   12743           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   12744             :                                 "not all bytes consumed ofs[%u] size[%u]",
   12745             :                                 highest_ofs, pull->data_size);
   12746           0 :                         TALLOC_FREE(pull);
   12747           0 :                         PyErr_SetNdrError(err);
   12748           0 :                         return NULL;
   12749             :                 }
   12750             :         }
   12751             : 
   12752           0 :         TALLOC_FREE(pull);
   12753           0 :         Py_RETURN_NONE;
   12754             : }
   12755             : 
   12756           0 : static PyObject *py_wbint_ListTrustedDomains_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   12757             : {
   12758             :         DATA_BLOB blob;
   12759           0 :         Py_ssize_t blob_length = 0;
   12760           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   12761           0 :         PyObject *bigendian_obj = NULL;
   12762           0 :         PyObject *ndr64_obj = NULL;
   12763           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   12764           0 :         PyObject *allow_remaining_obj = NULL;
   12765           0 :         bool allow_remaining = false;
   12766             : 
   12767           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   12768             :                 discard_const_p(char *, kwnames),
   12769             :                 &blob.data, &blob_length,
   12770             :                 &bigendian_obj,
   12771             :                 &ndr64_obj,
   12772             :                 &allow_remaining_obj)) {
   12773           0 :                 return NULL;
   12774             :         }
   12775           0 :         blob.length = blob_length;
   12776             : 
   12777           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   12778           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   12779             :         }
   12780           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   12781           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   12782             :         }
   12783             : 
   12784           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   12785           0 :                 allow_remaining = true;
   12786             :         }
   12787             : 
   12788           0 :         return py_wbint_ListTrustedDomains_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   12789             : }
   12790             : 
   12791           0 : static PyObject *py_wbint_ListTrustedDomains_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   12792             : {
   12793             :         DATA_BLOB blob;
   12794           0 :         Py_ssize_t blob_length = 0;
   12795           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   12796           0 :         PyObject *bigendian_obj = NULL;
   12797           0 :         PyObject *ndr64_obj = NULL;
   12798           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   12799           0 :         PyObject *allow_remaining_obj = NULL;
   12800           0 :         bool allow_remaining = false;
   12801             : 
   12802           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   12803             :                 discard_const_p(char *, kwnames),
   12804             :                 &blob.data, &blob_length,
   12805             :                 &bigendian_obj,
   12806             :                 &ndr64_obj,
   12807             :                 &allow_remaining_obj)) {
   12808           0 :                 return NULL;
   12809             :         }
   12810           0 :         blob.length = blob_length;
   12811             : 
   12812           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   12813           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   12814             :         }
   12815           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   12816           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   12817             :         }
   12818             : 
   12819           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   12820           0 :                 allow_remaining = true;
   12821             :         }
   12822             : 
   12823           0 :         return py_wbint_ListTrustedDomains_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   12824             : }
   12825             : 
   12826           0 : static PyObject *py_wbint_ListTrustedDomains_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   12827             : {
   12828           0 :         const struct ndr_interface_call *call = NULL;
   12829           0 :         struct wbint_ListTrustedDomains *object = (struct wbint_ListTrustedDomains *)pytalloc_get_ptr(py_obj);
   12830             :         PyObject *ret;
   12831             :         char *retstr;
   12832             : 
   12833           0 :         if (ndr_table_winbind.num_calls < 21) {
   12834           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_ListTrustedDomains_ndr_print");
   12835           0 :                 return NULL;
   12836             :         }
   12837           0 :         call = &ndr_table_winbind.calls[20];
   12838             : 
   12839           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   12840           0 :         ret = PyUnicode_FromString(retstr);
   12841           0 :         TALLOC_FREE(retstr);
   12842             : 
   12843           0 :         return ret;
   12844             : }
   12845             : 
   12846           0 : static PyObject *py_wbint_ListTrustedDomains_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   12847             : {
   12848           0 :         return py_wbint_ListTrustedDomains_ndr_print(py_obj, "wbint_ListTrustedDomains_in", NDR_IN);
   12849             : }
   12850             : 
   12851           0 : static PyObject *py_wbint_ListTrustedDomains_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   12852             : {
   12853           0 :         return py_wbint_ListTrustedDomains_ndr_print(py_obj, "wbint_ListTrustedDomains_out", NDR_OUT);
   12854             : }
   12855             : 
   12856             : static PyMethodDef py_wbint_ListTrustedDomains_methods[] = {
   12857             :         { "opnum", (PyCFunction)py_wbint_ListTrustedDomains_ndr_opnum, METH_NOARGS|METH_CLASS,
   12858             :                 "winbind.wbint_ListTrustedDomains.opnum() -> 20 (0x14) " },
   12859             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_ListTrustedDomains_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   12860             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   12861             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_ListTrustedDomains_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   12862             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   12863             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_ListTrustedDomains_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   12864             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   12865             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_ListTrustedDomains_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   12866             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   12867             :         { "__ndr_print_in__", (PyCFunction)py_wbint_ListTrustedDomains_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   12868             :         { "__ndr_print_out__", (PyCFunction)py_wbint_ListTrustedDomains_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   12869             :         { NULL, NULL, 0, NULL }
   12870             : };
   12871             : 
   12872             : 
   12873             : static PyTypeObject wbint_ListTrustedDomains_Type = {
   12874             :         PyVarObject_HEAD_INIT(NULL, 0)
   12875             :         .tp_name = "winbind.wbint_ListTrustedDomains",
   12876             :         .tp_getset = py_wbint_ListTrustedDomains_getsetters,
   12877             :         .tp_methods = py_wbint_ListTrustedDomains_methods,
   12878             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12879             :         .tp_new = py_wbint_ListTrustedDomains_new,
   12880             : };
   12881             : 
   12882           0 : static bool pack_py_wbint_ListTrustedDomains_args_in(PyObject *args, PyObject *kwargs, struct wbint_ListTrustedDomains *r)
   12883             : {
   12884             :         PyObject *py_client_name;
   12885             :         PyObject *py_client_pid;
   12886           0 :         const char *kwnames[] = {
   12887             :                 "client_name", "client_pid", NULL
   12888             :         };
   12889             : 
   12890           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:wbint_ListTrustedDomains", discard_const_p(char *, kwnames), &py_client_name, &py_client_pid)) {
   12891           0 :                 return false;
   12892             :         }
   12893             : 
   12894           0 :         if (py_client_name == NULL) {
   12895           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_name");
   12896           0 :                 return false;
   12897             :         }
   12898           0 :         r->in.client_name = talloc_ptrtype(r, r->in.client_name);
   12899           0 :         if (r->in.client_name == NULL) {
   12900           0 :                 PyErr_NoMemory();
   12901           0 :                 return false;
   12902             :         }
   12903             :         {
   12904             :                 const char *test_str;
   12905             :                 const char *talloc_str;
   12906           0 :                 PyObject *unicode = NULL;
   12907           0 :                 if (PyUnicode_Check(py_client_name)) {
   12908           0 :                         unicode = PyUnicode_AsEncodedString(py_client_name, "utf-8", "ignore");
   12909           0 :                         if (unicode == NULL) {
   12910           0 :                                 PyErr_NoMemory();
   12911           0 :                                 return false;
   12912             :                         }
   12913           0 :                         test_str = PyBytes_AS_STRING(unicode);
   12914           0 :                 } else if (PyBytes_Check(py_client_name)) {
   12915           0 :                         test_str = PyBytes_AS_STRING(py_client_name);
   12916             :                 } else {
   12917           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client_name)->tp_name);
   12918           0 :                         return false;
   12919             :                 }
   12920           0 :                 talloc_str = talloc_strdup(r, test_str);
   12921           0 :                 if (unicode != NULL) {
   12922           0 :                         Py_DECREF(unicode);
   12923             :                 }
   12924           0 :                 if (talloc_str == NULL) {
   12925           0 :                         PyErr_NoMemory();
   12926           0 :                         return false;
   12927             :                 }
   12928           0 :                 r->in.client_name = talloc_str;
   12929             :         }
   12930           0 :         if (py_client_pid == NULL) {
   12931           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_pid");
   12932           0 :                 return false;
   12933             :         }
   12934             :         {
   12935           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.client_pid));
   12936           0 :                 if (PyLong_Check(py_client_pid)) {
   12937             :                         unsigned long long test_var;
   12938           0 :                         test_var = PyLong_AsUnsignedLongLong(py_client_pid);
   12939           0 :                         if (PyErr_Occurred() != NULL) {
   12940           0 :                                 return false;
   12941             :                         }
   12942           0 :                         if (test_var > uint_max) {
   12943           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12944             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12945           0 :                                 return false;
   12946             :                         }
   12947           0 :                         r->in.client_pid = test_var;
   12948             :                 } else {
   12949           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12950             :                           PyLong_Type.tp_name);
   12951           0 :                         return false;
   12952             :                 }
   12953             :         }
   12954           0 :         return true;
   12955             : }
   12956             : 
   12957           0 : static PyObject *unpack_py_wbint_ListTrustedDomains_args_out(struct wbint_ListTrustedDomains *r)
   12958             : {
   12959             :         PyObject *result;
   12960             :         PyObject *py_domains;
   12961           0 :         py_domains = pytalloc_reference_ex(netr_DomainTrustList_Type, r->out.domains, r->out.domains);
   12962           0 :         result = py_domains;
   12963           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   12964           0 :                 PyErr_SetNTSTATUS(r->out.result);
   12965           0 :                 return NULL;
   12966             :         }
   12967             : 
   12968           0 :         return result;
   12969             : }
   12970             : 
   12971             : 
   12972           0 : static PyObject *py_wbint_PamAuth_in_get_client_name(PyObject *obj, void *closure)
   12973             : {
   12974           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(obj);
   12975             :         PyObject *py_client_name;
   12976           0 :         if (object->in.client_name == NULL) {
   12977           0 :                 Py_RETURN_NONE;
   12978             :         }
   12979           0 :         if (object->in.client_name == NULL) {
   12980           0 :                 py_client_name = Py_None;
   12981           0 :                 Py_INCREF(py_client_name);
   12982             :         } else {
   12983           0 :                 py_client_name = PyUnicode_Decode(object->in.client_name, strlen(object->in.client_name), "utf-8", "ignore");
   12984             :         }
   12985           0 :         return py_client_name;
   12986             : }
   12987             : 
   12988           0 : static int py_wbint_PamAuth_in_set_client_name(PyObject *py_obj, PyObject *value, void *closure)
   12989             : {
   12990           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(py_obj);
   12991           0 :         if (value == NULL) {
   12992           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_name");
   12993           0 :                 return -1;
   12994             :         }
   12995           0 :         object->in.client_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.client_name);
   12996           0 :         if (object->in.client_name == NULL) {
   12997           0 :                 PyErr_NoMemory();
   12998           0 :                 return -1;
   12999             :         }
   13000             :         {
   13001             :                 const char *test_str;
   13002             :                 const char *talloc_str;
   13003           0 :                 PyObject *unicode = NULL;
   13004           0 :                 if (PyUnicode_Check(value)) {
   13005           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   13006           0 :                         if (unicode == NULL) {
   13007           0 :                                 PyErr_NoMemory();
   13008           0 :                                 return -1;
   13009             :                         }
   13010           0 :                         test_str = PyBytes_AS_STRING(unicode);
   13011           0 :                 } else if (PyBytes_Check(value)) {
   13012           0 :                         test_str = PyBytes_AS_STRING(value);
   13013             :                 } else {
   13014           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   13015           0 :                         return -1;
   13016             :                 }
   13017           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   13018           0 :                 if (unicode != NULL) {
   13019           0 :                         Py_DECREF(unicode);
   13020             :                 }
   13021           0 :                 if (talloc_str == NULL) {
   13022           0 :                         PyErr_NoMemory();
   13023           0 :                         return -1;
   13024             :                 }
   13025           0 :                 object->in.client_name = talloc_str;
   13026             :         }
   13027           0 :         return 0;
   13028             : }
   13029             : 
   13030           0 : static PyObject *py_wbint_PamAuth_in_get_client_pid(PyObject *obj, void *closure)
   13031             : {
   13032           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(obj);
   13033             :         PyObject *py_client_pid;
   13034           0 :         py_client_pid = PyLong_FromUnsignedLongLong(object->in.client_pid);
   13035           0 :         return py_client_pid;
   13036             : }
   13037             : 
   13038           0 : static int py_wbint_PamAuth_in_set_client_pid(PyObject *py_obj, PyObject *value, void *closure)
   13039             : {
   13040           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(py_obj);
   13041           0 :         if (value == NULL) {
   13042           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_pid");
   13043           0 :                 return -1;
   13044             :         }
   13045             :         {
   13046           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.client_pid));
   13047           0 :                 if (PyLong_Check(value)) {
   13048             :                         unsigned long long test_var;
   13049           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13050           0 :                         if (PyErr_Occurred() != NULL) {
   13051           0 :                                 return -1;
   13052             :                         }
   13053           0 :                         if (test_var > uint_max) {
   13054           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13055             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13056           0 :                                 return -1;
   13057             :                         }
   13058           0 :                         object->in.client_pid = test_var;
   13059             :                 } else {
   13060           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13061             :                           PyLong_Type.tp_name);
   13062           0 :                         return -1;
   13063             :                 }
   13064             :         }
   13065           0 :         return 0;
   13066             : }
   13067             : 
   13068           0 : static PyObject *py_wbint_PamAuth_in_get_flags(PyObject *obj, void *closure)
   13069             : {
   13070           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(obj);
   13071             :         PyObject *py_flags;
   13072           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   13073           0 :         return py_flags;
   13074             : }
   13075             : 
   13076           0 : static int py_wbint_PamAuth_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   13077             : {
   13078           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(py_obj);
   13079           0 :         if (value == NULL) {
   13080           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   13081           0 :                 return -1;
   13082             :         }
   13083             :         {
   13084           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   13085           0 :                 if (PyLong_Check(value)) {
   13086             :                         unsigned long long test_var;
   13087           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13088           0 :                         if (PyErr_Occurred() != NULL) {
   13089           0 :                                 return -1;
   13090             :                         }
   13091           0 :                         if (test_var > uint_max) {
   13092           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13093             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13094           0 :                                 return -1;
   13095             :                         }
   13096           0 :                         object->in.flags = test_var;
   13097             :                 } else {
   13098           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13099             :                           PyLong_Type.tp_name);
   13100           0 :                         return -1;
   13101             :                 }
   13102             :         }
   13103           0 :         return 0;
   13104             : }
   13105             : 
   13106           0 : static PyObject *py_wbint_PamAuth_in_get_info(PyObject *obj, void *closure)
   13107             : {
   13108           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(obj);
   13109             :         PyObject *py_info;
   13110           0 :         if (object->in.info == NULL) {
   13111           0 :                 Py_RETURN_NONE;
   13112             :         }
   13113           0 :         py_info = pytalloc_reference_ex(&wbint_AuthUserInfo_Type, object->in.info, object->in.info);
   13114           0 :         return py_info;
   13115             : }
   13116             : 
   13117           0 : static int py_wbint_PamAuth_in_set_info(PyObject *py_obj, PyObject *value, void *closure)
   13118             : {
   13119           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(py_obj);
   13120           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info));
   13121           0 :         if (value == NULL) {
   13122           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.info");
   13123           0 :                 return -1;
   13124             :         }
   13125           0 :         object->in.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info);
   13126           0 :         if (object->in.info == NULL) {
   13127           0 :                 PyErr_NoMemory();
   13128           0 :                 return -1;
   13129             :         }
   13130           0 :         PY_CHECK_TYPE(&wbint_AuthUserInfo_Type, value, return -1;);
   13131           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13132           0 :                 PyErr_NoMemory();
   13133           0 :                 return -1;
   13134             :         }
   13135           0 :         object->in.info = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(value);
   13136           0 :         return 0;
   13137             : }
   13138             : 
   13139           0 : static PyObject *py_wbint_PamAuth_in_get_require_membership_of_sid(PyObject *obj, void *closure)
   13140             : {
   13141           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(obj);
   13142             :         PyObject *py_require_membership_of_sid;
   13143           0 :         if (object->in.require_membership_of_sid == NULL) {
   13144           0 :                 Py_RETURN_NONE;
   13145             :         }
   13146           0 :         py_require_membership_of_sid = pytalloc_reference_ex(&wbint_SidArray_Type, object->in.require_membership_of_sid, object->in.require_membership_of_sid);
   13147           0 :         return py_require_membership_of_sid;
   13148             : }
   13149             : 
   13150           0 : static int py_wbint_PamAuth_in_set_require_membership_of_sid(PyObject *py_obj, PyObject *value, void *closure)
   13151             : {
   13152           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(py_obj);
   13153           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.require_membership_of_sid));
   13154           0 :         if (value == NULL) {
   13155           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.require_membership_of_sid");
   13156           0 :                 return -1;
   13157             :         }
   13158           0 :         object->in.require_membership_of_sid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.require_membership_of_sid);
   13159           0 :         if (object->in.require_membership_of_sid == NULL) {
   13160           0 :                 PyErr_NoMemory();
   13161           0 :                 return -1;
   13162             :         }
   13163           0 :         PY_CHECK_TYPE(&wbint_SidArray_Type, value, return -1;);
   13164           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13165           0 :                 PyErr_NoMemory();
   13166           0 :                 return -1;
   13167             :         }
   13168           0 :         object->in.require_membership_of_sid = (struct wbint_SidArray *)pytalloc_get_ptr(value);
   13169           0 :         return 0;
   13170             : }
   13171             : 
   13172           0 : static PyObject *py_wbint_PamAuth_out_get_validation(PyObject *obj, void *closure)
   13173             : {
   13174           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(obj);
   13175             :         PyObject *py_validation;
   13176           0 :         if (object->out.validation == NULL) {
   13177           0 :                 Py_RETURN_NONE;
   13178             :         }
   13179           0 :         py_validation = pytalloc_reference_ex(&wbint_Validation_Type, object->out.validation, object->out.validation);
   13180           0 :         return py_validation;
   13181             : }
   13182             : 
   13183           0 : static int py_wbint_PamAuth_out_set_validation(PyObject *py_obj, PyObject *value, void *closure)
   13184             : {
   13185           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(py_obj);
   13186           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.validation));
   13187           0 :         if (value == NULL) {
   13188           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.validation");
   13189           0 :                 return -1;
   13190             :         }
   13191           0 :         object->out.validation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.validation);
   13192           0 :         if (object->out.validation == NULL) {
   13193           0 :                 PyErr_NoMemory();
   13194           0 :                 return -1;
   13195             :         }
   13196           0 :         PY_CHECK_TYPE(&wbint_Validation_Type, value, return -1;);
   13197           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13198           0 :                 PyErr_NoMemory();
   13199           0 :                 return -1;
   13200             :         }
   13201           0 :         object->out.validation = (struct wbint_Validation *)pytalloc_get_ptr(value);
   13202           0 :         return 0;
   13203             : }
   13204             : 
   13205           0 : static PyObject *py_wbint_PamAuth_get_result(PyObject *obj, void *closure)
   13206             : {
   13207           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(obj);
   13208             :         PyObject *py_result;
   13209           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   13210           0 :         return py_result;
   13211             : }
   13212             : 
   13213           0 : static int py_wbint_PamAuth_set_result(PyObject *py_obj, PyObject *value, void *closure)
   13214             : {
   13215           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(py_obj);
   13216           0 :         if (value == NULL) {
   13217           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   13218           0 :                 return -1;
   13219             :         }
   13220           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   13221           0 :         return 0;
   13222             : }
   13223             : 
   13224             : static PyGetSetDef py_wbint_PamAuth_getsetters[] = {
   13225             :         {
   13226             :                 .name = discard_const_p(char, "in_client_name"),
   13227             :                 .get = py_wbint_PamAuth_in_get_client_name,
   13228             :                 .set = py_wbint_PamAuth_in_set_client_name,
   13229             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   13230             :         },
   13231             :         {
   13232             :                 .name = discard_const_p(char, "in_client_pid"),
   13233             :                 .get = py_wbint_PamAuth_in_get_client_pid,
   13234             :                 .set = py_wbint_PamAuth_in_set_client_pid,
   13235             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   13236             :         },
   13237             :         {
   13238             :                 .name = discard_const_p(char, "in_flags"),
   13239             :                 .get = py_wbint_PamAuth_in_get_flags,
   13240             :                 .set = py_wbint_PamAuth_in_set_flags,
   13241             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13242             :         },
   13243             :         {
   13244             :                 .name = discard_const_p(char, "in_info"),
   13245             :                 .get = py_wbint_PamAuth_in_get_info,
   13246             :                 .set = py_wbint_PamAuth_in_set_info,
   13247             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_AuthUserInfo")
   13248             :         },
   13249             :         {
   13250             :                 .name = discard_const_p(char, "in_require_membership_of_sid"),
   13251             :                 .get = py_wbint_PamAuth_in_get_require_membership_of_sid,
   13252             :                 .set = py_wbint_PamAuth_in_set_require_membership_of_sid,
   13253             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_SidArray")
   13254             :         },
   13255             :         {
   13256             :                 .name = discard_const_p(char, "out_validation"),
   13257             :                 .get = py_wbint_PamAuth_out_get_validation,
   13258             :                 .set = py_wbint_PamAuth_out_set_validation,
   13259             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_Validation")
   13260             :         },
   13261             :         {
   13262             :                 .name = discard_const_p(char, "result"),
   13263             :                 .get = py_wbint_PamAuth_get_result,
   13264             :                 .set = py_wbint_PamAuth_set_result,
   13265             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   13266             :         },
   13267             :         { .name = NULL }
   13268             : };
   13269             : 
   13270           0 : static PyObject *py_wbint_PamAuth_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13271             : {
   13272           0 :         PyObject *self = pytalloc_new(struct wbint_PamAuth, type);
   13273           0 :         struct wbint_PamAuth *_self = (struct wbint_PamAuth *)pytalloc_get_ptr(self);
   13274           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   13275           0 :         _self->in.info = talloc_zero(mem_ctx, struct wbint_AuthUserInfo);
   13276           0 :         _self->in.require_membership_of_sid = talloc_zero(mem_ctx, struct wbint_SidArray);
   13277           0 :         _self->out.validation = talloc_zero(mem_ctx, struct wbint_Validation);
   13278           0 :         return self;
   13279             : }
   13280             : 
   13281           0 : static PyObject *py_wbint_PamAuth_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   13282             : {
   13283             : 
   13284             : 
   13285           0 :         return PyLong_FromLong(21);
   13286             : }
   13287             : 
   13288           0 : static PyObject *py_wbint_PamAuth_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   13289             : {
   13290           0 :         const struct ndr_interface_call *call = NULL;
   13291           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(py_obj);
   13292           0 :         PyObject *ret = NULL;
   13293           0 :         struct ndr_push *push = NULL;
   13294             :         DATA_BLOB blob;
   13295             :         enum ndr_err_code err;
   13296             : 
   13297           0 :         if (ndr_table_winbind.num_calls < 22) {
   13298           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuth_ndr_pack");
   13299           0 :                 return NULL;
   13300             :         }
   13301           0 :         call = &ndr_table_winbind.calls[21];
   13302             : 
   13303           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   13304           0 :         if (push == NULL) {
   13305           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   13306           0 :                 return NULL;
   13307             :         }
   13308             : 
   13309           0 :         push->flags |= ndr_push_flags;
   13310             : 
   13311           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   13312           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   13313           0 :                 TALLOC_FREE(push);
   13314           0 :                 PyErr_SetNdrError(err);
   13315           0 :                 return NULL;
   13316             :         }
   13317           0 :         blob = ndr_push_blob(push);
   13318           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   13319           0 :         TALLOC_FREE(push);
   13320           0 :         return ret;
   13321             : }
   13322             : 
   13323           0 : static PyObject *py_wbint_PamAuth_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   13324             : {
   13325           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   13326           0 :         PyObject *bigendian_obj = NULL;
   13327           0 :         PyObject *ndr64_obj = NULL;
   13328           0 :         uint32_t ndr_push_flags = 0;
   13329             : 
   13330           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   13331             :                 discard_const_p(char *, kwnames),
   13332             :                 &bigendian_obj,
   13333             :                 &ndr64_obj)) {
   13334           0 :                 return NULL;
   13335             :         }
   13336             : 
   13337           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   13338           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   13339             :         }
   13340           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   13341           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   13342             :         }
   13343             : 
   13344           0 :         return py_wbint_PamAuth_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   13345             : }
   13346             : 
   13347           0 : static PyObject *py_wbint_PamAuth_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   13348             : {
   13349           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   13350           0 :         PyObject *bigendian_obj = NULL;
   13351           0 :         PyObject *ndr64_obj = NULL;
   13352           0 :         uint32_t ndr_push_flags = 0;
   13353             : 
   13354           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   13355             :                 discard_const_p(char *, kwnames),
   13356             :                 &bigendian_obj,
   13357             :                 &ndr64_obj)) {
   13358           0 :                 return NULL;
   13359             :         }
   13360             : 
   13361           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   13362           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   13363             :         }
   13364           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   13365           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   13366             :         }
   13367             : 
   13368           0 :         return py_wbint_PamAuth_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   13369             : }
   13370             : 
   13371           0 : static PyObject *py_wbint_PamAuth_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   13372             : {
   13373           0 :         const struct ndr_interface_call *call = NULL;
   13374           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(py_obj);
   13375           0 :         struct ndr_pull *pull = NULL;
   13376             :         enum ndr_err_code err;
   13377             : 
   13378           0 :         if (ndr_table_winbind.num_calls < 22) {
   13379           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuth_ndr_unpack");
   13380           0 :                 return NULL;
   13381             :         }
   13382           0 :         call = &ndr_table_winbind.calls[21];
   13383             : 
   13384           0 :         pull = ndr_pull_init_blob(blob, object);
   13385           0 :         if (pull == NULL) {
   13386           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   13387           0 :                 return NULL;
   13388             :         }
   13389             : 
   13390           0 :         pull->flags |= ndr_pull_flags;
   13391             : 
   13392           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   13393           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   13394           0 :                 TALLOC_FREE(pull);
   13395           0 :                 PyErr_SetNdrError(err);
   13396           0 :                 return NULL;
   13397             :         }
   13398           0 :         if (!allow_remaining) {
   13399             :                 uint32_t highest_ofs;
   13400             : 
   13401           0 :                 if (pull->offset > pull->relative_highest_offset) {
   13402           0 :                         highest_ofs = pull->offset;
   13403             :                 } else {
   13404           0 :                         highest_ofs = pull->relative_highest_offset;
   13405             :                 }
   13406           0 :                 if (highest_ofs < pull->data_size) {
   13407           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   13408             :                                 "not all bytes consumed ofs[%u] size[%u]",
   13409             :                                 highest_ofs, pull->data_size);
   13410           0 :                         TALLOC_FREE(pull);
   13411           0 :                         PyErr_SetNdrError(err);
   13412           0 :                         return NULL;
   13413             :                 }
   13414             :         }
   13415             : 
   13416           0 :         TALLOC_FREE(pull);
   13417           0 :         Py_RETURN_NONE;
   13418             : }
   13419             : 
   13420           0 : static PyObject *py_wbint_PamAuth_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   13421             : {
   13422             :         DATA_BLOB blob;
   13423           0 :         Py_ssize_t blob_length = 0;
   13424           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   13425           0 :         PyObject *bigendian_obj = NULL;
   13426           0 :         PyObject *ndr64_obj = NULL;
   13427           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   13428           0 :         PyObject *allow_remaining_obj = NULL;
   13429           0 :         bool allow_remaining = false;
   13430             : 
   13431           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   13432             :                 discard_const_p(char *, kwnames),
   13433             :                 &blob.data, &blob_length,
   13434             :                 &bigendian_obj,
   13435             :                 &ndr64_obj,
   13436             :                 &allow_remaining_obj)) {
   13437           0 :                 return NULL;
   13438             :         }
   13439           0 :         blob.length = blob_length;
   13440             : 
   13441           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   13442           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   13443             :         }
   13444           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   13445           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   13446             :         }
   13447             : 
   13448           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   13449           0 :                 allow_remaining = true;
   13450             :         }
   13451             : 
   13452           0 :         return py_wbint_PamAuth_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   13453             : }
   13454             : 
   13455           0 : static PyObject *py_wbint_PamAuth_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   13456             : {
   13457             :         DATA_BLOB blob;
   13458           0 :         Py_ssize_t blob_length = 0;
   13459           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   13460           0 :         PyObject *bigendian_obj = NULL;
   13461           0 :         PyObject *ndr64_obj = NULL;
   13462           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   13463           0 :         PyObject *allow_remaining_obj = NULL;
   13464           0 :         bool allow_remaining = false;
   13465             : 
   13466           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   13467             :                 discard_const_p(char *, kwnames),
   13468             :                 &blob.data, &blob_length,
   13469             :                 &bigendian_obj,
   13470             :                 &ndr64_obj,
   13471             :                 &allow_remaining_obj)) {
   13472           0 :                 return NULL;
   13473             :         }
   13474           0 :         blob.length = blob_length;
   13475             : 
   13476           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   13477           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   13478             :         }
   13479           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   13480           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   13481             :         }
   13482             : 
   13483           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   13484           0 :                 allow_remaining = true;
   13485             :         }
   13486             : 
   13487           0 :         return py_wbint_PamAuth_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   13488             : }
   13489             : 
   13490           0 : static PyObject *py_wbint_PamAuth_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   13491             : {
   13492           0 :         const struct ndr_interface_call *call = NULL;
   13493           0 :         struct wbint_PamAuth *object = (struct wbint_PamAuth *)pytalloc_get_ptr(py_obj);
   13494             :         PyObject *ret;
   13495             :         char *retstr;
   13496             : 
   13497           0 :         if (ndr_table_winbind.num_calls < 22) {
   13498           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuth_ndr_print");
   13499           0 :                 return NULL;
   13500             :         }
   13501           0 :         call = &ndr_table_winbind.calls[21];
   13502             : 
   13503           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   13504           0 :         ret = PyUnicode_FromString(retstr);
   13505           0 :         TALLOC_FREE(retstr);
   13506             : 
   13507           0 :         return ret;
   13508             : }
   13509             : 
   13510           0 : static PyObject *py_wbint_PamAuth_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   13511             : {
   13512           0 :         return py_wbint_PamAuth_ndr_print(py_obj, "wbint_PamAuth_in", NDR_IN);
   13513             : }
   13514             : 
   13515           0 : static PyObject *py_wbint_PamAuth_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   13516             : {
   13517           0 :         return py_wbint_PamAuth_ndr_print(py_obj, "wbint_PamAuth_out", NDR_OUT);
   13518             : }
   13519             : 
   13520             : static PyMethodDef py_wbint_PamAuth_methods[] = {
   13521             :         { "opnum", (PyCFunction)py_wbint_PamAuth_ndr_opnum, METH_NOARGS|METH_CLASS,
   13522             :                 "winbind.wbint_PamAuth.opnum() -> 21 (0x15) " },
   13523             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuth_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   13524             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   13525             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuth_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   13526             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   13527             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuth_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   13528             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   13529             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuth_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   13530             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   13531             :         { "__ndr_print_in__", (PyCFunction)py_wbint_PamAuth_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   13532             :         { "__ndr_print_out__", (PyCFunction)py_wbint_PamAuth_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   13533             :         { NULL, NULL, 0, NULL }
   13534             : };
   13535             : 
   13536             : 
   13537             : static PyTypeObject wbint_PamAuth_Type = {
   13538             :         PyVarObject_HEAD_INIT(NULL, 0)
   13539             :         .tp_name = "winbind.wbint_PamAuth",
   13540             :         .tp_getset = py_wbint_PamAuth_getsetters,
   13541             :         .tp_methods = py_wbint_PamAuth_methods,
   13542             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   13543             :         .tp_new = py_wbint_PamAuth_new,
   13544             : };
   13545             : 
   13546           0 : static bool pack_py_wbint_PamAuth_args_in(PyObject *args, PyObject *kwargs, struct wbint_PamAuth *r)
   13547             : {
   13548             :         PyObject *py_client_name;
   13549             :         PyObject *py_client_pid;
   13550             :         PyObject *py_flags;
   13551             :         PyObject *py_info;
   13552             :         PyObject *py_require_membership_of_sid;
   13553           0 :         const char *kwnames[] = {
   13554             :                 "client_name", "client_pid", "flags", "info", "require_membership_of_sid", NULL
   13555             :         };
   13556             : 
   13557           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)) {
   13558           0 :                 return false;
   13559             :         }
   13560             : 
   13561           0 :         if (py_client_name == NULL) {
   13562           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_name");
   13563           0 :                 return false;
   13564             :         }
   13565           0 :         r->in.client_name = talloc_ptrtype(r, r->in.client_name);
   13566           0 :         if (r->in.client_name == NULL) {
   13567           0 :                 PyErr_NoMemory();
   13568           0 :                 return false;
   13569             :         }
   13570             :         {
   13571             :                 const char *test_str;
   13572             :                 const char *talloc_str;
   13573           0 :                 PyObject *unicode = NULL;
   13574           0 :                 if (PyUnicode_Check(py_client_name)) {
   13575           0 :                         unicode = PyUnicode_AsEncodedString(py_client_name, "utf-8", "ignore");
   13576           0 :                         if (unicode == NULL) {
   13577           0 :                                 PyErr_NoMemory();
   13578           0 :                                 return false;
   13579             :                         }
   13580           0 :                         test_str = PyBytes_AS_STRING(unicode);
   13581           0 :                 } else if (PyBytes_Check(py_client_name)) {
   13582           0 :                         test_str = PyBytes_AS_STRING(py_client_name);
   13583             :                 } else {
   13584           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client_name)->tp_name);
   13585           0 :                         return false;
   13586             :                 }
   13587           0 :                 talloc_str = talloc_strdup(r, test_str);
   13588           0 :                 if (unicode != NULL) {
   13589           0 :                         Py_DECREF(unicode);
   13590             :                 }
   13591           0 :                 if (talloc_str == NULL) {
   13592           0 :                         PyErr_NoMemory();
   13593           0 :                         return false;
   13594             :                 }
   13595           0 :                 r->in.client_name = talloc_str;
   13596             :         }
   13597           0 :         if (py_client_pid == NULL) {
   13598           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_pid");
   13599           0 :                 return false;
   13600             :         }
   13601             :         {
   13602           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.client_pid));
   13603           0 :                 if (PyLong_Check(py_client_pid)) {
   13604             :                         unsigned long long test_var;
   13605           0 :                         test_var = PyLong_AsUnsignedLongLong(py_client_pid);
   13606           0 :                         if (PyErr_Occurred() != NULL) {
   13607           0 :                                 return false;
   13608             :                         }
   13609           0 :                         if (test_var > uint_max) {
   13610           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13611             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13612           0 :                                 return false;
   13613             :                         }
   13614           0 :                         r->in.client_pid = test_var;
   13615             :                 } else {
   13616           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13617             :                           PyLong_Type.tp_name);
   13618           0 :                         return false;
   13619             :                 }
   13620             :         }
   13621           0 :         if (py_flags == NULL) {
   13622           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   13623           0 :                 return false;
   13624             :         }
   13625             :         {
   13626           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   13627           0 :                 if (PyLong_Check(py_flags)) {
   13628             :                         unsigned long long test_var;
   13629           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   13630           0 :                         if (PyErr_Occurred() != NULL) {
   13631           0 :                                 return false;
   13632             :                         }
   13633           0 :                         if (test_var > uint_max) {
   13634           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13635             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13636           0 :                                 return false;
   13637             :                         }
   13638           0 :                         r->in.flags = test_var;
   13639             :                 } else {
   13640           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13641             :                           PyLong_Type.tp_name);
   13642           0 :                         return false;
   13643             :                 }
   13644             :         }
   13645           0 :         if (py_info == NULL) {
   13646           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info");
   13647           0 :                 return false;
   13648             :         }
   13649           0 :         r->in.info = talloc_ptrtype(r, r->in.info);
   13650           0 :         if (r->in.info == NULL) {
   13651           0 :                 PyErr_NoMemory();
   13652           0 :                 return false;
   13653             :         }
   13654           0 :         PY_CHECK_TYPE(&wbint_AuthUserInfo_Type, py_info, return false;);
   13655           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info)) == NULL) {
   13656           0 :                 PyErr_NoMemory();
   13657           0 :                 return false;
   13658             :         }
   13659           0 :         r->in.info = (struct wbint_AuthUserInfo *)pytalloc_get_ptr(py_info);
   13660           0 :         if (py_require_membership_of_sid == NULL) {
   13661           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.require_membership_of_sid");
   13662           0 :                 return false;
   13663             :         }
   13664           0 :         r->in.require_membership_of_sid = talloc_ptrtype(r, r->in.require_membership_of_sid);
   13665           0 :         if (r->in.require_membership_of_sid == NULL) {
   13666           0 :                 PyErr_NoMemory();
   13667           0 :                 return false;
   13668             :         }
   13669           0 :         PY_CHECK_TYPE(&wbint_SidArray_Type, py_require_membership_of_sid, return false;);
   13670           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_require_membership_of_sid)) == NULL) {
   13671           0 :                 PyErr_NoMemory();
   13672           0 :                 return false;
   13673             :         }
   13674           0 :         r->in.require_membership_of_sid = (struct wbint_SidArray *)pytalloc_get_ptr(py_require_membership_of_sid);
   13675           0 :         return true;
   13676             : }
   13677             : 
   13678           0 : static PyObject *unpack_py_wbint_PamAuth_args_out(struct wbint_PamAuth *r)
   13679             : {
   13680             :         PyObject *result;
   13681             :         PyObject *py_validation;
   13682           0 :         py_validation = pytalloc_reference_ex(&wbint_Validation_Type, r->out.validation, r->out.validation);
   13683           0 :         result = py_validation;
   13684           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   13685           0 :                 PyErr_SetNTSTATUS(r->out.result);
   13686           0 :                 return NULL;
   13687             :         }
   13688             : 
   13689           0 :         return result;
   13690             : }
   13691             : 
   13692             : 
   13693           0 : static PyObject *py_wbint_PamAuthCrap_in_get_client_name(PyObject *obj, void *closure)
   13694             : {
   13695           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   13696             :         PyObject *py_client_name;
   13697           0 :         if (object->in.client_name == NULL) {
   13698           0 :                 Py_RETURN_NONE;
   13699             :         }
   13700           0 :         if (object->in.client_name == NULL) {
   13701           0 :                 py_client_name = Py_None;
   13702           0 :                 Py_INCREF(py_client_name);
   13703             :         } else {
   13704           0 :                 py_client_name = PyUnicode_Decode(object->in.client_name, strlen(object->in.client_name), "utf-8", "ignore");
   13705             :         }
   13706           0 :         return py_client_name;
   13707             : }
   13708             : 
   13709           0 : static int py_wbint_PamAuthCrap_in_set_client_name(PyObject *py_obj, PyObject *value, void *closure)
   13710             : {
   13711           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   13712           0 :         if (value == NULL) {
   13713           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_name");
   13714           0 :                 return -1;
   13715             :         }
   13716           0 :         object->in.client_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.client_name);
   13717           0 :         if (object->in.client_name == NULL) {
   13718           0 :                 PyErr_NoMemory();
   13719           0 :                 return -1;
   13720             :         }
   13721             :         {
   13722             :                 const char *test_str;
   13723             :                 const char *talloc_str;
   13724           0 :                 PyObject *unicode = NULL;
   13725           0 :                 if (PyUnicode_Check(value)) {
   13726           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   13727           0 :                         if (unicode == NULL) {
   13728           0 :                                 PyErr_NoMemory();
   13729           0 :                                 return -1;
   13730             :                         }
   13731           0 :                         test_str = PyBytes_AS_STRING(unicode);
   13732           0 :                 } else if (PyBytes_Check(value)) {
   13733           0 :                         test_str = PyBytes_AS_STRING(value);
   13734             :                 } else {
   13735           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   13736           0 :                         return -1;
   13737             :                 }
   13738           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   13739           0 :                 if (unicode != NULL) {
   13740           0 :                         Py_DECREF(unicode);
   13741             :                 }
   13742           0 :                 if (talloc_str == NULL) {
   13743           0 :                         PyErr_NoMemory();
   13744           0 :                         return -1;
   13745             :                 }
   13746           0 :                 object->in.client_name = talloc_str;
   13747             :         }
   13748           0 :         return 0;
   13749             : }
   13750             : 
   13751           0 : static PyObject *py_wbint_PamAuthCrap_in_get_client_pid(PyObject *obj, void *closure)
   13752             : {
   13753           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   13754             :         PyObject *py_client_pid;
   13755           0 :         py_client_pid = PyLong_FromUnsignedLongLong(object->in.client_pid);
   13756           0 :         return py_client_pid;
   13757             : }
   13758             : 
   13759           0 : static int py_wbint_PamAuthCrap_in_set_client_pid(PyObject *py_obj, PyObject *value, void *closure)
   13760             : {
   13761           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   13762           0 :         if (value == NULL) {
   13763           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_pid");
   13764           0 :                 return -1;
   13765             :         }
   13766             :         {
   13767           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.client_pid));
   13768           0 :                 if (PyLong_Check(value)) {
   13769             :                         unsigned long long test_var;
   13770           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13771           0 :                         if (PyErr_Occurred() != NULL) {
   13772           0 :                                 return -1;
   13773             :                         }
   13774           0 :                         if (test_var > uint_max) {
   13775           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13776             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13777           0 :                                 return -1;
   13778             :                         }
   13779           0 :                         object->in.client_pid = test_var;
   13780             :                 } else {
   13781           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13782             :                           PyLong_Type.tp_name);
   13783           0 :                         return -1;
   13784             :                 }
   13785             :         }
   13786           0 :         return 0;
   13787             : }
   13788             : 
   13789           0 : static PyObject *py_wbint_PamAuthCrap_in_get_flags(PyObject *obj, void *closure)
   13790             : {
   13791           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   13792             :         PyObject *py_flags;
   13793           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   13794           0 :         return py_flags;
   13795             : }
   13796             : 
   13797           0 : static int py_wbint_PamAuthCrap_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   13798             : {
   13799           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   13800           0 :         if (value == NULL) {
   13801           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   13802           0 :                 return -1;
   13803             :         }
   13804             :         {
   13805           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   13806           0 :                 if (PyLong_Check(value)) {
   13807             :                         unsigned long long test_var;
   13808           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13809           0 :                         if (PyErr_Occurred() != NULL) {
   13810           0 :                                 return -1;
   13811             :                         }
   13812           0 :                         if (test_var > uint_max) {
   13813           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13814             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13815           0 :                                 return -1;
   13816             :                         }
   13817           0 :                         object->in.flags = test_var;
   13818             :                 } else {
   13819           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13820             :                           PyLong_Type.tp_name);
   13821           0 :                         return -1;
   13822             :                 }
   13823             :         }
   13824           0 :         return 0;
   13825             : }
   13826             : 
   13827           0 : static PyObject *py_wbint_PamAuthCrap_in_get_user(PyObject *obj, void *closure)
   13828             : {
   13829           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   13830             :         PyObject *py_user;
   13831           0 :         if (object->in.user == NULL) {
   13832           0 :                 Py_RETURN_NONE;
   13833             :         }
   13834           0 :         if (object->in.user == NULL) {
   13835           0 :                 py_user = Py_None;
   13836           0 :                 Py_INCREF(py_user);
   13837             :         } else {
   13838           0 :                 py_user = PyUnicode_Decode(object->in.user, strlen(object->in.user), "utf-8", "ignore");
   13839             :         }
   13840           0 :         return py_user;
   13841             : }
   13842             : 
   13843           0 : static int py_wbint_PamAuthCrap_in_set_user(PyObject *py_obj, PyObject *value, void *closure)
   13844             : {
   13845           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   13846           0 :         if (value == NULL) {
   13847           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.user");
   13848           0 :                 return -1;
   13849             :         }
   13850           0 :         object->in.user = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.user);
   13851           0 :         if (object->in.user == NULL) {
   13852           0 :                 PyErr_NoMemory();
   13853           0 :                 return -1;
   13854             :         }
   13855             :         {
   13856             :                 const char *test_str;
   13857             :                 const char *talloc_str;
   13858           0 :                 PyObject *unicode = NULL;
   13859           0 :                 if (PyUnicode_Check(value)) {
   13860           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   13861           0 :                         if (unicode == NULL) {
   13862           0 :                                 PyErr_NoMemory();
   13863           0 :                                 return -1;
   13864             :                         }
   13865           0 :                         test_str = PyBytes_AS_STRING(unicode);
   13866           0 :                 } else if (PyBytes_Check(value)) {
   13867           0 :                         test_str = PyBytes_AS_STRING(value);
   13868             :                 } else {
   13869           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   13870           0 :                         return -1;
   13871             :                 }
   13872           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   13873           0 :                 if (unicode != NULL) {
   13874           0 :                         Py_DECREF(unicode);
   13875             :                 }
   13876           0 :                 if (talloc_str == NULL) {
   13877           0 :                         PyErr_NoMemory();
   13878           0 :                         return -1;
   13879             :                 }
   13880           0 :                 object->in.user = talloc_str;
   13881             :         }
   13882           0 :         return 0;
   13883             : }
   13884             : 
   13885           0 : static PyObject *py_wbint_PamAuthCrap_in_get_domain(PyObject *obj, void *closure)
   13886             : {
   13887           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   13888             :         PyObject *py_domain;
   13889           0 :         if (object->in.domain == NULL) {
   13890           0 :                 Py_RETURN_NONE;
   13891             :         }
   13892           0 :         if (object->in.domain == NULL) {
   13893           0 :                 py_domain = Py_None;
   13894           0 :                 Py_INCREF(py_domain);
   13895             :         } else {
   13896           0 :                 py_domain = PyUnicode_Decode(object->in.domain, strlen(object->in.domain), "utf-8", "ignore");
   13897             :         }
   13898           0 :         return py_domain;
   13899             : }
   13900             : 
   13901           0 : static int py_wbint_PamAuthCrap_in_set_domain(PyObject *py_obj, PyObject *value, void *closure)
   13902             : {
   13903           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   13904           0 :         if (value == NULL) {
   13905           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain");
   13906           0 :                 return -1;
   13907             :         }
   13908           0 :         object->in.domain = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.domain);
   13909           0 :         if (object->in.domain == NULL) {
   13910           0 :                 PyErr_NoMemory();
   13911           0 :                 return -1;
   13912             :         }
   13913             :         {
   13914             :                 const char *test_str;
   13915             :                 const char *talloc_str;
   13916           0 :                 PyObject *unicode = NULL;
   13917           0 :                 if (PyUnicode_Check(value)) {
   13918           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   13919           0 :                         if (unicode == NULL) {
   13920           0 :                                 PyErr_NoMemory();
   13921           0 :                                 return -1;
   13922             :                         }
   13923           0 :                         test_str = PyBytes_AS_STRING(unicode);
   13924           0 :                 } else if (PyBytes_Check(value)) {
   13925           0 :                         test_str = PyBytes_AS_STRING(value);
   13926             :                 } else {
   13927           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   13928           0 :                         return -1;
   13929             :                 }
   13930           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   13931           0 :                 if (unicode != NULL) {
   13932           0 :                         Py_DECREF(unicode);
   13933             :                 }
   13934           0 :                 if (talloc_str == NULL) {
   13935           0 :                         PyErr_NoMemory();
   13936           0 :                         return -1;
   13937             :                 }
   13938           0 :                 object->in.domain = talloc_str;
   13939             :         }
   13940           0 :         return 0;
   13941             : }
   13942             : 
   13943           0 : static PyObject *py_wbint_PamAuthCrap_in_get_workstation(PyObject *obj, void *closure)
   13944             : {
   13945           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   13946             :         PyObject *py_workstation;
   13947           0 :         if (object->in.workstation == NULL) {
   13948           0 :                 Py_RETURN_NONE;
   13949             :         }
   13950           0 :         if (object->in.workstation == NULL) {
   13951           0 :                 py_workstation = Py_None;
   13952           0 :                 Py_INCREF(py_workstation);
   13953             :         } else {
   13954           0 :                 py_workstation = PyUnicode_Decode(object->in.workstation, strlen(object->in.workstation), "utf-8", "ignore");
   13955             :         }
   13956           0 :         return py_workstation;
   13957             : }
   13958             : 
   13959           0 : static int py_wbint_PamAuthCrap_in_set_workstation(PyObject *py_obj, PyObject *value, void *closure)
   13960             : {
   13961           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   13962           0 :         if (value == NULL) {
   13963           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.workstation");
   13964           0 :                 return -1;
   13965             :         }
   13966           0 :         object->in.workstation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.workstation);
   13967           0 :         if (object->in.workstation == NULL) {
   13968           0 :                 PyErr_NoMemory();
   13969           0 :                 return -1;
   13970             :         }
   13971             :         {
   13972             :                 const char *test_str;
   13973             :                 const char *talloc_str;
   13974           0 :                 PyObject *unicode = NULL;
   13975           0 :                 if (PyUnicode_Check(value)) {
   13976           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   13977           0 :                         if (unicode == NULL) {
   13978           0 :                                 PyErr_NoMemory();
   13979           0 :                                 return -1;
   13980             :                         }
   13981           0 :                         test_str = PyBytes_AS_STRING(unicode);
   13982           0 :                 } else if (PyBytes_Check(value)) {
   13983           0 :                         test_str = PyBytes_AS_STRING(value);
   13984             :                 } else {
   13985           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   13986           0 :                         return -1;
   13987             :                 }
   13988           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   13989           0 :                 if (unicode != NULL) {
   13990           0 :                         Py_DECREF(unicode);
   13991             :                 }
   13992           0 :                 if (talloc_str == NULL) {
   13993           0 :                         PyErr_NoMemory();
   13994           0 :                         return -1;
   13995             :                 }
   13996           0 :                 object->in.workstation = talloc_str;
   13997             :         }
   13998           0 :         return 0;
   13999             : }
   14000             : 
   14001           0 : static PyObject *py_wbint_PamAuthCrap_in_get_lm_resp(PyObject *obj, void *closure)
   14002             : {
   14003           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14004             :         PyObject *py_lm_resp;
   14005           0 :         py_lm_resp = PyBytes_FromStringAndSize((char *)(object->in.lm_resp).data, (object->in.lm_resp).length);
   14006           0 :         return py_lm_resp;
   14007             : }
   14008             : 
   14009           0 : static int py_wbint_PamAuthCrap_in_set_lm_resp(PyObject *py_obj, PyObject *value, void *closure)
   14010             : {
   14011           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14012           0 :         if (value == NULL) {
   14013           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.lm_resp");
   14014           0 :                 return -1;
   14015             :         }
   14016           0 :         object->in.lm_resp = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   14017           0 :         return 0;
   14018             : }
   14019             : 
   14020           0 : static PyObject *py_wbint_PamAuthCrap_in_get_nt_resp(PyObject *obj, void *closure)
   14021             : {
   14022           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14023             :         PyObject *py_nt_resp;
   14024           0 :         py_nt_resp = PyBytes_FromStringAndSize((char *)(object->in.nt_resp).data, (object->in.nt_resp).length);
   14025           0 :         return py_nt_resp;
   14026             : }
   14027             : 
   14028           0 : static int py_wbint_PamAuthCrap_in_set_nt_resp(PyObject *py_obj, PyObject *value, void *closure)
   14029             : {
   14030           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14031           0 :         if (value == NULL) {
   14032           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.nt_resp");
   14033           0 :                 return -1;
   14034             :         }
   14035           0 :         object->in.nt_resp = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   14036           0 :         return 0;
   14037             : }
   14038             : 
   14039           0 : static PyObject *py_wbint_PamAuthCrap_in_get_chal(PyObject *obj, void *closure)
   14040             : {
   14041           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14042             :         PyObject *py_chal;
   14043           0 :         py_chal = PyBytes_FromStringAndSize((char *)(object->in.chal).data, (object->in.chal).length);
   14044           0 :         return py_chal;
   14045             : }
   14046             : 
   14047           0 : static int py_wbint_PamAuthCrap_in_set_chal(PyObject *py_obj, PyObject *value, void *closure)
   14048             : {
   14049           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14050           0 :         if (value == NULL) {
   14051           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.chal");
   14052           0 :                 return -1;
   14053             :         }
   14054           0 :         object->in.chal = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   14055           0 :         return 0;
   14056             : }
   14057             : 
   14058           0 : static PyObject *py_wbint_PamAuthCrap_in_get_logon_parameters(PyObject *obj, void *closure)
   14059             : {
   14060           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14061             :         PyObject *py_logon_parameters;
   14062           0 :         py_logon_parameters = PyLong_FromUnsignedLongLong((uint32_t)object->in.logon_parameters);
   14063           0 :         return py_logon_parameters;
   14064             : }
   14065             : 
   14066           0 : static int py_wbint_PamAuthCrap_in_set_logon_parameters(PyObject *py_obj, PyObject *value, void *closure)
   14067             : {
   14068           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14069           0 :         if (value == NULL) {
   14070           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_parameters");
   14071           0 :                 return -1;
   14072             :         }
   14073             :         {
   14074           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.logon_parameters));
   14075           0 :                 if (PyLong_Check(value)) {
   14076             :                         unsigned long long test_var;
   14077           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14078           0 :                         if (PyErr_Occurred() != NULL) {
   14079           0 :                                 return -1;
   14080             :                         }
   14081           0 :                         if (test_var > uint_max) {
   14082           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14083             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14084           0 :                                 return -1;
   14085             :                         }
   14086           0 :                         object->in.logon_parameters = test_var;
   14087             :                 } else {
   14088           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14089             :                           PyLong_Type.tp_name);
   14090           0 :                         return -1;
   14091             :                 }
   14092             :         }
   14093           0 :         return 0;
   14094             : }
   14095             : 
   14096           0 : static PyObject *py_wbint_PamAuthCrap_in_get_require_membership_of_sid(PyObject *obj, void *closure)
   14097             : {
   14098           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14099             :         PyObject *py_require_membership_of_sid;
   14100           0 :         if (object->in.require_membership_of_sid == NULL) {
   14101           0 :                 Py_RETURN_NONE;
   14102             :         }
   14103           0 :         py_require_membership_of_sid = pytalloc_reference_ex(&wbint_SidArray_Type, object->in.require_membership_of_sid, object->in.require_membership_of_sid);
   14104           0 :         return py_require_membership_of_sid;
   14105             : }
   14106             : 
   14107           0 : static int py_wbint_PamAuthCrap_in_set_require_membership_of_sid(PyObject *py_obj, PyObject *value, void *closure)
   14108             : {
   14109           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14110           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.require_membership_of_sid));
   14111           0 :         if (value == NULL) {
   14112           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.require_membership_of_sid");
   14113           0 :                 return -1;
   14114             :         }
   14115           0 :         object->in.require_membership_of_sid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.require_membership_of_sid);
   14116           0 :         if (object->in.require_membership_of_sid == NULL) {
   14117           0 :                 PyErr_NoMemory();
   14118           0 :                 return -1;
   14119             :         }
   14120           0 :         PY_CHECK_TYPE(&wbint_SidArray_Type, value, return -1;);
   14121           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14122           0 :                 PyErr_NoMemory();
   14123           0 :                 return -1;
   14124             :         }
   14125           0 :         object->in.require_membership_of_sid = (struct wbint_SidArray *)pytalloc_get_ptr(value);
   14126           0 :         return 0;
   14127             : }
   14128             : 
   14129           0 : static PyObject *py_wbint_PamAuthCrap_out_get_authoritative(PyObject *obj, void *closure)
   14130             : {
   14131           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14132             :         PyObject *py_authoritative;
   14133           0 :         if (object->out.authoritative == NULL) {
   14134           0 :                 Py_RETURN_NONE;
   14135             :         }
   14136           0 :         py_authoritative = PyLong_FromLong((uint16_t)*object->out.authoritative);
   14137           0 :         return py_authoritative;
   14138             : }
   14139             : 
   14140           0 : static int py_wbint_PamAuthCrap_out_set_authoritative(PyObject *py_obj, PyObject *value, void *closure)
   14141             : {
   14142           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14143           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.authoritative));
   14144           0 :         if (value == NULL) {
   14145           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.authoritative");
   14146           0 :                 return -1;
   14147             :         }
   14148           0 :         object->out.authoritative = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.authoritative);
   14149           0 :         if (object->out.authoritative == NULL) {
   14150           0 :                 PyErr_NoMemory();
   14151           0 :                 return -1;
   14152             :         }
   14153             :         {
   14154           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.authoritative));
   14155           0 :                 if (PyLong_Check(value)) {
   14156             :                         unsigned long long test_var;
   14157           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14158           0 :                         if (PyErr_Occurred() != NULL) {
   14159           0 :                                 return -1;
   14160             :                         }
   14161           0 :                         if (test_var > uint_max) {
   14162           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14163             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14164           0 :                                 return -1;
   14165             :                         }
   14166           0 :                         *object->out.authoritative = test_var;
   14167             :                 } else {
   14168           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14169             :                           PyLong_Type.tp_name);
   14170           0 :                         return -1;
   14171             :                 }
   14172             :         }
   14173           0 :         return 0;
   14174             : }
   14175             : 
   14176           0 : static PyObject *py_wbint_PamAuthCrap_out_get_validation(PyObject *obj, void *closure)
   14177             : {
   14178           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14179             :         PyObject *py_validation;
   14180           0 :         if (object->out.validation == NULL) {
   14181           0 :                 Py_RETURN_NONE;
   14182             :         }
   14183           0 :         py_validation = pytalloc_reference_ex(&wbint_PamAuthCrapValidation_Type, object->out.validation, object->out.validation);
   14184           0 :         return py_validation;
   14185             : }
   14186             : 
   14187           0 : static int py_wbint_PamAuthCrap_out_set_validation(PyObject *py_obj, PyObject *value, void *closure)
   14188             : {
   14189           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14190           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.validation));
   14191           0 :         if (value == NULL) {
   14192           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.validation");
   14193           0 :                 return -1;
   14194             :         }
   14195           0 :         object->out.validation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.validation);
   14196           0 :         if (object->out.validation == NULL) {
   14197           0 :                 PyErr_NoMemory();
   14198           0 :                 return -1;
   14199             :         }
   14200           0 :         PY_CHECK_TYPE(&wbint_PamAuthCrapValidation_Type, value, return -1;);
   14201           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14202           0 :                 PyErr_NoMemory();
   14203           0 :                 return -1;
   14204             :         }
   14205           0 :         object->out.validation = (struct wbint_PamAuthCrapValidation *)pytalloc_get_ptr(value);
   14206           0 :         return 0;
   14207             : }
   14208             : 
   14209           0 : static PyObject *py_wbint_PamAuthCrap_get_result(PyObject *obj, void *closure)
   14210             : {
   14211           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(obj);
   14212             :         PyObject *py_result;
   14213           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   14214           0 :         return py_result;
   14215             : }
   14216             : 
   14217           0 : static int py_wbint_PamAuthCrap_set_result(PyObject *py_obj, PyObject *value, void *closure)
   14218             : {
   14219           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14220           0 :         if (value == NULL) {
   14221           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   14222           0 :                 return -1;
   14223             :         }
   14224           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   14225           0 :         return 0;
   14226             : }
   14227             : 
   14228             : static PyGetSetDef py_wbint_PamAuthCrap_getsetters[] = {
   14229             :         {
   14230             :                 .name = discard_const_p(char, "in_client_name"),
   14231             :                 .get = py_wbint_PamAuthCrap_in_get_client_name,
   14232             :                 .set = py_wbint_PamAuthCrap_in_set_client_name,
   14233             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   14234             :         },
   14235             :         {
   14236             :                 .name = discard_const_p(char, "in_client_pid"),
   14237             :                 .get = py_wbint_PamAuthCrap_in_get_client_pid,
   14238             :                 .set = py_wbint_PamAuthCrap_in_set_client_pid,
   14239             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   14240             :         },
   14241             :         {
   14242             :                 .name = discard_const_p(char, "in_flags"),
   14243             :                 .get = py_wbint_PamAuthCrap_in_get_flags,
   14244             :                 .set = py_wbint_PamAuthCrap_in_set_flags,
   14245             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14246             :         },
   14247             :         {
   14248             :                 .name = discard_const_p(char, "in_user"),
   14249             :                 .get = py_wbint_PamAuthCrap_in_get_user,
   14250             :                 .set = py_wbint_PamAuthCrap_in_set_user,
   14251             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   14252             :         },
   14253             :         {
   14254             :                 .name = discard_const_p(char, "in_domain"),
   14255             :                 .get = py_wbint_PamAuthCrap_in_get_domain,
   14256             :                 .set = py_wbint_PamAuthCrap_in_set_domain,
   14257             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   14258             :         },
   14259             :         {
   14260             :                 .name = discard_const_p(char, "in_workstation"),
   14261             :                 .get = py_wbint_PamAuthCrap_in_get_workstation,
   14262             :                 .set = py_wbint_PamAuthCrap_in_set_workstation,
   14263             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   14264             :         },
   14265             :         {
   14266             :                 .name = discard_const_p(char, "in_lm_resp"),
   14267             :                 .get = py_wbint_PamAuthCrap_in_get_lm_resp,
   14268             :                 .set = py_wbint_PamAuthCrap_in_set_lm_resp,
   14269             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   14270             :         },
   14271             :         {
   14272             :                 .name = discard_const_p(char, "in_nt_resp"),
   14273             :                 .get = py_wbint_PamAuthCrap_in_get_nt_resp,
   14274             :                 .set = py_wbint_PamAuthCrap_in_set_nt_resp,
   14275             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   14276             :         },
   14277             :         {
   14278             :                 .name = discard_const_p(char, "in_chal"),
   14279             :                 .get = py_wbint_PamAuthCrap_in_get_chal,
   14280             :                 .set = py_wbint_PamAuthCrap_in_set_chal,
   14281             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   14282             :         },
   14283             :         {
   14284             :                 .name = discard_const_p(char, "in_logon_parameters"),
   14285             :                 .get = py_wbint_PamAuthCrap_in_get_logon_parameters,
   14286             :                 .set = py_wbint_PamAuthCrap_in_set_logon_parameters,
   14287             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14288             :         },
   14289             :         {
   14290             :                 .name = discard_const_p(char, "in_require_membership_of_sid"),
   14291             :                 .get = py_wbint_PamAuthCrap_in_get_require_membership_of_sid,
   14292             :                 .set = py_wbint_PamAuthCrap_in_set_require_membership_of_sid,
   14293             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_SidArray")
   14294             :         },
   14295             :         {
   14296             :                 .name = discard_const_p(char, "out_authoritative"),
   14297             :                 .get = py_wbint_PamAuthCrap_out_get_authoritative,
   14298             :                 .set = py_wbint_PamAuthCrap_out_set_authoritative,
   14299             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   14300             :         },
   14301             :         {
   14302             :                 .name = discard_const_p(char, "out_validation"),
   14303             :                 .get = py_wbint_PamAuthCrap_out_get_validation,
   14304             :                 .set = py_wbint_PamAuthCrap_out_set_validation,
   14305             :                 .doc = discard_const_p(char, "PIDL-generated element of base type wbint_PamAuthCrapValidation")
   14306             :         },
   14307             :         {
   14308             :                 .name = discard_const_p(char, "result"),
   14309             :                 .get = py_wbint_PamAuthCrap_get_result,
   14310             :                 .set = py_wbint_PamAuthCrap_set_result,
   14311             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   14312             :         },
   14313             :         { .name = NULL }
   14314             : };
   14315             : 
   14316           0 : static PyObject *py_wbint_PamAuthCrap_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14317             : {
   14318           0 :         PyObject *self = pytalloc_new(struct wbint_PamAuthCrap, type);
   14319           0 :         struct wbint_PamAuthCrap *_self = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(self);
   14320           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   14321           0 :         _self->in.require_membership_of_sid = talloc_zero(mem_ctx, struct wbint_SidArray);
   14322           0 :         _self->out.authoritative = talloc_zero(mem_ctx, uint8_t);
   14323           0 :         _self->out.validation = talloc_zero(mem_ctx, struct wbint_PamAuthCrapValidation);
   14324           0 :         return self;
   14325             : }
   14326             : 
   14327           0 : static PyObject *py_wbint_PamAuthCrap_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   14328             : {
   14329             : 
   14330             : 
   14331           0 :         return PyLong_FromLong(22);
   14332             : }
   14333             : 
   14334           0 : static PyObject *py_wbint_PamAuthCrap_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   14335             : {
   14336           0 :         const struct ndr_interface_call *call = NULL;
   14337           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14338           0 :         PyObject *ret = NULL;
   14339           0 :         struct ndr_push *push = NULL;
   14340             :         DATA_BLOB blob;
   14341             :         enum ndr_err_code err;
   14342             : 
   14343           0 :         if (ndr_table_winbind.num_calls < 23) {
   14344           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuthCrap_ndr_pack");
   14345           0 :                 return NULL;
   14346             :         }
   14347           0 :         call = &ndr_table_winbind.calls[22];
   14348             : 
   14349           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   14350           0 :         if (push == NULL) {
   14351           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   14352           0 :                 return NULL;
   14353             :         }
   14354             : 
   14355           0 :         push->flags |= ndr_push_flags;
   14356             : 
   14357           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   14358           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   14359           0 :                 TALLOC_FREE(push);
   14360           0 :                 PyErr_SetNdrError(err);
   14361           0 :                 return NULL;
   14362             :         }
   14363           0 :         blob = ndr_push_blob(push);
   14364           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   14365           0 :         TALLOC_FREE(push);
   14366           0 :         return ret;
   14367             : }
   14368             : 
   14369           0 : static PyObject *py_wbint_PamAuthCrap_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   14370             : {
   14371           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   14372           0 :         PyObject *bigendian_obj = NULL;
   14373           0 :         PyObject *ndr64_obj = NULL;
   14374           0 :         uint32_t ndr_push_flags = 0;
   14375             : 
   14376           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   14377             :                 discard_const_p(char *, kwnames),
   14378             :                 &bigendian_obj,
   14379             :                 &ndr64_obj)) {
   14380           0 :                 return NULL;
   14381             :         }
   14382             : 
   14383           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   14384           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   14385             :         }
   14386           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   14387           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   14388             :         }
   14389             : 
   14390           0 :         return py_wbint_PamAuthCrap_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   14391             : }
   14392             : 
   14393           0 : static PyObject *py_wbint_PamAuthCrap_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   14394             : {
   14395           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   14396           0 :         PyObject *bigendian_obj = NULL;
   14397           0 :         PyObject *ndr64_obj = NULL;
   14398           0 :         uint32_t ndr_push_flags = 0;
   14399             : 
   14400           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   14401             :                 discard_const_p(char *, kwnames),
   14402             :                 &bigendian_obj,
   14403             :                 &ndr64_obj)) {
   14404           0 :                 return NULL;
   14405             :         }
   14406             : 
   14407           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   14408           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   14409             :         }
   14410           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   14411           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   14412             :         }
   14413             : 
   14414           0 :         return py_wbint_PamAuthCrap_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   14415             : }
   14416             : 
   14417           0 : static PyObject *py_wbint_PamAuthCrap_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   14418             : {
   14419           0 :         const struct ndr_interface_call *call = NULL;
   14420           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14421           0 :         struct ndr_pull *pull = NULL;
   14422             :         enum ndr_err_code err;
   14423             : 
   14424           0 :         if (ndr_table_winbind.num_calls < 23) {
   14425           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuthCrap_ndr_unpack");
   14426           0 :                 return NULL;
   14427             :         }
   14428           0 :         call = &ndr_table_winbind.calls[22];
   14429             : 
   14430           0 :         pull = ndr_pull_init_blob(blob, object);
   14431           0 :         if (pull == NULL) {
   14432           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   14433           0 :                 return NULL;
   14434             :         }
   14435             : 
   14436           0 :         pull->flags |= ndr_pull_flags;
   14437             : 
   14438           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   14439           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   14440           0 :                 TALLOC_FREE(pull);
   14441           0 :                 PyErr_SetNdrError(err);
   14442           0 :                 return NULL;
   14443             :         }
   14444           0 :         if (!allow_remaining) {
   14445             :                 uint32_t highest_ofs;
   14446             : 
   14447           0 :                 if (pull->offset > pull->relative_highest_offset) {
   14448           0 :                         highest_ofs = pull->offset;
   14449             :                 } else {
   14450           0 :                         highest_ofs = pull->relative_highest_offset;
   14451             :                 }
   14452           0 :                 if (highest_ofs < pull->data_size) {
   14453           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   14454             :                                 "not all bytes consumed ofs[%u] size[%u]",
   14455             :                                 highest_ofs, pull->data_size);
   14456           0 :                         TALLOC_FREE(pull);
   14457           0 :                         PyErr_SetNdrError(err);
   14458           0 :                         return NULL;
   14459             :                 }
   14460             :         }
   14461             : 
   14462           0 :         TALLOC_FREE(pull);
   14463           0 :         Py_RETURN_NONE;
   14464             : }
   14465             : 
   14466           0 : static PyObject *py_wbint_PamAuthCrap_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   14467             : {
   14468             :         DATA_BLOB blob;
   14469           0 :         Py_ssize_t blob_length = 0;
   14470           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   14471           0 :         PyObject *bigendian_obj = NULL;
   14472           0 :         PyObject *ndr64_obj = NULL;
   14473           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   14474           0 :         PyObject *allow_remaining_obj = NULL;
   14475           0 :         bool allow_remaining = false;
   14476             : 
   14477           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   14478             :                 discard_const_p(char *, kwnames),
   14479             :                 &blob.data, &blob_length,
   14480             :                 &bigendian_obj,
   14481             :                 &ndr64_obj,
   14482             :                 &allow_remaining_obj)) {
   14483           0 :                 return NULL;
   14484             :         }
   14485           0 :         blob.length = blob_length;
   14486             : 
   14487           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   14488           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   14489             :         }
   14490           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   14491           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   14492             :         }
   14493             : 
   14494           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   14495           0 :                 allow_remaining = true;
   14496             :         }
   14497             : 
   14498           0 :         return py_wbint_PamAuthCrap_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   14499             : }
   14500             : 
   14501           0 : static PyObject *py_wbint_PamAuthCrap_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   14502             : {
   14503             :         DATA_BLOB blob;
   14504           0 :         Py_ssize_t blob_length = 0;
   14505           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   14506           0 :         PyObject *bigendian_obj = NULL;
   14507           0 :         PyObject *ndr64_obj = NULL;
   14508           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   14509           0 :         PyObject *allow_remaining_obj = NULL;
   14510           0 :         bool allow_remaining = false;
   14511             : 
   14512           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   14513             :                 discard_const_p(char *, kwnames),
   14514             :                 &blob.data, &blob_length,
   14515             :                 &bigendian_obj,
   14516             :                 &ndr64_obj,
   14517             :                 &allow_remaining_obj)) {
   14518           0 :                 return NULL;
   14519             :         }
   14520           0 :         blob.length = blob_length;
   14521             : 
   14522           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   14523           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   14524             :         }
   14525           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   14526           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   14527             :         }
   14528             : 
   14529           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   14530           0 :                 allow_remaining = true;
   14531             :         }
   14532             : 
   14533           0 :         return py_wbint_PamAuthCrap_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   14534             : }
   14535             : 
   14536           0 : static PyObject *py_wbint_PamAuthCrap_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   14537             : {
   14538           0 :         const struct ndr_interface_call *call = NULL;
   14539           0 :         struct wbint_PamAuthCrap *object = (struct wbint_PamAuthCrap *)pytalloc_get_ptr(py_obj);
   14540             :         PyObject *ret;
   14541             :         char *retstr;
   14542             : 
   14543           0 :         if (ndr_table_winbind.num_calls < 23) {
   14544           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuthCrap_ndr_print");
   14545           0 :                 return NULL;
   14546             :         }
   14547           0 :         call = &ndr_table_winbind.calls[22];
   14548             : 
   14549           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   14550           0 :         ret = PyUnicode_FromString(retstr);
   14551           0 :         TALLOC_FREE(retstr);
   14552             : 
   14553           0 :         return ret;
   14554             : }
   14555             : 
   14556           0 : static PyObject *py_wbint_PamAuthCrap_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   14557             : {
   14558           0 :         return py_wbint_PamAuthCrap_ndr_print(py_obj, "wbint_PamAuthCrap_in", NDR_IN);
   14559             : }
   14560             : 
   14561           0 : static PyObject *py_wbint_PamAuthCrap_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   14562             : {
   14563           0 :         return py_wbint_PamAuthCrap_ndr_print(py_obj, "wbint_PamAuthCrap_out", NDR_OUT);
   14564             : }
   14565             : 
   14566             : static PyMethodDef py_wbint_PamAuthCrap_methods[] = {
   14567             :         { "opnum", (PyCFunction)py_wbint_PamAuthCrap_ndr_opnum, METH_NOARGS|METH_CLASS,
   14568             :                 "winbind.wbint_PamAuthCrap.opnum() -> 22 (0x16) " },
   14569             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthCrap_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   14570             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   14571             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthCrap_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   14572             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   14573             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthCrap_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   14574             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   14575             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthCrap_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   14576             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   14577             :         { "__ndr_print_in__", (PyCFunction)py_wbint_PamAuthCrap_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   14578             :         { "__ndr_print_out__", (PyCFunction)py_wbint_PamAuthCrap_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   14579             :         { NULL, NULL, 0, NULL }
   14580             : };
   14581             : 
   14582             : 
   14583             : static PyTypeObject wbint_PamAuthCrap_Type = {
   14584             :         PyVarObject_HEAD_INIT(NULL, 0)
   14585             :         .tp_name = "winbind.wbint_PamAuthCrap",
   14586             :         .tp_getset = py_wbint_PamAuthCrap_getsetters,
   14587             :         .tp_methods = py_wbint_PamAuthCrap_methods,
   14588             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   14589             :         .tp_new = py_wbint_PamAuthCrap_new,
   14590             : };
   14591             : 
   14592           0 : static bool pack_py_wbint_PamAuthCrap_args_in(PyObject *args, PyObject *kwargs, struct wbint_PamAuthCrap *r)
   14593             : {
   14594             :         PyObject *py_client_name;
   14595             :         PyObject *py_client_pid;
   14596             :         PyObject *py_flags;
   14597             :         PyObject *py_user;
   14598             :         PyObject *py_domain;
   14599             :         PyObject *py_workstation;
   14600             :         PyObject *py_lm_resp;
   14601             :         PyObject *py_nt_resp;
   14602             :         PyObject *py_chal;
   14603             :         PyObject *py_logon_parameters;
   14604             :         PyObject *py_require_membership_of_sid;
   14605           0 :         const char *kwnames[] = {
   14606             :                 "client_name", "client_pid", "flags", "user", "domain", "workstation", "lm_resp", "nt_resp", "chal", "logon_parameters", "require_membership_of_sid", NULL
   14607             :         };
   14608             : 
   14609           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)) {
   14610           0 :                 return false;
   14611             :         }
   14612             : 
   14613           0 :         if (py_client_name == NULL) {
   14614           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_name");
   14615           0 :                 return false;
   14616             :         }
   14617           0 :         r->in.client_name = talloc_ptrtype(r, r->in.client_name);
   14618           0 :         if (r->in.client_name == NULL) {
   14619           0 :                 PyErr_NoMemory();
   14620           0 :                 return false;
   14621             :         }
   14622             :         {
   14623             :                 const char *test_str;
   14624             :                 const char *talloc_str;
   14625           0 :                 PyObject *unicode = NULL;
   14626           0 :                 if (PyUnicode_Check(py_client_name)) {
   14627           0 :                         unicode = PyUnicode_AsEncodedString(py_client_name, "utf-8", "ignore");
   14628           0 :                         if (unicode == NULL) {
   14629           0 :                                 PyErr_NoMemory();
   14630           0 :                                 return false;
   14631             :                         }
   14632           0 :                         test_str = PyBytes_AS_STRING(unicode);
   14633           0 :                 } else if (PyBytes_Check(py_client_name)) {
   14634           0 :                         test_str = PyBytes_AS_STRING(py_client_name);
   14635             :                 } else {
   14636           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client_name)->tp_name);
   14637           0 :                         return false;
   14638             :                 }
   14639           0 :                 talloc_str = talloc_strdup(r, test_str);
   14640           0 :                 if (unicode != NULL) {
   14641           0 :                         Py_DECREF(unicode);
   14642             :                 }
   14643           0 :                 if (talloc_str == NULL) {
   14644           0 :                         PyErr_NoMemory();
   14645           0 :                         return false;
   14646             :                 }
   14647           0 :                 r->in.client_name = talloc_str;
   14648             :         }
   14649           0 :         if (py_client_pid == NULL) {
   14650           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_pid");
   14651           0 :                 return false;
   14652             :         }
   14653             :         {
   14654           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.client_pid));
   14655           0 :                 if (PyLong_Check(py_client_pid)) {
   14656             :                         unsigned long long test_var;
   14657           0 :                         test_var = PyLong_AsUnsignedLongLong(py_client_pid);
   14658           0 :                         if (PyErr_Occurred() != NULL) {
   14659           0 :                                 return false;
   14660             :                         }
   14661           0 :                         if (test_var > uint_max) {
   14662           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14663             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14664           0 :                                 return false;
   14665             :                         }
   14666           0 :                         r->in.client_pid = test_var;
   14667             :                 } else {
   14668           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14669             :                           PyLong_Type.tp_name);
   14670           0 :                         return false;
   14671             :                 }
   14672             :         }
   14673           0 :         if (py_flags == NULL) {
   14674           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   14675           0 :                 return false;
   14676             :         }
   14677             :         {
   14678           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   14679           0 :                 if (PyLong_Check(py_flags)) {
   14680             :                         unsigned long long test_var;
   14681           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   14682           0 :                         if (PyErr_Occurred() != NULL) {
   14683           0 :                                 return false;
   14684             :                         }
   14685           0 :                         if (test_var > uint_max) {
   14686           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14687             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14688           0 :                                 return false;
   14689             :                         }
   14690           0 :                         r->in.flags = test_var;
   14691             :                 } else {
   14692           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14693             :                           PyLong_Type.tp_name);
   14694           0 :                         return false;
   14695             :                 }
   14696             :         }
   14697           0 :         if (py_user == NULL) {
   14698           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.user");
   14699           0 :                 return false;
   14700             :         }
   14701           0 :         r->in.user = talloc_ptrtype(r, r->in.user);
   14702           0 :         if (r->in.user == NULL) {
   14703           0 :                 PyErr_NoMemory();
   14704           0 :                 return false;
   14705             :         }
   14706             :         {
   14707             :                 const char *test_str;
   14708             :                 const char *talloc_str;
   14709           0 :                 PyObject *unicode = NULL;
   14710           0 :                 if (PyUnicode_Check(py_user)) {
   14711           0 :                         unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
   14712           0 :                         if (unicode == NULL) {
   14713           0 :                                 PyErr_NoMemory();
   14714           0 :                                 return false;
   14715             :                         }
   14716           0 :                         test_str = PyBytes_AS_STRING(unicode);
   14717           0 :                 } else if (PyBytes_Check(py_user)) {
   14718           0 :                         test_str = PyBytes_AS_STRING(py_user);
   14719             :                 } else {
   14720           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
   14721           0 :                         return false;
   14722             :                 }
   14723           0 :                 talloc_str = talloc_strdup(r, test_str);
   14724           0 :                 if (unicode != NULL) {
   14725           0 :                         Py_DECREF(unicode);
   14726             :                 }
   14727           0 :                 if (talloc_str == NULL) {
   14728           0 :                         PyErr_NoMemory();
   14729           0 :                         return false;
   14730             :                 }
   14731           0 :                 r->in.user = talloc_str;
   14732             :         }
   14733           0 :         if (py_domain == NULL) {
   14734           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain");
   14735           0 :                 return false;
   14736             :         }
   14737           0 :         r->in.domain = talloc_ptrtype(r, r->in.domain);
   14738           0 :         if (r->in.domain == NULL) {
   14739           0 :                 PyErr_NoMemory();
   14740           0 :                 return false;
   14741             :         }
   14742             :         {
   14743             :                 const char *test_str;
   14744             :                 const char *talloc_str;
   14745           0 :                 PyObject *unicode = NULL;
   14746           0 :                 if (PyUnicode_Check(py_domain)) {
   14747           0 :                         unicode = PyUnicode_AsEncodedString(py_domain, "utf-8", "ignore");
   14748           0 :                         if (unicode == NULL) {
   14749           0 :                                 PyErr_NoMemory();
   14750           0 :                                 return false;
   14751             :                         }
   14752           0 :                         test_str = PyBytes_AS_STRING(unicode);
   14753           0 :                 } else if (PyBytes_Check(py_domain)) {
   14754           0 :                         test_str = PyBytes_AS_STRING(py_domain);
   14755             :                 } else {
   14756           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain)->tp_name);
   14757           0 :                         return false;
   14758             :                 }
   14759           0 :                 talloc_str = talloc_strdup(r, test_str);
   14760           0 :                 if (unicode != NULL) {
   14761           0 :                         Py_DECREF(unicode);
   14762             :                 }
   14763           0 :                 if (talloc_str == NULL) {
   14764           0 :                         PyErr_NoMemory();
   14765           0 :                         return false;
   14766             :                 }
   14767           0 :                 r->in.domain = talloc_str;
   14768             :         }
   14769           0 :         if (py_workstation == NULL) {
   14770           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.workstation");
   14771           0 :                 return false;
   14772             :         }
   14773           0 :         r->in.workstation = talloc_ptrtype(r, r->in.workstation);
   14774           0 :         if (r->in.workstation == NULL) {
   14775           0 :                 PyErr_NoMemory();
   14776           0 :                 return false;
   14777             :         }
   14778             :         {
   14779             :                 const char *test_str;
   14780             :                 const char *talloc_str;
   14781           0 :                 PyObject *unicode = NULL;
   14782           0 :                 if (PyUnicode_Check(py_workstation)) {
   14783           0 :                         unicode = PyUnicode_AsEncodedString(py_workstation, "utf-8", "ignore");
   14784           0 :                         if (unicode == NULL) {
   14785           0 :                                 PyErr_NoMemory();
   14786           0 :                                 return false;
   14787             :                         }
   14788           0 :                         test_str = PyBytes_AS_STRING(unicode);
   14789           0 :                 } else if (PyBytes_Check(py_workstation)) {
   14790           0 :                         test_str = PyBytes_AS_STRING(py_workstation);
   14791             :                 } else {
   14792           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_workstation)->tp_name);
   14793           0 :                         return false;
   14794             :                 }
   14795           0 :                 talloc_str = talloc_strdup(r, test_str);
   14796           0 :                 if (unicode != NULL) {
   14797           0 :                         Py_DECREF(unicode);
   14798             :                 }
   14799           0 :                 if (talloc_str == NULL) {
   14800           0 :                         PyErr_NoMemory();
   14801           0 :                         return false;
   14802             :                 }
   14803           0 :                 r->in.workstation = talloc_str;
   14804             :         }
   14805           0 :         if (py_lm_resp == NULL) {
   14806           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.lm_resp");
   14807           0 :                 return false;
   14808             :         }
   14809           0 :         r->in.lm_resp = data_blob_talloc(r, PyBytes_AS_STRING(py_lm_resp), PyBytes_GET_SIZE(py_lm_resp));
   14810           0 :         if (py_nt_resp == NULL) {
   14811           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.nt_resp");
   14812           0 :                 return false;
   14813             :         }
   14814           0 :         r->in.nt_resp = data_blob_talloc(r, PyBytes_AS_STRING(py_nt_resp), PyBytes_GET_SIZE(py_nt_resp));
   14815           0 :         if (py_chal == NULL) {
   14816           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.chal");
   14817           0 :                 return false;
   14818             :         }
   14819           0 :         r->in.chal = data_blob_talloc(r, PyBytes_AS_STRING(py_chal), PyBytes_GET_SIZE(py_chal));
   14820           0 :         if (py_logon_parameters == NULL) {
   14821           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_parameters");
   14822           0 :                 return false;
   14823             :         }
   14824             :         {
   14825           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.logon_parameters));
   14826           0 :                 if (PyLong_Check(py_logon_parameters)) {
   14827             :                         unsigned long long test_var;
   14828           0 :                         test_var = PyLong_AsUnsignedLongLong(py_logon_parameters);
   14829           0 :                         if (PyErr_Occurred() != NULL) {
   14830           0 :                                 return false;
   14831             :                         }
   14832           0 :                         if (test_var > uint_max) {
   14833           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14834             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14835           0 :                                 return false;
   14836             :                         }
   14837           0 :                         r->in.logon_parameters = test_var;
   14838             :                 } else {
   14839           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14840             :                           PyLong_Type.tp_name);
   14841           0 :                         return false;
   14842             :                 }
   14843             :         }
   14844           0 :         if (py_require_membership_of_sid == NULL) {
   14845           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.require_membership_of_sid");
   14846           0 :                 return false;
   14847             :         }
   14848           0 :         r->in.require_membership_of_sid = talloc_ptrtype(r, r->in.require_membership_of_sid);
   14849           0 :         if (r->in.require_membership_of_sid == NULL) {
   14850           0 :                 PyErr_NoMemory();
   14851           0 :                 return false;
   14852             :         }
   14853           0 :         PY_CHECK_TYPE(&wbint_SidArray_Type, py_require_membership_of_sid, return false;);
   14854           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_require_membership_of_sid)) == NULL) {
   14855           0 :                 PyErr_NoMemory();
   14856           0 :                 return false;
   14857             :         }
   14858           0 :         r->in.require_membership_of_sid = (struct wbint_SidArray *)pytalloc_get_ptr(py_require_membership_of_sid);
   14859           0 :         return true;
   14860             : }
   14861             : 
   14862           0 : static PyObject *unpack_py_wbint_PamAuthCrap_args_out(struct wbint_PamAuthCrap *r)
   14863             : {
   14864             :         PyObject *result;
   14865             :         PyObject *py_authoritative;
   14866             :         PyObject *py_validation;
   14867           0 :         result = PyTuple_New(2);
   14868           0 :         py_authoritative = PyLong_FromLong((uint16_t)*r->out.authoritative);
   14869           0 :         PyTuple_SetItem(result, 0, py_authoritative);
   14870           0 :         py_validation = pytalloc_reference_ex(&wbint_PamAuthCrapValidation_Type, r->out.validation, r->out.validation);
   14871           0 :         PyTuple_SetItem(result, 1, py_validation);
   14872           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   14873           0 :                 PyErr_SetNTSTATUS(r->out.result);
   14874           0 :                 return NULL;
   14875             :         }
   14876             : 
   14877           0 :         return result;
   14878             : }
   14879             : 
   14880             : 
   14881           0 : static PyObject *py_wbint_PamLogOff_in_get_client_name(PyObject *obj, void *closure)
   14882             : {
   14883           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(obj);
   14884             :         PyObject *py_client_name;
   14885           0 :         if (object->in.client_name == NULL) {
   14886           0 :                 Py_RETURN_NONE;
   14887             :         }
   14888           0 :         if (object->in.client_name == NULL) {
   14889           0 :                 py_client_name = Py_None;
   14890           0 :                 Py_INCREF(py_client_name);
   14891             :         } else {
   14892           0 :                 py_client_name = PyUnicode_Decode(object->in.client_name, strlen(object->in.client_name), "utf-8", "ignore");
   14893             :         }
   14894           0 :         return py_client_name;
   14895             : }
   14896             : 
   14897           0 : static int py_wbint_PamLogOff_in_set_client_name(PyObject *py_obj, PyObject *value, void *closure)
   14898             : {
   14899           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(py_obj);
   14900           0 :         if (value == NULL) {
   14901           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_name");
   14902           0 :                 return -1;
   14903             :         }
   14904           0 :         object->in.client_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.client_name);
   14905           0 :         if (object->in.client_name == NULL) {
   14906           0 :                 PyErr_NoMemory();
   14907           0 :                 return -1;
   14908             :         }
   14909             :         {
   14910             :                 const char *test_str;
   14911             :                 const char *talloc_str;
   14912           0 :                 PyObject *unicode = NULL;
   14913           0 :                 if (PyUnicode_Check(value)) {
   14914           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   14915           0 :                         if (unicode == NULL) {
   14916           0 :                                 PyErr_NoMemory();
   14917           0 :                                 return -1;
   14918             :                         }
   14919           0 :                         test_str = PyBytes_AS_STRING(unicode);
   14920           0 :                 } else if (PyBytes_Check(value)) {
   14921           0 :                         test_str = PyBytes_AS_STRING(value);
   14922             :                 } else {
   14923           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   14924           0 :                         return -1;
   14925             :                 }
   14926           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   14927           0 :                 if (unicode != NULL) {
   14928           0 :                         Py_DECREF(unicode);
   14929             :                 }
   14930           0 :                 if (talloc_str == NULL) {
   14931           0 :                         PyErr_NoMemory();
   14932           0 :                         return -1;
   14933             :                 }
   14934           0 :                 object->in.client_name = talloc_str;
   14935             :         }
   14936           0 :         return 0;
   14937             : }
   14938             : 
   14939           0 : static PyObject *py_wbint_PamLogOff_in_get_client_pid(PyObject *obj, void *closure)
   14940             : {
   14941           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(obj);
   14942             :         PyObject *py_client_pid;
   14943           0 :         py_client_pid = PyLong_FromUnsignedLongLong(object->in.client_pid);
   14944           0 :         return py_client_pid;
   14945             : }
   14946             : 
   14947           0 : static int py_wbint_PamLogOff_in_set_client_pid(PyObject *py_obj, PyObject *value, void *closure)
   14948             : {
   14949           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(py_obj);
   14950           0 :         if (value == NULL) {
   14951           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_pid");
   14952           0 :                 return -1;
   14953             :         }
   14954             :         {
   14955           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.client_pid));
   14956           0 :                 if (PyLong_Check(value)) {
   14957             :                         unsigned long long test_var;
   14958           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14959           0 :                         if (PyErr_Occurred() != NULL) {
   14960           0 :                                 return -1;
   14961             :                         }
   14962           0 :                         if (test_var > uint_max) {
   14963           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14964             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14965           0 :                                 return -1;
   14966             :                         }
   14967           0 :                         object->in.client_pid = test_var;
   14968             :                 } else {
   14969           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14970             :                           PyLong_Type.tp_name);
   14971           0 :                         return -1;
   14972             :                 }
   14973             :         }
   14974           0 :         return 0;
   14975             : }
   14976             : 
   14977           0 : static PyObject *py_wbint_PamLogOff_in_get_flags(PyObject *obj, void *closure)
   14978             : {
   14979           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(obj);
   14980             :         PyObject *py_flags;
   14981           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   14982           0 :         return py_flags;
   14983             : }
   14984             : 
   14985           0 : static int py_wbint_PamLogOff_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   14986             : {
   14987           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(py_obj);
   14988           0 :         if (value == NULL) {
   14989           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   14990           0 :                 return -1;
   14991             :         }
   14992             :         {
   14993           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   14994           0 :                 if (PyLong_Check(value)) {
   14995             :                         unsigned long long test_var;
   14996           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14997           0 :                         if (PyErr_Occurred() != NULL) {
   14998           0 :                                 return -1;
   14999             :                         }
   15000           0 :                         if (test_var > uint_max) {
   15001           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15002             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15003           0 :                                 return -1;
   15004             :                         }
   15005           0 :                         object->in.flags = test_var;
   15006             :                 } else {
   15007           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15008             :                           PyLong_Type.tp_name);
   15009           0 :                         return -1;
   15010             :                 }
   15011             :         }
   15012           0 :         return 0;
   15013             : }
   15014             : 
   15015           0 : static PyObject *py_wbint_PamLogOff_in_get_user(PyObject *obj, void *closure)
   15016             : {
   15017           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(obj);
   15018             :         PyObject *py_user;
   15019           0 :         if (object->in.user == NULL) {
   15020           0 :                 Py_RETURN_NONE;
   15021             :         }
   15022           0 :         if (object->in.user == NULL) {
   15023           0 :                 py_user = Py_None;
   15024           0 :                 Py_INCREF(py_user);
   15025             :         } else {
   15026           0 :                 py_user = PyUnicode_Decode(object->in.user, strlen(object->in.user), "utf-8", "ignore");
   15027             :         }
   15028           0 :         return py_user;
   15029             : }
   15030             : 
   15031           0 : static int py_wbint_PamLogOff_in_set_user(PyObject *py_obj, PyObject *value, void *closure)
   15032             : {
   15033           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(py_obj);
   15034           0 :         if (value == NULL) {
   15035           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.user");
   15036           0 :                 return -1;
   15037             :         }
   15038           0 :         object->in.user = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.user);
   15039           0 :         if (object->in.user == NULL) {
   15040           0 :                 PyErr_NoMemory();
   15041           0 :                 return -1;
   15042             :         }
   15043             :         {
   15044             :                 const char *test_str;
   15045             :                 const char *talloc_str;
   15046           0 :                 PyObject *unicode = NULL;
   15047           0 :                 if (PyUnicode_Check(value)) {
   15048           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   15049           0 :                         if (unicode == NULL) {
   15050           0 :                                 PyErr_NoMemory();
   15051           0 :                                 return -1;
   15052             :                         }
   15053           0 :                         test_str = PyBytes_AS_STRING(unicode);
   15054           0 :                 } else if (PyBytes_Check(value)) {
   15055           0 :                         test_str = PyBytes_AS_STRING(value);
   15056             :                 } else {
   15057           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   15058           0 :                         return -1;
   15059             :                 }
   15060           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   15061           0 :                 if (unicode != NULL) {
   15062           0 :                         Py_DECREF(unicode);
   15063             :                 }
   15064           0 :                 if (talloc_str == NULL) {
   15065           0 :                         PyErr_NoMemory();
   15066           0 :                         return -1;
   15067             :                 }
   15068           0 :                 object->in.user = talloc_str;
   15069             :         }
   15070           0 :         return 0;
   15071             : }
   15072             : 
   15073           0 : static PyObject *py_wbint_PamLogOff_in_get_krb5ccname(PyObject *obj, void *closure)
   15074             : {
   15075           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(obj);
   15076             :         PyObject *py_krb5ccname;
   15077           0 :         if (object->in.krb5ccname == NULL) {
   15078           0 :                 Py_RETURN_NONE;
   15079             :         }
   15080           0 :         if (object->in.krb5ccname == NULL) {
   15081           0 :                 py_krb5ccname = Py_None;
   15082           0 :                 Py_INCREF(py_krb5ccname);
   15083             :         } else {
   15084           0 :                 py_krb5ccname = PyUnicode_Decode(object->in.krb5ccname, strlen(object->in.krb5ccname), "utf-8", "ignore");
   15085             :         }
   15086           0 :         return py_krb5ccname;
   15087             : }
   15088             : 
   15089           0 : static int py_wbint_PamLogOff_in_set_krb5ccname(PyObject *py_obj, PyObject *value, void *closure)
   15090             : {
   15091           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(py_obj);
   15092           0 :         if (value == NULL) {
   15093           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.krb5ccname");
   15094           0 :                 return -1;
   15095             :         }
   15096           0 :         object->in.krb5ccname = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.krb5ccname);
   15097           0 :         if (object->in.krb5ccname == NULL) {
   15098           0 :                 PyErr_NoMemory();
   15099           0 :                 return -1;
   15100             :         }
   15101             :         {
   15102             :                 const char *test_str;
   15103             :                 const char *talloc_str;
   15104           0 :                 PyObject *unicode = NULL;
   15105           0 :                 if (PyUnicode_Check(value)) {
   15106           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   15107           0 :                         if (unicode == NULL) {
   15108           0 :                                 PyErr_NoMemory();
   15109           0 :                                 return -1;
   15110             :                         }
   15111           0 :                         test_str = PyBytes_AS_STRING(unicode);
   15112           0 :                 } else if (PyBytes_Check(value)) {
   15113           0 :                         test_str = PyBytes_AS_STRING(value);
   15114             :                 } else {
   15115           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   15116           0 :                         return -1;
   15117             :                 }
   15118           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   15119           0 :                 if (unicode != NULL) {
   15120           0 :                         Py_DECREF(unicode);
   15121             :                 }
   15122           0 :                 if (talloc_str == NULL) {
   15123           0 :                         PyErr_NoMemory();
   15124           0 :                         return -1;
   15125             :                 }
   15126           0 :                 object->in.krb5ccname = talloc_str;
   15127             :         }
   15128           0 :         return 0;
   15129             : }
   15130             : 
   15131           0 : static PyObject *py_wbint_PamLogOff_in_get_uid(PyObject *obj, void *closure)
   15132             : {
   15133           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(obj);
   15134             :         PyObject *py_uid;
   15135           0 :         py_uid = PyLong_FromUnsignedLongLong(object->in.uid);
   15136           0 :         return py_uid;
   15137             : }
   15138             : 
   15139           0 : static int py_wbint_PamLogOff_in_set_uid(PyObject *py_obj, PyObject *value, void *closure)
   15140             : {
   15141           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(py_obj);
   15142           0 :         if (value == NULL) {
   15143           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.uid");
   15144           0 :                 return -1;
   15145             :         }
   15146             :         {
   15147           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.uid));
   15148           0 :                 if (PyLong_Check(value)) {
   15149             :                         unsigned long long test_var;
   15150           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15151           0 :                         if (PyErr_Occurred() != NULL) {
   15152           0 :                                 return -1;
   15153             :                         }
   15154           0 :                         if (test_var > uint_max) {
   15155           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15156             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15157           0 :                                 return -1;
   15158             :                         }
   15159           0 :                         object->in.uid = test_var;
   15160             :                 } else {
   15161           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15162             :                           PyLong_Type.tp_name);
   15163           0 :                         return -1;
   15164             :                 }
   15165             :         }
   15166           0 :         return 0;
   15167             : }
   15168             : 
   15169           0 : static PyObject *py_wbint_PamLogOff_get_result(PyObject *obj, void *closure)
   15170             : {
   15171           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(obj);
   15172             :         PyObject *py_result;
   15173           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   15174           0 :         return py_result;
   15175             : }
   15176             : 
   15177           0 : static int py_wbint_PamLogOff_set_result(PyObject *py_obj, PyObject *value, void *closure)
   15178             : {
   15179           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(py_obj);
   15180           0 :         if (value == NULL) {
   15181           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   15182           0 :                 return -1;
   15183             :         }
   15184           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   15185           0 :         return 0;
   15186             : }
   15187             : 
   15188             : static PyGetSetDef py_wbint_PamLogOff_getsetters[] = {
   15189             :         {
   15190             :                 .name = discard_const_p(char, "in_client_name"),
   15191             :                 .get = py_wbint_PamLogOff_in_get_client_name,
   15192             :                 .set = py_wbint_PamLogOff_in_set_client_name,
   15193             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   15194             :         },
   15195             :         {
   15196             :                 .name = discard_const_p(char, "in_client_pid"),
   15197             :                 .get = py_wbint_PamLogOff_in_get_client_pid,
   15198             :                 .set = py_wbint_PamLogOff_in_set_client_pid,
   15199             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   15200             :         },
   15201             :         {
   15202             :                 .name = discard_const_p(char, "in_flags"),
   15203             :                 .get = py_wbint_PamLogOff_in_get_flags,
   15204             :                 .set = py_wbint_PamLogOff_in_set_flags,
   15205             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15206             :         },
   15207             :         {
   15208             :                 .name = discard_const_p(char, "in_user"),
   15209             :                 .get = py_wbint_PamLogOff_in_get_user,
   15210             :                 .set = py_wbint_PamLogOff_in_set_user,
   15211             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   15212             :         },
   15213             :         {
   15214             :                 .name = discard_const_p(char, "in_krb5ccname"),
   15215             :                 .get = py_wbint_PamLogOff_in_get_krb5ccname,
   15216             :                 .set = py_wbint_PamLogOff_in_set_krb5ccname,
   15217             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   15218             :         },
   15219             :         {
   15220             :                 .name = discard_const_p(char, "in_uid"),
   15221             :                 .get = py_wbint_PamLogOff_in_get_uid,
   15222             :                 .set = py_wbint_PamLogOff_in_set_uid,
   15223             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   15224             :         },
   15225             :         {
   15226             :                 .name = discard_const_p(char, "result"),
   15227             :                 .get = py_wbint_PamLogOff_get_result,
   15228             :                 .set = py_wbint_PamLogOff_set_result,
   15229             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   15230             :         },
   15231             :         { .name = NULL }
   15232             : };
   15233             : 
   15234           0 : static PyObject *py_wbint_PamLogOff_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15235             : {
   15236           0 :         PyObject *self = pytalloc_new(struct wbint_PamLogOff, type);
   15237           0 :         return self;
   15238             : }
   15239             : 
   15240           0 : static PyObject *py_wbint_PamLogOff_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   15241             : {
   15242             : 
   15243             : 
   15244           0 :         return PyLong_FromLong(23);
   15245             : }
   15246             : 
   15247           0 : static PyObject *py_wbint_PamLogOff_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   15248             : {
   15249           0 :         const struct ndr_interface_call *call = NULL;
   15250           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(py_obj);
   15251           0 :         PyObject *ret = NULL;
   15252           0 :         struct ndr_push *push = NULL;
   15253             :         DATA_BLOB blob;
   15254             :         enum ndr_err_code err;
   15255             : 
   15256           0 :         if (ndr_table_winbind.num_calls < 24) {
   15257           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamLogOff_ndr_pack");
   15258           0 :                 return NULL;
   15259             :         }
   15260           0 :         call = &ndr_table_winbind.calls[23];
   15261             : 
   15262           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   15263           0 :         if (push == NULL) {
   15264           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   15265           0 :                 return NULL;
   15266             :         }
   15267             : 
   15268           0 :         push->flags |= ndr_push_flags;
   15269             : 
   15270           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   15271           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   15272           0 :                 TALLOC_FREE(push);
   15273           0 :                 PyErr_SetNdrError(err);
   15274           0 :                 return NULL;
   15275             :         }
   15276           0 :         blob = ndr_push_blob(push);
   15277           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   15278           0 :         TALLOC_FREE(push);
   15279           0 :         return ret;
   15280             : }
   15281             : 
   15282           0 : static PyObject *py_wbint_PamLogOff_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   15283             : {
   15284           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   15285           0 :         PyObject *bigendian_obj = NULL;
   15286           0 :         PyObject *ndr64_obj = NULL;
   15287           0 :         uint32_t ndr_push_flags = 0;
   15288             : 
   15289           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   15290             :                 discard_const_p(char *, kwnames),
   15291             :                 &bigendian_obj,
   15292             :                 &ndr64_obj)) {
   15293           0 :                 return NULL;
   15294             :         }
   15295             : 
   15296           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   15297           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   15298             :         }
   15299           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   15300           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   15301             :         }
   15302             : 
   15303           0 :         return py_wbint_PamLogOff_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   15304             : }
   15305             : 
   15306           0 : static PyObject *py_wbint_PamLogOff_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   15307             : {
   15308           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   15309           0 :         PyObject *bigendian_obj = NULL;
   15310           0 :         PyObject *ndr64_obj = NULL;
   15311           0 :         uint32_t ndr_push_flags = 0;
   15312             : 
   15313           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   15314             :                 discard_const_p(char *, kwnames),
   15315             :                 &bigendian_obj,
   15316             :                 &ndr64_obj)) {
   15317           0 :                 return NULL;
   15318             :         }
   15319             : 
   15320           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   15321           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   15322             :         }
   15323           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   15324           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   15325             :         }
   15326             : 
   15327           0 :         return py_wbint_PamLogOff_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   15328             : }
   15329             : 
   15330           0 : static PyObject *py_wbint_PamLogOff_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   15331             : {
   15332           0 :         const struct ndr_interface_call *call = NULL;
   15333           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(py_obj);
   15334           0 :         struct ndr_pull *pull = NULL;
   15335             :         enum ndr_err_code err;
   15336             : 
   15337           0 :         if (ndr_table_winbind.num_calls < 24) {
   15338           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamLogOff_ndr_unpack");
   15339           0 :                 return NULL;
   15340             :         }
   15341           0 :         call = &ndr_table_winbind.calls[23];
   15342             : 
   15343           0 :         pull = ndr_pull_init_blob(blob, object);
   15344           0 :         if (pull == NULL) {
   15345           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   15346           0 :                 return NULL;
   15347             :         }
   15348             : 
   15349           0 :         pull->flags |= ndr_pull_flags;
   15350             : 
   15351           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   15352           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   15353           0 :                 TALLOC_FREE(pull);
   15354           0 :                 PyErr_SetNdrError(err);
   15355           0 :                 return NULL;
   15356             :         }
   15357           0 :         if (!allow_remaining) {
   15358             :                 uint32_t highest_ofs;
   15359             : 
   15360           0 :                 if (pull->offset > pull->relative_highest_offset) {
   15361           0 :                         highest_ofs = pull->offset;
   15362             :                 } else {
   15363           0 :                         highest_ofs = pull->relative_highest_offset;
   15364             :                 }
   15365           0 :                 if (highest_ofs < pull->data_size) {
   15366           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   15367             :                                 "not all bytes consumed ofs[%u] size[%u]",
   15368             :                                 highest_ofs, pull->data_size);
   15369           0 :                         TALLOC_FREE(pull);
   15370           0 :                         PyErr_SetNdrError(err);
   15371           0 :                         return NULL;
   15372             :                 }
   15373             :         }
   15374             : 
   15375           0 :         TALLOC_FREE(pull);
   15376           0 :         Py_RETURN_NONE;
   15377             : }
   15378             : 
   15379           0 : static PyObject *py_wbint_PamLogOff_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   15380             : {
   15381             :         DATA_BLOB blob;
   15382           0 :         Py_ssize_t blob_length = 0;
   15383           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   15384           0 :         PyObject *bigendian_obj = NULL;
   15385           0 :         PyObject *ndr64_obj = NULL;
   15386           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   15387           0 :         PyObject *allow_remaining_obj = NULL;
   15388           0 :         bool allow_remaining = false;
   15389             : 
   15390           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   15391             :                 discard_const_p(char *, kwnames),
   15392             :                 &blob.data, &blob_length,
   15393             :                 &bigendian_obj,
   15394             :                 &ndr64_obj,
   15395             :                 &allow_remaining_obj)) {
   15396           0 :                 return NULL;
   15397             :         }
   15398           0 :         blob.length = blob_length;
   15399             : 
   15400           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   15401           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   15402             :         }
   15403           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   15404           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   15405             :         }
   15406             : 
   15407           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   15408           0 :                 allow_remaining = true;
   15409             :         }
   15410             : 
   15411           0 :         return py_wbint_PamLogOff_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   15412             : }
   15413             : 
   15414           0 : static PyObject *py_wbint_PamLogOff_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   15415             : {
   15416             :         DATA_BLOB blob;
   15417           0 :         Py_ssize_t blob_length = 0;
   15418           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   15419           0 :         PyObject *bigendian_obj = NULL;
   15420           0 :         PyObject *ndr64_obj = NULL;
   15421           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   15422           0 :         PyObject *allow_remaining_obj = NULL;
   15423           0 :         bool allow_remaining = false;
   15424             : 
   15425           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   15426             :                 discard_const_p(char *, kwnames),
   15427             :                 &blob.data, &blob_length,
   15428             :                 &bigendian_obj,
   15429             :                 &ndr64_obj,
   15430             :                 &allow_remaining_obj)) {
   15431           0 :                 return NULL;
   15432             :         }
   15433           0 :         blob.length = blob_length;
   15434             : 
   15435           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   15436           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   15437             :         }
   15438           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   15439           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   15440             :         }
   15441             : 
   15442           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   15443           0 :                 allow_remaining = true;
   15444             :         }
   15445             : 
   15446           0 :         return py_wbint_PamLogOff_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   15447             : }
   15448             : 
   15449           0 : static PyObject *py_wbint_PamLogOff_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   15450             : {
   15451           0 :         const struct ndr_interface_call *call = NULL;
   15452           0 :         struct wbint_PamLogOff *object = (struct wbint_PamLogOff *)pytalloc_get_ptr(py_obj);
   15453             :         PyObject *ret;
   15454             :         char *retstr;
   15455             : 
   15456           0 :         if (ndr_table_winbind.num_calls < 24) {
   15457           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamLogOff_ndr_print");
   15458           0 :                 return NULL;
   15459             :         }
   15460           0 :         call = &ndr_table_winbind.calls[23];
   15461             : 
   15462           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   15463           0 :         ret = PyUnicode_FromString(retstr);
   15464           0 :         TALLOC_FREE(retstr);
   15465             : 
   15466           0 :         return ret;
   15467             : }
   15468             : 
   15469           0 : static PyObject *py_wbint_PamLogOff_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   15470             : {
   15471           0 :         return py_wbint_PamLogOff_ndr_print(py_obj, "wbint_PamLogOff_in", NDR_IN);
   15472             : }
   15473             : 
   15474           0 : static PyObject *py_wbint_PamLogOff_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   15475             : {
   15476           0 :         return py_wbint_PamLogOff_ndr_print(py_obj, "wbint_PamLogOff_out", NDR_OUT);
   15477             : }
   15478             : 
   15479             : static PyMethodDef py_wbint_PamLogOff_methods[] = {
   15480             :         { "opnum", (PyCFunction)py_wbint_PamLogOff_ndr_opnum, METH_NOARGS|METH_CLASS,
   15481             :                 "winbind.wbint_PamLogOff.opnum() -> 23 (0x17) " },
   15482             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamLogOff_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   15483             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   15484             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamLogOff_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   15485             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   15486             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamLogOff_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   15487             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   15488             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamLogOff_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   15489             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   15490             :         { "__ndr_print_in__", (PyCFunction)py_wbint_PamLogOff_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   15491             :         { "__ndr_print_out__", (PyCFunction)py_wbint_PamLogOff_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   15492             :         { NULL, NULL, 0, NULL }
   15493             : };
   15494             : 
   15495             : 
   15496             : static PyTypeObject wbint_PamLogOff_Type = {
   15497             :         PyVarObject_HEAD_INIT(NULL, 0)
   15498             :         .tp_name = "winbind.wbint_PamLogOff",
   15499             :         .tp_getset = py_wbint_PamLogOff_getsetters,
   15500             :         .tp_methods = py_wbint_PamLogOff_methods,
   15501             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   15502             :         .tp_new = py_wbint_PamLogOff_new,
   15503             : };
   15504             : 
   15505           0 : static bool pack_py_wbint_PamLogOff_args_in(PyObject *args, PyObject *kwargs, struct wbint_PamLogOff *r)
   15506             : {
   15507             :         PyObject *py_client_name;
   15508             :         PyObject *py_client_pid;
   15509             :         PyObject *py_flags;
   15510             :         PyObject *py_user;
   15511             :         PyObject *py_krb5ccname;
   15512             :         PyObject *py_uid;
   15513           0 :         const char *kwnames[] = {
   15514             :                 "client_name", "client_pid", "flags", "user", "krb5ccname", "uid", NULL
   15515             :         };
   15516             : 
   15517           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)) {
   15518           0 :                 return false;
   15519             :         }
   15520             : 
   15521           0 :         if (py_client_name == NULL) {
   15522           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_name");
   15523           0 :                 return false;
   15524             :         }
   15525           0 :         r->in.client_name = talloc_ptrtype(r, r->in.client_name);
   15526           0 :         if (r->in.client_name == NULL) {
   15527           0 :                 PyErr_NoMemory();
   15528           0 :                 return false;
   15529             :         }
   15530             :         {
   15531             :                 const char *test_str;
   15532             :                 const char *talloc_str;
   15533           0 :                 PyObject *unicode = NULL;
   15534           0 :                 if (PyUnicode_Check(py_client_name)) {
   15535           0 :                         unicode = PyUnicode_AsEncodedString(py_client_name, "utf-8", "ignore");
   15536           0 :                         if (unicode == NULL) {
   15537           0 :                                 PyErr_NoMemory();
   15538           0 :                                 return false;
   15539             :                         }
   15540           0 :                         test_str = PyBytes_AS_STRING(unicode);
   15541           0 :                 } else if (PyBytes_Check(py_client_name)) {
   15542           0 :                         test_str = PyBytes_AS_STRING(py_client_name);
   15543             :                 } else {
   15544           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client_name)->tp_name);
   15545           0 :                         return false;
   15546             :                 }
   15547           0 :                 talloc_str = talloc_strdup(r, test_str);
   15548           0 :                 if (unicode != NULL) {
   15549           0 :                         Py_DECREF(unicode);
   15550             :                 }
   15551           0 :                 if (talloc_str == NULL) {
   15552           0 :                         PyErr_NoMemory();
   15553           0 :                         return false;
   15554             :                 }
   15555           0 :                 r->in.client_name = talloc_str;
   15556             :         }
   15557           0 :         if (py_client_pid == NULL) {
   15558           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_pid");
   15559           0 :                 return false;
   15560             :         }
   15561             :         {
   15562           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.client_pid));
   15563           0 :                 if (PyLong_Check(py_client_pid)) {
   15564             :                         unsigned long long test_var;
   15565           0 :                         test_var = PyLong_AsUnsignedLongLong(py_client_pid);
   15566           0 :                         if (PyErr_Occurred() != NULL) {
   15567           0 :                                 return false;
   15568             :                         }
   15569           0 :                         if (test_var > uint_max) {
   15570           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15571             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15572           0 :                                 return false;
   15573             :                         }
   15574           0 :                         r->in.client_pid = test_var;
   15575             :                 } else {
   15576           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15577             :                           PyLong_Type.tp_name);
   15578           0 :                         return false;
   15579             :                 }
   15580             :         }
   15581           0 :         if (py_flags == NULL) {
   15582           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   15583           0 :                 return false;
   15584             :         }
   15585             :         {
   15586           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   15587           0 :                 if (PyLong_Check(py_flags)) {
   15588             :                         unsigned long long test_var;
   15589           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   15590           0 :                         if (PyErr_Occurred() != NULL) {
   15591           0 :                                 return false;
   15592             :                         }
   15593           0 :                         if (test_var > uint_max) {
   15594           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15595             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15596           0 :                                 return false;
   15597             :                         }
   15598           0 :                         r->in.flags = test_var;
   15599             :                 } else {
   15600           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15601             :                           PyLong_Type.tp_name);
   15602           0 :                         return false;
   15603             :                 }
   15604             :         }
   15605           0 :         if (py_user == NULL) {
   15606           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.user");
   15607           0 :                 return false;
   15608             :         }
   15609           0 :         r->in.user = talloc_ptrtype(r, r->in.user);
   15610           0 :         if (r->in.user == NULL) {
   15611           0 :                 PyErr_NoMemory();
   15612           0 :                 return false;
   15613             :         }
   15614             :         {
   15615             :                 const char *test_str;
   15616             :                 const char *talloc_str;
   15617           0 :                 PyObject *unicode = NULL;
   15618           0 :                 if (PyUnicode_Check(py_user)) {
   15619           0 :                         unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
   15620           0 :                         if (unicode == NULL) {
   15621           0 :                                 PyErr_NoMemory();
   15622           0 :                                 return false;
   15623             :                         }
   15624           0 :                         test_str = PyBytes_AS_STRING(unicode);
   15625           0 :                 } else if (PyBytes_Check(py_user)) {
   15626           0 :                         test_str = PyBytes_AS_STRING(py_user);
   15627             :                 } else {
   15628           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
   15629           0 :                         return false;
   15630             :                 }
   15631           0 :                 talloc_str = talloc_strdup(r, test_str);
   15632           0 :                 if (unicode != NULL) {
   15633           0 :                         Py_DECREF(unicode);
   15634             :                 }
   15635           0 :                 if (talloc_str == NULL) {
   15636           0 :                         PyErr_NoMemory();
   15637           0 :                         return false;
   15638             :                 }
   15639           0 :                 r->in.user = talloc_str;
   15640             :         }
   15641           0 :         if (py_krb5ccname == NULL) {
   15642           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.krb5ccname");
   15643           0 :                 return false;
   15644             :         }
   15645           0 :         r->in.krb5ccname = talloc_ptrtype(r, r->in.krb5ccname);
   15646           0 :         if (r->in.krb5ccname == NULL) {
   15647           0 :                 PyErr_NoMemory();
   15648           0 :                 return false;
   15649             :         }
   15650             :         {
   15651             :                 const char *test_str;
   15652             :                 const char *talloc_str;
   15653           0 :                 PyObject *unicode = NULL;
   15654           0 :                 if (PyUnicode_Check(py_krb5ccname)) {
   15655           0 :                         unicode = PyUnicode_AsEncodedString(py_krb5ccname, "utf-8", "ignore");
   15656           0 :                         if (unicode == NULL) {
   15657           0 :                                 PyErr_NoMemory();
   15658           0 :                                 return false;
   15659             :                         }
   15660           0 :                         test_str = PyBytes_AS_STRING(unicode);
   15661           0 :                 } else if (PyBytes_Check(py_krb5ccname)) {
   15662           0 :                         test_str = PyBytes_AS_STRING(py_krb5ccname);
   15663             :                 } else {
   15664           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_krb5ccname)->tp_name);
   15665           0 :                         return false;
   15666             :                 }
   15667           0 :                 talloc_str = talloc_strdup(r, test_str);
   15668           0 :                 if (unicode != NULL) {
   15669           0 :                         Py_DECREF(unicode);
   15670             :                 }
   15671           0 :                 if (talloc_str == NULL) {
   15672           0 :                         PyErr_NoMemory();
   15673           0 :                         return false;
   15674             :                 }
   15675           0 :                 r->in.krb5ccname = talloc_str;
   15676             :         }
   15677           0 :         if (py_uid == NULL) {
   15678           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.uid");
   15679           0 :                 return false;
   15680             :         }
   15681             :         {
   15682           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.uid));
   15683           0 :                 if (PyLong_Check(py_uid)) {
   15684             :                         unsigned long long test_var;
   15685           0 :                         test_var = PyLong_AsUnsignedLongLong(py_uid);
   15686           0 :                         if (PyErr_Occurred() != NULL) {
   15687           0 :                                 return false;
   15688             :                         }
   15689           0 :                         if (test_var > uint_max) {
   15690           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15691             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15692           0 :                                 return false;
   15693             :                         }
   15694           0 :                         r->in.uid = test_var;
   15695             :                 } else {
   15696           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15697             :                           PyLong_Type.tp_name);
   15698           0 :                         return false;
   15699             :                 }
   15700             :         }
   15701           0 :         return true;
   15702             : }
   15703             : 
   15704           0 : static PyObject *unpack_py_wbint_PamLogOff_args_out(struct wbint_PamLogOff *r)
   15705             : {
   15706             :         PyObject *result;
   15707           0 :         result = Py_None;
   15708           0 :         Py_INCREF(result);
   15709           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   15710           0 :                 PyErr_SetNTSTATUS(r->out.result);
   15711           0 :                 return NULL;
   15712             :         }
   15713             : 
   15714           0 :         return result;
   15715             : }
   15716             : 
   15717             : 
   15718           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_in_get_client_name(PyObject *obj, void *closure)
   15719             : {
   15720           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(obj);
   15721             :         PyObject *py_client_name;
   15722           0 :         if (object->in.client_name == NULL) {
   15723           0 :                 Py_RETURN_NONE;
   15724             :         }
   15725           0 :         if (object->in.client_name == NULL) {
   15726           0 :                 py_client_name = Py_None;
   15727           0 :                 Py_INCREF(py_client_name);
   15728             :         } else {
   15729           0 :                 py_client_name = PyUnicode_Decode(object->in.client_name, strlen(object->in.client_name), "utf-8", "ignore");
   15730             :         }
   15731           0 :         return py_client_name;
   15732             : }
   15733             : 
   15734           0 : static int py_wbint_PamAuthCrapChangePassword_in_set_client_name(PyObject *py_obj, PyObject *value, void *closure)
   15735             : {
   15736           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   15737           0 :         if (value == NULL) {
   15738           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_name");
   15739           0 :                 return -1;
   15740             :         }
   15741           0 :         object->in.client_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.client_name);
   15742           0 :         if (object->in.client_name == NULL) {
   15743           0 :                 PyErr_NoMemory();
   15744           0 :                 return -1;
   15745             :         }
   15746             :         {
   15747             :                 const char *test_str;
   15748             :                 const char *talloc_str;
   15749           0 :                 PyObject *unicode = NULL;
   15750           0 :                 if (PyUnicode_Check(value)) {
   15751           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   15752           0 :                         if (unicode == NULL) {
   15753           0 :                                 PyErr_NoMemory();
   15754           0 :                                 return -1;
   15755             :                         }
   15756           0 :                         test_str = PyBytes_AS_STRING(unicode);
   15757           0 :                 } else if (PyBytes_Check(value)) {
   15758           0 :                         test_str = PyBytes_AS_STRING(value);
   15759             :                 } else {
   15760           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   15761           0 :                         return -1;
   15762             :                 }
   15763           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   15764           0 :                 if (unicode != NULL) {
   15765           0 :                         Py_DECREF(unicode);
   15766             :                 }
   15767           0 :                 if (talloc_str == NULL) {
   15768           0 :                         PyErr_NoMemory();
   15769           0 :                         return -1;
   15770             :                 }
   15771           0 :                 object->in.client_name = talloc_str;
   15772             :         }
   15773           0 :         return 0;
   15774             : }
   15775             : 
   15776           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_in_get_client_pid(PyObject *obj, void *closure)
   15777             : {
   15778           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(obj);
   15779             :         PyObject *py_client_pid;
   15780           0 :         py_client_pid = PyLong_FromUnsignedLongLong(object->in.client_pid);
   15781           0 :         return py_client_pid;
   15782             : }
   15783             : 
   15784           0 : static int py_wbint_PamAuthCrapChangePassword_in_set_client_pid(PyObject *py_obj, PyObject *value, void *closure)
   15785             : {
   15786           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   15787           0 :         if (value == NULL) {
   15788           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_pid");
   15789           0 :                 return -1;
   15790             :         }
   15791             :         {
   15792           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.client_pid));
   15793           0 :                 if (PyLong_Check(value)) {
   15794             :                         unsigned long long test_var;
   15795           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15796           0 :                         if (PyErr_Occurred() != NULL) {
   15797           0 :                                 return -1;
   15798             :                         }
   15799           0 :                         if (test_var > uint_max) {
   15800           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15801             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15802           0 :                                 return -1;
   15803             :                         }
   15804           0 :                         object->in.client_pid = test_var;
   15805             :                 } else {
   15806           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15807             :                           PyLong_Type.tp_name);
   15808           0 :                         return -1;
   15809             :                 }
   15810             :         }
   15811           0 :         return 0;
   15812             : }
   15813             : 
   15814           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_in_get_user(PyObject *obj, void *closure)
   15815             : {
   15816           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(obj);
   15817             :         PyObject *py_user;
   15818           0 :         if (object->in.user == NULL) {
   15819           0 :                 Py_RETURN_NONE;
   15820             :         }
   15821           0 :         if (object->in.user == NULL) {
   15822           0 :                 py_user = Py_None;
   15823           0 :                 Py_INCREF(py_user);
   15824             :         } else {
   15825           0 :                 py_user = PyUnicode_Decode(object->in.user, strlen(object->in.user), "utf-8", "ignore");
   15826             :         }
   15827           0 :         return py_user;
   15828             : }
   15829             : 
   15830           0 : static int py_wbint_PamAuthCrapChangePassword_in_set_user(PyObject *py_obj, PyObject *value, void *closure)
   15831             : {
   15832           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   15833           0 :         if (value == NULL) {
   15834           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.user");
   15835           0 :                 return -1;
   15836             :         }
   15837           0 :         object->in.user = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.user);
   15838           0 :         if (object->in.user == NULL) {
   15839           0 :                 PyErr_NoMemory();
   15840           0 :                 return -1;
   15841             :         }
   15842             :         {
   15843             :                 const char *test_str;
   15844             :                 const char *talloc_str;
   15845           0 :                 PyObject *unicode = NULL;
   15846           0 :                 if (PyUnicode_Check(value)) {
   15847           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   15848           0 :                         if (unicode == NULL) {
   15849           0 :                                 PyErr_NoMemory();
   15850           0 :                                 return -1;
   15851             :                         }
   15852           0 :                         test_str = PyBytes_AS_STRING(unicode);
   15853           0 :                 } else if (PyBytes_Check(value)) {
   15854           0 :                         test_str = PyBytes_AS_STRING(value);
   15855             :                 } else {
   15856           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   15857           0 :                         return -1;
   15858             :                 }
   15859           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   15860           0 :                 if (unicode != NULL) {
   15861           0 :                         Py_DECREF(unicode);
   15862             :                 }
   15863           0 :                 if (talloc_str == NULL) {
   15864           0 :                         PyErr_NoMemory();
   15865           0 :                         return -1;
   15866             :                 }
   15867           0 :                 object->in.user = talloc_str;
   15868             :         }
   15869           0 :         return 0;
   15870             : }
   15871             : 
   15872           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_in_get_domain(PyObject *obj, void *closure)
   15873             : {
   15874           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(obj);
   15875             :         PyObject *py_domain;
   15876           0 :         if (object->in.domain == NULL) {
   15877           0 :                 Py_RETURN_NONE;
   15878             :         }
   15879           0 :         if (object->in.domain == NULL) {
   15880           0 :                 py_domain = Py_None;
   15881           0 :                 Py_INCREF(py_domain);
   15882             :         } else {
   15883           0 :                 py_domain = PyUnicode_Decode(object->in.domain, strlen(object->in.domain), "utf-8", "ignore");
   15884             :         }
   15885           0 :         return py_domain;
   15886             : }
   15887             : 
   15888           0 : static int py_wbint_PamAuthCrapChangePassword_in_set_domain(PyObject *py_obj, PyObject *value, void *closure)
   15889             : {
   15890           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   15891           0 :         if (value == NULL) {
   15892           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain");
   15893           0 :                 return -1;
   15894             :         }
   15895           0 :         object->in.domain = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.domain);
   15896           0 :         if (object->in.domain == NULL) {
   15897           0 :                 PyErr_NoMemory();
   15898           0 :                 return -1;
   15899             :         }
   15900             :         {
   15901             :                 const char *test_str;
   15902             :                 const char *talloc_str;
   15903           0 :                 PyObject *unicode = NULL;
   15904           0 :                 if (PyUnicode_Check(value)) {
   15905           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   15906           0 :                         if (unicode == NULL) {
   15907           0 :                                 PyErr_NoMemory();
   15908           0 :                                 return -1;
   15909             :                         }
   15910           0 :                         test_str = PyBytes_AS_STRING(unicode);
   15911           0 :                 } else if (PyBytes_Check(value)) {
   15912           0 :                         test_str = PyBytes_AS_STRING(value);
   15913             :                 } else {
   15914           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   15915           0 :                         return -1;
   15916             :                 }
   15917           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   15918           0 :                 if (unicode != NULL) {
   15919           0 :                         Py_DECREF(unicode);
   15920             :                 }
   15921           0 :                 if (talloc_str == NULL) {
   15922           0 :                         PyErr_NoMemory();
   15923           0 :                         return -1;
   15924             :                 }
   15925           0 :                 object->in.domain = talloc_str;
   15926             :         }
   15927           0 :         return 0;
   15928             : }
   15929             : 
   15930           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_in_get_new_nt_pswd(PyObject *obj, void *closure)
   15931             : {
   15932           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(obj);
   15933             :         PyObject *py_new_nt_pswd;
   15934           0 :         py_new_nt_pswd = PyBytes_FromStringAndSize((char *)(object->in.new_nt_pswd).data, (object->in.new_nt_pswd).length);
   15935           0 :         return py_new_nt_pswd;
   15936             : }
   15937             : 
   15938           0 : static int py_wbint_PamAuthCrapChangePassword_in_set_new_nt_pswd(PyObject *py_obj, PyObject *value, void *closure)
   15939             : {
   15940           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   15941           0 :         if (value == NULL) {
   15942           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.new_nt_pswd");
   15943           0 :                 return -1;
   15944             :         }
   15945           0 :         object->in.new_nt_pswd = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   15946           0 :         return 0;
   15947             : }
   15948             : 
   15949           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_in_get_old_nt_hash_enc(PyObject *obj, void *closure)
   15950             : {
   15951           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(obj);
   15952             :         PyObject *py_old_nt_hash_enc;
   15953           0 :         py_old_nt_hash_enc = PyBytes_FromStringAndSize((char *)(object->in.old_nt_hash_enc).data, (object->in.old_nt_hash_enc).length);
   15954           0 :         return py_old_nt_hash_enc;
   15955             : }
   15956             : 
   15957           0 : static int py_wbint_PamAuthCrapChangePassword_in_set_old_nt_hash_enc(PyObject *py_obj, PyObject *value, void *closure)
   15958             : {
   15959           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   15960           0 :         if (value == NULL) {
   15961           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.old_nt_hash_enc");
   15962           0 :                 return -1;
   15963             :         }
   15964           0 :         object->in.old_nt_hash_enc = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   15965           0 :         return 0;
   15966             : }
   15967             : 
   15968           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_in_get_new_lm_pswd(PyObject *obj, void *closure)
   15969             : {
   15970           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(obj);
   15971             :         PyObject *py_new_lm_pswd;
   15972           0 :         py_new_lm_pswd = PyBytes_FromStringAndSize((char *)(object->in.new_lm_pswd).data, (object->in.new_lm_pswd).length);
   15973           0 :         return py_new_lm_pswd;
   15974             : }
   15975             : 
   15976           0 : static int py_wbint_PamAuthCrapChangePassword_in_set_new_lm_pswd(PyObject *py_obj, PyObject *value, void *closure)
   15977             : {
   15978           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   15979           0 :         if (value == NULL) {
   15980           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.new_lm_pswd");
   15981           0 :                 return -1;
   15982             :         }
   15983           0 :         object->in.new_lm_pswd = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   15984           0 :         return 0;
   15985             : }
   15986             : 
   15987           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_in_get_old_lm_hash_enc(PyObject *obj, void *closure)
   15988             : {
   15989           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(obj);
   15990             :         PyObject *py_old_lm_hash_enc;
   15991           0 :         py_old_lm_hash_enc = PyBytes_FromStringAndSize((char *)(object->in.old_lm_hash_enc).data, (object->in.old_lm_hash_enc).length);
   15992           0 :         return py_old_lm_hash_enc;
   15993             : }
   15994             : 
   15995           0 : static int py_wbint_PamAuthCrapChangePassword_in_set_old_lm_hash_enc(PyObject *py_obj, PyObject *value, void *closure)
   15996             : {
   15997           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   15998           0 :         if (value == NULL) {
   15999           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.old_lm_hash_enc");
   16000           0 :                 return -1;
   16001             :         }
   16002           0 :         object->in.old_lm_hash_enc = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   16003           0 :         return 0;
   16004             : }
   16005             : 
   16006           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_get_result(PyObject *obj, void *closure)
   16007             : {
   16008           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(obj);
   16009             :         PyObject *py_result;
   16010           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   16011           0 :         return py_result;
   16012             : }
   16013             : 
   16014           0 : static int py_wbint_PamAuthCrapChangePassword_set_result(PyObject *py_obj, PyObject *value, void *closure)
   16015             : {
   16016           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   16017           0 :         if (value == NULL) {
   16018           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   16019           0 :                 return -1;
   16020             :         }
   16021           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   16022           0 :         return 0;
   16023             : }
   16024             : 
   16025             : static PyGetSetDef py_wbint_PamAuthCrapChangePassword_getsetters[] = {
   16026             :         {
   16027             :                 .name = discard_const_p(char, "in_client_name"),
   16028             :                 .get = py_wbint_PamAuthCrapChangePassword_in_get_client_name,
   16029             :                 .set = py_wbint_PamAuthCrapChangePassword_in_set_client_name,
   16030             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   16031             :         },
   16032             :         {
   16033             :                 .name = discard_const_p(char, "in_client_pid"),
   16034             :                 .get = py_wbint_PamAuthCrapChangePassword_in_get_client_pid,
   16035             :                 .set = py_wbint_PamAuthCrapChangePassword_in_set_client_pid,
   16036             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   16037             :         },
   16038             :         {
   16039             :                 .name = discard_const_p(char, "in_user"),
   16040             :                 .get = py_wbint_PamAuthCrapChangePassword_in_get_user,
   16041             :                 .set = py_wbint_PamAuthCrapChangePassword_in_set_user,
   16042             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   16043             :         },
   16044             :         {
   16045             :                 .name = discard_const_p(char, "in_domain"),
   16046             :                 .get = py_wbint_PamAuthCrapChangePassword_in_get_domain,
   16047             :                 .set = py_wbint_PamAuthCrapChangePassword_in_set_domain,
   16048             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   16049             :         },
   16050             :         {
   16051             :                 .name = discard_const_p(char, "in_new_nt_pswd"),
   16052             :                 .get = py_wbint_PamAuthCrapChangePassword_in_get_new_nt_pswd,
   16053             :                 .set = py_wbint_PamAuthCrapChangePassword_in_set_new_nt_pswd,
   16054             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   16055             :         },
   16056             :         {
   16057             :                 .name = discard_const_p(char, "in_old_nt_hash_enc"),
   16058             :                 .get = py_wbint_PamAuthCrapChangePassword_in_get_old_nt_hash_enc,
   16059             :                 .set = py_wbint_PamAuthCrapChangePassword_in_set_old_nt_hash_enc,
   16060             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   16061             :         },
   16062             :         {
   16063             :                 .name = discard_const_p(char, "in_new_lm_pswd"),
   16064             :                 .get = py_wbint_PamAuthCrapChangePassword_in_get_new_lm_pswd,
   16065             :                 .set = py_wbint_PamAuthCrapChangePassword_in_set_new_lm_pswd,
   16066             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   16067             :         },
   16068             :         {
   16069             :                 .name = discard_const_p(char, "in_old_lm_hash_enc"),
   16070             :                 .get = py_wbint_PamAuthCrapChangePassword_in_get_old_lm_hash_enc,
   16071             :                 .set = py_wbint_PamAuthCrapChangePassword_in_set_old_lm_hash_enc,
   16072             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   16073             :         },
   16074             :         {
   16075             :                 .name = discard_const_p(char, "result"),
   16076             :                 .get = py_wbint_PamAuthCrapChangePassword_get_result,
   16077             :                 .set = py_wbint_PamAuthCrapChangePassword_set_result,
   16078             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   16079             :         },
   16080             :         { .name = NULL }
   16081             : };
   16082             : 
   16083           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16084             : {
   16085           0 :         PyObject *self = pytalloc_new(struct wbint_PamAuthCrapChangePassword, type);
   16086           0 :         return self;
   16087             : }
   16088             : 
   16089           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   16090             : {
   16091             : 
   16092             : 
   16093           0 :         return PyLong_FromLong(24);
   16094             : }
   16095             : 
   16096           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   16097             : {
   16098           0 :         const struct ndr_interface_call *call = NULL;
   16099           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   16100           0 :         PyObject *ret = NULL;
   16101           0 :         struct ndr_push *push = NULL;
   16102             :         DATA_BLOB blob;
   16103             :         enum ndr_err_code err;
   16104             : 
   16105           0 :         if (ndr_table_winbind.num_calls < 25) {
   16106           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuthCrapChangePassword_ndr_pack");
   16107           0 :                 return NULL;
   16108             :         }
   16109           0 :         call = &ndr_table_winbind.calls[24];
   16110             : 
   16111           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   16112           0 :         if (push == NULL) {
   16113           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   16114           0 :                 return NULL;
   16115             :         }
   16116             : 
   16117           0 :         push->flags |= ndr_push_flags;
   16118             : 
   16119           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   16120           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   16121           0 :                 TALLOC_FREE(push);
   16122           0 :                 PyErr_SetNdrError(err);
   16123           0 :                 return NULL;
   16124             :         }
   16125           0 :         blob = ndr_push_blob(push);
   16126           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   16127           0 :         TALLOC_FREE(push);
   16128           0 :         return ret;
   16129             : }
   16130             : 
   16131           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   16132             : {
   16133           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   16134           0 :         PyObject *bigendian_obj = NULL;
   16135           0 :         PyObject *ndr64_obj = NULL;
   16136           0 :         uint32_t ndr_push_flags = 0;
   16137             : 
   16138           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   16139             :                 discard_const_p(char *, kwnames),
   16140             :                 &bigendian_obj,
   16141             :                 &ndr64_obj)) {
   16142           0 :                 return NULL;
   16143             :         }
   16144             : 
   16145           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   16146           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   16147             :         }
   16148           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   16149           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   16150             :         }
   16151             : 
   16152           0 :         return py_wbint_PamAuthCrapChangePassword_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   16153             : }
   16154             : 
   16155           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   16156             : {
   16157           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   16158           0 :         PyObject *bigendian_obj = NULL;
   16159           0 :         PyObject *ndr64_obj = NULL;
   16160           0 :         uint32_t ndr_push_flags = 0;
   16161             : 
   16162           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   16163             :                 discard_const_p(char *, kwnames),
   16164             :                 &bigendian_obj,
   16165             :                 &ndr64_obj)) {
   16166           0 :                 return NULL;
   16167             :         }
   16168             : 
   16169           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   16170           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   16171             :         }
   16172           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   16173           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   16174             :         }
   16175             : 
   16176           0 :         return py_wbint_PamAuthCrapChangePassword_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   16177             : }
   16178             : 
   16179           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   16180             : {
   16181           0 :         const struct ndr_interface_call *call = NULL;
   16182           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   16183           0 :         struct ndr_pull *pull = NULL;
   16184             :         enum ndr_err_code err;
   16185             : 
   16186           0 :         if (ndr_table_winbind.num_calls < 25) {
   16187           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuthCrapChangePassword_ndr_unpack");
   16188           0 :                 return NULL;
   16189             :         }
   16190           0 :         call = &ndr_table_winbind.calls[24];
   16191             : 
   16192           0 :         pull = ndr_pull_init_blob(blob, object);
   16193           0 :         if (pull == NULL) {
   16194           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   16195           0 :                 return NULL;
   16196             :         }
   16197             : 
   16198           0 :         pull->flags |= ndr_pull_flags;
   16199             : 
   16200           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   16201           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   16202           0 :                 TALLOC_FREE(pull);
   16203           0 :                 PyErr_SetNdrError(err);
   16204           0 :                 return NULL;
   16205             :         }
   16206           0 :         if (!allow_remaining) {
   16207             :                 uint32_t highest_ofs;
   16208             : 
   16209           0 :                 if (pull->offset > pull->relative_highest_offset) {
   16210           0 :                         highest_ofs = pull->offset;
   16211             :                 } else {
   16212           0 :                         highest_ofs = pull->relative_highest_offset;
   16213             :                 }
   16214           0 :                 if (highest_ofs < pull->data_size) {
   16215           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   16216             :                                 "not all bytes consumed ofs[%u] size[%u]",
   16217             :                                 highest_ofs, pull->data_size);
   16218           0 :                         TALLOC_FREE(pull);
   16219           0 :                         PyErr_SetNdrError(err);
   16220           0 :                         return NULL;
   16221             :                 }
   16222             :         }
   16223             : 
   16224           0 :         TALLOC_FREE(pull);
   16225           0 :         Py_RETURN_NONE;
   16226             : }
   16227             : 
   16228           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   16229             : {
   16230             :         DATA_BLOB blob;
   16231           0 :         Py_ssize_t blob_length = 0;
   16232           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   16233           0 :         PyObject *bigendian_obj = NULL;
   16234           0 :         PyObject *ndr64_obj = NULL;
   16235           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   16236           0 :         PyObject *allow_remaining_obj = NULL;
   16237           0 :         bool allow_remaining = false;
   16238             : 
   16239           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   16240             :                 discard_const_p(char *, kwnames),
   16241             :                 &blob.data, &blob_length,
   16242             :                 &bigendian_obj,
   16243             :                 &ndr64_obj,
   16244             :                 &allow_remaining_obj)) {
   16245           0 :                 return NULL;
   16246             :         }
   16247           0 :         blob.length = blob_length;
   16248             : 
   16249           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   16250           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   16251             :         }
   16252           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   16253           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   16254             :         }
   16255             : 
   16256           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   16257           0 :                 allow_remaining = true;
   16258             :         }
   16259             : 
   16260           0 :         return py_wbint_PamAuthCrapChangePassword_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   16261             : }
   16262             : 
   16263           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   16264             : {
   16265             :         DATA_BLOB blob;
   16266           0 :         Py_ssize_t blob_length = 0;
   16267           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   16268           0 :         PyObject *bigendian_obj = NULL;
   16269           0 :         PyObject *ndr64_obj = NULL;
   16270           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   16271           0 :         PyObject *allow_remaining_obj = NULL;
   16272           0 :         bool allow_remaining = false;
   16273             : 
   16274           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   16275             :                 discard_const_p(char *, kwnames),
   16276             :                 &blob.data, &blob_length,
   16277             :                 &bigendian_obj,
   16278             :                 &ndr64_obj,
   16279             :                 &allow_remaining_obj)) {
   16280           0 :                 return NULL;
   16281             :         }
   16282           0 :         blob.length = blob_length;
   16283             : 
   16284           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   16285           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   16286             :         }
   16287           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   16288           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   16289             :         }
   16290             : 
   16291           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   16292           0 :                 allow_remaining = true;
   16293             :         }
   16294             : 
   16295           0 :         return py_wbint_PamAuthCrapChangePassword_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   16296             : }
   16297             : 
   16298           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   16299             : {
   16300           0 :         const struct ndr_interface_call *call = NULL;
   16301           0 :         struct wbint_PamAuthCrapChangePassword *object = (struct wbint_PamAuthCrapChangePassword *)pytalloc_get_ptr(py_obj);
   16302             :         PyObject *ret;
   16303             :         char *retstr;
   16304             : 
   16305           0 :         if (ndr_table_winbind.num_calls < 25) {
   16306           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuthCrapChangePassword_ndr_print");
   16307           0 :                 return NULL;
   16308             :         }
   16309           0 :         call = &ndr_table_winbind.calls[24];
   16310             : 
   16311           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   16312           0 :         ret = PyUnicode_FromString(retstr);
   16313           0 :         TALLOC_FREE(retstr);
   16314             : 
   16315           0 :         return ret;
   16316             : }
   16317             : 
   16318           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   16319             : {
   16320           0 :         return py_wbint_PamAuthCrapChangePassword_ndr_print(py_obj, "wbint_PamAuthCrapChangePassword_in", NDR_IN);
   16321             : }
   16322             : 
   16323           0 : static PyObject *py_wbint_PamAuthCrapChangePassword_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   16324             : {
   16325           0 :         return py_wbint_PamAuthCrapChangePassword_ndr_print(py_obj, "wbint_PamAuthCrapChangePassword_out", NDR_OUT);
   16326             : }
   16327             : 
   16328             : static PyMethodDef py_wbint_PamAuthCrapChangePassword_methods[] = {
   16329             :         { "opnum", (PyCFunction)py_wbint_PamAuthCrapChangePassword_ndr_opnum, METH_NOARGS|METH_CLASS,
   16330             :                 "winbind.wbint_PamAuthCrapChangePassword.opnum() -> 24 (0x18) " },
   16331             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthCrapChangePassword_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   16332             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   16333             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthCrapChangePassword_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   16334             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   16335             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthCrapChangePassword_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   16336             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   16337             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthCrapChangePassword_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   16338             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   16339             :         { "__ndr_print_in__", (PyCFunction)py_wbint_PamAuthCrapChangePassword_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   16340             :         { "__ndr_print_out__", (PyCFunction)py_wbint_PamAuthCrapChangePassword_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   16341             :         { NULL, NULL, 0, NULL }
   16342             : };
   16343             : 
   16344             : 
   16345             : static PyTypeObject wbint_PamAuthCrapChangePassword_Type = {
   16346             :         PyVarObject_HEAD_INIT(NULL, 0)
   16347             :         .tp_name = "winbind.wbint_PamAuthCrapChangePassword",
   16348             :         .tp_getset = py_wbint_PamAuthCrapChangePassword_getsetters,
   16349             :         .tp_methods = py_wbint_PamAuthCrapChangePassword_methods,
   16350             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16351             :         .tp_new = py_wbint_PamAuthCrapChangePassword_new,
   16352             : };
   16353             : 
   16354           0 : static bool pack_py_wbint_PamAuthCrapChangePassword_args_in(PyObject *args, PyObject *kwargs, struct wbint_PamAuthCrapChangePassword *r)
   16355             : {
   16356             :         PyObject *py_client_name;
   16357             :         PyObject *py_client_pid;
   16358             :         PyObject *py_user;
   16359             :         PyObject *py_domain;
   16360             :         PyObject *py_new_nt_pswd;
   16361             :         PyObject *py_old_nt_hash_enc;
   16362             :         PyObject *py_new_lm_pswd;
   16363             :         PyObject *py_old_lm_hash_enc;
   16364           0 :         const char *kwnames[] = {
   16365             :                 "client_name", "client_pid", "user", "domain", "new_nt_pswd", "old_nt_hash_enc", "new_lm_pswd", "old_lm_hash_enc", NULL
   16366             :         };
   16367             : 
   16368           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)) {
   16369           0 :                 return false;
   16370             :         }
   16371             : 
   16372           0 :         if (py_client_name == NULL) {
   16373           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_name");
   16374           0 :                 return false;
   16375             :         }
   16376           0 :         r->in.client_name = talloc_ptrtype(r, r->in.client_name);
   16377           0 :         if (r->in.client_name == NULL) {
   16378           0 :                 PyErr_NoMemory();
   16379           0 :                 return false;
   16380             :         }
   16381             :         {
   16382             :                 const char *test_str;
   16383             :                 const char *talloc_str;
   16384           0 :                 PyObject *unicode = NULL;
   16385           0 :                 if (PyUnicode_Check(py_client_name)) {
   16386           0 :                         unicode = PyUnicode_AsEncodedString(py_client_name, "utf-8", "ignore");
   16387           0 :                         if (unicode == NULL) {
   16388           0 :                                 PyErr_NoMemory();
   16389           0 :                                 return false;
   16390             :                         }
   16391           0 :                         test_str = PyBytes_AS_STRING(unicode);
   16392           0 :                 } else if (PyBytes_Check(py_client_name)) {
   16393           0 :                         test_str = PyBytes_AS_STRING(py_client_name);
   16394             :                 } else {
   16395           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client_name)->tp_name);
   16396           0 :                         return false;
   16397             :                 }
   16398           0 :                 talloc_str = talloc_strdup(r, test_str);
   16399           0 :                 if (unicode != NULL) {
   16400           0 :                         Py_DECREF(unicode);
   16401             :                 }
   16402           0 :                 if (talloc_str == NULL) {
   16403           0 :                         PyErr_NoMemory();
   16404           0 :                         return false;
   16405             :                 }
   16406           0 :                 r->in.client_name = talloc_str;
   16407             :         }
   16408           0 :         if (py_client_pid == NULL) {
   16409           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_pid");
   16410           0 :                 return false;
   16411             :         }
   16412             :         {
   16413           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.client_pid));
   16414           0 :                 if (PyLong_Check(py_client_pid)) {
   16415             :                         unsigned long long test_var;
   16416           0 :                         test_var = PyLong_AsUnsignedLongLong(py_client_pid);
   16417           0 :                         if (PyErr_Occurred() != NULL) {
   16418           0 :                                 return false;
   16419             :                         }
   16420           0 :                         if (test_var > uint_max) {
   16421           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16422             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16423           0 :                                 return false;
   16424             :                         }
   16425           0 :                         r->in.client_pid = test_var;
   16426             :                 } else {
   16427           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16428             :                           PyLong_Type.tp_name);
   16429           0 :                         return false;
   16430             :                 }
   16431             :         }
   16432           0 :         if (py_user == NULL) {
   16433           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.user");
   16434           0 :                 return false;
   16435             :         }
   16436           0 :         r->in.user = talloc_ptrtype(r, r->in.user);
   16437           0 :         if (r->in.user == NULL) {
   16438           0 :                 PyErr_NoMemory();
   16439           0 :                 return false;
   16440             :         }
   16441             :         {
   16442             :                 const char *test_str;
   16443             :                 const char *talloc_str;
   16444           0 :                 PyObject *unicode = NULL;
   16445           0 :                 if (PyUnicode_Check(py_user)) {
   16446           0 :                         unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
   16447           0 :                         if (unicode == NULL) {
   16448           0 :                                 PyErr_NoMemory();
   16449           0 :                                 return false;
   16450             :                         }
   16451           0 :                         test_str = PyBytes_AS_STRING(unicode);
   16452           0 :                 } else if (PyBytes_Check(py_user)) {
   16453           0 :                         test_str = PyBytes_AS_STRING(py_user);
   16454             :                 } else {
   16455           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
   16456           0 :                         return false;
   16457             :                 }
   16458           0 :                 talloc_str = talloc_strdup(r, test_str);
   16459           0 :                 if (unicode != NULL) {
   16460           0 :                         Py_DECREF(unicode);
   16461             :                 }
   16462           0 :                 if (talloc_str == NULL) {
   16463           0 :                         PyErr_NoMemory();
   16464           0 :                         return false;
   16465             :                 }
   16466           0 :                 r->in.user = talloc_str;
   16467             :         }
   16468           0 :         if (py_domain == NULL) {
   16469           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain");
   16470           0 :                 return false;
   16471             :         }
   16472           0 :         r->in.domain = talloc_ptrtype(r, r->in.domain);
   16473           0 :         if (r->in.domain == NULL) {
   16474           0 :                 PyErr_NoMemory();
   16475           0 :                 return false;
   16476             :         }
   16477             :         {
   16478             :                 const char *test_str;
   16479             :                 const char *talloc_str;
   16480           0 :                 PyObject *unicode = NULL;
   16481           0 :                 if (PyUnicode_Check(py_domain)) {
   16482           0 :                         unicode = PyUnicode_AsEncodedString(py_domain, "utf-8", "ignore");
   16483           0 :                         if (unicode == NULL) {
   16484           0 :                                 PyErr_NoMemory();
   16485           0 :                                 return false;
   16486             :                         }
   16487           0 :                         test_str = PyBytes_AS_STRING(unicode);
   16488           0 :                 } else if (PyBytes_Check(py_domain)) {
   16489           0 :                         test_str = PyBytes_AS_STRING(py_domain);
   16490             :                 } else {
   16491           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain)->tp_name);
   16492           0 :                         return false;
   16493             :                 }
   16494           0 :                 talloc_str = talloc_strdup(r, test_str);
   16495           0 :                 if (unicode != NULL) {
   16496           0 :                         Py_DECREF(unicode);
   16497             :                 }
   16498           0 :                 if (talloc_str == NULL) {
   16499           0 :                         PyErr_NoMemory();
   16500           0 :                         return false;
   16501             :                 }
   16502           0 :                 r->in.domain = talloc_str;
   16503             :         }
   16504           0 :         if (py_new_nt_pswd == NULL) {
   16505           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.new_nt_pswd");
   16506           0 :                 return false;
   16507             :         }
   16508           0 :         r->in.new_nt_pswd = data_blob_talloc(r, PyBytes_AS_STRING(py_new_nt_pswd), PyBytes_GET_SIZE(py_new_nt_pswd));
   16509           0 :         if (py_old_nt_hash_enc == NULL) {
   16510           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.old_nt_hash_enc");
   16511           0 :                 return false;
   16512             :         }
   16513           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));
   16514           0 :         if (py_new_lm_pswd == NULL) {
   16515           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.new_lm_pswd");
   16516           0 :                 return false;
   16517             :         }
   16518           0 :         r->in.new_lm_pswd = data_blob_talloc(r, PyBytes_AS_STRING(py_new_lm_pswd), PyBytes_GET_SIZE(py_new_lm_pswd));
   16519           0 :         if (py_old_lm_hash_enc == NULL) {
   16520           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.old_lm_hash_enc");
   16521           0 :                 return false;
   16522             :         }
   16523           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));
   16524           0 :         return true;
   16525             : }
   16526             : 
   16527           0 : static PyObject *unpack_py_wbint_PamAuthCrapChangePassword_args_out(struct wbint_PamAuthCrapChangePassword *r)
   16528             : {
   16529             :         PyObject *result;
   16530           0 :         result = Py_None;
   16531           0 :         Py_INCREF(result);
   16532           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   16533           0 :                 PyErr_SetNTSTATUS(r->out.result);
   16534           0 :                 return NULL;
   16535             :         }
   16536             : 
   16537           0 :         return result;
   16538             : }
   16539             : 
   16540             : 
   16541           0 : static PyObject *py_wbint_PamAuthChangePassword_in_get_client_name(PyObject *obj, void *closure)
   16542             : {
   16543           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(obj);
   16544             :         PyObject *py_client_name;
   16545           0 :         if (object->in.client_name == NULL) {
   16546           0 :                 Py_RETURN_NONE;
   16547             :         }
   16548           0 :         if (object->in.client_name == NULL) {
   16549           0 :                 py_client_name = Py_None;
   16550           0 :                 Py_INCREF(py_client_name);
   16551             :         } else {
   16552           0 :                 py_client_name = PyUnicode_Decode(object->in.client_name, strlen(object->in.client_name), "utf-8", "ignore");
   16553             :         }
   16554           0 :         return py_client_name;
   16555             : }
   16556             : 
   16557           0 : static int py_wbint_PamAuthChangePassword_in_set_client_name(PyObject *py_obj, PyObject *value, void *closure)
   16558             : {
   16559           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   16560           0 :         if (value == NULL) {
   16561           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_name");
   16562           0 :                 return -1;
   16563             :         }
   16564           0 :         object->in.client_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.client_name);
   16565           0 :         if (object->in.client_name == NULL) {
   16566           0 :                 PyErr_NoMemory();
   16567           0 :                 return -1;
   16568             :         }
   16569             :         {
   16570             :                 const char *test_str;
   16571             :                 const char *talloc_str;
   16572           0 :                 PyObject *unicode = NULL;
   16573           0 :                 if (PyUnicode_Check(value)) {
   16574           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   16575           0 :                         if (unicode == NULL) {
   16576           0 :                                 PyErr_NoMemory();
   16577           0 :                                 return -1;
   16578             :                         }
   16579           0 :                         test_str = PyBytes_AS_STRING(unicode);
   16580           0 :                 } else if (PyBytes_Check(value)) {
   16581           0 :                         test_str = PyBytes_AS_STRING(value);
   16582             :                 } else {
   16583           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   16584           0 :                         return -1;
   16585             :                 }
   16586           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   16587           0 :                 if (unicode != NULL) {
   16588           0 :                         Py_DECREF(unicode);
   16589             :                 }
   16590           0 :                 if (talloc_str == NULL) {
   16591           0 :                         PyErr_NoMemory();
   16592           0 :                         return -1;
   16593             :                 }
   16594           0 :                 object->in.client_name = talloc_str;
   16595             :         }
   16596           0 :         return 0;
   16597             : }
   16598             : 
   16599           0 : static PyObject *py_wbint_PamAuthChangePassword_in_get_client_pid(PyObject *obj, void *closure)
   16600             : {
   16601           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(obj);
   16602             :         PyObject *py_client_pid;
   16603           0 :         py_client_pid = PyLong_FromUnsignedLongLong(object->in.client_pid);
   16604           0 :         return py_client_pid;
   16605             : }
   16606             : 
   16607           0 : static int py_wbint_PamAuthChangePassword_in_set_client_pid(PyObject *py_obj, PyObject *value, void *closure)
   16608             : {
   16609           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   16610           0 :         if (value == NULL) {
   16611           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_pid");
   16612           0 :                 return -1;
   16613             :         }
   16614             :         {
   16615           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.client_pid));
   16616           0 :                 if (PyLong_Check(value)) {
   16617             :                         unsigned long long test_var;
   16618           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16619           0 :                         if (PyErr_Occurred() != NULL) {
   16620           0 :                                 return -1;
   16621             :                         }
   16622           0 :                         if (test_var > uint_max) {
   16623           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16624             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16625           0 :                                 return -1;
   16626             :                         }
   16627           0 :                         object->in.client_pid = test_var;
   16628             :                 } else {
   16629           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16630             :                           PyLong_Type.tp_name);
   16631           0 :                         return -1;
   16632             :                 }
   16633             :         }
   16634           0 :         return 0;
   16635             : }
   16636             : 
   16637           0 : static PyObject *py_wbint_PamAuthChangePassword_in_get_flags(PyObject *obj, void *closure)
   16638             : {
   16639           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(obj);
   16640             :         PyObject *py_flags;
   16641           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   16642           0 :         return py_flags;
   16643             : }
   16644             : 
   16645           0 : static int py_wbint_PamAuthChangePassword_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   16646             : {
   16647           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   16648           0 :         if (value == NULL) {
   16649           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   16650           0 :                 return -1;
   16651             :         }
   16652             :         {
   16653           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   16654           0 :                 if (PyLong_Check(value)) {
   16655             :                         unsigned long long test_var;
   16656           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16657           0 :                         if (PyErr_Occurred() != NULL) {
   16658           0 :                                 return -1;
   16659             :                         }
   16660           0 :                         if (test_var > uint_max) {
   16661           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16662             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16663           0 :                                 return -1;
   16664             :                         }
   16665           0 :                         object->in.flags = test_var;
   16666             :                 } else {
   16667           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16668             :                           PyLong_Type.tp_name);
   16669           0 :                         return -1;
   16670             :                 }
   16671             :         }
   16672           0 :         return 0;
   16673             : }
   16674             : 
   16675           0 : static PyObject *py_wbint_PamAuthChangePassword_in_get_user(PyObject *obj, void *closure)
   16676             : {
   16677           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(obj);
   16678             :         PyObject *py_user;
   16679           0 :         if (object->in.user == NULL) {
   16680           0 :                 Py_RETURN_NONE;
   16681             :         }
   16682           0 :         if (object->in.user == NULL) {
   16683           0 :                 py_user = Py_None;
   16684           0 :                 Py_INCREF(py_user);
   16685             :         } else {
   16686           0 :                 py_user = PyUnicode_Decode(object->in.user, strlen(object->in.user), "utf-8", "ignore");
   16687             :         }
   16688           0 :         return py_user;
   16689             : }
   16690             : 
   16691           0 : static int py_wbint_PamAuthChangePassword_in_set_user(PyObject *py_obj, PyObject *value, void *closure)
   16692             : {
   16693           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   16694           0 :         if (value == NULL) {
   16695           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.user");
   16696           0 :                 return -1;
   16697             :         }
   16698           0 :         object->in.user = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.user);
   16699           0 :         if (object->in.user == NULL) {
   16700           0 :                 PyErr_NoMemory();
   16701           0 :                 return -1;
   16702             :         }
   16703             :         {
   16704             :                 const char *test_str;
   16705             :                 const char *talloc_str;
   16706           0 :                 PyObject *unicode = NULL;
   16707           0 :                 if (PyUnicode_Check(value)) {
   16708           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   16709           0 :                         if (unicode == NULL) {
   16710           0 :                                 PyErr_NoMemory();
   16711           0 :                                 return -1;
   16712             :                         }
   16713           0 :                         test_str = PyBytes_AS_STRING(unicode);
   16714           0 :                 } else if (PyBytes_Check(value)) {
   16715           0 :                         test_str = PyBytes_AS_STRING(value);
   16716             :                 } else {
   16717           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   16718           0 :                         return -1;
   16719             :                 }
   16720           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   16721           0 :                 if (unicode != NULL) {
   16722           0 :                         Py_DECREF(unicode);
   16723             :                 }
   16724           0 :                 if (talloc_str == NULL) {
   16725           0 :                         PyErr_NoMemory();
   16726           0 :                         return -1;
   16727             :                 }
   16728           0 :                 object->in.user = talloc_str;
   16729             :         }
   16730           0 :         return 0;
   16731             : }
   16732             : 
   16733           0 : static PyObject *py_wbint_PamAuthChangePassword_in_get_old_password(PyObject *obj, void *closure)
   16734             : {
   16735           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(obj);
   16736             :         PyObject *py_old_password;
   16737           0 :         if (object->in.old_password == NULL) {
   16738           0 :                 Py_RETURN_NONE;
   16739             :         }
   16740           0 :         if (object->in.old_password == NULL) {
   16741           0 :                 py_old_password = Py_None;
   16742           0 :                 Py_INCREF(py_old_password);
   16743             :         } else {
   16744           0 :                 py_old_password = PyUnicode_Decode(object->in.old_password, strlen(object->in.old_password), "utf-8", "ignore");
   16745             :         }
   16746           0 :         return py_old_password;
   16747             : }
   16748             : 
   16749           0 : static int py_wbint_PamAuthChangePassword_in_set_old_password(PyObject *py_obj, PyObject *value, void *closure)
   16750             : {
   16751           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   16752           0 :         if (value == NULL) {
   16753           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.old_password");
   16754           0 :                 return -1;
   16755             :         }
   16756           0 :         object->in.old_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.old_password);
   16757           0 :         if (object->in.old_password == NULL) {
   16758           0 :                 PyErr_NoMemory();
   16759           0 :                 return -1;
   16760             :         }
   16761             :         {
   16762             :                 const char *test_str;
   16763             :                 const char *talloc_str;
   16764           0 :                 PyObject *unicode = NULL;
   16765           0 :                 if (PyUnicode_Check(value)) {
   16766           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   16767           0 :                         if (unicode == NULL) {
   16768           0 :                                 PyErr_NoMemory();
   16769           0 :                                 return -1;
   16770             :                         }
   16771           0 :                         test_str = PyBytes_AS_STRING(unicode);
   16772           0 :                 } else if (PyBytes_Check(value)) {
   16773           0 :                         test_str = PyBytes_AS_STRING(value);
   16774             :                 } else {
   16775           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   16776           0 :                         return -1;
   16777             :                 }
   16778           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   16779           0 :                 if (unicode != NULL) {
   16780           0 :                         Py_DECREF(unicode);
   16781             :                 }
   16782           0 :                 if (talloc_str == NULL) {
   16783           0 :                         PyErr_NoMemory();
   16784           0 :                         return -1;
   16785             :                 }
   16786           0 :                 object->in.old_password = talloc_str;
   16787             :         }
   16788           0 :         return 0;
   16789             : }
   16790             : 
   16791           0 : static PyObject *py_wbint_PamAuthChangePassword_in_get_new_password(PyObject *obj, void *closure)
   16792             : {
   16793           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(obj);
   16794             :         PyObject *py_new_password;
   16795           0 :         if (object->in.new_password == NULL) {
   16796           0 :                 Py_RETURN_NONE;
   16797             :         }
   16798           0 :         if (object->in.new_password == NULL) {
   16799           0 :                 py_new_password = Py_None;
   16800           0 :                 Py_INCREF(py_new_password);
   16801             :         } else {
   16802           0 :                 py_new_password = PyUnicode_Decode(object->in.new_password, strlen(object->in.new_password), "utf-8", "ignore");
   16803             :         }
   16804           0 :         return py_new_password;
   16805             : }
   16806             : 
   16807           0 : static int py_wbint_PamAuthChangePassword_in_set_new_password(PyObject *py_obj, PyObject *value, void *closure)
   16808             : {
   16809           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   16810           0 :         if (value == NULL) {
   16811           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.new_password");
   16812           0 :                 return -1;
   16813             :         }
   16814           0 :         object->in.new_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.new_password);
   16815           0 :         if (object->in.new_password == NULL) {
   16816           0 :                 PyErr_NoMemory();
   16817           0 :                 return -1;
   16818             :         }
   16819             :         {
   16820             :                 const char *test_str;
   16821             :                 const char *talloc_str;
   16822           0 :                 PyObject *unicode = NULL;
   16823           0 :                 if (PyUnicode_Check(value)) {
   16824           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   16825           0 :                         if (unicode == NULL) {
   16826           0 :                                 PyErr_NoMemory();
   16827           0 :                                 return -1;
   16828             :                         }
   16829           0 :                         test_str = PyBytes_AS_STRING(unicode);
   16830           0 :                 } else if (PyBytes_Check(value)) {
   16831           0 :                         test_str = PyBytes_AS_STRING(value);
   16832             :                 } else {
   16833           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   16834           0 :                         return -1;
   16835             :                 }
   16836           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   16837           0 :                 if (unicode != NULL) {
   16838           0 :                         Py_DECREF(unicode);
   16839             :                 }
   16840           0 :                 if (talloc_str == NULL) {
   16841           0 :                         PyErr_NoMemory();
   16842           0 :                         return -1;
   16843             :                 }
   16844           0 :                 object->in.new_password = talloc_str;
   16845             :         }
   16846           0 :         return 0;
   16847             : }
   16848             : 
   16849           0 : static PyObject *py_wbint_PamAuthChangePassword_out_get_dominfo(PyObject *obj, void *closure)
   16850             : {
   16851           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(obj);
   16852             :         PyObject *py_dominfo;
   16853           0 :         if (object->out.dominfo == NULL) {
   16854           0 :                 Py_RETURN_NONE;
   16855             :         }
   16856           0 :         if (*object->out.dominfo == NULL) {
   16857           0 :                 py_dominfo = Py_None;
   16858           0 :                 Py_INCREF(py_dominfo);
   16859             :         } else {
   16860           0 :                 py_dominfo = pytalloc_reference_ex(samr_DomInfo1_Type, *object->out.dominfo, *object->out.dominfo);
   16861             :         }
   16862           0 :         return py_dominfo;
   16863             : }
   16864             : 
   16865           0 : static int py_wbint_PamAuthChangePassword_out_set_dominfo(PyObject *py_obj, PyObject *value, void *closure)
   16866             : {
   16867           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   16868           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dominfo));
   16869           0 :         if (value == NULL) {
   16870           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.dominfo");
   16871           0 :                 return -1;
   16872             :         }
   16873           0 :         object->out.dominfo = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dominfo);
   16874           0 :         if (object->out.dominfo == NULL) {
   16875           0 :                 PyErr_NoMemory();
   16876           0 :                 return -1;
   16877             :         }
   16878           0 :         if (value == Py_None) {
   16879           0 :                 *object->out.dominfo = NULL;
   16880             :         } else {
   16881           0 :                 *object->out.dominfo = NULL;
   16882           0 :                 PY_CHECK_TYPE(samr_DomInfo1_Type, value, return -1;);
   16883           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   16884           0 :                         PyErr_NoMemory();
   16885           0 :                         return -1;
   16886             :                 }
   16887           0 :                 *object->out.dominfo = (struct samr_DomInfo1 *)pytalloc_get_ptr(value);
   16888             :         }
   16889           0 :         return 0;
   16890             : }
   16891             : 
   16892           0 : static PyObject *py_wbint_PamAuthChangePassword_out_get_reject_reason(PyObject *obj, void *closure)
   16893             : {
   16894           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(obj);
   16895             :         PyObject *py_reject_reason;
   16896           0 :         if (object->out.reject_reason == NULL) {
   16897           0 :                 Py_RETURN_NONE;
   16898             :         }
   16899           0 :         py_reject_reason = PyLong_FromUnsignedLongLong((uint32_t)*object->out.reject_reason);
   16900           0 :         return py_reject_reason;
   16901             : }
   16902             : 
   16903           0 : static int py_wbint_PamAuthChangePassword_out_set_reject_reason(PyObject *py_obj, PyObject *value, void *closure)
   16904             : {
   16905           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   16906           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.reject_reason));
   16907           0 :         if (value == NULL) {
   16908           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.reject_reason");
   16909           0 :                 return -1;
   16910             :         }
   16911           0 :         object->out.reject_reason = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.reject_reason);
   16912           0 :         if (object->out.reject_reason == NULL) {
   16913           0 :                 PyErr_NoMemory();
   16914           0 :                 return -1;
   16915             :         }
   16916             :         {
   16917           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.reject_reason));
   16918           0 :                 if (PyLong_Check(value)) {
   16919             :                         unsigned long long test_var;
   16920           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16921           0 :                         if (PyErr_Occurred() != NULL) {
   16922           0 :                                 return -1;
   16923             :                         }
   16924           0 :                         if (test_var > uint_max) {
   16925           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16926             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16927           0 :                                 return -1;
   16928             :                         }
   16929           0 :                         *object->out.reject_reason = test_var;
   16930             :                 } else {
   16931           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16932             :                           PyLong_Type.tp_name);
   16933           0 :                         return -1;
   16934             :                 }
   16935             :         }
   16936           0 :         return 0;
   16937             : }
   16938             : 
   16939           0 : static PyObject *py_wbint_PamAuthChangePassword_get_result(PyObject *obj, void *closure)
   16940             : {
   16941           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(obj);
   16942             :         PyObject *py_result;
   16943           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   16944           0 :         return py_result;
   16945             : }
   16946             : 
   16947           0 : static int py_wbint_PamAuthChangePassword_set_result(PyObject *py_obj, PyObject *value, void *closure)
   16948             : {
   16949           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   16950           0 :         if (value == NULL) {
   16951           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   16952           0 :                 return -1;
   16953             :         }
   16954           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   16955           0 :         return 0;
   16956             : }
   16957             : 
   16958             : static PyGetSetDef py_wbint_PamAuthChangePassword_getsetters[] = {
   16959             :         {
   16960             :                 .name = discard_const_p(char, "in_client_name"),
   16961             :                 .get = py_wbint_PamAuthChangePassword_in_get_client_name,
   16962             :                 .set = py_wbint_PamAuthChangePassword_in_set_client_name,
   16963             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   16964             :         },
   16965             :         {
   16966             :                 .name = discard_const_p(char, "in_client_pid"),
   16967             :                 .get = py_wbint_PamAuthChangePassword_in_get_client_pid,
   16968             :                 .set = py_wbint_PamAuthChangePassword_in_set_client_pid,
   16969             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   16970             :         },
   16971             :         {
   16972             :                 .name = discard_const_p(char, "in_flags"),
   16973             :                 .get = py_wbint_PamAuthChangePassword_in_get_flags,
   16974             :                 .set = py_wbint_PamAuthChangePassword_in_set_flags,
   16975             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16976             :         },
   16977             :         {
   16978             :                 .name = discard_const_p(char, "in_user"),
   16979             :                 .get = py_wbint_PamAuthChangePassword_in_get_user,
   16980             :                 .set = py_wbint_PamAuthChangePassword_in_set_user,
   16981             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   16982             :         },
   16983             :         {
   16984             :                 .name = discard_const_p(char, "in_old_password"),
   16985             :                 .get = py_wbint_PamAuthChangePassword_in_get_old_password,
   16986             :                 .set = py_wbint_PamAuthChangePassword_in_set_old_password,
   16987             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   16988             :         },
   16989             :         {
   16990             :                 .name = discard_const_p(char, "in_new_password"),
   16991             :                 .get = py_wbint_PamAuthChangePassword_in_get_new_password,
   16992             :                 .set = py_wbint_PamAuthChangePassword_in_set_new_password,
   16993             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   16994             :         },
   16995             :         {
   16996             :                 .name = discard_const_p(char, "out_dominfo"),
   16997             :                 .get = py_wbint_PamAuthChangePassword_out_get_dominfo,
   16998             :                 .set = py_wbint_PamAuthChangePassword_out_set_dominfo,
   16999             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_DomInfo1")
   17000             :         },
   17001             :         {
   17002             :                 .name = discard_const_p(char, "out_reject_reason"),
   17003             :                 .get = py_wbint_PamAuthChangePassword_out_get_reject_reason,
   17004             :                 .set = py_wbint_PamAuthChangePassword_out_set_reject_reason,
   17005             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samPwdChangeReason")
   17006             :         },
   17007             :         {
   17008             :                 .name = discard_const_p(char, "result"),
   17009             :                 .get = py_wbint_PamAuthChangePassword_get_result,
   17010             :                 .set = py_wbint_PamAuthChangePassword_set_result,
   17011             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   17012             :         },
   17013             :         { .name = NULL }
   17014             : };
   17015             : 
   17016           0 : static PyObject *py_wbint_PamAuthChangePassword_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17017             : {
   17018           0 :         PyObject *self = pytalloc_new(struct wbint_PamAuthChangePassword, type);
   17019           0 :         struct wbint_PamAuthChangePassword *_self = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(self);
   17020           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   17021             :         /* a pointer to a NULL pointer */
   17022           0 :         _self->out.dominfo = talloc_zero(mem_ctx, struct samr_DomInfo1 *);
   17023           0 :         _self->out.reject_reason = talloc_zero(mem_ctx, enum samPwdChangeReason);
   17024           0 :         return self;
   17025             : }
   17026             : 
   17027           0 : static PyObject *py_wbint_PamAuthChangePassword_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   17028             : {
   17029             : 
   17030             : 
   17031           0 :         return PyLong_FromLong(25);
   17032             : }
   17033             : 
   17034           0 : static PyObject *py_wbint_PamAuthChangePassword_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   17035             : {
   17036           0 :         const struct ndr_interface_call *call = NULL;
   17037           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   17038           0 :         PyObject *ret = NULL;
   17039           0 :         struct ndr_push *push = NULL;
   17040             :         DATA_BLOB blob;
   17041             :         enum ndr_err_code err;
   17042             : 
   17043           0 :         if (ndr_table_winbind.num_calls < 26) {
   17044           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuthChangePassword_ndr_pack");
   17045           0 :                 return NULL;
   17046             :         }
   17047           0 :         call = &ndr_table_winbind.calls[25];
   17048             : 
   17049           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   17050           0 :         if (push == NULL) {
   17051           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   17052           0 :                 return NULL;
   17053             :         }
   17054             : 
   17055           0 :         push->flags |= ndr_push_flags;
   17056             : 
   17057           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   17058           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   17059           0 :                 TALLOC_FREE(push);
   17060           0 :                 PyErr_SetNdrError(err);
   17061           0 :                 return NULL;
   17062             :         }
   17063           0 :         blob = ndr_push_blob(push);
   17064           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   17065           0 :         TALLOC_FREE(push);
   17066           0 :         return ret;
   17067             : }
   17068             : 
   17069           0 : static PyObject *py_wbint_PamAuthChangePassword_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   17070             : {
   17071           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   17072           0 :         PyObject *bigendian_obj = NULL;
   17073           0 :         PyObject *ndr64_obj = NULL;
   17074           0 :         uint32_t ndr_push_flags = 0;
   17075             : 
   17076           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   17077             :                 discard_const_p(char *, kwnames),
   17078             :                 &bigendian_obj,
   17079             :                 &ndr64_obj)) {
   17080           0 :                 return NULL;
   17081             :         }
   17082             : 
   17083           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   17084           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   17085             :         }
   17086           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   17087           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   17088             :         }
   17089             : 
   17090           0 :         return py_wbint_PamAuthChangePassword_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   17091             : }
   17092             : 
   17093           0 : static PyObject *py_wbint_PamAuthChangePassword_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   17094             : {
   17095           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   17096           0 :         PyObject *bigendian_obj = NULL;
   17097           0 :         PyObject *ndr64_obj = NULL;
   17098           0 :         uint32_t ndr_push_flags = 0;
   17099             : 
   17100           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   17101             :                 discard_const_p(char *, kwnames),
   17102             :                 &bigendian_obj,
   17103             :                 &ndr64_obj)) {
   17104           0 :                 return NULL;
   17105             :         }
   17106             : 
   17107           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   17108           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   17109             :         }
   17110           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   17111           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   17112             :         }
   17113             : 
   17114           0 :         return py_wbint_PamAuthChangePassword_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   17115             : }
   17116             : 
   17117           0 : static PyObject *py_wbint_PamAuthChangePassword_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   17118             : {
   17119           0 :         const struct ndr_interface_call *call = NULL;
   17120           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   17121           0 :         struct ndr_pull *pull = NULL;
   17122             :         enum ndr_err_code err;
   17123             : 
   17124           0 :         if (ndr_table_winbind.num_calls < 26) {
   17125           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuthChangePassword_ndr_unpack");
   17126           0 :                 return NULL;
   17127             :         }
   17128           0 :         call = &ndr_table_winbind.calls[25];
   17129             : 
   17130           0 :         pull = ndr_pull_init_blob(blob, object);
   17131           0 :         if (pull == NULL) {
   17132           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   17133           0 :                 return NULL;
   17134             :         }
   17135             : 
   17136           0 :         pull->flags |= ndr_pull_flags;
   17137             : 
   17138           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   17139           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   17140           0 :                 TALLOC_FREE(pull);
   17141           0 :                 PyErr_SetNdrError(err);
   17142           0 :                 return NULL;
   17143             :         }
   17144           0 :         if (!allow_remaining) {
   17145             :                 uint32_t highest_ofs;
   17146             : 
   17147           0 :                 if (pull->offset > pull->relative_highest_offset) {
   17148           0 :                         highest_ofs = pull->offset;
   17149             :                 } else {
   17150           0 :                         highest_ofs = pull->relative_highest_offset;
   17151             :                 }
   17152           0 :                 if (highest_ofs < pull->data_size) {
   17153           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   17154             :                                 "not all bytes consumed ofs[%u] size[%u]",
   17155             :                                 highest_ofs, pull->data_size);
   17156           0 :                         TALLOC_FREE(pull);
   17157           0 :                         PyErr_SetNdrError(err);
   17158           0 :                         return NULL;
   17159             :                 }
   17160             :         }
   17161             : 
   17162           0 :         TALLOC_FREE(pull);
   17163           0 :         Py_RETURN_NONE;
   17164             : }
   17165             : 
   17166           0 : static PyObject *py_wbint_PamAuthChangePassword_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   17167             : {
   17168             :         DATA_BLOB blob;
   17169           0 :         Py_ssize_t blob_length = 0;
   17170           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   17171           0 :         PyObject *bigendian_obj = NULL;
   17172           0 :         PyObject *ndr64_obj = NULL;
   17173           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   17174           0 :         PyObject *allow_remaining_obj = NULL;
   17175           0 :         bool allow_remaining = false;
   17176             : 
   17177           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   17178             :                 discard_const_p(char *, kwnames),
   17179             :                 &blob.data, &blob_length,
   17180             :                 &bigendian_obj,
   17181             :                 &ndr64_obj,
   17182             :                 &allow_remaining_obj)) {
   17183           0 :                 return NULL;
   17184             :         }
   17185           0 :         blob.length = blob_length;
   17186             : 
   17187           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   17188           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   17189             :         }
   17190           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   17191           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   17192             :         }
   17193             : 
   17194           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   17195           0 :                 allow_remaining = true;
   17196             :         }
   17197             : 
   17198           0 :         return py_wbint_PamAuthChangePassword_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   17199             : }
   17200             : 
   17201           0 : static PyObject *py_wbint_PamAuthChangePassword_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   17202             : {
   17203             :         DATA_BLOB blob;
   17204           0 :         Py_ssize_t blob_length = 0;
   17205           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   17206           0 :         PyObject *bigendian_obj = NULL;
   17207           0 :         PyObject *ndr64_obj = NULL;
   17208           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   17209           0 :         PyObject *allow_remaining_obj = NULL;
   17210           0 :         bool allow_remaining = false;
   17211             : 
   17212           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   17213             :                 discard_const_p(char *, kwnames),
   17214             :                 &blob.data, &blob_length,
   17215             :                 &bigendian_obj,
   17216             :                 &ndr64_obj,
   17217             :                 &allow_remaining_obj)) {
   17218           0 :                 return NULL;
   17219             :         }
   17220           0 :         blob.length = blob_length;
   17221             : 
   17222           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   17223           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   17224             :         }
   17225           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   17226           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   17227             :         }
   17228             : 
   17229           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   17230           0 :                 allow_remaining = true;
   17231             :         }
   17232             : 
   17233           0 :         return py_wbint_PamAuthChangePassword_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   17234             : }
   17235             : 
   17236           0 : static PyObject *py_wbint_PamAuthChangePassword_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   17237             : {
   17238           0 :         const struct ndr_interface_call *call = NULL;
   17239           0 :         struct wbint_PamAuthChangePassword *object = (struct wbint_PamAuthChangePassword *)pytalloc_get_ptr(py_obj);
   17240             :         PyObject *ret;
   17241             :         char *retstr;
   17242             : 
   17243           0 :         if (ndr_table_winbind.num_calls < 26) {
   17244           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_PamAuthChangePassword_ndr_print");
   17245           0 :                 return NULL;
   17246             :         }
   17247           0 :         call = &ndr_table_winbind.calls[25];
   17248             : 
   17249           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   17250           0 :         ret = PyUnicode_FromString(retstr);
   17251           0 :         TALLOC_FREE(retstr);
   17252             : 
   17253           0 :         return ret;
   17254             : }
   17255             : 
   17256           0 : static PyObject *py_wbint_PamAuthChangePassword_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   17257             : {
   17258           0 :         return py_wbint_PamAuthChangePassword_ndr_print(py_obj, "wbint_PamAuthChangePassword_in", NDR_IN);
   17259             : }
   17260             : 
   17261           0 : static PyObject *py_wbint_PamAuthChangePassword_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   17262             : {
   17263           0 :         return py_wbint_PamAuthChangePassword_ndr_print(py_obj, "wbint_PamAuthChangePassword_out", NDR_OUT);
   17264             : }
   17265             : 
   17266             : static PyMethodDef py_wbint_PamAuthChangePassword_methods[] = {
   17267             :         { "opnum", (PyCFunction)py_wbint_PamAuthChangePassword_ndr_opnum, METH_NOARGS|METH_CLASS,
   17268             :                 "winbind.wbint_PamAuthChangePassword.opnum() -> 25 (0x19) " },
   17269             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthChangePassword_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   17270             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   17271             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthChangePassword_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   17272             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   17273             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthChangePassword_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   17274             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   17275             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_PamAuthChangePassword_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   17276             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   17277             :         { "__ndr_print_in__", (PyCFunction)py_wbint_PamAuthChangePassword_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   17278             :         { "__ndr_print_out__", (PyCFunction)py_wbint_PamAuthChangePassword_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   17279             :         { NULL, NULL, 0, NULL }
   17280             : };
   17281             : 
   17282             : 
   17283             : static PyTypeObject wbint_PamAuthChangePassword_Type = {
   17284             :         PyVarObject_HEAD_INIT(NULL, 0)
   17285             :         .tp_name = "winbind.wbint_PamAuthChangePassword",
   17286             :         .tp_getset = py_wbint_PamAuthChangePassword_getsetters,
   17287             :         .tp_methods = py_wbint_PamAuthChangePassword_methods,
   17288             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17289             :         .tp_new = py_wbint_PamAuthChangePassword_new,
   17290             : };
   17291             : 
   17292           0 : static bool pack_py_wbint_PamAuthChangePassword_args_in(PyObject *args, PyObject *kwargs, struct wbint_PamAuthChangePassword *r)
   17293             : {
   17294             :         PyObject *py_client_name;
   17295             :         PyObject *py_client_pid;
   17296             :         PyObject *py_flags;
   17297             :         PyObject *py_user;
   17298             :         PyObject *py_old_password;
   17299             :         PyObject *py_new_password;
   17300           0 :         const char *kwnames[] = {
   17301             :                 "client_name", "client_pid", "flags", "user", "old_password", "new_password", NULL
   17302             :         };
   17303             : 
   17304           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)) {
   17305           0 :                 return false;
   17306             :         }
   17307             : 
   17308           0 :         if (py_client_name == NULL) {
   17309           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_name");
   17310           0 :                 return false;
   17311             :         }
   17312           0 :         r->in.client_name = talloc_ptrtype(r, r->in.client_name);
   17313           0 :         if (r->in.client_name == NULL) {
   17314           0 :                 PyErr_NoMemory();
   17315           0 :                 return false;
   17316             :         }
   17317             :         {
   17318             :                 const char *test_str;
   17319             :                 const char *talloc_str;
   17320           0 :                 PyObject *unicode = NULL;
   17321           0 :                 if (PyUnicode_Check(py_client_name)) {
   17322           0 :                         unicode = PyUnicode_AsEncodedString(py_client_name, "utf-8", "ignore");
   17323           0 :                         if (unicode == NULL) {
   17324           0 :                                 PyErr_NoMemory();
   17325           0 :                                 return false;
   17326             :                         }
   17327           0 :                         test_str = PyBytes_AS_STRING(unicode);
   17328           0 :                 } else if (PyBytes_Check(py_client_name)) {
   17329           0 :                         test_str = PyBytes_AS_STRING(py_client_name);
   17330             :                 } else {
   17331           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client_name)->tp_name);
   17332           0 :                         return false;
   17333             :                 }
   17334           0 :                 talloc_str = talloc_strdup(r, test_str);
   17335           0 :                 if (unicode != NULL) {
   17336           0 :                         Py_DECREF(unicode);
   17337             :                 }
   17338           0 :                 if (talloc_str == NULL) {
   17339           0 :                         PyErr_NoMemory();
   17340           0 :                         return false;
   17341             :                 }
   17342           0 :                 r->in.client_name = talloc_str;
   17343             :         }
   17344           0 :         if (py_client_pid == NULL) {
   17345           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_pid");
   17346           0 :                 return false;
   17347             :         }
   17348             :         {
   17349           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.client_pid));
   17350           0 :                 if (PyLong_Check(py_client_pid)) {
   17351             :                         unsigned long long test_var;
   17352           0 :                         test_var = PyLong_AsUnsignedLongLong(py_client_pid);
   17353           0 :                         if (PyErr_Occurred() != NULL) {
   17354           0 :                                 return false;
   17355             :                         }
   17356           0 :                         if (test_var > uint_max) {
   17357           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17358             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17359           0 :                                 return false;
   17360             :                         }
   17361           0 :                         r->in.client_pid = test_var;
   17362             :                 } else {
   17363           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17364             :                           PyLong_Type.tp_name);
   17365           0 :                         return false;
   17366             :                 }
   17367             :         }
   17368           0 :         if (py_flags == NULL) {
   17369           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   17370           0 :                 return false;
   17371             :         }
   17372             :         {
   17373           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   17374           0 :                 if (PyLong_Check(py_flags)) {
   17375             :                         unsigned long long test_var;
   17376           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   17377           0 :                         if (PyErr_Occurred() != NULL) {
   17378           0 :                                 return false;
   17379             :                         }
   17380           0 :                         if (test_var > uint_max) {
   17381           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17382             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17383           0 :                                 return false;
   17384             :                         }
   17385           0 :                         r->in.flags = test_var;
   17386             :                 } else {
   17387           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17388             :                           PyLong_Type.tp_name);
   17389           0 :                         return false;
   17390             :                 }
   17391             :         }
   17392           0 :         if (py_user == NULL) {
   17393           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.user");
   17394           0 :                 return false;
   17395             :         }
   17396           0 :         r->in.user = talloc_ptrtype(r, r->in.user);
   17397           0 :         if (r->in.user == NULL) {
   17398           0 :                 PyErr_NoMemory();
   17399           0 :                 return false;
   17400             :         }
   17401             :         {
   17402             :                 const char *test_str;
   17403             :                 const char *talloc_str;
   17404           0 :                 PyObject *unicode = NULL;
   17405           0 :                 if (PyUnicode_Check(py_user)) {
   17406           0 :                         unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
   17407           0 :                         if (unicode == NULL) {
   17408           0 :                                 PyErr_NoMemory();
   17409           0 :                                 return false;
   17410             :                         }
   17411           0 :                         test_str = PyBytes_AS_STRING(unicode);
   17412           0 :                 } else if (PyBytes_Check(py_user)) {
   17413           0 :                         test_str = PyBytes_AS_STRING(py_user);
   17414             :                 } else {
   17415           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
   17416           0 :                         return false;
   17417             :                 }
   17418           0 :                 talloc_str = talloc_strdup(r, test_str);
   17419           0 :                 if (unicode != NULL) {
   17420           0 :                         Py_DECREF(unicode);
   17421             :                 }
   17422           0 :                 if (talloc_str == NULL) {
   17423           0 :                         PyErr_NoMemory();
   17424           0 :                         return false;
   17425             :                 }
   17426           0 :                 r->in.user = talloc_str;
   17427             :         }
   17428           0 :         if (py_old_password == NULL) {
   17429           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.old_password");
   17430           0 :                 return false;
   17431             :         }
   17432           0 :         r->in.old_password = talloc_ptrtype(r, r->in.old_password);
   17433           0 :         if (r->in.old_password == NULL) {
   17434           0 :                 PyErr_NoMemory();
   17435           0 :                 return false;
   17436             :         }
   17437             :         {
   17438             :                 const char *test_str;
   17439             :                 const char *talloc_str;
   17440           0 :                 PyObject *unicode = NULL;
   17441           0 :                 if (PyUnicode_Check(py_old_password)) {
   17442           0 :                         unicode = PyUnicode_AsEncodedString(py_old_password, "utf-8", "ignore");
   17443           0 :                         if (unicode == NULL) {
   17444           0 :                                 PyErr_NoMemory();
   17445           0 :                                 return false;
   17446             :                         }
   17447           0 :                         test_str = PyBytes_AS_STRING(unicode);
   17448           0 :                 } else if (PyBytes_Check(py_old_password)) {
   17449           0 :                         test_str = PyBytes_AS_STRING(py_old_password);
   17450             :                 } else {
   17451           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_old_password)->tp_name);
   17452           0 :                         return false;
   17453             :                 }
   17454           0 :                 talloc_str = talloc_strdup(r, test_str);
   17455           0 :                 if (unicode != NULL) {
   17456           0 :                         Py_DECREF(unicode);
   17457             :                 }
   17458           0 :                 if (talloc_str == NULL) {
   17459           0 :                         PyErr_NoMemory();
   17460           0 :                         return false;
   17461             :                 }
   17462           0 :                 r->in.old_password = talloc_str;
   17463             :         }
   17464           0 :         if (py_new_password == NULL) {
   17465           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.new_password");
   17466           0 :                 return false;
   17467             :         }
   17468           0 :         r->in.new_password = talloc_ptrtype(r, r->in.new_password);
   17469           0 :         if (r->in.new_password == NULL) {
   17470           0 :                 PyErr_NoMemory();
   17471           0 :                 return false;
   17472             :         }
   17473             :         {
   17474             :                 const char *test_str;
   17475             :                 const char *talloc_str;
   17476           0 :                 PyObject *unicode = NULL;
   17477           0 :                 if (PyUnicode_Check(py_new_password)) {
   17478           0 :                         unicode = PyUnicode_AsEncodedString(py_new_password, "utf-8", "ignore");
   17479           0 :                         if (unicode == NULL) {
   17480           0 :                                 PyErr_NoMemory();
   17481           0 :                                 return false;
   17482             :                         }
   17483           0 :                         test_str = PyBytes_AS_STRING(unicode);
   17484           0 :                 } else if (PyBytes_Check(py_new_password)) {
   17485           0 :                         test_str = PyBytes_AS_STRING(py_new_password);
   17486             :                 } else {
   17487           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_new_password)->tp_name);
   17488           0 :                         return false;
   17489             :                 }
   17490           0 :                 talloc_str = talloc_strdup(r, test_str);
   17491           0 :                 if (unicode != NULL) {
   17492           0 :                         Py_DECREF(unicode);
   17493             :                 }
   17494           0 :                 if (talloc_str == NULL) {
   17495           0 :                         PyErr_NoMemory();
   17496           0 :                         return false;
   17497             :                 }
   17498           0 :                 r->in.new_password = talloc_str;
   17499             :         }
   17500           0 :         return true;
   17501             : }
   17502             : 
   17503           0 : static PyObject *unpack_py_wbint_PamAuthChangePassword_args_out(struct wbint_PamAuthChangePassword *r)
   17504             : {
   17505             :         PyObject *result;
   17506             :         PyObject *py_dominfo;
   17507             :         PyObject *py_reject_reason;
   17508           0 :         result = PyTuple_New(2);
   17509           0 :         if (*r->out.dominfo == NULL) {
   17510           0 :                 py_dominfo = Py_None;
   17511           0 :                 Py_INCREF(py_dominfo);
   17512             :         } else {
   17513           0 :                 py_dominfo = pytalloc_reference_ex(samr_DomInfo1_Type, *r->out.dominfo, *r->out.dominfo);
   17514             :         }
   17515           0 :         PyTuple_SetItem(result, 0, py_dominfo);
   17516           0 :         py_reject_reason = PyLong_FromUnsignedLongLong((uint32_t)*r->out.reject_reason);
   17517           0 :         PyTuple_SetItem(result, 1, py_reject_reason);
   17518           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   17519           0 :                 PyErr_SetNTSTATUS(r->out.result);
   17520           0 :                 return NULL;
   17521             :         }
   17522             : 
   17523           0 :         return result;
   17524             : }
   17525             : 
   17526             : 
   17527           0 : static PyObject *py_wbint_InitConnection_in_get_dcname(PyObject *obj, void *closure)
   17528             : {
   17529           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(obj);
   17530             :         PyObject *py_dcname;
   17531           0 :         if (object->in.dcname == NULL) {
   17532           0 :                 Py_RETURN_NONE;
   17533             :         }
   17534           0 :         if (object->in.dcname == NULL) {
   17535           0 :                 py_dcname = Py_None;
   17536           0 :                 Py_INCREF(py_dcname);
   17537             :         } else {
   17538           0 :                 py_dcname = PyUnicode_Decode(object->in.dcname, strlen(object->in.dcname), "utf-8", "ignore");
   17539             :         }
   17540           0 :         return py_dcname;
   17541             : }
   17542             : 
   17543           0 : static int py_wbint_InitConnection_in_set_dcname(PyObject *py_obj, PyObject *value, void *closure)
   17544             : {
   17545           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(py_obj);
   17546           0 :         if (value == NULL) {
   17547           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dcname");
   17548           0 :                 return -1;
   17549             :         }
   17550           0 :         object->in.dcname = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.dcname);
   17551           0 :         if (object->in.dcname == NULL) {
   17552           0 :                 PyErr_NoMemory();
   17553           0 :                 return -1;
   17554             :         }
   17555             :         {
   17556             :                 const char *test_str;
   17557             :                 const char *talloc_str;
   17558           0 :                 PyObject *unicode = NULL;
   17559           0 :                 if (PyUnicode_Check(value)) {
   17560           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   17561           0 :                         if (unicode == NULL) {
   17562           0 :                                 PyErr_NoMemory();
   17563           0 :                                 return -1;
   17564             :                         }
   17565           0 :                         test_str = PyBytes_AS_STRING(unicode);
   17566           0 :                 } else if (PyBytes_Check(value)) {
   17567           0 :                         test_str = PyBytes_AS_STRING(value);
   17568             :                 } else {
   17569           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   17570           0 :                         return -1;
   17571             :                 }
   17572           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   17573           0 :                 if (unicode != NULL) {
   17574           0 :                         Py_DECREF(unicode);
   17575             :                 }
   17576           0 :                 if (talloc_str == NULL) {
   17577           0 :                         PyErr_NoMemory();
   17578           0 :                         return -1;
   17579             :                 }
   17580           0 :                 object->in.dcname = talloc_str;
   17581             :         }
   17582           0 :         return 0;
   17583             : }
   17584             : 
   17585           0 : static PyObject *py_wbint_InitConnection_out_get_name(PyObject *obj, void *closure)
   17586             : {
   17587           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(obj);
   17588             :         PyObject *py_name;
   17589           0 :         if (object->out.name == NULL) {
   17590           0 :                 Py_RETURN_NONE;
   17591             :         }
   17592           0 :         if (*object->out.name == NULL) {
   17593           0 :                 py_name = Py_None;
   17594           0 :                 Py_INCREF(py_name);
   17595             :         } else {
   17596           0 :                 if (*object->out.name == NULL) {
   17597           0 :                         py_name = Py_None;
   17598           0 :                         Py_INCREF(py_name);
   17599             :                 } else {
   17600           0 :                         py_name = PyUnicode_Decode(*object->out.name, strlen(*object->out.name), "utf-8", "ignore");
   17601             :                 }
   17602             :         }
   17603           0 :         return py_name;
   17604             : }
   17605             : 
   17606           0 : static int py_wbint_InitConnection_out_set_name(PyObject *py_obj, PyObject *value, void *closure)
   17607             : {
   17608           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(py_obj);
   17609           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.name));
   17610           0 :         if (value == NULL) {
   17611           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.name");
   17612           0 :                 return -1;
   17613             :         }
   17614           0 :         object->out.name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.name);
   17615           0 :         if (object->out.name == NULL) {
   17616           0 :                 PyErr_NoMemory();
   17617           0 :                 return -1;
   17618             :         }
   17619           0 :         if (value == Py_None) {
   17620           0 :                 *object->out.name = NULL;
   17621             :         } else {
   17622           0 :                 *object->out.name = NULL;
   17623             :                 {
   17624             :                         const char *test_str;
   17625             :                         const char *talloc_str;
   17626           0 :                         PyObject *unicode = NULL;
   17627           0 :                         if (PyUnicode_Check(value)) {
   17628           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   17629           0 :                                 if (unicode == NULL) {
   17630           0 :                                         PyErr_NoMemory();
   17631           0 :                                         return -1;
   17632             :                                 }
   17633           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   17634           0 :                         } else if (PyBytes_Check(value)) {
   17635           0 :                                 test_str = PyBytes_AS_STRING(value);
   17636             :                         } else {
   17637           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   17638           0 :                                 return -1;
   17639             :                         }
   17640           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   17641           0 :                         if (unicode != NULL) {
   17642           0 :                                 Py_DECREF(unicode);
   17643             :                         }
   17644           0 :                         if (talloc_str == NULL) {
   17645           0 :                                 PyErr_NoMemory();
   17646           0 :                                 return -1;
   17647             :                         }
   17648           0 :                         *object->out.name = talloc_str;
   17649             :                 }
   17650             :         }
   17651           0 :         return 0;
   17652             : }
   17653             : 
   17654           0 : static PyObject *py_wbint_InitConnection_out_get_alt_name(PyObject *obj, void *closure)
   17655             : {
   17656           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(obj);
   17657             :         PyObject *py_alt_name;
   17658           0 :         if (object->out.alt_name == NULL) {
   17659           0 :                 Py_RETURN_NONE;
   17660             :         }
   17661           0 :         if (*object->out.alt_name == NULL) {
   17662           0 :                 py_alt_name = Py_None;
   17663           0 :                 Py_INCREF(py_alt_name);
   17664             :         } else {
   17665           0 :                 if (*object->out.alt_name == NULL) {
   17666           0 :                         py_alt_name = Py_None;
   17667           0 :                         Py_INCREF(py_alt_name);
   17668             :                 } else {
   17669           0 :                         py_alt_name = PyUnicode_Decode(*object->out.alt_name, strlen(*object->out.alt_name), "utf-8", "ignore");
   17670             :                 }
   17671             :         }
   17672           0 :         return py_alt_name;
   17673             : }
   17674             : 
   17675           0 : static int py_wbint_InitConnection_out_set_alt_name(PyObject *py_obj, PyObject *value, void *closure)
   17676             : {
   17677           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(py_obj);
   17678           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.alt_name));
   17679           0 :         if (value == NULL) {
   17680           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.alt_name");
   17681           0 :                 return -1;
   17682             :         }
   17683           0 :         object->out.alt_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.alt_name);
   17684           0 :         if (object->out.alt_name == NULL) {
   17685           0 :                 PyErr_NoMemory();
   17686           0 :                 return -1;
   17687             :         }
   17688           0 :         if (value == Py_None) {
   17689           0 :                 *object->out.alt_name = NULL;
   17690             :         } else {
   17691           0 :                 *object->out.alt_name = NULL;
   17692             :                 {
   17693             :                         const char *test_str;
   17694             :                         const char *talloc_str;
   17695           0 :                         PyObject *unicode = NULL;
   17696           0 :                         if (PyUnicode_Check(value)) {
   17697           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   17698           0 :                                 if (unicode == NULL) {
   17699           0 :                                         PyErr_NoMemory();
   17700           0 :                                         return -1;
   17701             :                                 }
   17702           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   17703           0 :                         } else if (PyBytes_Check(value)) {
   17704           0 :                                 test_str = PyBytes_AS_STRING(value);
   17705             :                         } else {
   17706           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   17707           0 :                                 return -1;
   17708             :                         }
   17709           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   17710           0 :                         if (unicode != NULL) {
   17711           0 :                                 Py_DECREF(unicode);
   17712             :                         }
   17713           0 :                         if (talloc_str == NULL) {
   17714           0 :                                 PyErr_NoMemory();
   17715           0 :                                 return -1;
   17716             :                         }
   17717           0 :                         *object->out.alt_name = talloc_str;
   17718             :                 }
   17719             :         }
   17720           0 :         return 0;
   17721             : }
   17722             : 
   17723           0 : static PyObject *py_wbint_InitConnection_out_get_sid(PyObject *obj, void *closure)
   17724             : {
   17725           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(obj);
   17726             :         PyObject *py_sid;
   17727           0 :         if (object->out.sid == NULL) {
   17728           0 :                 Py_RETURN_NONE;
   17729             :         }
   17730           0 :         py_sid = pytalloc_reference_ex(dom_sid_Type, object->out.sid, object->out.sid);
   17731           0 :         return py_sid;
   17732             : }
   17733             : 
   17734           0 : static int py_wbint_InitConnection_out_set_sid(PyObject *py_obj, PyObject *value, void *closure)
   17735             : {
   17736           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(py_obj);
   17737           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sid));
   17738           0 :         if (value == NULL) {
   17739           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.sid");
   17740           0 :                 return -1;
   17741             :         }
   17742           0 :         object->out.sid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sid);
   17743           0 :         if (object->out.sid == NULL) {
   17744           0 :                 PyErr_NoMemory();
   17745           0 :                 return -1;
   17746             :         }
   17747           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
   17748           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   17749           0 :                 PyErr_NoMemory();
   17750           0 :                 return -1;
   17751             :         }
   17752           0 :         object->out.sid = (struct dom_sid *)pytalloc_get_ptr(value);
   17753           0 :         return 0;
   17754             : }
   17755             : 
   17756           0 : static PyObject *py_wbint_InitConnection_out_get_flags(PyObject *obj, void *closure)
   17757             : {
   17758           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(obj);
   17759             :         PyObject *py_flags;
   17760           0 :         if (object->out.flags == NULL) {
   17761           0 :                 Py_RETURN_NONE;
   17762             :         }
   17763           0 :         py_flags = PyLong_FromLong((uint16_t)*object->out.flags);
   17764           0 :         return py_flags;
   17765             : }
   17766             : 
   17767           0 : static int py_wbint_InitConnection_out_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   17768             : {
   17769           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(py_obj);
   17770           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.flags));
   17771           0 :         if (value == NULL) {
   17772           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.flags");
   17773           0 :                 return -1;
   17774             :         }
   17775           0 :         object->out.flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.flags);
   17776           0 :         if (object->out.flags == NULL) {
   17777           0 :                 PyErr_NoMemory();
   17778           0 :                 return -1;
   17779             :         }
   17780             :         {
   17781           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.flags));
   17782           0 :                 if (PyLong_Check(value)) {
   17783             :                         unsigned long long test_var;
   17784           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17785           0 :                         if (PyErr_Occurred() != NULL) {
   17786           0 :                                 return -1;
   17787             :                         }
   17788           0 :                         if (test_var > uint_max) {
   17789           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17790             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17791           0 :                                 return -1;
   17792             :                         }
   17793           0 :                         *object->out.flags = test_var;
   17794             :                 } else {
   17795           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17796             :                           PyLong_Type.tp_name);
   17797           0 :                         return -1;
   17798             :                 }
   17799             :         }
   17800           0 :         return 0;
   17801             : }
   17802             : 
   17803           0 : static PyObject *py_wbint_InitConnection_get_result(PyObject *obj, void *closure)
   17804             : {
   17805           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(obj);
   17806             :         PyObject *py_result;
   17807           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   17808           0 :         return py_result;
   17809             : }
   17810             : 
   17811           0 : static int py_wbint_InitConnection_set_result(PyObject *py_obj, PyObject *value, void *closure)
   17812             : {
   17813           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(py_obj);
   17814           0 :         if (value == NULL) {
   17815           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   17816           0 :                 return -1;
   17817             :         }
   17818           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   17819           0 :         return 0;
   17820             : }
   17821             : 
   17822             : static PyGetSetDef py_wbint_InitConnection_getsetters[] = {
   17823             :         {
   17824             :                 .name = discard_const_p(char, "in_dcname"),
   17825             :                 .get = py_wbint_InitConnection_in_get_dcname,
   17826             :                 .set = py_wbint_InitConnection_in_set_dcname,
   17827             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   17828             :         },
   17829             :         {
   17830             :                 .name = discard_const_p(char, "out_name"),
   17831             :                 .get = py_wbint_InitConnection_out_get_name,
   17832             :                 .set = py_wbint_InitConnection_out_set_name,
   17833             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   17834             :         },
   17835             :         {
   17836             :                 .name = discard_const_p(char, "out_alt_name"),
   17837             :                 .get = py_wbint_InitConnection_out_get_alt_name,
   17838             :                 .set = py_wbint_InitConnection_out_set_alt_name,
   17839             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   17840             :         },
   17841             :         {
   17842             :                 .name = discard_const_p(char, "out_sid"),
   17843             :                 .get = py_wbint_InitConnection_out_get_sid,
   17844             :                 .set = py_wbint_InitConnection_out_set_sid,
   17845             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
   17846             :         },
   17847             :         {
   17848             :                 .name = discard_const_p(char, "out_flags"),
   17849             :                 .get = py_wbint_InitConnection_out_get_flags,
   17850             :                 .set = py_wbint_InitConnection_out_set_flags,
   17851             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DomainInfoFlags")
   17852             :         },
   17853             :         {
   17854             :                 .name = discard_const_p(char, "result"),
   17855             :                 .get = py_wbint_InitConnection_get_result,
   17856             :                 .set = py_wbint_InitConnection_set_result,
   17857             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   17858             :         },
   17859             :         { .name = NULL }
   17860             : };
   17861             : 
   17862           0 : static PyObject *py_wbint_InitConnection_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17863             : {
   17864           0 :         PyObject *self = pytalloc_new(struct wbint_InitConnection, type);
   17865           0 :         struct wbint_InitConnection *_self = (struct wbint_InitConnection *)pytalloc_get_ptr(self);
   17866           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   17867           0 :         _self->out.sid = talloc_zero(mem_ctx, struct dom_sid);
   17868           0 :         _self->out.flags = talloc_zero(mem_ctx, enum DomainInfoFlags);
   17869           0 :         return self;
   17870             : }
   17871             : 
   17872           0 : static PyObject *py_wbint_InitConnection_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   17873             : {
   17874             : 
   17875             : 
   17876           0 :         return PyLong_FromLong(26);
   17877             : }
   17878             : 
   17879           0 : static PyObject *py_wbint_InitConnection_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   17880             : {
   17881           0 :         const struct ndr_interface_call *call = NULL;
   17882           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(py_obj);
   17883           0 :         PyObject *ret = NULL;
   17884           0 :         struct ndr_push *push = NULL;
   17885             :         DATA_BLOB blob;
   17886             :         enum ndr_err_code err;
   17887             : 
   17888           0 :         if (ndr_table_winbind.num_calls < 27) {
   17889           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_InitConnection_ndr_pack");
   17890           0 :                 return NULL;
   17891             :         }
   17892           0 :         call = &ndr_table_winbind.calls[26];
   17893             : 
   17894           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   17895           0 :         if (push == NULL) {
   17896           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   17897           0 :                 return NULL;
   17898             :         }
   17899             : 
   17900           0 :         push->flags |= ndr_push_flags;
   17901             : 
   17902           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   17903           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   17904           0 :                 TALLOC_FREE(push);
   17905           0 :                 PyErr_SetNdrError(err);
   17906           0 :                 return NULL;
   17907             :         }
   17908           0 :         blob = ndr_push_blob(push);
   17909           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   17910           0 :         TALLOC_FREE(push);
   17911           0 :         return ret;
   17912             : }
   17913             : 
   17914           0 : static PyObject *py_wbint_InitConnection_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   17915             : {
   17916           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   17917           0 :         PyObject *bigendian_obj = NULL;
   17918           0 :         PyObject *ndr64_obj = NULL;
   17919           0 :         uint32_t ndr_push_flags = 0;
   17920             : 
   17921           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   17922             :                 discard_const_p(char *, kwnames),
   17923             :                 &bigendian_obj,
   17924             :                 &ndr64_obj)) {
   17925           0 :                 return NULL;
   17926             :         }
   17927             : 
   17928           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   17929           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   17930             :         }
   17931           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   17932           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   17933             :         }
   17934             : 
   17935           0 :         return py_wbint_InitConnection_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   17936             : }
   17937             : 
   17938           0 : static PyObject *py_wbint_InitConnection_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   17939             : {
   17940           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   17941           0 :         PyObject *bigendian_obj = NULL;
   17942           0 :         PyObject *ndr64_obj = NULL;
   17943           0 :         uint32_t ndr_push_flags = 0;
   17944             : 
   17945           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   17946             :                 discard_const_p(char *, kwnames),
   17947             :                 &bigendian_obj,
   17948             :                 &ndr64_obj)) {
   17949           0 :                 return NULL;
   17950             :         }
   17951             : 
   17952           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   17953           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   17954             :         }
   17955           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   17956           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   17957             :         }
   17958             : 
   17959           0 :         return py_wbint_InitConnection_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   17960             : }
   17961             : 
   17962           0 : static PyObject *py_wbint_InitConnection_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   17963             : {
   17964           0 :         const struct ndr_interface_call *call = NULL;
   17965           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(py_obj);
   17966           0 :         struct ndr_pull *pull = NULL;
   17967             :         enum ndr_err_code err;
   17968             : 
   17969           0 :         if (ndr_table_winbind.num_calls < 27) {
   17970           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_InitConnection_ndr_unpack");
   17971           0 :                 return NULL;
   17972             :         }
   17973           0 :         call = &ndr_table_winbind.calls[26];
   17974             : 
   17975           0 :         pull = ndr_pull_init_blob(blob, object);
   17976           0 :         if (pull == NULL) {
   17977           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   17978           0 :                 return NULL;
   17979             :         }
   17980             : 
   17981           0 :         pull->flags |= ndr_pull_flags;
   17982             : 
   17983           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   17984           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   17985           0 :                 TALLOC_FREE(pull);
   17986           0 :                 PyErr_SetNdrError(err);
   17987           0 :                 return NULL;
   17988             :         }
   17989           0 :         if (!allow_remaining) {
   17990             :                 uint32_t highest_ofs;
   17991             : 
   17992           0 :                 if (pull->offset > pull->relative_highest_offset) {
   17993           0 :                         highest_ofs = pull->offset;
   17994             :                 } else {
   17995           0 :                         highest_ofs = pull->relative_highest_offset;
   17996             :                 }
   17997           0 :                 if (highest_ofs < pull->data_size) {
   17998           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   17999             :                                 "not all bytes consumed ofs[%u] size[%u]",
   18000             :                                 highest_ofs, pull->data_size);
   18001           0 :                         TALLOC_FREE(pull);
   18002           0 :                         PyErr_SetNdrError(err);
   18003           0 :                         return NULL;
   18004             :                 }
   18005             :         }
   18006             : 
   18007           0 :         TALLOC_FREE(pull);
   18008           0 :         Py_RETURN_NONE;
   18009             : }
   18010             : 
   18011           0 : static PyObject *py_wbint_InitConnection_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   18012             : {
   18013             :         DATA_BLOB blob;
   18014           0 :         Py_ssize_t blob_length = 0;
   18015           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   18016           0 :         PyObject *bigendian_obj = NULL;
   18017           0 :         PyObject *ndr64_obj = NULL;
   18018           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   18019           0 :         PyObject *allow_remaining_obj = NULL;
   18020           0 :         bool allow_remaining = false;
   18021             : 
   18022           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   18023             :                 discard_const_p(char *, kwnames),
   18024             :                 &blob.data, &blob_length,
   18025             :                 &bigendian_obj,
   18026             :                 &ndr64_obj,
   18027             :                 &allow_remaining_obj)) {
   18028           0 :                 return NULL;
   18029             :         }
   18030           0 :         blob.length = blob_length;
   18031             : 
   18032           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   18033           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   18034             :         }
   18035           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   18036           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   18037             :         }
   18038             : 
   18039           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   18040           0 :                 allow_remaining = true;
   18041             :         }
   18042             : 
   18043           0 :         return py_wbint_InitConnection_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   18044             : }
   18045             : 
   18046           0 : static PyObject *py_wbint_InitConnection_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   18047             : {
   18048             :         DATA_BLOB blob;
   18049           0 :         Py_ssize_t blob_length = 0;
   18050           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   18051           0 :         PyObject *bigendian_obj = NULL;
   18052           0 :         PyObject *ndr64_obj = NULL;
   18053           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   18054           0 :         PyObject *allow_remaining_obj = NULL;
   18055           0 :         bool allow_remaining = false;
   18056             : 
   18057           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   18058             :                 discard_const_p(char *, kwnames),
   18059             :                 &blob.data, &blob_length,
   18060             :                 &bigendian_obj,
   18061             :                 &ndr64_obj,
   18062             :                 &allow_remaining_obj)) {
   18063           0 :                 return NULL;
   18064             :         }
   18065           0 :         blob.length = blob_length;
   18066             : 
   18067           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   18068           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   18069             :         }
   18070           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   18071           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   18072             :         }
   18073             : 
   18074           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   18075           0 :                 allow_remaining = true;
   18076             :         }
   18077             : 
   18078           0 :         return py_wbint_InitConnection_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   18079             : }
   18080             : 
   18081           0 : static PyObject *py_wbint_InitConnection_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   18082             : {
   18083           0 :         const struct ndr_interface_call *call = NULL;
   18084           0 :         struct wbint_InitConnection *object = (struct wbint_InitConnection *)pytalloc_get_ptr(py_obj);
   18085             :         PyObject *ret;
   18086             :         char *retstr;
   18087             : 
   18088           0 :         if (ndr_table_winbind.num_calls < 27) {
   18089           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_wbint_InitConnection_ndr_print");
   18090           0 :                 return NULL;
   18091             :         }
   18092           0 :         call = &ndr_table_winbind.calls[26];
   18093             : 
   18094           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   18095           0 :         ret = PyUnicode_FromString(retstr);
   18096           0 :         TALLOC_FREE(retstr);
   18097             : 
   18098           0 :         return ret;
   18099             : }
   18100             : 
   18101           0 : static PyObject *py_wbint_InitConnection_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   18102             : {
   18103           0 :         return py_wbint_InitConnection_ndr_print(py_obj, "wbint_InitConnection_in", NDR_IN);
   18104             : }
   18105             : 
   18106           0 : static PyObject *py_wbint_InitConnection_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   18107             : {
   18108           0 :         return py_wbint_InitConnection_ndr_print(py_obj, "wbint_InitConnection_out", NDR_OUT);
   18109             : }
   18110             : 
   18111             : static PyMethodDef py_wbint_InitConnection_methods[] = {
   18112             :         { "opnum", (PyCFunction)py_wbint_InitConnection_ndr_opnum, METH_NOARGS|METH_CLASS,
   18113             :                 "winbind.wbint_InitConnection.opnum() -> 26 (0x1a) " },
   18114             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_InitConnection_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   18115             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   18116             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_InitConnection_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   18117             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   18118             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_InitConnection_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   18119             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   18120             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_wbint_InitConnection_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   18121             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   18122             :         { "__ndr_print_in__", (PyCFunction)py_wbint_InitConnection_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   18123             :         { "__ndr_print_out__", (PyCFunction)py_wbint_InitConnection_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   18124             :         { NULL, NULL, 0, NULL }
   18125             : };
   18126             : 
   18127             : 
   18128             : static PyTypeObject wbint_InitConnection_Type = {
   18129             :         PyVarObject_HEAD_INIT(NULL, 0)
   18130             :         .tp_name = "winbind.wbint_InitConnection",
   18131             :         .tp_getset = py_wbint_InitConnection_getsetters,
   18132             :         .tp_methods = py_wbint_InitConnection_methods,
   18133             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   18134             :         .tp_new = py_wbint_InitConnection_new,
   18135             : };
   18136             : 
   18137           0 : static bool pack_py_wbint_InitConnection_args_in(PyObject *args, PyObject *kwargs, struct wbint_InitConnection *r)
   18138             : {
   18139             :         PyObject *py_dcname;
   18140           0 :         const char *kwnames[] = {
   18141             :                 "dcname", NULL
   18142             :         };
   18143             : 
   18144           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:wbint_InitConnection", discard_const_p(char *, kwnames), &py_dcname)) {
   18145           0 :                 return false;
   18146             :         }
   18147             : 
   18148           0 :         if (py_dcname == NULL) {
   18149           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dcname");
   18150           0 :                 return false;
   18151             :         }
   18152           0 :         r->in.dcname = talloc_ptrtype(r, r->in.dcname);
   18153           0 :         if (r->in.dcname == NULL) {
   18154           0 :                 PyErr_NoMemory();
   18155           0 :                 return false;
   18156             :         }
   18157             :         {
   18158             :                 const char *test_str;
   18159             :                 const char *talloc_str;
   18160           0 :                 PyObject *unicode = NULL;
   18161           0 :                 if (PyUnicode_Check(py_dcname)) {
   18162           0 :                         unicode = PyUnicode_AsEncodedString(py_dcname, "utf-8", "ignore");
   18163           0 :                         if (unicode == NULL) {
   18164           0 :                                 PyErr_NoMemory();
   18165           0 :                                 return false;
   18166             :                         }
   18167           0 :                         test_str = PyBytes_AS_STRING(unicode);
   18168           0 :                 } else if (PyBytes_Check(py_dcname)) {
   18169           0 :                         test_str = PyBytes_AS_STRING(py_dcname);
   18170             :                 } else {
   18171           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dcname)->tp_name);
   18172           0 :                         return false;
   18173             :                 }
   18174           0 :                 talloc_str = talloc_strdup(r, 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 false;
   18181             :                 }
   18182           0 :                 r->in.dcname = talloc_str;
   18183             :         }
   18184           0 :         return true;
   18185             : }
   18186             : 
   18187           0 : static PyObject *unpack_py_wbint_InitConnection_args_out(struct wbint_InitConnection *r)
   18188             : {
   18189             :         PyObject *result;
   18190             :         PyObject *py_name;
   18191             :         PyObject *py_alt_name;
   18192             :         PyObject *py_sid;
   18193             :         PyObject *py_flags;
   18194           0 :         result = PyTuple_New(4);
   18195           0 :         if (*r->out.name == NULL) {
   18196           0 :                 py_name = Py_None;
   18197           0 :                 Py_INCREF(py_name);
   18198             :         } else {
   18199           0 :                 if (*r->out.name == NULL) {
   18200           0 :                         py_name = Py_None;
   18201           0 :                         Py_INCREF(py_name);
   18202             :                 } else {
   18203           0 :                         py_name = PyUnicode_Decode(*r->out.name, strlen(*r->out.name), "utf-8", "ignore");
   18204             :                 }
   18205             :         }
   18206           0 :         PyTuple_SetItem(result, 0, py_name);
   18207           0 :         if (*r->out.alt_name == NULL) {
   18208           0 :                 py_alt_name = Py_None;
   18209           0 :                 Py_INCREF(py_alt_name);
   18210             :         } else {
   18211           0 :                 if (*r->out.alt_name == NULL) {
   18212           0 :                         py_alt_name = Py_None;
   18213           0 :                         Py_INCREF(py_alt_name);
   18214             :                 } else {
   18215           0 :                         py_alt_name = PyUnicode_Decode(*r->out.alt_name, strlen(*r->out.alt_name), "utf-8", "ignore");
   18216             :                 }
   18217             :         }
   18218           0 :         PyTuple_SetItem(result, 1, py_alt_name);
   18219           0 :         py_sid = pytalloc_reference_ex(dom_sid_Type, r->out.sid, r->out.sid);
   18220           0 :         PyTuple_SetItem(result, 2, py_sid);
   18221           0 :         py_flags = PyLong_FromLong((uint16_t)*r->out.flags);
   18222           0 :         PyTuple_SetItem(result, 3, py_flags);
   18223           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   18224           0 :                 PyErr_SetNTSTATUS(r->out.result);
   18225           0 :                 return NULL;
   18226             :         }
   18227             : 
   18228           0 :         return result;
   18229             : }
   18230             : 
   18231             : 
   18232           0 : static PyObject *py_winbind_SamLogon_in_get_logon_level(PyObject *obj, void *closure)
   18233             : {
   18234           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(obj);
   18235             :         PyObject *py_logon_level;
   18236           0 :         py_logon_level = PyLong_FromLong((uint16_t)object->in.logon_level);
   18237           0 :         return py_logon_level;
   18238             : }
   18239             : 
   18240           0 : static int py_winbind_SamLogon_in_set_logon_level(PyObject *py_obj, PyObject *value, void *closure)
   18241             : {
   18242           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(py_obj);
   18243           0 :         if (value == NULL) {
   18244           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_level");
   18245           0 :                 return -1;
   18246             :         }
   18247             :         {
   18248           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.logon_level));
   18249           0 :                 if (PyLong_Check(value)) {
   18250             :                         unsigned long long test_var;
   18251           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18252           0 :                         if (PyErr_Occurred() != NULL) {
   18253           0 :                                 return -1;
   18254             :                         }
   18255           0 :                         if (test_var > uint_max) {
   18256           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18257             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18258           0 :                                 return -1;
   18259             :                         }
   18260           0 :                         object->in.logon_level = test_var;
   18261             :                 } else {
   18262           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18263             :                           PyLong_Type.tp_name);
   18264           0 :                         return -1;
   18265             :                 }
   18266             :         }
   18267           0 :         return 0;
   18268             : }
   18269             : 
   18270           0 : static PyObject *py_winbind_SamLogon_in_get_logon(PyObject *obj, void *closure)
   18271             : {
   18272           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(obj);
   18273             :         PyObject *py_logon;
   18274           0 :         py_logon = pyrpc_import_union(netr_LogonLevel_Type, pytalloc_get_mem_ctx(obj), object->in.logon_level, &object->in.logon, "union netr_LogonLevel");
   18275           0 :         if (py_logon == NULL) {
   18276           0 :                 return NULL;
   18277             :         }
   18278           0 :         return py_logon;
   18279             : }
   18280             : 
   18281           0 : static int py_winbind_SamLogon_in_set_logon(PyObject *py_obj, PyObject *value, void *closure)
   18282             : {
   18283           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(py_obj);
   18284           0 :         if (value == NULL) {
   18285           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon");
   18286           0 :                 return -1;
   18287             :         }
   18288             :         {
   18289             :                 union netr_LogonLevel *logon_switch_0;
   18290           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");
   18291           0 :                 if (logon_switch_0 == NULL) {
   18292           0 :                         return -1;
   18293             :                 }
   18294           0 :                 object->in.logon = *logon_switch_0;
   18295             :         }
   18296           0 :         return 0;
   18297             : }
   18298             : 
   18299           0 : static PyObject *py_winbind_SamLogon_in_get_validation_level(PyObject *obj, void *closure)
   18300             : {
   18301           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(obj);
   18302             :         PyObject *py_validation_level;
   18303           0 :         py_validation_level = PyLong_FromLong((uint16_t)object->in.validation_level);
   18304           0 :         return py_validation_level;
   18305             : }
   18306             : 
   18307           0 : static int py_winbind_SamLogon_in_set_validation_level(PyObject *py_obj, PyObject *value, void *closure)
   18308             : {
   18309           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(py_obj);
   18310           0 :         if (value == NULL) {
   18311           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.validation_level");
   18312           0 :                 return -1;
   18313             :         }
   18314             :         {
   18315           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.validation_level));
   18316           0 :                 if (PyLong_Check(value)) {
   18317             :                         unsigned long long test_var;
   18318           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18319           0 :                         if (PyErr_Occurred() != NULL) {
   18320           0 :                                 return -1;
   18321             :                         }
   18322           0 :                         if (test_var > uint_max) {
   18323           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18324             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18325           0 :                                 return -1;
   18326             :                         }
   18327           0 :                         object->in.validation_level = test_var;
   18328             :                 } else {
   18329           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18330             :                           PyLong_Type.tp_name);
   18331           0 :                         return -1;
   18332             :                 }
   18333             :         }
   18334           0 :         return 0;
   18335             : }
   18336             : 
   18337           0 : static PyObject *py_winbind_SamLogon_out_get_validation(PyObject *obj, void *closure)
   18338             : {
   18339           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(obj);
   18340             :         PyObject *py_validation;
   18341           0 :         py_validation = pyrpc_import_union(netr_Validation_Type, pytalloc_get_mem_ctx(obj), object->in.validation_level, &object->out.validation, "union netr_Validation");
   18342           0 :         if (py_validation == NULL) {
   18343           0 :                 return NULL;
   18344             :         }
   18345           0 :         return py_validation;
   18346             : }
   18347             : 
   18348           0 : static int py_winbind_SamLogon_out_set_validation(PyObject *py_obj, PyObject *value, void *closure)
   18349             : {
   18350           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(py_obj);
   18351           0 :         if (value == NULL) {
   18352           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.validation");
   18353           0 :                 return -1;
   18354             :         }
   18355             :         {
   18356             :                 union netr_Validation *validation_switch_0;
   18357           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");
   18358           0 :                 if (validation_switch_0 == NULL) {
   18359           0 :                         return -1;
   18360             :                 }
   18361           0 :                 object->out.validation = *validation_switch_0;
   18362             :         }
   18363           0 :         return 0;
   18364             : }
   18365             : 
   18366           0 : static PyObject *py_winbind_SamLogon_out_get_authoritative(PyObject *obj, void *closure)
   18367             : {
   18368           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(obj);
   18369             :         PyObject *py_authoritative;
   18370           0 :         py_authoritative = PyLong_FromLong((uint16_t)object->out.authoritative);
   18371           0 :         return py_authoritative;
   18372             : }
   18373             : 
   18374           0 : static int py_winbind_SamLogon_out_set_authoritative(PyObject *py_obj, PyObject *value, void *closure)
   18375             : {
   18376           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(py_obj);
   18377           0 :         if (value == NULL) {
   18378           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.authoritative");
   18379           0 :                 return -1;
   18380             :         }
   18381             :         {
   18382           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->out.authoritative));
   18383           0 :                 if (PyLong_Check(value)) {
   18384             :                         unsigned long long test_var;
   18385           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18386           0 :                         if (PyErr_Occurred() != NULL) {
   18387           0 :                                 return -1;
   18388             :                         }
   18389           0 :                         if (test_var > uint_max) {
   18390           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18391             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18392           0 :                                 return -1;
   18393             :                         }
   18394           0 :                         object->out.authoritative = test_var;
   18395             :                 } else {
   18396           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18397             :                           PyLong_Type.tp_name);
   18398           0 :                         return -1;
   18399             :                 }
   18400             :         }
   18401           0 :         return 0;
   18402             : }
   18403             : 
   18404           0 : static PyObject *py_winbind_SamLogon_get_result(PyObject *obj, void *closure)
   18405             : {
   18406           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(obj);
   18407             :         PyObject *py_result;
   18408           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   18409           0 :         return py_result;
   18410             : }
   18411             : 
   18412           0 : static int py_winbind_SamLogon_set_result(PyObject *py_obj, PyObject *value, void *closure)
   18413             : {
   18414           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(py_obj);
   18415           0 :         if (value == NULL) {
   18416           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   18417           0 :                 return -1;
   18418             :         }
   18419           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   18420           0 :         return 0;
   18421             : }
   18422             : 
   18423             : static PyGetSetDef py_winbind_SamLogon_getsetters[] = {
   18424             :         {
   18425             :                 .name = discard_const_p(char, "in_logon_level"),
   18426             :                 .get = py_winbind_SamLogon_in_get_logon_level,
   18427             :                 .set = py_winbind_SamLogon_in_set_logon_level,
   18428             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   18429             :         },
   18430             :         {
   18431             :                 .name = discard_const_p(char, "in_logon"),
   18432             :                 .get = py_winbind_SamLogon_in_get_logon,
   18433             :                 .set = py_winbind_SamLogon_in_set_logon,
   18434             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonLevel")
   18435             :         },
   18436             :         {
   18437             :                 .name = discard_const_p(char, "in_validation_level"),
   18438             :                 .get = py_winbind_SamLogon_in_get_validation_level,
   18439             :                 .set = py_winbind_SamLogon_in_set_validation_level,
   18440             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   18441             :         },
   18442             :         {
   18443             :                 .name = discard_const_p(char, "out_validation"),
   18444             :                 .get = py_winbind_SamLogon_out_get_validation,
   18445             :                 .set = py_winbind_SamLogon_out_set_validation,
   18446             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Validation")
   18447             :         },
   18448             :         {
   18449             :                 .name = discard_const_p(char, "out_authoritative"),
   18450             :                 .get = py_winbind_SamLogon_out_get_authoritative,
   18451             :                 .set = py_winbind_SamLogon_out_set_authoritative,
   18452             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   18453             :         },
   18454             :         {
   18455             :                 .name = discard_const_p(char, "result"),
   18456             :                 .get = py_winbind_SamLogon_get_result,
   18457             :                 .set = py_winbind_SamLogon_set_result,
   18458             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   18459             :         },
   18460             :         { .name = NULL }
   18461             : };
   18462             : 
   18463           0 : static PyObject *py_winbind_SamLogon_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18464             : {
   18465           0 :         PyObject *self = pytalloc_new(struct winbind_SamLogon, type);
   18466           0 :         return self;
   18467             : }
   18468             : 
   18469           0 : static PyObject *py_winbind_SamLogon_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   18470             : {
   18471             : 
   18472             : 
   18473           0 :         return PyLong_FromLong(27);
   18474             : }
   18475             : 
   18476           0 : static PyObject *py_winbind_SamLogon_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   18477             : {
   18478           0 :         const struct ndr_interface_call *call = NULL;
   18479           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(py_obj);
   18480           0 :         PyObject *ret = NULL;
   18481           0 :         struct ndr_push *push = NULL;
   18482             :         DATA_BLOB blob;
   18483             :         enum ndr_err_code err;
   18484             : 
   18485           0 :         if (ndr_table_winbind.num_calls < 28) {
   18486           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_SamLogon_ndr_pack");
   18487           0 :                 return NULL;
   18488             :         }
   18489           0 :         call = &ndr_table_winbind.calls[27];
   18490             : 
   18491           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   18492           0 :         if (push == NULL) {
   18493           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   18494           0 :                 return NULL;
   18495             :         }
   18496             : 
   18497           0 :         push->flags |= ndr_push_flags;
   18498             : 
   18499           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   18500           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   18501           0 :                 TALLOC_FREE(push);
   18502           0 :                 PyErr_SetNdrError(err);
   18503           0 :                 return NULL;
   18504             :         }
   18505           0 :         blob = ndr_push_blob(push);
   18506           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   18507           0 :         TALLOC_FREE(push);
   18508           0 :         return ret;
   18509             : }
   18510             : 
   18511           0 : static PyObject *py_winbind_SamLogon_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   18512             : {
   18513           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   18514           0 :         PyObject *bigendian_obj = NULL;
   18515           0 :         PyObject *ndr64_obj = NULL;
   18516           0 :         uint32_t ndr_push_flags = 0;
   18517             : 
   18518           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   18519             :                 discard_const_p(char *, kwnames),
   18520             :                 &bigendian_obj,
   18521             :                 &ndr64_obj)) {
   18522           0 :                 return NULL;
   18523             :         }
   18524             : 
   18525           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   18526           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   18527             :         }
   18528           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   18529           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   18530             :         }
   18531             : 
   18532           0 :         return py_winbind_SamLogon_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   18533             : }
   18534             : 
   18535           0 : static PyObject *py_winbind_SamLogon_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   18536             : {
   18537           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   18538           0 :         PyObject *bigendian_obj = NULL;
   18539           0 :         PyObject *ndr64_obj = NULL;
   18540           0 :         uint32_t ndr_push_flags = 0;
   18541             : 
   18542           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   18543             :                 discard_const_p(char *, kwnames),
   18544             :                 &bigendian_obj,
   18545             :                 &ndr64_obj)) {
   18546           0 :                 return NULL;
   18547             :         }
   18548             : 
   18549           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   18550           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   18551             :         }
   18552           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   18553           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   18554             :         }
   18555             : 
   18556           0 :         return py_winbind_SamLogon_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   18557             : }
   18558             : 
   18559           0 : static PyObject *py_winbind_SamLogon_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   18560             : {
   18561           0 :         const struct ndr_interface_call *call = NULL;
   18562           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(py_obj);
   18563           0 :         struct ndr_pull *pull = NULL;
   18564             :         enum ndr_err_code err;
   18565             : 
   18566           0 :         if (ndr_table_winbind.num_calls < 28) {
   18567           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_SamLogon_ndr_unpack");
   18568           0 :                 return NULL;
   18569             :         }
   18570           0 :         call = &ndr_table_winbind.calls[27];
   18571             : 
   18572           0 :         pull = ndr_pull_init_blob(blob, object);
   18573           0 :         if (pull == NULL) {
   18574           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   18575           0 :                 return NULL;
   18576             :         }
   18577             : 
   18578           0 :         pull->flags |= ndr_pull_flags;
   18579             : 
   18580           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   18581           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   18582           0 :                 TALLOC_FREE(pull);
   18583           0 :                 PyErr_SetNdrError(err);
   18584           0 :                 return NULL;
   18585             :         }
   18586           0 :         if (!allow_remaining) {
   18587             :                 uint32_t highest_ofs;
   18588             : 
   18589           0 :                 if (pull->offset > pull->relative_highest_offset) {
   18590           0 :                         highest_ofs = pull->offset;
   18591             :                 } else {
   18592           0 :                         highest_ofs = pull->relative_highest_offset;
   18593             :                 }
   18594           0 :                 if (highest_ofs < pull->data_size) {
   18595           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   18596             :                                 "not all bytes consumed ofs[%u] size[%u]",
   18597             :                                 highest_ofs, pull->data_size);
   18598           0 :                         TALLOC_FREE(pull);
   18599           0 :                         PyErr_SetNdrError(err);
   18600           0 :                         return NULL;
   18601             :                 }
   18602             :         }
   18603             : 
   18604           0 :         TALLOC_FREE(pull);
   18605           0 :         Py_RETURN_NONE;
   18606             : }
   18607             : 
   18608           0 : static PyObject *py_winbind_SamLogon_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   18609             : {
   18610             :         DATA_BLOB blob;
   18611           0 :         Py_ssize_t blob_length = 0;
   18612           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   18613           0 :         PyObject *bigendian_obj = NULL;
   18614           0 :         PyObject *ndr64_obj = NULL;
   18615           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   18616           0 :         PyObject *allow_remaining_obj = NULL;
   18617           0 :         bool allow_remaining = false;
   18618             : 
   18619           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   18620             :                 discard_const_p(char *, kwnames),
   18621             :                 &blob.data, &blob_length,
   18622             :                 &bigendian_obj,
   18623             :                 &ndr64_obj,
   18624             :                 &allow_remaining_obj)) {
   18625           0 :                 return NULL;
   18626             :         }
   18627           0 :         blob.length = blob_length;
   18628             : 
   18629           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   18630           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   18631             :         }
   18632           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   18633           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   18634             :         }
   18635             : 
   18636           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   18637           0 :                 allow_remaining = true;
   18638             :         }
   18639             : 
   18640           0 :         return py_winbind_SamLogon_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   18641             : }
   18642             : 
   18643           0 : static PyObject *py_winbind_SamLogon_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   18644             : {
   18645             :         DATA_BLOB blob;
   18646           0 :         Py_ssize_t blob_length = 0;
   18647           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   18648           0 :         PyObject *bigendian_obj = NULL;
   18649           0 :         PyObject *ndr64_obj = NULL;
   18650           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   18651           0 :         PyObject *allow_remaining_obj = NULL;
   18652           0 :         bool allow_remaining = false;
   18653             : 
   18654           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   18655             :                 discard_const_p(char *, kwnames),
   18656             :                 &blob.data, &blob_length,
   18657             :                 &bigendian_obj,
   18658             :                 &ndr64_obj,
   18659             :                 &allow_remaining_obj)) {
   18660           0 :                 return NULL;
   18661             :         }
   18662           0 :         blob.length = blob_length;
   18663             : 
   18664           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   18665           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   18666             :         }
   18667           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   18668           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   18669             :         }
   18670             : 
   18671           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   18672           0 :                 allow_remaining = true;
   18673             :         }
   18674             : 
   18675           0 :         return py_winbind_SamLogon_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   18676             : }
   18677             : 
   18678           0 : static PyObject *py_winbind_SamLogon_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   18679             : {
   18680           0 :         const struct ndr_interface_call *call = NULL;
   18681           0 :         struct winbind_SamLogon *object = (struct winbind_SamLogon *)pytalloc_get_ptr(py_obj);
   18682             :         PyObject *ret;
   18683             :         char *retstr;
   18684             : 
   18685           0 :         if (ndr_table_winbind.num_calls < 28) {
   18686           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_SamLogon_ndr_print");
   18687           0 :                 return NULL;
   18688             :         }
   18689           0 :         call = &ndr_table_winbind.calls[27];
   18690             : 
   18691           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   18692           0 :         ret = PyUnicode_FromString(retstr);
   18693           0 :         TALLOC_FREE(retstr);
   18694             : 
   18695           0 :         return ret;
   18696             : }
   18697             : 
   18698           0 : static PyObject *py_winbind_SamLogon_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   18699             : {
   18700           0 :         return py_winbind_SamLogon_ndr_print(py_obj, "winbind_SamLogon_in", NDR_IN);
   18701             : }
   18702             : 
   18703           0 : static PyObject *py_winbind_SamLogon_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   18704             : {
   18705           0 :         return py_winbind_SamLogon_ndr_print(py_obj, "winbind_SamLogon_out", NDR_OUT);
   18706             : }
   18707             : 
   18708             : static PyMethodDef py_winbind_SamLogon_methods[] = {
   18709             :         { "opnum", (PyCFunction)py_winbind_SamLogon_ndr_opnum, METH_NOARGS|METH_CLASS,
   18710             :                 "winbind.SamLogon.opnum() -> 27 (0x1b) " },
   18711             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_SamLogon_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   18712             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   18713             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_SamLogon_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   18714             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   18715             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_SamLogon_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   18716             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   18717             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_SamLogon_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   18718             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   18719             :         { "__ndr_print_in__", (PyCFunction)py_winbind_SamLogon_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   18720             :         { "__ndr_print_out__", (PyCFunction)py_winbind_SamLogon_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   18721             :         { NULL, NULL, 0, NULL }
   18722             : };
   18723             : 
   18724             : 
   18725             : static PyTypeObject winbind_SamLogon_Type = {
   18726             :         PyVarObject_HEAD_INIT(NULL, 0)
   18727             :         .tp_name = "winbind.SamLogon",
   18728             :         .tp_getset = py_winbind_SamLogon_getsetters,
   18729             :         .tp_methods = py_winbind_SamLogon_methods,
   18730             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   18731             :         .tp_new = py_winbind_SamLogon_new,
   18732             : };
   18733             : 
   18734           0 : static bool pack_py_winbind_SamLogon_args_in(PyObject *args, PyObject *kwargs, struct winbind_SamLogon *r)
   18735             : {
   18736             :         PyObject *py_logon_level;
   18737             :         PyObject *py_logon;
   18738             :         PyObject *py_validation_level;
   18739           0 :         const char *kwnames[] = {
   18740             :                 "logon_level", "logon", "validation_level", NULL
   18741             :         };
   18742             : 
   18743           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:winbind_SamLogon", discard_const_p(char *, kwnames), &py_logon_level, &py_logon, &py_validation_level)) {
   18744           0 :                 return false;
   18745             :         }
   18746             : 
   18747           0 :         if (py_logon_level == NULL) {
   18748           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_level");
   18749           0 :                 return false;
   18750             :         }
   18751             :         {
   18752           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.logon_level));
   18753           0 :                 if (PyLong_Check(py_logon_level)) {
   18754             :                         unsigned long long test_var;
   18755           0 :                         test_var = PyLong_AsUnsignedLongLong(py_logon_level);
   18756           0 :                         if (PyErr_Occurred() != NULL) {
   18757           0 :                                 return false;
   18758             :                         }
   18759           0 :                         if (test_var > uint_max) {
   18760           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18761             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18762           0 :                                 return false;
   18763             :                         }
   18764           0 :                         r->in.logon_level = test_var;
   18765             :                 } else {
   18766           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18767             :                           PyLong_Type.tp_name);
   18768           0 :                         return false;
   18769             :                 }
   18770             :         }
   18771           0 :         if (py_logon == NULL) {
   18772           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon");
   18773           0 :                 return false;
   18774             :         }
   18775             :         {
   18776             :                 union netr_LogonLevel *logon_switch_0;
   18777           0 :                 logon_switch_0 = (union netr_LogonLevel *)pyrpc_export_union(netr_LogonLevel_Type, r, r->in.logon_level, py_logon, "union netr_LogonLevel");
   18778           0 :                 if (logon_switch_0 == NULL) {
   18779           0 :                         return false;
   18780             :                 }
   18781           0 :                 r->in.logon = *logon_switch_0;
   18782             :         }
   18783           0 :         if (py_validation_level == NULL) {
   18784           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.validation_level");
   18785           0 :                 return false;
   18786             :         }
   18787             :         {
   18788           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.validation_level));
   18789           0 :                 if (PyLong_Check(py_validation_level)) {
   18790             :                         unsigned long long test_var;
   18791           0 :                         test_var = PyLong_AsUnsignedLongLong(py_validation_level);
   18792           0 :                         if (PyErr_Occurred() != NULL) {
   18793           0 :                                 return false;
   18794             :                         }
   18795           0 :                         if (test_var > uint_max) {
   18796           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18797             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18798           0 :                                 return false;
   18799             :                         }
   18800           0 :                         r->in.validation_level = test_var;
   18801             :                 } else {
   18802           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18803             :                           PyLong_Type.tp_name);
   18804           0 :                         return false;
   18805             :                 }
   18806             :         }
   18807           0 :         return true;
   18808             : }
   18809             : 
   18810           0 : static PyObject *unpack_py_winbind_SamLogon_args_out(struct winbind_SamLogon *r)
   18811             : {
   18812             :         PyObject *result;
   18813             :         PyObject *py_validation;
   18814             :         PyObject *py_authoritative;
   18815           0 :         result = PyTuple_New(2);
   18816           0 :         py_validation = pyrpc_import_union(netr_Validation_Type, r, r->in.validation_level, &r->out.validation, "union netr_Validation");
   18817           0 :         if (py_validation == NULL) {
   18818           0 :                 return NULL;
   18819             :         }
   18820           0 :         PyTuple_SetItem(result, 0, py_validation);
   18821           0 :         py_authoritative = PyLong_FromLong((uint16_t)r->out.authoritative);
   18822           0 :         PyTuple_SetItem(result, 1, py_authoritative);
   18823           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   18824           0 :                 PyErr_SetNTSTATUS(r->out.result);
   18825           0 :                 return NULL;
   18826             :         }
   18827             : 
   18828           0 :         return result;
   18829             : }
   18830             : 
   18831             : 
   18832           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_get_site_name(PyObject *obj, void *closure)
   18833             : {
   18834           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   18835             :         PyObject *py_site_name;
   18836           0 :         if (object->in.site_name == NULL) {
   18837           0 :                 Py_RETURN_NONE;
   18838             :         }
   18839           0 :         if (object->in.site_name == NULL) {
   18840           0 :                 py_site_name = Py_None;
   18841           0 :                 Py_INCREF(py_site_name);
   18842             :         } else {
   18843           0 :                 if (object->in.site_name == NULL) {
   18844           0 :                         py_site_name = Py_None;
   18845           0 :                         Py_INCREF(py_site_name);
   18846             :                 } else {
   18847           0 :                         py_site_name = PyUnicode_Decode(object->in.site_name, strlen(object->in.site_name), "utf-8", "ignore");
   18848             :                 }
   18849             :         }
   18850           0 :         return py_site_name;
   18851             : }
   18852             : 
   18853           0 : static int py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
   18854             : {
   18855           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   18856           0 :         if (value == NULL) {
   18857           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.site_name");
   18858           0 :                 return -1;
   18859             :         }
   18860           0 :         if (value == Py_None) {
   18861           0 :                 object->in.site_name = NULL;
   18862             :         } else {
   18863           0 :                 object->in.site_name = NULL;
   18864             :                 {
   18865             :                         const char *test_str;
   18866             :                         const char *talloc_str;
   18867           0 :                         PyObject *unicode = NULL;
   18868           0 :                         if (PyUnicode_Check(value)) {
   18869           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   18870           0 :                                 if (unicode == NULL) {
   18871           0 :                                         PyErr_NoMemory();
   18872           0 :                                         return -1;
   18873             :                                 }
   18874           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   18875           0 :                         } else if (PyBytes_Check(value)) {
   18876           0 :                                 test_str = PyBytes_AS_STRING(value);
   18877             :                         } else {
   18878           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   18879           0 :                                 return -1;
   18880             :                         }
   18881           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   18882           0 :                         if (unicode != NULL) {
   18883           0 :                                 Py_DECREF(unicode);
   18884             :                         }
   18885           0 :                         if (talloc_str == NULL) {
   18886           0 :                                 PyErr_NoMemory();
   18887           0 :                                 return -1;
   18888             :                         }
   18889           0 :                         object->in.site_name = talloc_str;
   18890             :                 }
   18891             :         }
   18892           0 :         return 0;
   18893             : }
   18894             : 
   18895           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_ttl(PyObject *obj, void *closure)
   18896             : {
   18897           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   18898             :         PyObject *py_dns_ttl;
   18899           0 :         py_dns_ttl = PyLong_FromUnsignedLongLong((uint32_t)object->in.dns_ttl);
   18900           0 :         return py_dns_ttl;
   18901             : }
   18902             : 
   18903           0 : static int py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_ttl(PyObject *py_obj, PyObject *value, void *closure)
   18904             : {
   18905           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   18906           0 :         if (value == NULL) {
   18907           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dns_ttl");
   18908           0 :                 return -1;
   18909             :         }
   18910             :         {
   18911           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dns_ttl));
   18912           0 :                 if (PyLong_Check(value)) {
   18913             :                         unsigned long long test_var;
   18914           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18915           0 :                         if (PyErr_Occurred() != NULL) {
   18916           0 :                                 return -1;
   18917             :                         }
   18918           0 :                         if (test_var > uint_max) {
   18919           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18920             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18921           0 :                                 return -1;
   18922             :                         }
   18923           0 :                         object->in.dns_ttl = test_var;
   18924             :                 } else {
   18925           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18926             :                           PyLong_Type.tp_name);
   18927           0 :                         return -1;
   18928             :                 }
   18929             :         }
   18930           0 :         return 0;
   18931             : }
   18932             : 
   18933           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_names(PyObject *obj, void *closure)
   18934             : {
   18935           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   18936             :         PyObject *py_dns_names;
   18937           0 :         if (object->in.dns_names == NULL) {
   18938           0 :                 Py_RETURN_NONE;
   18939             :         }
   18940           0 :         py_dns_names = pytalloc_reference_ex(NL_DNS_NAME_INFO_ARRAY_Type, object->in.dns_names, object->in.dns_names);
   18941           0 :         return py_dns_names;
   18942             : }
   18943             : 
   18944           0 : static int py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_names(PyObject *py_obj, PyObject *value, void *closure)
   18945             : {
   18946           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   18947           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.dns_names));
   18948           0 :         if (value == NULL) {
   18949           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dns_names");
   18950           0 :                 return -1;
   18951             :         }
   18952           0 :         object->in.dns_names = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.dns_names);
   18953           0 :         if (object->in.dns_names == NULL) {
   18954           0 :                 PyErr_NoMemory();
   18955           0 :                 return -1;
   18956             :         }
   18957           0 :         PY_CHECK_TYPE(NL_DNS_NAME_INFO_ARRAY_Type, value, return -1;);
   18958           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   18959           0 :                 PyErr_NoMemory();
   18960           0 :                 return -1;
   18961             :         }
   18962           0 :         object->in.dns_names = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(value);
   18963           0 :         return 0;
   18964             : }
   18965             : 
   18966           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_out_get_dns_names(PyObject *obj, void *closure)
   18967             : {
   18968           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   18969             :         PyObject *py_dns_names;
   18970           0 :         if (object->out.dns_names == NULL) {
   18971           0 :                 Py_RETURN_NONE;
   18972             :         }
   18973           0 :         py_dns_names = pytalloc_reference_ex(NL_DNS_NAME_INFO_ARRAY_Type, object->out.dns_names, object->out.dns_names);
   18974           0 :         return py_dns_names;
   18975             : }
   18976             : 
   18977           0 : static int py_winbind_DsrUpdateReadOnlyServerDnsRecords_out_set_dns_names(PyObject *py_obj, PyObject *value, void *closure)
   18978             : {
   18979           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   18980           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dns_names));
   18981           0 :         if (value == NULL) {
   18982           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.dns_names");
   18983           0 :                 return -1;
   18984             :         }
   18985           0 :         object->out.dns_names = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dns_names);
   18986           0 :         if (object->out.dns_names == NULL) {
   18987           0 :                 PyErr_NoMemory();
   18988           0 :                 return -1;
   18989             :         }
   18990           0 :         PY_CHECK_TYPE(NL_DNS_NAME_INFO_ARRAY_Type, value, return -1;);
   18991           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   18992           0 :                 PyErr_NoMemory();
   18993           0 :                 return -1;
   18994             :         }
   18995           0 :         object->out.dns_names = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(value);
   18996           0 :         return 0;
   18997             : }
   18998             : 
   18999           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_get_result(PyObject *obj, void *closure)
   19000             : {
   19001           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   19002             :         PyObject *py_result;
   19003           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   19004           0 :         return py_result;
   19005             : }
   19006             : 
   19007           0 : static int py_winbind_DsrUpdateReadOnlyServerDnsRecords_set_result(PyObject *py_obj, PyObject *value, void *closure)
   19008             : {
   19009           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   19010           0 :         if (value == NULL) {
   19011           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   19012           0 :                 return -1;
   19013             :         }
   19014           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   19015           0 :         return 0;
   19016             : }
   19017             : 
   19018             : static PyGetSetDef py_winbind_DsrUpdateReadOnlyServerDnsRecords_getsetters[] = {
   19019             :         {
   19020             :                 .name = discard_const_p(char, "in_site_name"),
   19021             :                 .get = py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_get_site_name,
   19022             :                 .set = py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_set_site_name,
   19023             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19024             :         },
   19025             :         {
   19026             :                 .name = discard_const_p(char, "in_dns_ttl"),
   19027             :                 .get = py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_ttl,
   19028             :                 .set = py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_ttl,
   19029             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   19030             :         },
   19031             :         {
   19032             :                 .name = discard_const_p(char, "in_dns_names"),
   19033             :                 .get = py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_names,
   19034             :                 .set = py_winbind_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_names,
   19035             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NL_DNS_NAME_INFO_ARRAY")
   19036             :         },
   19037             :         {
   19038             :                 .name = discard_const_p(char, "out_dns_names"),
   19039             :                 .get = py_winbind_DsrUpdateReadOnlyServerDnsRecords_out_get_dns_names,
   19040             :                 .set = py_winbind_DsrUpdateReadOnlyServerDnsRecords_out_set_dns_names,
   19041             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NL_DNS_NAME_INFO_ARRAY")
   19042             :         },
   19043             :         {
   19044             :                 .name = discard_const_p(char, "result"),
   19045             :                 .get = py_winbind_DsrUpdateReadOnlyServerDnsRecords_get_result,
   19046             :                 .set = py_winbind_DsrUpdateReadOnlyServerDnsRecords_set_result,
   19047             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   19048             :         },
   19049             :         { .name = NULL }
   19050             : };
   19051             : 
   19052           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   19053             : {
   19054           0 :         PyObject *self = pytalloc_new(struct winbind_DsrUpdateReadOnlyServerDnsRecords, type);
   19055           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *_self = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(self);
   19056           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   19057           0 :         _self->in.dns_names = talloc_zero(mem_ctx, struct NL_DNS_NAME_INFO_ARRAY);
   19058           0 :         _self->out.dns_names = talloc_zero(mem_ctx, struct NL_DNS_NAME_INFO_ARRAY);
   19059           0 :         return self;
   19060             : }
   19061             : 
   19062           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   19063             : {
   19064             : 
   19065             : 
   19066           0 :         return PyLong_FromLong(28);
   19067             : }
   19068             : 
   19069           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   19070             : {
   19071           0 :         const struct ndr_interface_call *call = NULL;
   19072           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   19073           0 :         PyObject *ret = NULL;
   19074           0 :         struct ndr_push *push = NULL;
   19075             :         DATA_BLOB blob;
   19076             :         enum ndr_err_code err;
   19077             : 
   19078           0 :         if (ndr_table_winbind.num_calls < 29) {
   19079           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_pack");
   19080           0 :                 return NULL;
   19081             :         }
   19082           0 :         call = &ndr_table_winbind.calls[28];
   19083             : 
   19084           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   19085           0 :         if (push == NULL) {
   19086           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   19087           0 :                 return NULL;
   19088             :         }
   19089             : 
   19090           0 :         push->flags |= ndr_push_flags;
   19091             : 
   19092           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   19093           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   19094           0 :                 TALLOC_FREE(push);
   19095           0 :                 PyErr_SetNdrError(err);
   19096           0 :                 return NULL;
   19097             :         }
   19098           0 :         blob = ndr_push_blob(push);
   19099           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   19100           0 :         TALLOC_FREE(push);
   19101           0 :         return ret;
   19102             : }
   19103             : 
   19104           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   19105             : {
   19106           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   19107           0 :         PyObject *bigendian_obj = NULL;
   19108           0 :         PyObject *ndr64_obj = NULL;
   19109           0 :         uint32_t ndr_push_flags = 0;
   19110             : 
   19111           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   19112             :                 discard_const_p(char *, kwnames),
   19113             :                 &bigendian_obj,
   19114             :                 &ndr64_obj)) {
   19115           0 :                 return NULL;
   19116             :         }
   19117             : 
   19118           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   19119           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   19120             :         }
   19121           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   19122           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   19123             :         }
   19124             : 
   19125           0 :         return py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   19126             : }
   19127             : 
   19128           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   19129             : {
   19130           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   19131           0 :         PyObject *bigendian_obj = NULL;
   19132           0 :         PyObject *ndr64_obj = NULL;
   19133           0 :         uint32_t ndr_push_flags = 0;
   19134             : 
   19135           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   19136             :                 discard_const_p(char *, kwnames),
   19137             :                 &bigendian_obj,
   19138             :                 &ndr64_obj)) {
   19139           0 :                 return NULL;
   19140             :         }
   19141             : 
   19142           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   19143           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   19144             :         }
   19145           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   19146           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   19147             :         }
   19148             : 
   19149           0 :         return py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   19150             : }
   19151             : 
   19152           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   19153             : {
   19154           0 :         const struct ndr_interface_call *call = NULL;
   19155           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   19156           0 :         struct ndr_pull *pull = NULL;
   19157             :         enum ndr_err_code err;
   19158             : 
   19159           0 :         if (ndr_table_winbind.num_calls < 29) {
   19160           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack");
   19161           0 :                 return NULL;
   19162             :         }
   19163           0 :         call = &ndr_table_winbind.calls[28];
   19164             : 
   19165           0 :         pull = ndr_pull_init_blob(blob, object);
   19166           0 :         if (pull == NULL) {
   19167           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   19168           0 :                 return NULL;
   19169             :         }
   19170             : 
   19171           0 :         pull->flags |= ndr_pull_flags;
   19172             : 
   19173           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   19174           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   19175           0 :                 TALLOC_FREE(pull);
   19176           0 :                 PyErr_SetNdrError(err);
   19177           0 :                 return NULL;
   19178             :         }
   19179           0 :         if (!allow_remaining) {
   19180             :                 uint32_t highest_ofs;
   19181             : 
   19182           0 :                 if (pull->offset > pull->relative_highest_offset) {
   19183           0 :                         highest_ofs = pull->offset;
   19184             :                 } else {
   19185           0 :                         highest_ofs = pull->relative_highest_offset;
   19186             :                 }
   19187           0 :                 if (highest_ofs < pull->data_size) {
   19188           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   19189             :                                 "not all bytes consumed ofs[%u] size[%u]",
   19190             :                                 highest_ofs, pull->data_size);
   19191           0 :                         TALLOC_FREE(pull);
   19192           0 :                         PyErr_SetNdrError(err);
   19193           0 :                         return NULL;
   19194             :                 }
   19195             :         }
   19196             : 
   19197           0 :         TALLOC_FREE(pull);
   19198           0 :         Py_RETURN_NONE;
   19199             : }
   19200             : 
   19201           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   19202             : {
   19203             :         DATA_BLOB blob;
   19204           0 :         Py_ssize_t blob_length = 0;
   19205           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   19206           0 :         PyObject *bigendian_obj = NULL;
   19207           0 :         PyObject *ndr64_obj = NULL;
   19208           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   19209           0 :         PyObject *allow_remaining_obj = NULL;
   19210           0 :         bool allow_remaining = false;
   19211             : 
   19212           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   19213             :                 discard_const_p(char *, kwnames),
   19214             :                 &blob.data, &blob_length,
   19215             :                 &bigendian_obj,
   19216             :                 &ndr64_obj,
   19217             :                 &allow_remaining_obj)) {
   19218           0 :                 return NULL;
   19219             :         }
   19220           0 :         blob.length = blob_length;
   19221             : 
   19222           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   19223           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   19224             :         }
   19225           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   19226           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   19227             :         }
   19228             : 
   19229           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   19230           0 :                 allow_remaining = true;
   19231             :         }
   19232             : 
   19233           0 :         return py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   19234             : }
   19235             : 
   19236           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   19237             : {
   19238             :         DATA_BLOB blob;
   19239           0 :         Py_ssize_t blob_length = 0;
   19240           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   19241           0 :         PyObject *bigendian_obj = NULL;
   19242           0 :         PyObject *ndr64_obj = NULL;
   19243           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   19244           0 :         PyObject *allow_remaining_obj = NULL;
   19245           0 :         bool allow_remaining = false;
   19246             : 
   19247           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   19248             :                 discard_const_p(char *, kwnames),
   19249             :                 &blob.data, &blob_length,
   19250             :                 &bigendian_obj,
   19251             :                 &ndr64_obj,
   19252             :                 &allow_remaining_obj)) {
   19253           0 :                 return NULL;
   19254             :         }
   19255           0 :         blob.length = blob_length;
   19256             : 
   19257           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   19258           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   19259             :         }
   19260           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   19261           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   19262             :         }
   19263             : 
   19264           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   19265           0 :                 allow_remaining = true;
   19266             :         }
   19267             : 
   19268           0 :         return py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   19269             : }
   19270             : 
   19271           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   19272             : {
   19273           0 :         const struct ndr_interface_call *call = NULL;
   19274           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *object = (struct winbind_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   19275             :         PyObject *ret;
   19276             :         char *retstr;
   19277             : 
   19278           0 :         if (ndr_table_winbind.num_calls < 29) {
   19279           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_print");
   19280           0 :                 return NULL;
   19281             :         }
   19282           0 :         call = &ndr_table_winbind.calls[28];
   19283             : 
   19284           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   19285           0 :         ret = PyUnicode_FromString(retstr);
   19286           0 :         TALLOC_FREE(retstr);
   19287             : 
   19288           0 :         return ret;
   19289             : }
   19290             : 
   19291           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   19292             : {
   19293           0 :         return py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_print(py_obj, "winbind_DsrUpdateReadOnlyServerDnsRecords_in", NDR_IN);
   19294             : }
   19295             : 
   19296           0 : static PyObject *py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   19297             : {
   19298           0 :         return py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_print(py_obj, "winbind_DsrUpdateReadOnlyServerDnsRecords_out", NDR_OUT);
   19299             : }
   19300             : 
   19301             : static PyMethodDef py_winbind_DsrUpdateReadOnlyServerDnsRecords_methods[] = {
   19302             :         { "opnum", (PyCFunction)py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_opnum, METH_NOARGS|METH_CLASS,
   19303             :                 "winbind.DsrUpdateReadOnlyServerDnsRecords.opnum() -> 28 (0x1c) " },
   19304             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   19305             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   19306             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   19307             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   19308             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   19309             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   19310             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   19311             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   19312             :         { "__ndr_print_in__", (PyCFunction)py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   19313             :         { "__ndr_print_out__", (PyCFunction)py_winbind_DsrUpdateReadOnlyServerDnsRecords_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   19314             :         { NULL, NULL, 0, NULL }
   19315             : };
   19316             : 
   19317             : 
   19318             : static PyTypeObject winbind_DsrUpdateReadOnlyServerDnsRecords_Type = {
   19319             :         PyVarObject_HEAD_INIT(NULL, 0)
   19320             :         .tp_name = "winbind.DsrUpdateReadOnlyServerDnsRecords",
   19321             :         .tp_getset = py_winbind_DsrUpdateReadOnlyServerDnsRecords_getsetters,
   19322             :         .tp_methods = py_winbind_DsrUpdateReadOnlyServerDnsRecords_methods,
   19323             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   19324             :         .tp_new = py_winbind_DsrUpdateReadOnlyServerDnsRecords_new,
   19325             : };
   19326             : 
   19327           4 : static bool pack_py_winbind_DsrUpdateReadOnlyServerDnsRecords_args_in(PyObject *args, PyObject *kwargs, struct winbind_DsrUpdateReadOnlyServerDnsRecords *r)
   19328             : {
   19329             :         PyObject *py_site_name;
   19330             :         PyObject *py_dns_ttl;
   19331             :         PyObject *py_dns_names;
   19332           4 :         const char *kwnames[] = {
   19333             :                 "site_name", "dns_ttl", "dns_names", NULL
   19334             :         };
   19335             : 
   19336           4 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:winbind_DsrUpdateReadOnlyServerDnsRecords", discard_const_p(char *, kwnames), &py_site_name, &py_dns_ttl, &py_dns_names)) {
   19337           0 :                 return false;
   19338             :         }
   19339             : 
   19340           4 :         if (py_site_name == NULL) {
   19341           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.site_name");
   19342           0 :                 return false;
   19343             :         }
   19344           4 :         if (py_site_name == Py_None) {
   19345           0 :                 r->in.site_name = NULL;
   19346             :         } else {
   19347           4 :                 r->in.site_name = NULL;
   19348             :                 {
   19349             :                         const char *test_str;
   19350             :                         const char *talloc_str;
   19351           4 :                         PyObject *unicode = NULL;
   19352           4 :                         if (PyUnicode_Check(py_site_name)) {
   19353           4 :                                 unicode = PyUnicode_AsEncodedString(py_site_name, "utf-8", "ignore");
   19354           4 :                                 if (unicode == NULL) {
   19355           0 :                                         PyErr_NoMemory();
   19356           0 :                                         return false;
   19357             :                                 }
   19358           4 :                                 test_str = PyBytes_AS_STRING(unicode);
   19359           0 :                         } else if (PyBytes_Check(py_site_name)) {
   19360           0 :                                 test_str = PyBytes_AS_STRING(py_site_name);
   19361             :                         } else {
   19362           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_site_name)->tp_name);
   19363           0 :                                 return false;
   19364             :                         }
   19365           4 :                         talloc_str = talloc_strdup(r, test_str);
   19366           4 :                         if (unicode != NULL) {
   19367           4 :                                 Py_DECREF(unicode);
   19368             :                         }
   19369           4 :                         if (talloc_str == NULL) {
   19370           0 :                                 PyErr_NoMemory();
   19371           0 :                                 return false;
   19372             :                         }
   19373           4 :                         r->in.site_name = talloc_str;
   19374             :                 }
   19375             :         }
   19376           4 :         if (py_dns_ttl == NULL) {
   19377           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dns_ttl");
   19378           0 :                 return false;
   19379             :         }
   19380             :         {
   19381           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dns_ttl));
   19382           4 :                 if (PyLong_Check(py_dns_ttl)) {
   19383             :                         unsigned long long test_var;
   19384           4 :                         test_var = PyLong_AsUnsignedLongLong(py_dns_ttl);
   19385           4 :                         if (PyErr_Occurred() != NULL) {
   19386           0 :                                 return false;
   19387             :                         }
   19388           4 :                         if (test_var > uint_max) {
   19389           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19390             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19391           0 :                                 return false;
   19392             :                         }
   19393           4 :                         r->in.dns_ttl = test_var;
   19394             :                 } else {
   19395           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19396             :                           PyLong_Type.tp_name);
   19397           0 :                         return false;
   19398             :                 }
   19399             :         }
   19400           4 :         if (py_dns_names == NULL) {
   19401           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dns_names");
   19402           0 :                 return false;
   19403             :         }
   19404           4 :         r->in.dns_names = talloc_ptrtype(r, r->in.dns_names);
   19405           4 :         if (r->in.dns_names == NULL) {
   19406           0 :                 PyErr_NoMemory();
   19407           0 :                 return false;
   19408             :         }
   19409           4 :         PY_CHECK_TYPE(NL_DNS_NAME_INFO_ARRAY_Type, py_dns_names, return false;);
   19410           4 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_dns_names)) == NULL) {
   19411           0 :                 PyErr_NoMemory();
   19412           0 :                 return false;
   19413             :         }
   19414           4 :         r->in.dns_names = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(py_dns_names);
   19415           4 :         return true;
   19416             : }
   19417             : 
   19418           4 : static PyObject *unpack_py_winbind_DsrUpdateReadOnlyServerDnsRecords_args_out(struct winbind_DsrUpdateReadOnlyServerDnsRecords *r)
   19419             : {
   19420             :         PyObject *result;
   19421             :         PyObject *py_dns_names;
   19422           4 :         py_dns_names = pytalloc_reference_ex(NL_DNS_NAME_INFO_ARRAY_Type, r->out.dns_names, r->out.dns_names);
   19423           4 :         result = py_dns_names;
   19424           4 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   19425           0 :                 PyErr_SetNTSTATUS(r->out.result);
   19426           0 :                 return NULL;
   19427             :         }
   19428             : 
   19429           4 :         return result;
   19430             : }
   19431             : 
   19432             : 
   19433           0 : static PyObject *py_winbind_LogonControl_in_get_function_code(PyObject *obj, void *closure)
   19434             : {
   19435           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(obj);
   19436             :         PyObject *py_function_code;
   19437           0 :         py_function_code = PyLong_FromUnsignedLongLong((uint32_t)object->in.function_code);
   19438           0 :         return py_function_code;
   19439             : }
   19440             : 
   19441           0 : static int py_winbind_LogonControl_in_set_function_code(PyObject *py_obj, PyObject *value, void *closure)
   19442             : {
   19443           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(py_obj);
   19444           0 :         if (value == NULL) {
   19445           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.function_code");
   19446           0 :                 return -1;
   19447             :         }
   19448             :         {
   19449           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.function_code));
   19450           0 :                 if (PyLong_Check(value)) {
   19451             :                         unsigned long long test_var;
   19452           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19453           0 :                         if (PyErr_Occurred() != NULL) {
   19454           0 :                                 return -1;
   19455             :                         }
   19456           0 :                         if (test_var > uint_max) {
   19457           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19458             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19459           0 :                                 return -1;
   19460             :                         }
   19461           0 :                         object->in.function_code = test_var;
   19462             :                 } else {
   19463           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19464             :                           PyLong_Type.tp_name);
   19465           0 :                         return -1;
   19466             :                 }
   19467             :         }
   19468           0 :         return 0;
   19469             : }
   19470             : 
   19471           0 : static PyObject *py_winbind_LogonControl_in_get_level(PyObject *obj, void *closure)
   19472             : {
   19473           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(obj);
   19474             :         PyObject *py_level;
   19475           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   19476           0 :         return py_level;
   19477             : }
   19478             : 
   19479           0 : static int py_winbind_LogonControl_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   19480             : {
   19481           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(py_obj);
   19482           0 :         if (value == NULL) {
   19483           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   19484           0 :                 return -1;
   19485             :         }
   19486             :         {
   19487           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   19488           0 :                 if (PyLong_Check(value)) {
   19489             :                         unsigned long long test_var;
   19490           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19491           0 :                         if (PyErr_Occurred() != NULL) {
   19492           0 :                                 return -1;
   19493             :                         }
   19494           0 :                         if (test_var > uint_max) {
   19495           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19496             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19497           0 :                                 return -1;
   19498             :                         }
   19499           0 :                         object->in.level = test_var;
   19500             :                 } else {
   19501           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19502             :                           PyLong_Type.tp_name);
   19503           0 :                         return -1;
   19504             :                 }
   19505             :         }
   19506           0 :         return 0;
   19507             : }
   19508             : 
   19509           0 : static PyObject *py_winbind_LogonControl_in_get_data(PyObject *obj, void *closure)
   19510             : {
   19511           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(obj);
   19512             :         PyObject *py_data;
   19513           0 :         if (object->in.data == NULL) {
   19514           0 :                 Py_RETURN_NONE;
   19515             :         }
   19516           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");
   19517           0 :         if (py_data == NULL) {
   19518           0 :                 return NULL;
   19519             :         }
   19520           0 :         return py_data;
   19521             : }
   19522             : 
   19523           0 : static int py_winbind_LogonControl_in_set_data(PyObject *py_obj, PyObject *value, void *closure)
   19524             : {
   19525           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(py_obj);
   19526           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.data));
   19527           0 :         if (value == NULL) {
   19528           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.data");
   19529           0 :                 return -1;
   19530             :         }
   19531           0 :         object->in.data = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.data);
   19532           0 :         if (object->in.data == NULL) {
   19533           0 :                 PyErr_NoMemory();
   19534           0 :                 return -1;
   19535             :         }
   19536             :         {
   19537             :                 union netr_CONTROL_DATA_INFORMATION *data_switch_1;
   19538           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");
   19539           0 :                 if (data_switch_1 == NULL) {
   19540           0 :                         return -1;
   19541             :                 }
   19542           0 :                 object->in.data = data_switch_1;
   19543             :         }
   19544           0 :         return 0;
   19545             : }
   19546             : 
   19547           0 : static PyObject *py_winbind_LogonControl_out_get_query(PyObject *obj, void *closure)
   19548             : {
   19549           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(obj);
   19550             :         PyObject *py_query;
   19551           0 :         if (object->out.query == NULL) {
   19552           0 :                 Py_RETURN_NONE;
   19553             :         }
   19554           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");
   19555           0 :         if (py_query == NULL) {
   19556           0 :                 return NULL;
   19557             :         }
   19558           0 :         return py_query;
   19559             : }
   19560             : 
   19561           0 : static int py_winbind_LogonControl_out_set_query(PyObject *py_obj, PyObject *value, void *closure)
   19562             : {
   19563           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(py_obj);
   19564           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.query));
   19565           0 :         if (value == NULL) {
   19566           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.query");
   19567           0 :                 return -1;
   19568             :         }
   19569           0 :         object->out.query = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.query);
   19570           0 :         if (object->out.query == NULL) {
   19571           0 :                 PyErr_NoMemory();
   19572           0 :                 return -1;
   19573             :         }
   19574             :         {
   19575             :                 union netr_CONTROL_QUERY_INFORMATION *query_switch_1;
   19576           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");
   19577           0 :                 if (query_switch_1 == NULL) {
   19578           0 :                         return -1;
   19579             :                 }
   19580           0 :                 object->out.query = query_switch_1;
   19581             :         }
   19582           0 :         return 0;
   19583             : }
   19584             : 
   19585           0 : static PyObject *py_winbind_LogonControl_get_result(PyObject *obj, void *closure)
   19586             : {
   19587           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(obj);
   19588             :         PyObject *py_result;
   19589           0 :         py_result = PyErr_FromWERROR(object->out.result);
   19590           0 :         return py_result;
   19591             : }
   19592             : 
   19593           0 : static int py_winbind_LogonControl_set_result(PyObject *py_obj, PyObject *value, void *closure)
   19594             : {
   19595           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(py_obj);
   19596           0 :         if (value == NULL) {
   19597           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   19598           0 :                 return -1;
   19599             :         }
   19600           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   19601           0 :         return 0;
   19602             : }
   19603             : 
   19604             : static PyGetSetDef py_winbind_LogonControl_getsetters[] = {
   19605             :         {
   19606             :                 .name = discard_const_p(char, "in_function_code"),
   19607             :                 .get = py_winbind_LogonControl_in_get_function_code,
   19608             :                 .set = py_winbind_LogonControl_in_set_function_code,
   19609             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonControlCode")
   19610             :         },
   19611             :         {
   19612             :                 .name = discard_const_p(char, "in_level"),
   19613             :                 .get = py_winbind_LogonControl_in_get_level,
   19614             :                 .set = py_winbind_LogonControl_in_set_level,
   19615             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   19616             :         },
   19617             :         {
   19618             :                 .name = discard_const_p(char, "in_data"),
   19619             :                 .get = py_winbind_LogonControl_in_get_data,
   19620             :                 .set = py_winbind_LogonControl_in_set_data,
   19621             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_DATA_INFORMATION")
   19622             :         },
   19623             :         {
   19624             :                 .name = discard_const_p(char, "out_query"),
   19625             :                 .get = py_winbind_LogonControl_out_get_query,
   19626             :                 .set = py_winbind_LogonControl_out_set_query,
   19627             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_QUERY_INFORMATION")
   19628             :         },
   19629             :         {
   19630             :                 .name = discard_const_p(char, "result"),
   19631             :                 .get = py_winbind_LogonControl_get_result,
   19632             :                 .set = py_winbind_LogonControl_set_result,
   19633             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   19634             :         },
   19635             :         { .name = NULL }
   19636             : };
   19637             : 
   19638           0 : static PyObject *py_winbind_LogonControl_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   19639             : {
   19640           0 :         PyObject *self = pytalloc_new(struct winbind_LogonControl, type);
   19641           0 :         struct winbind_LogonControl *_self = (struct winbind_LogonControl *)pytalloc_get_ptr(self);
   19642           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   19643           0 :         _self->in.data = talloc_zero(mem_ctx, union netr_CONTROL_DATA_INFORMATION);
   19644           0 :         _self->out.query = talloc_zero(mem_ctx, union netr_CONTROL_QUERY_INFORMATION);
   19645           0 :         return self;
   19646             : }
   19647             : 
   19648           0 : static PyObject *py_winbind_LogonControl_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   19649             : {
   19650             : 
   19651             : 
   19652           0 :         return PyLong_FromLong(29);
   19653             : }
   19654             : 
   19655           0 : static PyObject *py_winbind_LogonControl_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   19656             : {
   19657           0 :         const struct ndr_interface_call *call = NULL;
   19658           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(py_obj);
   19659           0 :         PyObject *ret = NULL;
   19660           0 :         struct ndr_push *push = NULL;
   19661             :         DATA_BLOB blob;
   19662             :         enum ndr_err_code err;
   19663             : 
   19664           0 :         if (ndr_table_winbind.num_calls < 30) {
   19665           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_LogonControl_ndr_pack");
   19666           0 :                 return NULL;
   19667             :         }
   19668           0 :         call = &ndr_table_winbind.calls[29];
   19669             : 
   19670           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   19671           0 :         if (push == NULL) {
   19672           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   19673           0 :                 return NULL;
   19674             :         }
   19675             : 
   19676           0 :         push->flags |= ndr_push_flags;
   19677             : 
   19678           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   19679           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   19680           0 :                 TALLOC_FREE(push);
   19681           0 :                 PyErr_SetNdrError(err);
   19682           0 :                 return NULL;
   19683             :         }
   19684           0 :         blob = ndr_push_blob(push);
   19685           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   19686           0 :         TALLOC_FREE(push);
   19687           0 :         return ret;
   19688             : }
   19689             : 
   19690           0 : static PyObject *py_winbind_LogonControl_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   19691             : {
   19692           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   19693           0 :         PyObject *bigendian_obj = NULL;
   19694           0 :         PyObject *ndr64_obj = NULL;
   19695           0 :         uint32_t ndr_push_flags = 0;
   19696             : 
   19697           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   19698             :                 discard_const_p(char *, kwnames),
   19699             :                 &bigendian_obj,
   19700             :                 &ndr64_obj)) {
   19701           0 :                 return NULL;
   19702             :         }
   19703             : 
   19704           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   19705           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   19706             :         }
   19707           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   19708           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   19709             :         }
   19710             : 
   19711           0 :         return py_winbind_LogonControl_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   19712             : }
   19713             : 
   19714           0 : static PyObject *py_winbind_LogonControl_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   19715             : {
   19716           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   19717           0 :         PyObject *bigendian_obj = NULL;
   19718           0 :         PyObject *ndr64_obj = NULL;
   19719           0 :         uint32_t ndr_push_flags = 0;
   19720             : 
   19721           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   19722             :                 discard_const_p(char *, kwnames),
   19723             :                 &bigendian_obj,
   19724             :                 &ndr64_obj)) {
   19725           0 :                 return NULL;
   19726             :         }
   19727             : 
   19728           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   19729           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   19730             :         }
   19731           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   19732           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   19733             :         }
   19734             : 
   19735           0 :         return py_winbind_LogonControl_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   19736             : }
   19737             : 
   19738           0 : static PyObject *py_winbind_LogonControl_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   19739             : {
   19740           0 :         const struct ndr_interface_call *call = NULL;
   19741           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(py_obj);
   19742           0 :         struct ndr_pull *pull = NULL;
   19743             :         enum ndr_err_code err;
   19744             : 
   19745           0 :         if (ndr_table_winbind.num_calls < 30) {
   19746           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_LogonControl_ndr_unpack");
   19747           0 :                 return NULL;
   19748             :         }
   19749           0 :         call = &ndr_table_winbind.calls[29];
   19750             : 
   19751           0 :         pull = ndr_pull_init_blob(blob, object);
   19752           0 :         if (pull == NULL) {
   19753           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   19754           0 :                 return NULL;
   19755             :         }
   19756             : 
   19757           0 :         pull->flags |= ndr_pull_flags;
   19758             : 
   19759           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   19760           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   19761           0 :                 TALLOC_FREE(pull);
   19762           0 :                 PyErr_SetNdrError(err);
   19763           0 :                 return NULL;
   19764             :         }
   19765           0 :         if (!allow_remaining) {
   19766             :                 uint32_t highest_ofs;
   19767             : 
   19768           0 :                 if (pull->offset > pull->relative_highest_offset) {
   19769           0 :                         highest_ofs = pull->offset;
   19770             :                 } else {
   19771           0 :                         highest_ofs = pull->relative_highest_offset;
   19772             :                 }
   19773           0 :                 if (highest_ofs < pull->data_size) {
   19774           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   19775             :                                 "not all bytes consumed ofs[%u] size[%u]",
   19776             :                                 highest_ofs, pull->data_size);
   19777           0 :                         TALLOC_FREE(pull);
   19778           0 :                         PyErr_SetNdrError(err);
   19779           0 :                         return NULL;
   19780             :                 }
   19781             :         }
   19782             : 
   19783           0 :         TALLOC_FREE(pull);
   19784           0 :         Py_RETURN_NONE;
   19785             : }
   19786             : 
   19787           0 : static PyObject *py_winbind_LogonControl_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   19788             : {
   19789             :         DATA_BLOB blob;
   19790           0 :         Py_ssize_t blob_length = 0;
   19791           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   19792           0 :         PyObject *bigendian_obj = NULL;
   19793           0 :         PyObject *ndr64_obj = NULL;
   19794           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   19795           0 :         PyObject *allow_remaining_obj = NULL;
   19796           0 :         bool allow_remaining = false;
   19797             : 
   19798           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   19799             :                 discard_const_p(char *, kwnames),
   19800             :                 &blob.data, &blob_length,
   19801             :                 &bigendian_obj,
   19802             :                 &ndr64_obj,
   19803             :                 &allow_remaining_obj)) {
   19804           0 :                 return NULL;
   19805             :         }
   19806           0 :         blob.length = blob_length;
   19807             : 
   19808           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   19809           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   19810             :         }
   19811           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   19812           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   19813             :         }
   19814             : 
   19815           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   19816           0 :                 allow_remaining = true;
   19817             :         }
   19818             : 
   19819           0 :         return py_winbind_LogonControl_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   19820             : }
   19821             : 
   19822           0 : static PyObject *py_winbind_LogonControl_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   19823             : {
   19824             :         DATA_BLOB blob;
   19825           0 :         Py_ssize_t blob_length = 0;
   19826           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   19827           0 :         PyObject *bigendian_obj = NULL;
   19828           0 :         PyObject *ndr64_obj = NULL;
   19829           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   19830           0 :         PyObject *allow_remaining_obj = NULL;
   19831           0 :         bool allow_remaining = false;
   19832             : 
   19833           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   19834             :                 discard_const_p(char *, kwnames),
   19835             :                 &blob.data, &blob_length,
   19836             :                 &bigendian_obj,
   19837             :                 &ndr64_obj,
   19838             :                 &allow_remaining_obj)) {
   19839           0 :                 return NULL;
   19840             :         }
   19841           0 :         blob.length = blob_length;
   19842             : 
   19843           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   19844           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   19845             :         }
   19846           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   19847           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   19848             :         }
   19849             : 
   19850           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   19851           0 :                 allow_remaining = true;
   19852             :         }
   19853             : 
   19854           0 :         return py_winbind_LogonControl_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   19855             : }
   19856             : 
   19857           0 : static PyObject *py_winbind_LogonControl_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   19858             : {
   19859           0 :         const struct ndr_interface_call *call = NULL;
   19860           0 :         struct winbind_LogonControl *object = (struct winbind_LogonControl *)pytalloc_get_ptr(py_obj);
   19861             :         PyObject *ret;
   19862             :         char *retstr;
   19863             : 
   19864           0 :         if (ndr_table_winbind.num_calls < 30) {
   19865           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_LogonControl_ndr_print");
   19866           0 :                 return NULL;
   19867             :         }
   19868           0 :         call = &ndr_table_winbind.calls[29];
   19869             : 
   19870           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   19871           0 :         ret = PyUnicode_FromString(retstr);
   19872           0 :         TALLOC_FREE(retstr);
   19873             : 
   19874           0 :         return ret;
   19875             : }
   19876             : 
   19877           0 : static PyObject *py_winbind_LogonControl_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   19878             : {
   19879           0 :         return py_winbind_LogonControl_ndr_print(py_obj, "winbind_LogonControl_in", NDR_IN);
   19880             : }
   19881             : 
   19882           0 : static PyObject *py_winbind_LogonControl_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   19883             : {
   19884           0 :         return py_winbind_LogonControl_ndr_print(py_obj, "winbind_LogonControl_out", NDR_OUT);
   19885             : }
   19886             : 
   19887             : static PyMethodDef py_winbind_LogonControl_methods[] = {
   19888             :         { "opnum", (PyCFunction)py_winbind_LogonControl_ndr_opnum, METH_NOARGS|METH_CLASS,
   19889             :                 "winbind.LogonControl.opnum() -> 29 (0x1d) " },
   19890             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_LogonControl_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   19891             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   19892             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_LogonControl_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   19893             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   19894             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_LogonControl_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   19895             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   19896             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_LogonControl_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   19897             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   19898             :         { "__ndr_print_in__", (PyCFunction)py_winbind_LogonControl_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   19899             :         { "__ndr_print_out__", (PyCFunction)py_winbind_LogonControl_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   19900             :         { NULL, NULL, 0, NULL }
   19901             : };
   19902             : 
   19903             : 
   19904             : static PyTypeObject winbind_LogonControl_Type = {
   19905             :         PyVarObject_HEAD_INIT(NULL, 0)
   19906             :         .tp_name = "winbind.LogonControl",
   19907             :         .tp_getset = py_winbind_LogonControl_getsetters,
   19908             :         .tp_methods = py_winbind_LogonControl_methods,
   19909             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   19910             :         .tp_new = py_winbind_LogonControl_new,
   19911             : };
   19912             : 
   19913           0 : static bool pack_py_winbind_LogonControl_args_in(PyObject *args, PyObject *kwargs, struct winbind_LogonControl *r)
   19914             : {
   19915             :         PyObject *py_function_code;
   19916             :         PyObject *py_level;
   19917             :         PyObject *py_data;
   19918           0 :         const char *kwnames[] = {
   19919             :                 "function_code", "level", "data", NULL
   19920             :         };
   19921             : 
   19922           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:winbind_LogonControl", discard_const_p(char *, kwnames), &py_function_code, &py_level, &py_data)) {
   19923           0 :                 return false;
   19924             :         }
   19925             : 
   19926           0 :         if (py_function_code == NULL) {
   19927           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.function_code");
   19928           0 :                 return false;
   19929             :         }
   19930             :         {
   19931           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.function_code));
   19932           0 :                 if (PyLong_Check(py_function_code)) {
   19933             :                         unsigned long long test_var;
   19934           0 :                         test_var = PyLong_AsUnsignedLongLong(py_function_code);
   19935           0 :                         if (PyErr_Occurred() != NULL) {
   19936           0 :                                 return false;
   19937             :                         }
   19938           0 :                         if (test_var > uint_max) {
   19939           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19940             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19941           0 :                                 return false;
   19942             :                         }
   19943           0 :                         r->in.function_code = test_var;
   19944             :                 } else {
   19945           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19946             :                           PyLong_Type.tp_name);
   19947           0 :                         return false;
   19948             :                 }
   19949             :         }
   19950           0 :         if (py_level == NULL) {
   19951           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   19952           0 :                 return false;
   19953             :         }
   19954             :         {
   19955           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   19956           0 :                 if (PyLong_Check(py_level)) {
   19957             :                         unsigned long long test_var;
   19958           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   19959           0 :                         if (PyErr_Occurred() != NULL) {
   19960           0 :                                 return false;
   19961             :                         }
   19962           0 :                         if (test_var > uint_max) {
   19963           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19964             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19965           0 :                                 return false;
   19966             :                         }
   19967           0 :                         r->in.level = test_var;
   19968             :                 } else {
   19969           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19970             :                           PyLong_Type.tp_name);
   19971           0 :                         return false;
   19972             :                 }
   19973             :         }
   19974           0 :         if (py_data == NULL) {
   19975           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.data");
   19976           0 :                 return false;
   19977             :         }
   19978           0 :         r->in.data = talloc_ptrtype(r, r->in.data);
   19979           0 :         if (r->in.data == NULL) {
   19980           0 :                 PyErr_NoMemory();
   19981           0 :                 return false;
   19982             :         }
   19983             :         {
   19984             :                 union netr_CONTROL_DATA_INFORMATION *data_switch_1;
   19985           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");
   19986           0 :                 if (data_switch_1 == NULL) {
   19987           0 :                         return false;
   19988             :                 }
   19989           0 :                 r->in.data = data_switch_1;
   19990             :         }
   19991           0 :         return true;
   19992             : }
   19993             : 
   19994           0 : static PyObject *unpack_py_winbind_LogonControl_args_out(struct winbind_LogonControl *r)
   19995             : {
   19996             :         PyObject *result;
   19997             :         PyObject *py_query;
   19998           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");
   19999           0 :         if (py_query == NULL) {
   20000           0 :                 return NULL;
   20001             :         }
   20002           0 :         result = py_query;
   20003           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   20004           0 :                 PyErr_SetWERROR(r->out.result);
   20005           0 :                 return NULL;
   20006             :         }
   20007             : 
   20008           0 :         return result;
   20009             : }
   20010             : 
   20011             : 
   20012           0 : static PyObject *py_winbind_GetForestTrustInformation_in_get_trusted_domain_name(PyObject *obj, void *closure)
   20013             : {
   20014           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   20015             :         PyObject *py_trusted_domain_name;
   20016           0 :         if (object->in.trusted_domain_name == NULL) {
   20017           0 :                 Py_RETURN_NONE;
   20018             :         }
   20019           0 :         if (object->in.trusted_domain_name == NULL) {
   20020           0 :                 py_trusted_domain_name = Py_None;
   20021           0 :                 Py_INCREF(py_trusted_domain_name);
   20022             :         } else {
   20023           0 :                 if (object->in.trusted_domain_name == NULL) {
   20024           0 :                         py_trusted_domain_name = Py_None;
   20025           0 :                         Py_INCREF(py_trusted_domain_name);
   20026             :                 } else {
   20027           0 :                         py_trusted_domain_name = PyUnicode_Decode(object->in.trusted_domain_name, strlen(object->in.trusted_domain_name), "utf-8", "ignore");
   20028             :                 }
   20029             :         }
   20030           0 :         return py_trusted_domain_name;
   20031             : }
   20032             : 
   20033           0 : static int py_winbind_GetForestTrustInformation_in_set_trusted_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   20034             : {
   20035           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   20036           0 :         if (value == NULL) {
   20037           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.trusted_domain_name");
   20038           0 :                 return -1;
   20039             :         }
   20040           0 :         if (value == Py_None) {
   20041           0 :                 object->in.trusted_domain_name = NULL;
   20042             :         } else {
   20043           0 :                 object->in.trusted_domain_name = NULL;
   20044             :                 {
   20045             :                         const char *test_str;
   20046             :                         const char *talloc_str;
   20047           0 :                         PyObject *unicode = NULL;
   20048           0 :                         if (PyUnicode_Check(value)) {
   20049           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   20050           0 :                                 if (unicode == NULL) {
   20051           0 :                                         PyErr_NoMemory();
   20052           0 :                                         return -1;
   20053             :                                 }
   20054           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   20055           0 :                         } else if (PyBytes_Check(value)) {
   20056           0 :                                 test_str = PyBytes_AS_STRING(value);
   20057             :                         } else {
   20058           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   20059           0 :                                 return -1;
   20060             :                         }
   20061           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   20062           0 :                         if (unicode != NULL) {
   20063           0 :                                 Py_DECREF(unicode);
   20064             :                         }
   20065           0 :                         if (talloc_str == NULL) {
   20066           0 :                                 PyErr_NoMemory();
   20067           0 :                                 return -1;
   20068             :                         }
   20069           0 :                         object->in.trusted_domain_name = talloc_str;
   20070             :                 }
   20071             :         }
   20072           0 :         return 0;
   20073             : }
   20074             : 
   20075           0 : static PyObject *py_winbind_GetForestTrustInformation_in_get_flags(PyObject *obj, void *closure)
   20076             : {
   20077           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   20078             :         PyObject *py_flags;
   20079           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   20080           0 :         return py_flags;
   20081             : }
   20082             : 
   20083           0 : static int py_winbind_GetForestTrustInformation_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   20084             : {
   20085           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   20086           0 :         if (value == NULL) {
   20087           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   20088           0 :                 return -1;
   20089             :         }
   20090             :         {
   20091           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   20092           0 :                 if (PyLong_Check(value)) {
   20093             :                         unsigned long long test_var;
   20094           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20095           0 :                         if (PyErr_Occurred() != NULL) {
   20096           0 :                                 return -1;
   20097             :                         }
   20098           0 :                         if (test_var > uint_max) {
   20099           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20100             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20101           0 :                                 return -1;
   20102             :                         }
   20103           0 :                         object->in.flags = test_var;
   20104             :                 } else {
   20105           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20106             :                           PyLong_Type.tp_name);
   20107           0 :                         return -1;
   20108             :                 }
   20109             :         }
   20110           0 :         return 0;
   20111             : }
   20112             : 
   20113           0 : static PyObject *py_winbind_GetForestTrustInformation_out_get_forest_trust_info(PyObject *obj, void *closure)
   20114             : {
   20115           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   20116             :         PyObject *py_forest_trust_info;
   20117           0 :         if (object->out.forest_trust_info == NULL) {
   20118           0 :                 Py_RETURN_NONE;
   20119             :         }
   20120           0 :         if (*object->out.forest_trust_info == NULL) {
   20121           0 :                 py_forest_trust_info = Py_None;
   20122           0 :                 Py_INCREF(py_forest_trust_info);
   20123             :         } else {
   20124           0 :                 py_forest_trust_info = pytalloc_reference_ex(lsa_ForestTrustInformation_Type, *object->out.forest_trust_info, *object->out.forest_trust_info);
   20125             :         }
   20126           0 :         return py_forest_trust_info;
   20127             : }
   20128             : 
   20129           0 : static int py_winbind_GetForestTrustInformation_out_set_forest_trust_info(PyObject *py_obj, PyObject *value, void *closure)
   20130             : {
   20131           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   20132           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.forest_trust_info));
   20133           0 :         if (value == NULL) {
   20134           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.forest_trust_info");
   20135           0 :                 return -1;
   20136             :         }
   20137           0 :         object->out.forest_trust_info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.forest_trust_info);
   20138           0 :         if (object->out.forest_trust_info == NULL) {
   20139           0 :                 PyErr_NoMemory();
   20140           0 :                 return -1;
   20141             :         }
   20142           0 :         if (value == Py_None) {
   20143           0 :                 *object->out.forest_trust_info = NULL;
   20144             :         } else {
   20145           0 :                 *object->out.forest_trust_info = NULL;
   20146           0 :                 PY_CHECK_TYPE(lsa_ForestTrustInformation_Type, value, return -1;);
   20147           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   20148           0 :                         PyErr_NoMemory();
   20149           0 :                         return -1;
   20150             :                 }
   20151           0 :                 *object->out.forest_trust_info = (struct lsa_ForestTrustInformation *)pytalloc_get_ptr(value);
   20152             :         }
   20153           0 :         return 0;
   20154             : }
   20155             : 
   20156           0 : static PyObject *py_winbind_GetForestTrustInformation_get_result(PyObject *obj, void *closure)
   20157             : {
   20158           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   20159             :         PyObject *py_result;
   20160           0 :         py_result = PyErr_FromWERROR(object->out.result);
   20161           0 :         return py_result;
   20162             : }
   20163             : 
   20164           0 : static int py_winbind_GetForestTrustInformation_set_result(PyObject *py_obj, PyObject *value, void *closure)
   20165             : {
   20166           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   20167           0 :         if (value == NULL) {
   20168           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   20169           0 :                 return -1;
   20170             :         }
   20171           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   20172           0 :         return 0;
   20173             : }
   20174             : 
   20175             : static PyGetSetDef py_winbind_GetForestTrustInformation_getsetters[] = {
   20176             :         {
   20177             :                 .name = discard_const_p(char, "in_trusted_domain_name"),
   20178             :                 .get = py_winbind_GetForestTrustInformation_in_get_trusted_domain_name,
   20179             :                 .set = py_winbind_GetForestTrustInformation_in_set_trusted_domain_name,
   20180             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20181             :         },
   20182             :         {
   20183             :                 .name = discard_const_p(char, "in_flags"),
   20184             :                 .get = py_winbind_GetForestTrustInformation_in_get_flags,
   20185             :                 .set = py_winbind_GetForestTrustInformation_in_set_flags,
   20186             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20187             :         },
   20188             :         {
   20189             :                 .name = discard_const_p(char, "out_forest_trust_info"),
   20190             :                 .get = py_winbind_GetForestTrustInformation_out_get_forest_trust_info,
   20191             :                 .set = py_winbind_GetForestTrustInformation_out_set_forest_trust_info,
   20192             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_ForestTrustInformation")
   20193             :         },
   20194             :         {
   20195             :                 .name = discard_const_p(char, "result"),
   20196             :                 .get = py_winbind_GetForestTrustInformation_get_result,
   20197             :                 .set = py_winbind_GetForestTrustInformation_set_result,
   20198             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   20199             :         },
   20200             :         { .name = NULL }
   20201             : };
   20202             : 
   20203           0 : static PyObject *py_winbind_GetForestTrustInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20204             : {
   20205           0 :         PyObject *self = pytalloc_new(struct winbind_GetForestTrustInformation, type);
   20206           0 :         struct winbind_GetForestTrustInformation *_self = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(self);
   20207           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   20208             :         /* a pointer to a NULL pointer */
   20209           0 :         _self->out.forest_trust_info = talloc_zero(mem_ctx, struct lsa_ForestTrustInformation *);
   20210           0 :         return self;
   20211             : }
   20212             : 
   20213           0 : static PyObject *py_winbind_GetForestTrustInformation_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   20214             : {
   20215             : 
   20216             : 
   20217           0 :         return PyLong_FromLong(30);
   20218             : }
   20219             : 
   20220           0 : static PyObject *py_winbind_GetForestTrustInformation_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   20221             : {
   20222           0 :         const struct ndr_interface_call *call = NULL;
   20223           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   20224           0 :         PyObject *ret = NULL;
   20225           0 :         struct ndr_push *push = NULL;
   20226             :         DATA_BLOB blob;
   20227             :         enum ndr_err_code err;
   20228             : 
   20229           0 :         if (ndr_table_winbind.num_calls < 31) {
   20230           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_GetForestTrustInformation_ndr_pack");
   20231           0 :                 return NULL;
   20232             :         }
   20233           0 :         call = &ndr_table_winbind.calls[30];
   20234             : 
   20235           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   20236           0 :         if (push == NULL) {
   20237           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   20238           0 :                 return NULL;
   20239             :         }
   20240             : 
   20241           0 :         push->flags |= ndr_push_flags;
   20242             : 
   20243           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   20244           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   20245           0 :                 TALLOC_FREE(push);
   20246           0 :                 PyErr_SetNdrError(err);
   20247           0 :                 return NULL;
   20248             :         }
   20249           0 :         blob = ndr_push_blob(push);
   20250           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   20251           0 :         TALLOC_FREE(push);
   20252           0 :         return ret;
   20253             : }
   20254             : 
   20255           0 : static PyObject *py_winbind_GetForestTrustInformation_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   20256             : {
   20257           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   20258           0 :         PyObject *bigendian_obj = NULL;
   20259           0 :         PyObject *ndr64_obj = NULL;
   20260           0 :         uint32_t ndr_push_flags = 0;
   20261             : 
   20262           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   20263             :                 discard_const_p(char *, kwnames),
   20264             :                 &bigendian_obj,
   20265             :                 &ndr64_obj)) {
   20266           0 :                 return NULL;
   20267             :         }
   20268             : 
   20269           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   20270           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   20271             :         }
   20272           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   20273           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   20274             :         }
   20275             : 
   20276           0 :         return py_winbind_GetForestTrustInformation_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   20277             : }
   20278             : 
   20279           0 : static PyObject *py_winbind_GetForestTrustInformation_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   20280             : {
   20281           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   20282           0 :         PyObject *bigendian_obj = NULL;
   20283           0 :         PyObject *ndr64_obj = NULL;
   20284           0 :         uint32_t ndr_push_flags = 0;
   20285             : 
   20286           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   20287             :                 discard_const_p(char *, kwnames),
   20288             :                 &bigendian_obj,
   20289             :                 &ndr64_obj)) {
   20290           0 :                 return NULL;
   20291             :         }
   20292             : 
   20293           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   20294           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   20295             :         }
   20296           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   20297           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   20298             :         }
   20299             : 
   20300           0 :         return py_winbind_GetForestTrustInformation_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   20301             : }
   20302             : 
   20303           0 : static PyObject *py_winbind_GetForestTrustInformation_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   20304             : {
   20305           0 :         const struct ndr_interface_call *call = NULL;
   20306           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   20307           0 :         struct ndr_pull *pull = NULL;
   20308             :         enum ndr_err_code err;
   20309             : 
   20310           0 :         if (ndr_table_winbind.num_calls < 31) {
   20311           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_GetForestTrustInformation_ndr_unpack");
   20312           0 :                 return NULL;
   20313             :         }
   20314           0 :         call = &ndr_table_winbind.calls[30];
   20315             : 
   20316           0 :         pull = ndr_pull_init_blob(blob, object);
   20317           0 :         if (pull == NULL) {
   20318           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   20319           0 :                 return NULL;
   20320             :         }
   20321             : 
   20322           0 :         pull->flags |= ndr_pull_flags;
   20323             : 
   20324           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   20325           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   20326           0 :                 TALLOC_FREE(pull);
   20327           0 :                 PyErr_SetNdrError(err);
   20328           0 :                 return NULL;
   20329             :         }
   20330           0 :         if (!allow_remaining) {
   20331             :                 uint32_t highest_ofs;
   20332             : 
   20333           0 :                 if (pull->offset > pull->relative_highest_offset) {
   20334           0 :                         highest_ofs = pull->offset;
   20335             :                 } else {
   20336           0 :                         highest_ofs = pull->relative_highest_offset;
   20337             :                 }
   20338           0 :                 if (highest_ofs < pull->data_size) {
   20339           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   20340             :                                 "not all bytes consumed ofs[%u] size[%u]",
   20341             :                                 highest_ofs, pull->data_size);
   20342           0 :                         TALLOC_FREE(pull);
   20343           0 :                         PyErr_SetNdrError(err);
   20344           0 :                         return NULL;
   20345             :                 }
   20346             :         }
   20347             : 
   20348           0 :         TALLOC_FREE(pull);
   20349           0 :         Py_RETURN_NONE;
   20350             : }
   20351             : 
   20352           0 : static PyObject *py_winbind_GetForestTrustInformation_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   20353             : {
   20354             :         DATA_BLOB blob;
   20355           0 :         Py_ssize_t blob_length = 0;
   20356           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   20357           0 :         PyObject *bigendian_obj = NULL;
   20358           0 :         PyObject *ndr64_obj = NULL;
   20359           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   20360           0 :         PyObject *allow_remaining_obj = NULL;
   20361           0 :         bool allow_remaining = false;
   20362             : 
   20363           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   20364             :                 discard_const_p(char *, kwnames),
   20365             :                 &blob.data, &blob_length,
   20366             :                 &bigendian_obj,
   20367             :                 &ndr64_obj,
   20368             :                 &allow_remaining_obj)) {
   20369           0 :                 return NULL;
   20370             :         }
   20371           0 :         blob.length = blob_length;
   20372             : 
   20373           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   20374           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   20375             :         }
   20376           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   20377           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   20378             :         }
   20379             : 
   20380           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   20381           0 :                 allow_remaining = true;
   20382             :         }
   20383             : 
   20384           0 :         return py_winbind_GetForestTrustInformation_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   20385             : }
   20386             : 
   20387           0 : static PyObject *py_winbind_GetForestTrustInformation_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   20388             : {
   20389             :         DATA_BLOB blob;
   20390           0 :         Py_ssize_t blob_length = 0;
   20391           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   20392           0 :         PyObject *bigendian_obj = NULL;
   20393           0 :         PyObject *ndr64_obj = NULL;
   20394           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   20395           0 :         PyObject *allow_remaining_obj = NULL;
   20396           0 :         bool allow_remaining = false;
   20397             : 
   20398           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   20399             :                 discard_const_p(char *, kwnames),
   20400             :                 &blob.data, &blob_length,
   20401             :                 &bigendian_obj,
   20402             :                 &ndr64_obj,
   20403             :                 &allow_remaining_obj)) {
   20404           0 :                 return NULL;
   20405             :         }
   20406           0 :         blob.length = blob_length;
   20407             : 
   20408           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   20409           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   20410             :         }
   20411           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   20412           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   20413             :         }
   20414             : 
   20415           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   20416           0 :                 allow_remaining = true;
   20417             :         }
   20418             : 
   20419           0 :         return py_winbind_GetForestTrustInformation_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   20420             : }
   20421             : 
   20422           0 : static PyObject *py_winbind_GetForestTrustInformation_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   20423             : {
   20424           0 :         const struct ndr_interface_call *call = NULL;
   20425           0 :         struct winbind_GetForestTrustInformation *object = (struct winbind_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   20426             :         PyObject *ret;
   20427             :         char *retstr;
   20428             : 
   20429           0 :         if (ndr_table_winbind.num_calls < 31) {
   20430           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_GetForestTrustInformation_ndr_print");
   20431           0 :                 return NULL;
   20432             :         }
   20433           0 :         call = &ndr_table_winbind.calls[30];
   20434             : 
   20435           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   20436           0 :         ret = PyUnicode_FromString(retstr);
   20437           0 :         TALLOC_FREE(retstr);
   20438             : 
   20439           0 :         return ret;
   20440             : }
   20441             : 
   20442           0 : static PyObject *py_winbind_GetForestTrustInformation_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   20443             : {
   20444           0 :         return py_winbind_GetForestTrustInformation_ndr_print(py_obj, "winbind_GetForestTrustInformation_in", NDR_IN);
   20445             : }
   20446             : 
   20447           0 : static PyObject *py_winbind_GetForestTrustInformation_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   20448             : {
   20449           0 :         return py_winbind_GetForestTrustInformation_ndr_print(py_obj, "winbind_GetForestTrustInformation_out", NDR_OUT);
   20450             : }
   20451             : 
   20452             : static PyMethodDef py_winbind_GetForestTrustInformation_methods[] = {
   20453             :         { "opnum", (PyCFunction)py_winbind_GetForestTrustInformation_ndr_opnum, METH_NOARGS|METH_CLASS,
   20454             :                 "winbind.GetForestTrustInformation.opnum() -> 30 (0x1e) " },
   20455             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_GetForestTrustInformation_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   20456             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   20457             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_GetForestTrustInformation_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   20458             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   20459             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_GetForestTrustInformation_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   20460             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   20461             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_GetForestTrustInformation_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   20462             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   20463             :         { "__ndr_print_in__", (PyCFunction)py_winbind_GetForestTrustInformation_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   20464             :         { "__ndr_print_out__", (PyCFunction)py_winbind_GetForestTrustInformation_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   20465             :         { NULL, NULL, 0, NULL }
   20466             : };
   20467             : 
   20468             : 
   20469             : static PyTypeObject winbind_GetForestTrustInformation_Type = {
   20470             :         PyVarObject_HEAD_INIT(NULL, 0)
   20471             :         .tp_name = "winbind.GetForestTrustInformation",
   20472             :         .tp_getset = py_winbind_GetForestTrustInformation_getsetters,
   20473             :         .tp_methods = py_winbind_GetForestTrustInformation_methods,
   20474             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20475             :         .tp_new = py_winbind_GetForestTrustInformation_new,
   20476             : };
   20477             : 
   20478           0 : static bool pack_py_winbind_GetForestTrustInformation_args_in(PyObject *args, PyObject *kwargs, struct winbind_GetForestTrustInformation *r)
   20479             : {
   20480             :         PyObject *py_trusted_domain_name;
   20481             :         PyObject *py_flags;
   20482           0 :         const char *kwnames[] = {
   20483             :                 "trusted_domain_name", "flags", NULL
   20484             :         };
   20485             : 
   20486           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:winbind_GetForestTrustInformation", discard_const_p(char *, kwnames), &py_trusted_domain_name, &py_flags)) {
   20487           0 :                 return false;
   20488             :         }
   20489             : 
   20490           0 :         if (py_trusted_domain_name == NULL) {
   20491           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.trusted_domain_name");
   20492           0 :                 return false;
   20493             :         }
   20494           0 :         if (py_trusted_domain_name == Py_None) {
   20495           0 :                 r->in.trusted_domain_name = NULL;
   20496             :         } else {
   20497           0 :                 r->in.trusted_domain_name = NULL;
   20498             :                 {
   20499             :                         const char *test_str;
   20500             :                         const char *talloc_str;
   20501           0 :                         PyObject *unicode = NULL;
   20502           0 :                         if (PyUnicode_Check(py_trusted_domain_name)) {
   20503           0 :                                 unicode = PyUnicode_AsEncodedString(py_trusted_domain_name, "utf-8", "ignore");
   20504           0 :                                 if (unicode == NULL) {
   20505           0 :                                         PyErr_NoMemory();
   20506           0 :                                         return false;
   20507             :                                 }
   20508           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   20509           0 :                         } else if (PyBytes_Check(py_trusted_domain_name)) {
   20510           0 :                                 test_str = PyBytes_AS_STRING(py_trusted_domain_name);
   20511             :                         } else {
   20512           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_trusted_domain_name)->tp_name);
   20513           0 :                                 return false;
   20514             :                         }
   20515           0 :                         talloc_str = talloc_strdup(r, test_str);
   20516           0 :                         if (unicode != NULL) {
   20517           0 :                                 Py_DECREF(unicode);
   20518             :                         }
   20519           0 :                         if (talloc_str == NULL) {
   20520           0 :                                 PyErr_NoMemory();
   20521           0 :                                 return false;
   20522             :                         }
   20523           0 :                         r->in.trusted_domain_name = talloc_str;
   20524             :                 }
   20525             :         }
   20526           0 :         if (py_flags == NULL) {
   20527           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   20528           0 :                 return false;
   20529             :         }
   20530             :         {
   20531           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   20532           0 :                 if (PyLong_Check(py_flags)) {
   20533             :                         unsigned long long test_var;
   20534           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   20535           0 :                         if (PyErr_Occurred() != NULL) {
   20536           0 :                                 return false;
   20537             :                         }
   20538           0 :                         if (test_var > uint_max) {
   20539           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20540             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20541           0 :                                 return false;
   20542             :                         }
   20543           0 :                         r->in.flags = test_var;
   20544             :                 } else {
   20545           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20546             :                           PyLong_Type.tp_name);
   20547           0 :                         return false;
   20548             :                 }
   20549             :         }
   20550           0 :         return true;
   20551             : }
   20552             : 
   20553           0 : static PyObject *unpack_py_winbind_GetForestTrustInformation_args_out(struct winbind_GetForestTrustInformation *r)
   20554             : {
   20555             :         PyObject *result;
   20556             :         PyObject *py_forest_trust_info;
   20557           0 :         if (*r->out.forest_trust_info == NULL) {
   20558           0 :                 py_forest_trust_info = Py_None;
   20559           0 :                 Py_INCREF(py_forest_trust_info);
   20560             :         } else {
   20561           0 :                 py_forest_trust_info = pytalloc_reference_ex(lsa_ForestTrustInformation_Type, *r->out.forest_trust_info, *r->out.forest_trust_info);
   20562             :         }
   20563           0 :         result = py_forest_trust_info;
   20564           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   20565           0 :                 PyErr_SetWERROR(r->out.result);
   20566           0 :                 return NULL;
   20567             :         }
   20568             : 
   20569           0 :         return result;
   20570             : }
   20571             : 
   20572             : 
   20573           0 : static PyObject *py_winbind_SendToSam_in_get_message(PyObject *obj, void *closure)
   20574             : {
   20575           0 :         struct winbind_SendToSam *object = (struct winbind_SendToSam *)pytalloc_get_ptr(obj);
   20576             :         PyObject *py_message;
   20577           0 :         py_message = pytalloc_reference_ex(netr_SendToSamBase_Type, pytalloc_get_mem_ctx(obj), &object->in.message);
   20578           0 :         return py_message;
   20579             : }
   20580             : 
   20581           0 : static int py_winbind_SendToSam_in_set_message(PyObject *py_obj, PyObject *value, void *closure)
   20582             : {
   20583           0 :         struct winbind_SendToSam *object = (struct winbind_SendToSam *)pytalloc_get_ptr(py_obj);
   20584           0 :         if (value == NULL) {
   20585           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.message");
   20586           0 :                 return -1;
   20587             :         }
   20588           0 :         PY_CHECK_TYPE(netr_SendToSamBase_Type, value, return -1;);
   20589           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   20590           0 :                 PyErr_NoMemory();
   20591           0 :                 return -1;
   20592             :         }
   20593           0 :         object->in.message = *(struct netr_SendToSamBase *)pytalloc_get_ptr(value);
   20594           0 :         return 0;
   20595             : }
   20596             : 
   20597           0 : static PyObject *py_winbind_SendToSam_get_result(PyObject *obj, void *closure)
   20598             : {
   20599           0 :         struct winbind_SendToSam *object = (struct winbind_SendToSam *)pytalloc_get_ptr(obj);
   20600             :         PyObject *py_result;
   20601           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   20602           0 :         return py_result;
   20603             : }
   20604             : 
   20605           0 : static int py_winbind_SendToSam_set_result(PyObject *py_obj, PyObject *value, void *closure)
   20606             : {
   20607           0 :         struct winbind_SendToSam *object = (struct winbind_SendToSam *)pytalloc_get_ptr(py_obj);
   20608           0 :         if (value == NULL) {
   20609           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   20610           0 :                 return -1;
   20611             :         }
   20612           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   20613           0 :         return 0;
   20614             : }
   20615             : 
   20616             : static PyGetSetDef py_winbind_SendToSam_getsetters[] = {
   20617             :         {
   20618             :                 .name = discard_const_p(char, "in_message"),
   20619             :                 .get = py_winbind_SendToSam_in_get_message,
   20620             :                 .set = py_winbind_SendToSam_in_set_message,
   20621             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SendToSamBase")
   20622             :         },
   20623             :         {
   20624             :                 .name = discard_const_p(char, "result"),
   20625             :                 .get = py_winbind_SendToSam_get_result,
   20626             :                 .set = py_winbind_SendToSam_set_result,
   20627             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   20628             :         },
   20629             :         { .name = NULL }
   20630             : };
   20631             : 
   20632           0 : static PyObject *py_winbind_SendToSam_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20633             : {
   20634           0 :         PyObject *self = pytalloc_new(struct winbind_SendToSam, type);
   20635           0 :         return self;
   20636             : }
   20637             : 
   20638           0 : static PyObject *py_winbind_SendToSam_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   20639             : {
   20640             : 
   20641             : 
   20642           0 :         return PyLong_FromLong(31);
   20643             : }
   20644             : 
   20645           0 : static PyObject *py_winbind_SendToSam_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   20646             : {
   20647           0 :         const struct ndr_interface_call *call = NULL;
   20648           0 :         struct winbind_SendToSam *object = (struct winbind_SendToSam *)pytalloc_get_ptr(py_obj);
   20649           0 :         PyObject *ret = NULL;
   20650           0 :         struct ndr_push *push = NULL;
   20651             :         DATA_BLOB blob;
   20652             :         enum ndr_err_code err;
   20653             : 
   20654           0 :         if (ndr_table_winbind.num_calls < 32) {
   20655           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_SendToSam_ndr_pack");
   20656           0 :                 return NULL;
   20657             :         }
   20658           0 :         call = &ndr_table_winbind.calls[31];
   20659             : 
   20660           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   20661           0 :         if (push == NULL) {
   20662           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   20663           0 :                 return NULL;
   20664             :         }
   20665             : 
   20666           0 :         push->flags |= ndr_push_flags;
   20667             : 
   20668           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   20669           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   20670           0 :                 TALLOC_FREE(push);
   20671           0 :                 PyErr_SetNdrError(err);
   20672           0 :                 return NULL;
   20673             :         }
   20674           0 :         blob = ndr_push_blob(push);
   20675           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   20676           0 :         TALLOC_FREE(push);
   20677           0 :         return ret;
   20678             : }
   20679             : 
   20680           0 : static PyObject *py_winbind_SendToSam_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   20681             : {
   20682           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   20683           0 :         PyObject *bigendian_obj = NULL;
   20684           0 :         PyObject *ndr64_obj = NULL;
   20685           0 :         uint32_t ndr_push_flags = 0;
   20686             : 
   20687           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   20688             :                 discard_const_p(char *, kwnames),
   20689             :                 &bigendian_obj,
   20690             :                 &ndr64_obj)) {
   20691           0 :                 return NULL;
   20692             :         }
   20693             : 
   20694           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   20695           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   20696             :         }
   20697           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   20698           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   20699             :         }
   20700             : 
   20701           0 :         return py_winbind_SendToSam_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   20702             : }
   20703             : 
   20704           0 : static PyObject *py_winbind_SendToSam_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   20705             : {
   20706           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   20707           0 :         PyObject *bigendian_obj = NULL;
   20708           0 :         PyObject *ndr64_obj = NULL;
   20709           0 :         uint32_t ndr_push_flags = 0;
   20710             : 
   20711           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   20712             :                 discard_const_p(char *, kwnames),
   20713             :                 &bigendian_obj,
   20714             :                 &ndr64_obj)) {
   20715           0 :                 return NULL;
   20716             :         }
   20717             : 
   20718           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   20719           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   20720             :         }
   20721           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   20722           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   20723             :         }
   20724             : 
   20725           0 :         return py_winbind_SendToSam_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   20726             : }
   20727             : 
   20728           0 : static PyObject *py_winbind_SendToSam_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   20729             : {
   20730           0 :         const struct ndr_interface_call *call = NULL;
   20731           0 :         struct winbind_SendToSam *object = (struct winbind_SendToSam *)pytalloc_get_ptr(py_obj);
   20732           0 :         struct ndr_pull *pull = NULL;
   20733             :         enum ndr_err_code err;
   20734             : 
   20735           0 :         if (ndr_table_winbind.num_calls < 32) {
   20736           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_SendToSam_ndr_unpack");
   20737           0 :                 return NULL;
   20738             :         }
   20739           0 :         call = &ndr_table_winbind.calls[31];
   20740             : 
   20741           0 :         pull = ndr_pull_init_blob(blob, object);
   20742           0 :         if (pull == NULL) {
   20743           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   20744           0 :                 return NULL;
   20745             :         }
   20746             : 
   20747           0 :         pull->flags |= ndr_pull_flags;
   20748             : 
   20749           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   20750           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   20751           0 :                 TALLOC_FREE(pull);
   20752           0 :                 PyErr_SetNdrError(err);
   20753           0 :                 return NULL;
   20754             :         }
   20755           0 :         if (!allow_remaining) {
   20756             :                 uint32_t highest_ofs;
   20757             : 
   20758           0 :                 if (pull->offset > pull->relative_highest_offset) {
   20759           0 :                         highest_ofs = pull->offset;
   20760             :                 } else {
   20761           0 :                         highest_ofs = pull->relative_highest_offset;
   20762             :                 }
   20763           0 :                 if (highest_ofs < pull->data_size) {
   20764           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   20765             :                                 "not all bytes consumed ofs[%u] size[%u]",
   20766             :                                 highest_ofs, pull->data_size);
   20767           0 :                         TALLOC_FREE(pull);
   20768           0 :                         PyErr_SetNdrError(err);
   20769           0 :                         return NULL;
   20770             :                 }
   20771             :         }
   20772             : 
   20773           0 :         TALLOC_FREE(pull);
   20774           0 :         Py_RETURN_NONE;
   20775             : }
   20776             : 
   20777           0 : static PyObject *py_winbind_SendToSam_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   20778             : {
   20779             :         DATA_BLOB blob;
   20780           0 :         Py_ssize_t blob_length = 0;
   20781           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   20782           0 :         PyObject *bigendian_obj = NULL;
   20783           0 :         PyObject *ndr64_obj = NULL;
   20784           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   20785           0 :         PyObject *allow_remaining_obj = NULL;
   20786           0 :         bool allow_remaining = false;
   20787             : 
   20788           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   20789             :                 discard_const_p(char *, kwnames),
   20790             :                 &blob.data, &blob_length,
   20791             :                 &bigendian_obj,
   20792             :                 &ndr64_obj,
   20793             :                 &allow_remaining_obj)) {
   20794           0 :                 return NULL;
   20795             :         }
   20796           0 :         blob.length = blob_length;
   20797             : 
   20798           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   20799           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   20800             :         }
   20801           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   20802           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   20803             :         }
   20804             : 
   20805           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   20806           0 :                 allow_remaining = true;
   20807             :         }
   20808             : 
   20809           0 :         return py_winbind_SendToSam_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   20810             : }
   20811             : 
   20812           0 : static PyObject *py_winbind_SendToSam_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   20813             : {
   20814             :         DATA_BLOB blob;
   20815           0 :         Py_ssize_t blob_length = 0;
   20816           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   20817           0 :         PyObject *bigendian_obj = NULL;
   20818           0 :         PyObject *ndr64_obj = NULL;
   20819           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   20820           0 :         PyObject *allow_remaining_obj = NULL;
   20821           0 :         bool allow_remaining = false;
   20822             : 
   20823           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   20824             :                 discard_const_p(char *, kwnames),
   20825             :                 &blob.data, &blob_length,
   20826             :                 &bigendian_obj,
   20827             :                 &ndr64_obj,
   20828             :                 &allow_remaining_obj)) {
   20829           0 :                 return NULL;
   20830             :         }
   20831           0 :         blob.length = blob_length;
   20832             : 
   20833           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   20834           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   20835             :         }
   20836           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   20837           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   20838             :         }
   20839             : 
   20840           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   20841           0 :                 allow_remaining = true;
   20842             :         }
   20843             : 
   20844           0 :         return py_winbind_SendToSam_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   20845             : }
   20846             : 
   20847           0 : static PyObject *py_winbind_SendToSam_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   20848             : {
   20849           0 :         const struct ndr_interface_call *call = NULL;
   20850           0 :         struct winbind_SendToSam *object = (struct winbind_SendToSam *)pytalloc_get_ptr(py_obj);
   20851             :         PyObject *ret;
   20852             :         char *retstr;
   20853             : 
   20854           0 :         if (ndr_table_winbind.num_calls < 32) {
   20855           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_winbind_SendToSam_ndr_print");
   20856           0 :                 return NULL;
   20857             :         }
   20858           0 :         call = &ndr_table_winbind.calls[31];
   20859             : 
   20860           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   20861           0 :         ret = PyUnicode_FromString(retstr);
   20862           0 :         TALLOC_FREE(retstr);
   20863             : 
   20864           0 :         return ret;
   20865             : }
   20866             : 
   20867           0 : static PyObject *py_winbind_SendToSam_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   20868             : {
   20869           0 :         return py_winbind_SendToSam_ndr_print(py_obj, "winbind_SendToSam_in", NDR_IN);
   20870             : }
   20871             : 
   20872           0 : static PyObject *py_winbind_SendToSam_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   20873             : {
   20874           0 :         return py_winbind_SendToSam_ndr_print(py_obj, "winbind_SendToSam_out", NDR_OUT);
   20875             : }
   20876             : 
   20877             : static PyMethodDef py_winbind_SendToSam_methods[] = {
   20878             :         { "opnum", (PyCFunction)py_winbind_SendToSam_ndr_opnum, METH_NOARGS|METH_CLASS,
   20879             :                 "winbind.SendToSam.opnum() -> 31 (0x1f) " },
   20880             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_SendToSam_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   20881             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   20882             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_SendToSam_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   20883             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   20884             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_SendToSam_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   20885             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   20886             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_winbind_SendToSam_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   20887             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   20888             :         { "__ndr_print_in__", (PyCFunction)py_winbind_SendToSam_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   20889             :         { "__ndr_print_out__", (PyCFunction)py_winbind_SendToSam_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   20890             :         { NULL, NULL, 0, NULL }
   20891             : };
   20892             : 
   20893             : 
   20894             : static PyTypeObject winbind_SendToSam_Type = {
   20895             :         PyVarObject_HEAD_INIT(NULL, 0)
   20896             :         .tp_name = "winbind.SendToSam",
   20897             :         .tp_getset = py_winbind_SendToSam_getsetters,
   20898             :         .tp_methods = py_winbind_SendToSam_methods,
   20899             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20900             :         .tp_new = py_winbind_SendToSam_new,
   20901             : };
   20902             : 
   20903           0 : static bool pack_py_winbind_SendToSam_args_in(PyObject *args, PyObject *kwargs, struct winbind_SendToSam *r)
   20904             : {
   20905             :         PyObject *py_message;
   20906           0 :         const char *kwnames[] = {
   20907             :                 "message", NULL
   20908             :         };
   20909             : 
   20910           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:winbind_SendToSam", discard_const_p(char *, kwnames), &py_message)) {
   20911           0 :                 return false;
   20912             :         }
   20913             : 
   20914           0 :         if (py_message == NULL) {
   20915           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.message");
   20916           0 :                 return false;
   20917             :         }
   20918           0 :         PY_CHECK_TYPE(netr_SendToSamBase_Type, py_message, return false;);
   20919           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_message)) == NULL) {
   20920           0 :                 PyErr_NoMemory();
   20921           0 :                 return false;
   20922             :         }
   20923           0 :         r->in.message = *(struct netr_SendToSamBase *)pytalloc_get_ptr(py_message);
   20924           0 :         return true;
   20925             : }
   20926             : 
   20927           0 : static PyObject *unpack_py_winbind_SendToSam_args_out(struct winbind_SendToSam *r)
   20928             : {
   20929             :         PyObject *result;
   20930           0 :         result = Py_None;
   20931           0 :         Py_INCREF(result);
   20932           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   20933           0 :                 PyErr_SetNTSTATUS(r->out.result);
   20934           0 :                 return NULL;
   20935             :         }
   20936             : 
   20937           0 :         return result;
   20938             : }
   20939             : 
   20940             : const struct PyNdrRpcMethodDef py_ndr_winbind_methods[] = {
   20941             :         { "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 },
   20942             :         { "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 },
   20943             :         { "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 },
   20944             :         { "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 },
   20945             :         { "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 },
   20946             :         { "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 },
   20947             :         { "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 },
   20948             :         { "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 },
   20949             :         { "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 },
   20950             :         { "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 },
   20951             :         { "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 },
   20952             :         { "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 },
   20953             :         { "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 },
   20954             :         { "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, 13, &ndr_table_winbind },
   20955             :         { "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, 14, &ndr_table_winbind },
   20956             :         { "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, 15, &ndr_table_winbind },
   20957             :         { "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, 16, &ndr_table_winbind },
   20958             :         { "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, 17, &ndr_table_winbind },
   20959             :         { "wbint_ChangeMachineAccount", "S.wbint_ChangeMachineAccount() -> 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, 18, &ndr_table_winbind },
   20960             :         { "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, 19, &ndr_table_winbind },
   20961             :         { "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, 20, &ndr_table_winbind },
   20962             :         { "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, 21, &ndr_table_winbind },
   20963             :         { "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, 22, &ndr_table_winbind },
   20964             :         { "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, 23, &ndr_table_winbind },
   20965             :         { "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, 24, &ndr_table_winbind },
   20966             :         { "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, 25, &ndr_table_winbind },
   20967             :         { "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, 26, &ndr_table_winbind },
   20968             :         { "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, 27, &ndr_table_winbind },
   20969             :         { "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, 28, &ndr_table_winbind },
   20970             :         { "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, 29, &ndr_table_winbind },
   20971             :         { "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, 30, &ndr_table_winbind },
   20972             :         { "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, 31, &ndr_table_winbind },
   20973             :         {0}
   20974             : };
   20975             : 
   20976           2 : static PyObject *interface_winbind_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20977             : {
   20978           2 :         return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_winbind);
   20979             : }
   20980             : 
   20981             : #define PY_DOC_WINBIND "winbind parent-child protocol"
   20982             : static PyTypeObject winbind_InterfaceType = {
   20983             :         PyVarObject_HEAD_INIT(NULL, 0)
   20984             :         .tp_name = "winbind.winbind",
   20985             :         .tp_basicsize = sizeof(dcerpc_InterfaceObject),
   20986             :         .tp_doc = "winbind(binding, lp_ctx=None, credentials=None) -> connection\n"
   20987             : "\n"
   20988             : "binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
   20989             : "lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
   20990             : "credentials should be a credentials.Credentials object.\n\n"PY_DOC_WINBIND,
   20991             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20992             :         .tp_new = interface_winbind_new,
   20993             : };
   20994             : 
   20995           0 : static PyObject *syntax_winbind_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20996             : {
   20997           0 :         return py_dcerpc_syntax_init_helper(type, args, kwargs, &ndr_table_winbind.syntax_id);
   20998             : }
   20999             : 
   21000             : #define PY_DOC_WINBIND_SYNTAX "winbind parent-child protocol"
   21001             : static PyTypeObject winbind_SyntaxType = {
   21002             :         PyVarObject_HEAD_INIT(NULL, 0)
   21003             :         .tp_name = "winbind.winbind_abstract_syntax",
   21004             :         .tp_doc = "winbind_abstract_syntax()\n"PY_DOC_WINBIND_SYNTAX,
   21005             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21006             :         .tp_new = syntax_winbind_new,
   21007             : };
   21008             : 
   21009             : static PyMethodDef winbind_methods[] = {
   21010             :         { NULL, NULL, 0, NULL }
   21011             : };
   21012             : 
   21013             : static struct PyModuleDef moduledef = {
   21014             :         PyModuleDef_HEAD_INIT,
   21015             :         .m_name = "winbind",
   21016             :         .m_doc = "winbind DCE/RPC",
   21017             :         .m_size = -1,
   21018             :         .m_methods = winbind_methods,
   21019             : };
   21020         116 : MODULE_INIT_FUNC(winbind)
   21021             : {
   21022         116 :         PyObject *m = NULL;
   21023         116 :         PyObject *dep_samba_dcerpc_lsa = NULL;
   21024         116 :         PyObject *dep_samba_dcerpc_netlogon = NULL;
   21025         116 :         PyObject *dep_samba_dcerpc_samr = NULL;
   21026         116 :         PyObject *dep_samba_dcerpc_misc = NULL;
   21027         116 :         PyObject *dep_samba_dcerpc_security = NULL;
   21028         116 :         PyObject *dep_samba_dcerpc_idmap = NULL;
   21029         116 :         PyObject *dep_talloc = NULL;
   21030         116 :         PyObject *dep_samba_dcerpc_base = NULL;
   21031             : 
   21032         116 :         dep_samba_dcerpc_lsa = PyImport_ImportModule("samba.dcerpc.lsa");
   21033         116 :         if (dep_samba_dcerpc_lsa == NULL)
   21034           0 :                 goto out;
   21035             : 
   21036         116 :         dep_samba_dcerpc_netlogon = PyImport_ImportModule("samba.dcerpc.netlogon");
   21037         116 :         if (dep_samba_dcerpc_netlogon == NULL)
   21038           0 :                 goto out;
   21039             : 
   21040         116 :         dep_samba_dcerpc_samr = PyImport_ImportModule("samba.dcerpc.samr");
   21041         116 :         if (dep_samba_dcerpc_samr == NULL)
   21042           0 :                 goto out;
   21043             : 
   21044         116 :         dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
   21045         116 :         if (dep_samba_dcerpc_misc == NULL)
   21046           0 :                 goto out;
   21047             : 
   21048         116 :         dep_samba_dcerpc_security = PyImport_ImportModule("samba.dcerpc.security");
   21049         116 :         if (dep_samba_dcerpc_security == NULL)
   21050           0 :                 goto out;
   21051             : 
   21052         116 :         dep_samba_dcerpc_idmap = PyImport_ImportModule("samba.dcerpc.idmap");
   21053         116 :         if (dep_samba_dcerpc_idmap == NULL)
   21054           0 :                 goto out;
   21055             : 
   21056         116 :         dep_talloc = PyImport_ImportModule("talloc");
   21057         116 :         if (dep_talloc == NULL)
   21058           0 :                 goto out;
   21059             : 
   21060         116 :         dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
   21061         116 :         if (dep_samba_dcerpc_base == NULL)
   21062           0 :                 goto out;
   21063             : 
   21064         116 :         unixid_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_idmap, "unixid");
   21065         116 :         if (unixid_Type == NULL)
   21066           0 :                 goto out;
   21067             : 
   21068         116 :         BaseObject_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "BaseObject");
   21069         116 :         if (BaseObject_Type == NULL)
   21070           0 :                 goto out;
   21071             : 
   21072         116 :         dom_sid_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "dom_sid");
   21073         116 :         if (dom_sid_Type == NULL)
   21074           0 :                 goto out;
   21075             : 
   21076         116 :         netr_Validation_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_netlogon, "netr_Validation");
   21077         116 :         if (netr_Validation_Type == NULL)
   21078           0 :                 goto out;
   21079             : 
   21080         116 :         lsa_SidArray_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "SidArray");
   21081         116 :         if (lsa_SidArray_Type == NULL)
   21082           0 :                 goto out;
   21083             : 
   21084         116 :         lsa_RefDomainList_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "RefDomainList");
   21085         116 :         if (lsa_RefDomainList_Type == NULL)
   21086           0 :                 goto out;
   21087             : 
   21088         116 :         lsa_TransNameArray_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "TransNameArray");
   21089         116 :         if (lsa_TransNameArray_Type == NULL)
   21090           0 :                 goto out;
   21091             : 
   21092         116 :         GUID_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "GUID");
   21093         116 :         if (GUID_Type == NULL)
   21094           0 :                 goto out;
   21095             : 
   21096         116 :         netr_DsRGetDCNameInfo_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_netlogon, "netr_DsRGetDCNameInfo");
   21097         116 :         if (netr_DsRGetDCNameInfo_Type == NULL)
   21098           0 :                 goto out;
   21099             : 
   21100         116 :         netr_DomainTrustList_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_netlogon, "netr_DomainTrustList");
   21101         116 :         if (netr_DomainTrustList_Type == NULL)
   21102           0 :                 goto out;
   21103             : 
   21104         116 :         samr_DomInfo1_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_samr, "DomInfo1");
   21105         116 :         if (samr_DomInfo1_Type == NULL)
   21106           0 :                 goto out;
   21107             : 
   21108         116 :         netr_LogonLevel_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_netlogon, "netr_LogonLevel");
   21109         116 :         if (netr_LogonLevel_Type == NULL)
   21110           0 :                 goto out;
   21111             : 
   21112         116 :         NL_DNS_NAME_INFO_ARRAY_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_netlogon, "NL_DNS_NAME_INFO_ARRAY");
   21113         116 :         if (NL_DNS_NAME_INFO_ARRAY_Type == NULL)
   21114           0 :                 goto out;
   21115             : 
   21116         116 :         netr_CONTROL_DATA_INFORMATION_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_netlogon, "netr_CONTROL_DATA_INFORMATION");
   21117         116 :         if (netr_CONTROL_DATA_INFORMATION_Type == NULL)
   21118           0 :                 goto out;
   21119             : 
   21120         116 :         netr_CONTROL_QUERY_INFORMATION_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_netlogon, "netr_CONTROL_QUERY_INFORMATION");
   21121         116 :         if (netr_CONTROL_QUERY_INFORMATION_Type == NULL)
   21122           0 :                 goto out;
   21123             : 
   21124         116 :         lsa_ForestTrustInformation_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "ForestTrustInformation");
   21125         116 :         if (lsa_ForestTrustInformation_Type == NULL)
   21126           0 :                 goto out;
   21127             : 
   21128         116 :         netr_SendToSamBase_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_netlogon, "netr_SendToSamBase");
   21129         116 :         if (netr_SendToSamBase_Type == NULL)
   21130           0 :                 goto out;
   21131             : 
   21132         116 :         ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
   21133         116 :         if (ClientConnection_Type == NULL)
   21134           0 :                 goto out;
   21135             : 
   21136         116 :         ndr_syntax_id_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "ndr_syntax_id");
   21137         116 :         if (ndr_syntax_id_Type == NULL)
   21138           0 :                 goto out;
   21139             : 
   21140         116 :         wbint_TransID_Type.tp_base = BaseObject_Type;
   21141         116 :         wbint_TransID_Type.tp_basicsize = pytalloc_BaseObject_size();
   21142             : 
   21143         116 :         wbint_TransIDArray_Type.tp_base = BaseObject_Type;
   21144         116 :         wbint_TransIDArray_Type.tp_basicsize = pytalloc_BaseObject_size();
   21145             : 
   21146         116 :         wbint_userinfo_Type.tp_base = BaseObject_Type;
   21147         116 :         wbint_userinfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   21148             : 
   21149         116 :         wbint_SidArray_Type.tp_base = BaseObject_Type;
   21150         116 :         wbint_SidArray_Type.tp_basicsize = pytalloc_BaseObject_size();
   21151             : 
   21152         116 :         wbint_RidArray_Type.tp_base = BaseObject_Type;
   21153         116 :         wbint_RidArray_Type.tp_basicsize = pytalloc_BaseObject_size();
   21154             : 
   21155         116 :         wbint_Principal_Type.tp_base = BaseObject_Type;
   21156         116 :         wbint_Principal_Type.tp_basicsize = pytalloc_BaseObject_size();
   21157             : 
   21158         116 :         wbint_Principals_Type.tp_base = BaseObject_Type;
   21159         116 :         wbint_Principals_Type.tp_basicsize = pytalloc_BaseObject_size();
   21160             : 
   21161         116 :         wbint_userinfos_Type.tp_base = BaseObject_Type;
   21162         116 :         wbint_userinfos_Type.tp_basicsize = pytalloc_BaseObject_size();
   21163             : 
   21164         116 :         wbint_Validation_Type.tp_base = BaseObject_Type;
   21165         116 :         wbint_Validation_Type.tp_basicsize = pytalloc_BaseObject_size();
   21166             : 
   21167         116 :         wbint_AuthUserInfo_Type.tp_base = BaseObject_Type;
   21168         116 :         wbint_AuthUserInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   21169             : 
   21170         116 :         wbint_PamAuthCrapValidation_Type.tp_base = BaseObject_Type;
   21171         116 :         wbint_PamAuthCrapValidation_Type.tp_basicsize = pytalloc_BaseObject_size();
   21172             : 
   21173         116 :         wbint_Ping_Type.tp_base = BaseObject_Type;
   21174         116 :         wbint_Ping_Type.tp_basicsize = pytalloc_BaseObject_size();
   21175             : 
   21176         116 :         wbint_LookupSid_Type.tp_base = BaseObject_Type;
   21177         116 :         wbint_LookupSid_Type.tp_basicsize = pytalloc_BaseObject_size();
   21178             : 
   21179         116 :         wbint_LookupSids_Type.tp_base = BaseObject_Type;
   21180         116 :         wbint_LookupSids_Type.tp_basicsize = pytalloc_BaseObject_size();
   21181             : 
   21182         116 :         wbint_LookupName_Type.tp_base = BaseObject_Type;
   21183         116 :         wbint_LookupName_Type.tp_basicsize = pytalloc_BaseObject_size();
   21184             : 
   21185         116 :         wbint_Sids2UnixIDs_Type.tp_base = BaseObject_Type;
   21186         116 :         wbint_Sids2UnixIDs_Type.tp_basicsize = pytalloc_BaseObject_size();
   21187             : 
   21188         116 :         wbint_UnixIDs2Sids_Type.tp_base = BaseObject_Type;
   21189         116 :         wbint_UnixIDs2Sids_Type.tp_basicsize = pytalloc_BaseObject_size();
   21190             : 
   21191         116 :         wbint_AllocateUid_Type.tp_base = BaseObject_Type;
   21192         116 :         wbint_AllocateUid_Type.tp_basicsize = pytalloc_BaseObject_size();
   21193             : 
   21194         116 :         wbint_AllocateGid_Type.tp_base = BaseObject_Type;
   21195         116 :         wbint_AllocateGid_Type.tp_basicsize = pytalloc_BaseObject_size();
   21196             : 
   21197         116 :         wbint_GetNssInfo_Type.tp_base = BaseObject_Type;
   21198         116 :         wbint_GetNssInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   21199             : 
   21200         116 :         wbint_LookupUserAliases_Type.tp_base = BaseObject_Type;
   21201         116 :         wbint_LookupUserAliases_Type.tp_basicsize = pytalloc_BaseObject_size();
   21202             : 
   21203         116 :         wbint_LookupUserGroups_Type.tp_base = BaseObject_Type;
   21204         116 :         wbint_LookupUserGroups_Type.tp_basicsize = pytalloc_BaseObject_size();
   21205             : 
   21206         116 :         wbint_QuerySequenceNumber_Type.tp_base = BaseObject_Type;
   21207         116 :         wbint_QuerySequenceNumber_Type.tp_basicsize = pytalloc_BaseObject_size();
   21208             : 
   21209         116 :         wbint_LookupGroupMembers_Type.tp_base = BaseObject_Type;
   21210         116 :         wbint_LookupGroupMembers_Type.tp_basicsize = pytalloc_BaseObject_size();
   21211             : 
   21212         116 :         wbint_QueryGroupList_Type.tp_base = BaseObject_Type;
   21213         116 :         wbint_QueryGroupList_Type.tp_basicsize = pytalloc_BaseObject_size();
   21214             : 
   21215         116 :         wbint_QueryUserRidList_Type.tp_base = BaseObject_Type;
   21216         116 :         wbint_QueryUserRidList_Type.tp_basicsize = pytalloc_BaseObject_size();
   21217             : 
   21218         116 :         wbint_DsGetDcName_Type.tp_base = BaseObject_Type;
   21219         116 :         wbint_DsGetDcName_Type.tp_basicsize = pytalloc_BaseObject_size();
   21220             : 
   21221         116 :         wbint_LookupRids_Type.tp_base = BaseObject_Type;
   21222         116 :         wbint_LookupRids_Type.tp_basicsize = pytalloc_BaseObject_size();
   21223             : 
   21224         116 :         wbint_CheckMachineAccount_Type.tp_base = BaseObject_Type;
   21225         116 :         wbint_CheckMachineAccount_Type.tp_basicsize = pytalloc_BaseObject_size();
   21226             : 
   21227         116 :         wbint_ChangeMachineAccount_Type.tp_base = BaseObject_Type;
   21228         116 :         wbint_ChangeMachineAccount_Type.tp_basicsize = pytalloc_BaseObject_size();
   21229             : 
   21230         116 :         wbint_PingDc_Type.tp_base = BaseObject_Type;
   21231         116 :         wbint_PingDc_Type.tp_basicsize = pytalloc_BaseObject_size();
   21232             : 
   21233         116 :         wbint_ListTrustedDomains_Type.tp_base = BaseObject_Type;
   21234         116 :         wbint_ListTrustedDomains_Type.tp_basicsize = pytalloc_BaseObject_size();
   21235             : 
   21236         116 :         wbint_PamAuth_Type.tp_base = BaseObject_Type;
   21237         116 :         wbint_PamAuth_Type.tp_basicsize = pytalloc_BaseObject_size();
   21238             : 
   21239         116 :         wbint_PamAuthCrap_Type.tp_base = BaseObject_Type;
   21240         116 :         wbint_PamAuthCrap_Type.tp_basicsize = pytalloc_BaseObject_size();
   21241             : 
   21242         116 :         wbint_PamLogOff_Type.tp_base = BaseObject_Type;
   21243         116 :         wbint_PamLogOff_Type.tp_basicsize = pytalloc_BaseObject_size();
   21244             : 
   21245         116 :         wbint_PamAuthCrapChangePassword_Type.tp_base = BaseObject_Type;
   21246         116 :         wbint_PamAuthCrapChangePassword_Type.tp_basicsize = pytalloc_BaseObject_size();
   21247             : 
   21248         116 :         wbint_PamAuthChangePassword_Type.tp_base = BaseObject_Type;
   21249         116 :         wbint_PamAuthChangePassword_Type.tp_basicsize = pytalloc_BaseObject_size();
   21250             : 
   21251         116 :         wbint_InitConnection_Type.tp_base = BaseObject_Type;
   21252         116 :         wbint_InitConnection_Type.tp_basicsize = pytalloc_BaseObject_size();
   21253             : 
   21254         116 :         winbind_SamLogon_Type.tp_base = BaseObject_Type;
   21255         116 :         winbind_SamLogon_Type.tp_basicsize = pytalloc_BaseObject_size();
   21256             : 
   21257         116 :         winbind_DsrUpdateReadOnlyServerDnsRecords_Type.tp_base = BaseObject_Type;
   21258         116 :         winbind_DsrUpdateReadOnlyServerDnsRecords_Type.tp_basicsize = pytalloc_BaseObject_size();
   21259             : 
   21260         116 :         winbind_LogonControl_Type.tp_base = BaseObject_Type;
   21261         116 :         winbind_LogonControl_Type.tp_basicsize = pytalloc_BaseObject_size();
   21262             : 
   21263         116 :         winbind_GetForestTrustInformation_Type.tp_base = BaseObject_Type;
   21264         116 :         winbind_GetForestTrustInformation_Type.tp_basicsize = pytalloc_BaseObject_size();
   21265             : 
   21266         116 :         winbind_SendToSam_Type.tp_base = BaseObject_Type;
   21267         116 :         winbind_SendToSam_Type.tp_basicsize = pytalloc_BaseObject_size();
   21268             : 
   21269         116 :         winbind_InterfaceType.tp_base = ClientConnection_Type;
   21270             : 
   21271         116 :         winbind_SyntaxType.tp_base = ndr_syntax_id_Type;
   21272         116 :         winbind_SyntaxType.tp_basicsize = pytalloc_BaseObject_size();
   21273             : 
   21274         116 :         if (PyType_Ready(&wbint_TransID_Type) < 0)
   21275           0 :                 goto out;
   21276         116 :         if (PyType_Ready(&wbint_TransIDArray_Type) < 0)
   21277           0 :                 goto out;
   21278         116 :         if (PyType_Ready(&wbint_userinfo_Type) < 0)
   21279           0 :                 goto out;
   21280         116 :         if (PyType_Ready(&wbint_SidArray_Type) < 0)
   21281           0 :                 goto out;
   21282         116 :         if (PyType_Ready(&wbint_RidArray_Type) < 0)
   21283           0 :                 goto out;
   21284         116 :         if (PyType_Ready(&wbint_Principal_Type) < 0)
   21285           0 :                 goto out;
   21286         116 :         if (PyType_Ready(&wbint_Principals_Type) < 0)
   21287           0 :                 goto out;
   21288         116 :         if (PyType_Ready(&wbint_userinfos_Type) < 0)
   21289           0 :                 goto out;
   21290         116 :         if (PyType_Ready(&wbint_Validation_Type) < 0)
   21291           0 :                 goto out;
   21292         116 :         if (PyType_Ready(&wbint_AuthUserInfo_Type) < 0)
   21293           0 :                 goto out;
   21294         116 :         if (PyType_Ready(&wbint_PamAuthCrapValidation_Type) < 0)
   21295           0 :                 goto out;
   21296         116 :         if (PyType_Ready(&wbint_Ping_Type) < 0)
   21297           0 :                 goto out;
   21298         116 :         if (PyType_Ready(&wbint_LookupSid_Type) < 0)
   21299           0 :                 goto out;
   21300         116 :         if (PyType_Ready(&wbint_LookupSids_Type) < 0)
   21301           0 :                 goto out;
   21302         116 :         if (PyType_Ready(&wbint_LookupName_Type) < 0)
   21303           0 :                 goto out;
   21304         116 :         if (PyType_Ready(&wbint_Sids2UnixIDs_Type) < 0)
   21305           0 :                 goto out;
   21306         116 :         if (PyType_Ready(&wbint_UnixIDs2Sids_Type) < 0)
   21307           0 :                 goto out;
   21308         116 :         if (PyType_Ready(&wbint_AllocateUid_Type) < 0)
   21309           0 :                 goto out;
   21310         116 :         if (PyType_Ready(&wbint_AllocateGid_Type) < 0)
   21311           0 :                 goto out;
   21312         116 :         if (PyType_Ready(&wbint_GetNssInfo_Type) < 0)
   21313           0 :                 goto out;
   21314         116 :         if (PyType_Ready(&wbint_LookupUserAliases_Type) < 0)
   21315           0 :                 goto out;
   21316         116 :         if (PyType_Ready(&wbint_LookupUserGroups_Type) < 0)
   21317           0 :                 goto out;
   21318         116 :         if (PyType_Ready(&wbint_QuerySequenceNumber_Type) < 0)
   21319           0 :                 goto out;
   21320         116 :         if (PyType_Ready(&wbint_LookupGroupMembers_Type) < 0)
   21321           0 :                 goto out;
   21322         116 :         if (PyType_Ready(&wbint_QueryGroupList_Type) < 0)
   21323           0 :                 goto out;
   21324         116 :         if (PyType_Ready(&wbint_QueryUserRidList_Type) < 0)
   21325           0 :                 goto out;
   21326         116 :         if (PyType_Ready(&wbint_DsGetDcName_Type) < 0)
   21327           0 :                 goto out;
   21328         116 :         if (PyType_Ready(&wbint_LookupRids_Type) < 0)
   21329           0 :                 goto out;
   21330         116 :         if (PyType_Ready(&wbint_CheckMachineAccount_Type) < 0)
   21331           0 :                 goto out;
   21332         116 :         if (PyType_Ready(&wbint_ChangeMachineAccount_Type) < 0)
   21333           0 :                 goto out;
   21334         116 :         if (PyType_Ready(&wbint_PingDc_Type) < 0)
   21335           0 :                 goto out;
   21336         116 :         if (PyType_Ready(&wbint_ListTrustedDomains_Type) < 0)
   21337           0 :                 goto out;
   21338         116 :         if (PyType_Ready(&wbint_PamAuth_Type) < 0)
   21339           0 :                 goto out;
   21340         116 :         if (PyType_Ready(&wbint_PamAuthCrap_Type) < 0)
   21341           0 :                 goto out;
   21342         116 :         if (PyType_Ready(&wbint_PamLogOff_Type) < 0)
   21343           0 :                 goto out;
   21344         116 :         if (PyType_Ready(&wbint_PamAuthCrapChangePassword_Type) < 0)
   21345           0 :                 goto out;
   21346         116 :         if (PyType_Ready(&wbint_PamAuthChangePassword_Type) < 0)
   21347           0 :                 goto out;
   21348         116 :         if (PyType_Ready(&wbint_InitConnection_Type) < 0)
   21349           0 :                 goto out;
   21350         116 :         if (PyType_Ready(&winbind_SamLogon_Type) < 0)
   21351           0 :                 goto out;
   21352         116 :         if (PyType_Ready(&winbind_DsrUpdateReadOnlyServerDnsRecords_Type) < 0)
   21353           0 :                 goto out;
   21354         116 :         if (PyType_Ready(&winbind_LogonControl_Type) < 0)
   21355           0 :                 goto out;
   21356         116 :         if (PyType_Ready(&winbind_GetForestTrustInformation_Type) < 0)
   21357           0 :                 goto out;
   21358         116 :         if (PyType_Ready(&winbind_SendToSam_Type) < 0)
   21359           0 :                 goto out;
   21360         116 :         if (PyType_Ready(&winbind_InterfaceType) < 0)
   21361           0 :                 goto out;
   21362         116 :         if (PyType_Ready(&winbind_SyntaxType) < 0)
   21363           0 :                 goto out;
   21364         116 :         if (!PyInterface_AddNdrRpcMethods(&winbind_InterfaceType, py_ndr_winbind_methods))
   21365           0 :                 return NULL;
   21366             : 
   21367             : #ifdef PY_WBINT_TRANSID_PATCH
   21368             :         PY_WBINT_TRANSID_PATCH(&wbint_TransID_Type);
   21369             : #endif
   21370             : #ifdef PY_WBINT_TRANSIDARRAY_PATCH
   21371             :         PY_WBINT_TRANSIDARRAY_PATCH(&wbint_TransIDArray_Type);
   21372             : #endif
   21373             : #ifdef PY_WBINT_USERINFO_PATCH
   21374             :         PY_WBINT_USERINFO_PATCH(&wbint_userinfo_Type);
   21375             : #endif
   21376             : #ifdef PY_WBINT_SIDARRAY_PATCH
   21377             :         PY_WBINT_SIDARRAY_PATCH(&wbint_SidArray_Type);
   21378             : #endif
   21379             : #ifdef PY_WBINT_RIDARRAY_PATCH
   21380             :         PY_WBINT_RIDARRAY_PATCH(&wbint_RidArray_Type);
   21381             : #endif
   21382             : #ifdef PY_WBINT_PRINCIPAL_PATCH
   21383             :         PY_WBINT_PRINCIPAL_PATCH(&wbint_Principal_Type);
   21384             : #endif
   21385             : #ifdef PY_WBINT_PRINCIPALS_PATCH
   21386             :         PY_WBINT_PRINCIPALS_PATCH(&wbint_Principals_Type);
   21387             : #endif
   21388             : #ifdef PY_WBINT_USERINFOS_PATCH
   21389             :         PY_WBINT_USERINFOS_PATCH(&wbint_userinfos_Type);
   21390             : #endif
   21391             : #ifdef PY_WBINT_VALIDATION_PATCH
   21392             :         PY_WBINT_VALIDATION_PATCH(&wbint_Validation_Type);
   21393             : #endif
   21394             : #ifdef PY_WBINT_AUTHUSERINFO_PATCH
   21395             :         PY_WBINT_AUTHUSERINFO_PATCH(&wbint_AuthUserInfo_Type);
   21396             : #endif
   21397             : #ifdef PY_WBINT_PAMAUTHCRAPVALIDATION_PATCH
   21398             :         PY_WBINT_PAMAUTHCRAPVALIDATION_PATCH(&wbint_PamAuthCrapValidation_Type);
   21399             : #endif
   21400             : #ifdef PY_WBINT_PING_PATCH
   21401             :         PY_WBINT_PING_PATCH(&wbint_Ping_Type);
   21402             : #endif
   21403             : #ifdef PY_WBINT_LOOKUPSID_PATCH
   21404             :         PY_WBINT_LOOKUPSID_PATCH(&wbint_LookupSid_Type);
   21405             : #endif
   21406             : #ifdef PY_WBINT_LOOKUPSIDS_PATCH
   21407             :         PY_WBINT_LOOKUPSIDS_PATCH(&wbint_LookupSids_Type);
   21408             : #endif
   21409             : #ifdef PY_WBINT_LOOKUPNAME_PATCH
   21410             :         PY_WBINT_LOOKUPNAME_PATCH(&wbint_LookupName_Type);
   21411             : #endif
   21412             : #ifdef PY_WBINT_SIDS2UNIXIDS_PATCH
   21413             :         PY_WBINT_SIDS2UNIXIDS_PATCH(&wbint_Sids2UnixIDs_Type);
   21414             : #endif
   21415             : #ifdef PY_WBINT_UNIXIDS2SIDS_PATCH
   21416             :         PY_WBINT_UNIXIDS2SIDS_PATCH(&wbint_UnixIDs2Sids_Type);
   21417             : #endif
   21418             : #ifdef PY_WBINT_ALLOCATEUID_PATCH
   21419             :         PY_WBINT_ALLOCATEUID_PATCH(&wbint_AllocateUid_Type);
   21420             : #endif
   21421             : #ifdef PY_WBINT_ALLOCATEGID_PATCH
   21422             :         PY_WBINT_ALLOCATEGID_PATCH(&wbint_AllocateGid_Type);
   21423             : #endif
   21424             : #ifdef PY_WBINT_GETNSSINFO_PATCH
   21425             :         PY_WBINT_GETNSSINFO_PATCH(&wbint_GetNssInfo_Type);
   21426             : #endif
   21427             : #ifdef PY_WBINT_LOOKUPUSERALIASES_PATCH
   21428             :         PY_WBINT_LOOKUPUSERALIASES_PATCH(&wbint_LookupUserAliases_Type);
   21429             : #endif
   21430             : #ifdef PY_WBINT_LOOKUPUSERGROUPS_PATCH
   21431             :         PY_WBINT_LOOKUPUSERGROUPS_PATCH(&wbint_LookupUserGroups_Type);
   21432             : #endif
   21433             : #ifdef PY_WBINT_QUERYSEQUENCENUMBER_PATCH
   21434             :         PY_WBINT_QUERYSEQUENCENUMBER_PATCH(&wbint_QuerySequenceNumber_Type);
   21435             : #endif
   21436             : #ifdef PY_WBINT_LOOKUPGROUPMEMBERS_PATCH
   21437             :         PY_WBINT_LOOKUPGROUPMEMBERS_PATCH(&wbint_LookupGroupMembers_Type);
   21438             : #endif
   21439             : #ifdef PY_WBINT_QUERYGROUPLIST_PATCH
   21440             :         PY_WBINT_QUERYGROUPLIST_PATCH(&wbint_QueryGroupList_Type);
   21441             : #endif
   21442             : #ifdef PY_WBINT_QUERYUSERRIDLIST_PATCH
   21443             :         PY_WBINT_QUERYUSERRIDLIST_PATCH(&wbint_QueryUserRidList_Type);
   21444             : #endif
   21445             : #ifdef PY_WBINT_DSGETDCNAME_PATCH
   21446             :         PY_WBINT_DSGETDCNAME_PATCH(&wbint_DsGetDcName_Type);
   21447             : #endif
   21448             : #ifdef PY_WBINT_LOOKUPRIDS_PATCH
   21449             :         PY_WBINT_LOOKUPRIDS_PATCH(&wbint_LookupRids_Type);
   21450             : #endif
   21451             : #ifdef PY_WBINT_CHECKMACHINEACCOUNT_PATCH
   21452             :         PY_WBINT_CHECKMACHINEACCOUNT_PATCH(&wbint_CheckMachineAccount_Type);
   21453             : #endif
   21454             : #ifdef PY_WBINT_CHANGEMACHINEACCOUNT_PATCH
   21455             :         PY_WBINT_CHANGEMACHINEACCOUNT_PATCH(&wbint_ChangeMachineAccount_Type);
   21456             : #endif
   21457             : #ifdef PY_WBINT_PINGDC_PATCH
   21458             :         PY_WBINT_PINGDC_PATCH(&wbint_PingDc_Type);
   21459             : #endif
   21460             : #ifdef PY_WBINT_LISTTRUSTEDDOMAINS_PATCH
   21461             :         PY_WBINT_LISTTRUSTEDDOMAINS_PATCH(&wbint_ListTrustedDomains_Type);
   21462             : #endif
   21463             : #ifdef PY_WBINT_PAMAUTH_PATCH
   21464             :         PY_WBINT_PAMAUTH_PATCH(&wbint_PamAuth_Type);
   21465             : #endif
   21466             : #ifdef PY_WBINT_PAMAUTHCRAP_PATCH
   21467             :         PY_WBINT_PAMAUTHCRAP_PATCH(&wbint_PamAuthCrap_Type);
   21468             : #endif
   21469             : #ifdef PY_WBINT_PAMLOGOFF_PATCH
   21470             :         PY_WBINT_PAMLOGOFF_PATCH(&wbint_PamLogOff_Type);
   21471             : #endif
   21472             : #ifdef PY_WBINT_PAMAUTHCRAPCHANGEPASSWORD_PATCH
   21473             :         PY_WBINT_PAMAUTHCRAPCHANGEPASSWORD_PATCH(&wbint_PamAuthCrapChangePassword_Type);
   21474             : #endif
   21475             : #ifdef PY_WBINT_PAMAUTHCHANGEPASSWORD_PATCH
   21476             :         PY_WBINT_PAMAUTHCHANGEPASSWORD_PATCH(&wbint_PamAuthChangePassword_Type);
   21477             : #endif
   21478             : #ifdef PY_WBINT_INITCONNECTION_PATCH
   21479             :         PY_WBINT_INITCONNECTION_PATCH(&wbint_InitConnection_Type);
   21480             : #endif
   21481             : #ifdef PY_SAMLOGON_PATCH
   21482             :         PY_SAMLOGON_PATCH(&winbind_SamLogon_Type);
   21483             : #endif
   21484             : #ifdef PY_DSRUPDATEREADONLYSERVERDNSRECORDS_PATCH
   21485             :         PY_DSRUPDATEREADONLYSERVERDNSRECORDS_PATCH(&winbind_DsrUpdateReadOnlyServerDnsRecords_Type);
   21486             : #endif
   21487             : #ifdef PY_LOGONCONTROL_PATCH
   21488             :         PY_LOGONCONTROL_PATCH(&winbind_LogonControl_Type);
   21489             : #endif
   21490             : #ifdef PY_GETFORESTTRUSTINFORMATION_PATCH
   21491             :         PY_GETFORESTTRUSTINFORMATION_PATCH(&winbind_GetForestTrustInformation_Type);
   21492             : #endif
   21493             : #ifdef PY_SENDTOSAM_PATCH
   21494             :         PY_SENDTOSAM_PATCH(&winbind_SendToSam_Type);
   21495             : #endif
   21496             : #ifdef PY_WINBIND_PATCH
   21497             :         PY_WINBIND_PATCH(&winbind_InterfaceType);
   21498             : #endif
   21499             : #ifdef PY_WINBIND_ABSTRACT_SYNTAX_PATCH
   21500             :         PY_WINBIND_ABSTRACT_SYNTAX_PATCH(&winbind_SyntaxType);
   21501             : #endif
   21502             : #ifdef PY_ABSTRACT_SYNTAX_PATCH
   21503             :         PY_ABSTRACT_SYNTAX_PATCH(&winbind_SyntaxType);
   21504             : #endif
   21505             : 
   21506         116 :         m = PyModule_Create(&moduledef);
   21507         116 :         if (m == NULL)
   21508           0 :                 goto out;
   21509             : 
   21510         116 :         PyModule_AddObject(m, "WB_DOMINFO_DOMAIN_UNKNOWN", PyLong_FromLong((uint16_t)WB_DOMINFO_DOMAIN_UNKNOWN));
   21511         116 :         PyModule_AddObject(m, "WB_DOMINFO_DOMAIN_NATIVE", PyLong_FromLong((uint16_t)WB_DOMINFO_DOMAIN_NATIVE));
   21512         116 :         PyModule_AddObject(m, "WB_DOMINFO_DOMAIN_AD", PyLong_FromLong((uint16_t)WB_DOMINFO_DOMAIN_AD));
   21513         116 :         PyModule_AddObject(m, "WB_DOMINFO_DOMAIN_PRIMARY", PyLong_FromLong((uint16_t)WB_DOMINFO_DOMAIN_PRIMARY));
   21514         116 :         PyModule_AddObject(m, "WB_DOMINFO_DOMAIN_OFFLINE", PyLong_FromLong((uint16_t)WB_DOMINFO_DOMAIN_OFFLINE));
   21515         116 :         Py_INCREF((PyObject *)(void *)&wbint_TransID_Type);
   21516         116 :         PyModule_AddObject(m, "wbint_TransID", (PyObject *)(void *)&wbint_TransID_Type);
   21517         116 :         Py_INCREF((PyObject *)(void *)&wbint_TransIDArray_Type);
   21518         116 :         PyModule_AddObject(m, "wbint_TransIDArray", (PyObject *)(void *)&wbint_TransIDArray_Type);
   21519         116 :         Py_INCREF((PyObject *)(void *)&wbint_userinfo_Type);
   21520         116 :         PyModule_AddObject(m, "wbint_userinfo", (PyObject *)(void *)&wbint_userinfo_Type);
   21521         116 :         Py_INCREF((PyObject *)(void *)&wbint_SidArray_Type);
   21522         116 :         PyModule_AddObject(m, "wbint_SidArray", (PyObject *)(void *)&wbint_SidArray_Type);
   21523         116 :         Py_INCREF((PyObject *)(void *)&wbint_RidArray_Type);
   21524         116 :         PyModule_AddObject(m, "wbint_RidArray", (PyObject *)(void *)&wbint_RidArray_Type);
   21525         116 :         Py_INCREF((PyObject *)(void *)&wbint_Principal_Type);
   21526         116 :         PyModule_AddObject(m, "wbint_Principal", (PyObject *)(void *)&wbint_Principal_Type);
   21527         116 :         Py_INCREF((PyObject *)(void *)&wbint_Principals_Type);
   21528         116 :         PyModule_AddObject(m, "wbint_Principals", (PyObject *)(void *)&wbint_Principals_Type);
   21529         116 :         Py_INCREF((PyObject *)(void *)&wbint_userinfos_Type);
   21530         116 :         PyModule_AddObject(m, "wbint_userinfos", (PyObject *)(void *)&wbint_userinfos_Type);
   21531         116 :         Py_INCREF((PyObject *)(void *)&wbint_Validation_Type);
   21532         116 :         PyModule_AddObject(m, "wbint_Validation", (PyObject *)(void *)&wbint_Validation_Type);
   21533         116 :         Py_INCREF((PyObject *)(void *)&wbint_AuthUserInfo_Type);
   21534         116 :         PyModule_AddObject(m, "wbint_AuthUserInfo", (PyObject *)(void *)&wbint_AuthUserInfo_Type);
   21535         116 :         Py_INCREF((PyObject *)(void *)&wbint_PamAuthCrapValidation_Type);
   21536         116 :         PyModule_AddObject(m, "wbint_PamAuthCrapValidation", (PyObject *)(void *)&wbint_PamAuthCrapValidation_Type);
   21537         116 :         Py_INCREF((PyObject *)(void *)&wbint_Ping_Type);
   21538         116 :         PyModule_AddObject(m, "wbint_Ping", (PyObject *)(void *)&wbint_Ping_Type);
   21539         116 :         Py_INCREF((PyObject *)(void *)&wbint_LookupSid_Type);
   21540         116 :         PyModule_AddObject(m, "wbint_LookupSid", (PyObject *)(void *)&wbint_LookupSid_Type);
   21541         116 :         Py_INCREF((PyObject *)(void *)&wbint_LookupSids_Type);
   21542         116 :         PyModule_AddObject(m, "wbint_LookupSids", (PyObject *)(void *)&wbint_LookupSids_Type);
   21543         116 :         Py_INCREF((PyObject *)(void *)&wbint_LookupName_Type);
   21544         116 :         PyModule_AddObject(m, "wbint_LookupName", (PyObject *)(void *)&wbint_LookupName_Type);
   21545         116 :         Py_INCREF((PyObject *)(void *)&wbint_Sids2UnixIDs_Type);
   21546         116 :         PyModule_AddObject(m, "wbint_Sids2UnixIDs", (PyObject *)(void *)&wbint_Sids2UnixIDs_Type);
   21547         116 :         Py_INCREF((PyObject *)(void *)&wbint_UnixIDs2Sids_Type);
   21548         116 :         PyModule_AddObject(m, "wbint_UnixIDs2Sids", (PyObject *)(void *)&wbint_UnixIDs2Sids_Type);
   21549         116 :         Py_INCREF((PyObject *)(void *)&wbint_AllocateUid_Type);
   21550         116 :         PyModule_AddObject(m, "wbint_AllocateUid", (PyObject *)(void *)&wbint_AllocateUid_Type);
   21551         116 :         Py_INCREF((PyObject *)(void *)&wbint_AllocateGid_Type);
   21552         116 :         PyModule_AddObject(m, "wbint_AllocateGid", (PyObject *)(void *)&wbint_AllocateGid_Type);
   21553         116 :         Py_INCREF((PyObject *)(void *)&wbint_GetNssInfo_Type);
   21554         116 :         PyModule_AddObject(m, "wbint_GetNssInfo", (PyObject *)(void *)&wbint_GetNssInfo_Type);
   21555         116 :         Py_INCREF((PyObject *)(void *)&wbint_LookupUserAliases_Type);
   21556         116 :         PyModule_AddObject(m, "wbint_LookupUserAliases", (PyObject *)(void *)&wbint_LookupUserAliases_Type);
   21557         116 :         Py_INCREF((PyObject *)(void *)&wbint_LookupUserGroups_Type);
   21558         116 :         PyModule_AddObject(m, "wbint_LookupUserGroups", (PyObject *)(void *)&wbint_LookupUserGroups_Type);
   21559         116 :         Py_INCREF((PyObject *)(void *)&wbint_QuerySequenceNumber_Type);
   21560         116 :         PyModule_AddObject(m, "wbint_QuerySequenceNumber", (PyObject *)(void *)&wbint_QuerySequenceNumber_Type);
   21561         116 :         Py_INCREF((PyObject *)(void *)&wbint_LookupGroupMembers_Type);
   21562         116 :         PyModule_AddObject(m, "wbint_LookupGroupMembers", (PyObject *)(void *)&wbint_LookupGroupMembers_Type);
   21563         116 :         Py_INCREF((PyObject *)(void *)&wbint_QueryGroupList_Type);
   21564         116 :         PyModule_AddObject(m, "wbint_QueryGroupList", (PyObject *)(void *)&wbint_QueryGroupList_Type);
   21565         116 :         Py_INCREF((PyObject *)(void *)&wbint_QueryUserRidList_Type);
   21566         116 :         PyModule_AddObject(m, "wbint_QueryUserRidList", (PyObject *)(void *)&wbint_QueryUserRidList_Type);
   21567         116 :         Py_INCREF((PyObject *)(void *)&wbint_DsGetDcName_Type);
   21568         116 :         PyModule_AddObject(m, "wbint_DsGetDcName", (PyObject *)(void *)&wbint_DsGetDcName_Type);
   21569         116 :         Py_INCREF((PyObject *)(void *)&wbint_LookupRids_Type);
   21570         116 :         PyModule_AddObject(m, "wbint_LookupRids", (PyObject *)(void *)&wbint_LookupRids_Type);
   21571         116 :         Py_INCREF((PyObject *)(void *)&wbint_CheckMachineAccount_Type);
   21572         116 :         PyModule_AddObject(m, "wbint_CheckMachineAccount", (PyObject *)(void *)&wbint_CheckMachineAccount_Type);
   21573         116 :         Py_INCREF((PyObject *)(void *)&wbint_ChangeMachineAccount_Type);
   21574         116 :         PyModule_AddObject(m, "wbint_ChangeMachineAccount", (PyObject *)(void *)&wbint_ChangeMachineAccount_Type);
   21575         116 :         Py_INCREF((PyObject *)(void *)&wbint_PingDc_Type);
   21576         116 :         PyModule_AddObject(m, "wbint_PingDc", (PyObject *)(void *)&wbint_PingDc_Type);
   21577         116 :         Py_INCREF((PyObject *)(void *)&wbint_ListTrustedDomains_Type);
   21578         116 :         PyModule_AddObject(m, "wbint_ListTrustedDomains", (PyObject *)(void *)&wbint_ListTrustedDomains_Type);
   21579         116 :         Py_INCREF((PyObject *)(void *)&wbint_PamAuth_Type);
   21580         116 :         PyModule_AddObject(m, "wbint_PamAuth", (PyObject *)(void *)&wbint_PamAuth_Type);
   21581         116 :         Py_INCREF((PyObject *)(void *)&wbint_PamAuthCrap_Type);
   21582         116 :         PyModule_AddObject(m, "wbint_PamAuthCrap", (PyObject *)(void *)&wbint_PamAuthCrap_Type);
   21583         116 :         Py_INCREF((PyObject *)(void *)&wbint_PamLogOff_Type);
   21584         116 :         PyModule_AddObject(m, "wbint_PamLogOff", (PyObject *)(void *)&wbint_PamLogOff_Type);
   21585         116 :         Py_INCREF((PyObject *)(void *)&wbint_PamAuthCrapChangePassword_Type);
   21586         116 :         PyModule_AddObject(m, "wbint_PamAuthCrapChangePassword", (PyObject *)(void *)&wbint_PamAuthCrapChangePassword_Type);
   21587         116 :         Py_INCREF((PyObject *)(void *)&wbint_PamAuthChangePassword_Type);
   21588         116 :         PyModule_AddObject(m, "wbint_PamAuthChangePassword", (PyObject *)(void *)&wbint_PamAuthChangePassword_Type);
   21589         116 :         Py_INCREF((PyObject *)(void *)&wbint_InitConnection_Type);
   21590         116 :         PyModule_AddObject(m, "wbint_InitConnection", (PyObject *)(void *)&wbint_InitConnection_Type);
   21591         116 :         Py_INCREF((PyObject *)(void *)&winbind_SamLogon_Type);
   21592         116 :         PyModule_AddObject(m, "SamLogon", (PyObject *)(void *)&winbind_SamLogon_Type);
   21593         116 :         Py_INCREF((PyObject *)(void *)&winbind_DsrUpdateReadOnlyServerDnsRecords_Type);
   21594         116 :         PyModule_AddObject(m, "DsrUpdateReadOnlyServerDnsRecords", (PyObject *)(void *)&winbind_DsrUpdateReadOnlyServerDnsRecords_Type);
   21595         116 :         Py_INCREF((PyObject *)(void *)&winbind_LogonControl_Type);
   21596         116 :         PyModule_AddObject(m, "LogonControl", (PyObject *)(void *)&winbind_LogonControl_Type);
   21597         116 :         Py_INCREF((PyObject *)(void *)&winbind_GetForestTrustInformation_Type);
   21598         116 :         PyModule_AddObject(m, "GetForestTrustInformation", (PyObject *)(void *)&winbind_GetForestTrustInformation_Type);
   21599         116 :         Py_INCREF((PyObject *)(void *)&winbind_SendToSam_Type);
   21600         116 :         PyModule_AddObject(m, "SendToSam", (PyObject *)(void *)&winbind_SendToSam_Type);
   21601         116 :         Py_INCREF((PyObject *)(void *)&winbind_InterfaceType);
   21602         116 :         PyModule_AddObject(m, "winbind", (PyObject *)(void *)&winbind_InterfaceType);
   21603         116 :         Py_INCREF((PyObject *)(void *)&winbind_SyntaxType);
   21604         116 :         PyModule_AddObject(m, "winbind_abstract_syntax", (PyObject *)(void *)&winbind_SyntaxType);
   21605         116 :         Py_INCREF((PyObject *)(void *)&winbind_SyntaxType);
   21606         116 :         PyModule_AddObject(m, "abstract_syntax", (PyObject *)(void *)&winbind_SyntaxType);
   21607             : #ifdef PY_MOD_WINBIND_PATCH
   21608             :         PY_MOD_WINBIND_PATCH(m);
   21609             : #endif
   21610         116 :         out:
   21611         116 :         Py_XDECREF(dep_samba_dcerpc_lsa);
   21612         116 :         Py_XDECREF(dep_samba_dcerpc_netlogon);
   21613         116 :         Py_XDECREF(dep_samba_dcerpc_samr);
   21614         116 :         Py_XDECREF(dep_samba_dcerpc_misc);
   21615         116 :         Py_XDECREF(dep_samba_dcerpc_security);
   21616         116 :         Py_XDECREF(dep_samba_dcerpc_idmap);
   21617         116 :         Py_XDECREF(dep_talloc);
   21618         116 :         Py_XDECREF(dep_samba_dcerpc_base);
   21619         116 :         return m;
   21620             : 
   21621             : }

Generated by: LCOV version 1.13