Ignore:
Timestamp:
Nov 14, 2012, 12:59:34 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to 3.6.0

Location:
vendor/current/source3/librpc
Files:
617 added
6 deleted
30 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/librpc/gen_ndr/libnet_join.h

    r414 r740  
    11/* header auto-generated by pidl */
     2
     3#ifndef _PIDL_HEADER_libnetjoin
     4#define _PIDL_HEADER_libnetjoin
    25
    36#include <stdint.h>
     
    710#include "librpc/gen_ndr/wkssvc.h"
    811#include "librpc/gen_ndr/security.h"
     12#include "librpc/gen_ndr/misc.h"
    913#ifndef _HEADER_libnetjoin
    1014#define _HEADER_libnetjoin
     
    1822                const char * account_ou;
    1923                const char * admin_account;
    20                 const char * admin_password;
     24                const char * admin_password;/* [noprint] */
    2125                const char * machine_password;
    2226                uint32_t join_flags;
     
    2630                const char * upn;
    2731                uint8_t modify_config;
    28                 struct ads_struct *ads;/* [ref] */
     32                struct ads_struct *ads;/* [unique] */
    2933                uint8_t debug;
    3034                uint8_t use_kerberos;
     
    5660                const char * account_ou;
    5761                const char * admin_account;
    58                 const char * admin_password;
     62                const char * admin_password;/* [noprint] */
    5963                const char * machine_password;
    6064                uint32_t unjoin_flags;
     
    6266                uint8_t modify_config;
    6367                struct dom_sid *domain_sid;/* [ref] */
    64                 struct ads_struct *ads;/* [ref] */
     68                struct ads_struct *ads;/* [unique] */
    6569                uint8_t debug;
    6670                uint8_t use_kerberos;
     
    8286
    8387#endif /* _HEADER_libnetjoin */
     88#endif /* _PIDL_HEADER_libnetjoin */
  • vendor/current/source3/librpc/gen_ndr/libnetapi.h

    r414 r740  
    11/* header auto-generated by pidl */
     2
     3#ifndef _PIDL_HEADER_libnetapi
     4#define _PIDL_HEADER_libnetapi
    25
    36#include <stdint.h>
     
    912#define MAXSUBAUTHS 15 /* max sub authorities in a SID */
    1013#endif
     14#include "librpc/gen_ndr/misc.h"
    1115#ifndef _HEADER_libnetapi
    1216#define _HEADER_libnetapi
     
    727731};
    728732
     733enum DOMAIN_CONTROLLER_INFO_FLAGS
     734#ifndef USE_UINT_ENUMS
     735 {
     736        DS_PDC_FLAG=(int)(0x00000001),
     737        DS_GC_FLAG=(int)(0x00000004),
     738        DS_LDAP_FLAG=(int)(0x00000008),
     739        DS_DS_FLAG=(int)(0x00000010),
     740        DS_KDC_FLAG=(int)(0x00000020),
     741        DS_TIMESERV_FLAG=(int)(0x00000040),
     742        DS_CLOSEST_FLAG=(int)(0x00000080),
     743        DS_WRITABLE_FLAG=(int)(0x00000100),
     744        DS_GOOD_TIMESERV_FLAG=(int)(0x00000200),
     745        DS_NDNC_FLAG=(int)(0x00000400),
     746        DS_SELECT_SECRET_DOMAIN_6_FLAG=(int)(0x00000800),
     747        DS_FULL_SECRET_DOMAIN_6_FLAG=(int)(0x00001000),
     748        DS_DNS_CONTROLLER_FLAG=(int)(0x20000000),
     749        DS_DNS_DOMAIN_FLAG=(int)(0x40000000),
     750        DS_DNS_FOREST_FLAG=(int)(0x80000000)
     751}
     752#else
     753 { __donnot_use_enum_DOMAIN_CONTROLLER_INFO_FLAGS=0x7FFFFFFF}
     754#define DS_PDC_FLAG ( 0x00000001 )
     755#define DS_GC_FLAG ( 0x00000004 )
     756#define DS_LDAP_FLAG ( 0x00000008 )
     757#define DS_DS_FLAG ( 0x00000010 )
     758#define DS_KDC_FLAG ( 0x00000020 )
     759#define DS_TIMESERV_FLAG ( 0x00000040 )
     760#define DS_CLOSEST_FLAG ( 0x00000080 )
     761#define DS_WRITABLE_FLAG ( 0x00000100 )
     762#define DS_GOOD_TIMESERV_FLAG ( 0x00000200 )
     763#define DS_NDNC_FLAG ( 0x00000400 )
     764#define DS_SELECT_SECRET_DOMAIN_6_FLAG ( 0x00000800 )
     765#define DS_FULL_SECRET_DOMAIN_6_FLAG ( 0x00001000 )
     766#define DS_DNS_CONTROLLER_FLAG ( 0x20000000 )
     767#define DS_DNS_DOMAIN_FLAG ( 0x40000000 )
     768#define DS_DNS_FOREST_FLAG ( 0x80000000 )
     769#endif
     770;
     771
    729772struct DOMAIN_CONTROLLER_INFO {
    730773        const char * domain_controller_name;
     
    734777        const char * domain_name;
    735778        const char * dns_forest_name;
    736         uint32_t flags;
     779        enum DOMAIN_CONTROLLER_INFO_FLAGS flags;
    737780        const char * dc_site_name;
    738781        const char * client_site_name;
     
    21482191                uint32_t function_code;
    21492192                uint32_t query_level;
    2150                 uint8_t *data;/* [ref] */
     2193                uint8_t *data;/* [unique] */
    21512194        } in;
    21522195
     
    21592202
    21602203#endif /* _HEADER_libnetapi */
     2204#endif /* _PIDL_HEADER_libnetapi */
  • vendor/current/source3/librpc/gen_ndr/messaging.h

    r427 r740  
    11/* header auto-generated by pidl */
     2
     3#ifndef _PIDL_HEADER_messaging
     4#define _PIDL_HEADER_messaging
    25
    36#include <stdint.h>
     
    58#include "libcli/util/ntstatus.h"
    69
     10#include "librpc/gen_ndr/server_id.h"
    711#ifndef _HEADER_messaging
    812#define _HEADER_messaging
     
    2529        MSG_REQ_DMALLOC_LOG_CHANGED=(int)(0x000C),
    2630        MSG_SHUTDOWN=(int)(0x000D),
     31        MSG_IDMAP_FLUSH=(int)(0x000E),
     32        MSG_IDMAP_DELETE=(int)(0x000F),
     33        MSG_IDMAP_KILL=(int)(0x0010),
    2734        MSG_FORCE_ELECTION=(int)(0x0101),
    2835        MSG_WINS_NEW_ENTRY=(int)(0x0102),
     
    3441        MSG_PRINTER_UPDATE=(int)(0x0205),
    3542        MSG_PRINTER_MOD=(int)(0x0206),
     43        MSG_PRINTER_PCAP=(int)(0x0207),
    3644        MSG_SMB_CONF_UPDATED=(int)(0x0301),
    3745        MSG_SMB_FORCE_TDIS=(int)(0x0302),
     
    6270        MSG_WINBIND_VALIDATE_CACHE=(int)(0x0408),
    6371        MSG_WINBIND_DUMP_DOMAIN_LIST=(int)(0x0409),
     72        MSG_WINBIND_IP_DROPPED=(int)(0x040A),
    6473        MSG_DUMP_EVENT_LIST=(int)(0x0500),
    6574        MSG_DBWRAP_TDB2_CHANGES=(int)(4001),
     
    8190#define MSG_REQ_DMALLOC_LOG_CHANGED ( 0x000C )
    8291#define MSG_SHUTDOWN ( 0x000D )
     92#define MSG_IDMAP_FLUSH ( 0x000E )
     93#define MSG_IDMAP_DELETE ( 0x000F )
     94#define MSG_IDMAP_KILL ( 0x0010 )
    8395#define MSG_FORCE_ELECTION ( 0x0101 )
    8496#define MSG_WINS_NEW_ENTRY ( 0x0102 )
     
    90102#define MSG_PRINTER_UPDATE ( 0x0205 )
    91103#define MSG_PRINTER_MOD ( 0x0206 )
     104#define MSG_PRINTER_PCAP ( 0x0207 )
    92105#define MSG_SMB_CONF_UPDATED ( 0x0301 )
    93106#define MSG_SMB_FORCE_TDIS ( 0x0302 )
     
    118131#define MSG_WINBIND_VALIDATE_CACHE ( 0x0408 )
    119132#define MSG_WINBIND_DUMP_DOMAIN_LIST ( 0x0409 )
     133#define MSG_WINBIND_IP_DROPPED ( 0x040A )
    120134#define MSG_DUMP_EVENT_LIST ( 0x0500 )
    121135#define MSG_DBWRAP_TDB2_CHANGES ( 4001 )
     
    149163
    150164#endif /* _HEADER_messaging */
     165#endif /* _PIDL_HEADER_messaging */
  • vendor/current/source3/librpc/gen_ndr/ndr_libnet_join.c

    r414 r740  
    66#include "librpc/gen_ndr/ndr_wkssvc.h"
    77#include "librpc/gen_ndr/ndr_security.h"
     8#include "librpc/gen_ndr/ndr_misc.h"
    89_PUBLIC_ void ndr_print_libnet_JoinCtx(struct ndr_print *ndr, const char *name, int flags, const struct libnet_JoinCtx *r)
    910{
    1011        ndr_print_struct(ndr, name, "libnet_JoinCtx");
     12        if (r == NULL) { ndr_print_null(ndr); return; }
    1113        ndr->depth++;
    1214        if (flags & NDR_SET_VALUES) {
     
    2426                ndr_print_string(ndr, "account_ou", r->in.account_ou);
    2527                ndr_print_string(ndr, "admin_account", r->in.admin_account);
    26 #ifdef DEBUG_PASSWORD
    27                 ndr_print_string(ndr, "admin_password", r->in.admin_password);
    2828                ndr_print_string(ndr, "machine_password", r->in.machine_password);
    29 #else
    30                 ndr_print_ptr(ndr, "admin_password", r->in.admin_password);
    31                 ndr_print_ptr(ndr, "machine_password", r->in.machine_password);
    32 #endif
    3329                ndr_print_wkssvc_joinflags(ndr, "join_flags", r->in.join_flags);
    3430                ndr_print_string(ndr, "os_version", r->in.os_version);
     
    3935                ndr_print_ptr(ndr, "ads", r->in.ads);
    4036                ndr->depth++;
    41                 ndr_print_ads_struct(ndr, "ads", r->in.ads);
     37                if (r->in.ads) {
     38                        ndr_print_ads_struct(ndr, "ads", r->in.ads);
     39                }
    4240                ndr->depth--;
    4341                ndr_print_uint8(ndr, "debug", r->in.debug);
     
    7068{
    7169        ndr_print_struct(ndr, name, "libnet_UnjoinCtx");
     70        if (r == NULL) { ndr_print_null(ndr); return; }
    7271        ndr->depth++;
    7372        if (flags & NDR_SET_VALUES) {
     
    8281                ndr_print_string(ndr, "account_ou", r->in.account_ou);
    8382                ndr_print_string(ndr, "admin_account", r->in.admin_account);
    84 #ifdef DEBUG_PASSWORD
    85                 ndr_print_string(ndr, "admin_password", r->in.admin_password);
    8683                ndr_print_string(ndr, "machine_password", r->in.machine_password);
    87 #else
    88                 ndr_print_ptr(ndr, "admin_password", r->in.admin_password);
    89                 ndr_print_ptr(ndr, "machine_password", r->in.machine_password);
    90 #endif
    9184                ndr_print_wkssvc_joinflags(ndr, "unjoin_flags", r->in.unjoin_flags);
    9285                ndr_print_uint8(ndr, "delete_machine_account", r->in.delete_machine_account);
     
    9891                ndr_print_ptr(ndr, "ads", r->in.ads);
    9992                ndr->depth++;
    100                 ndr_print_ads_struct(ndr, "ads", r->in.ads);
     93                if (r->in.ads) {
     94                        ndr_print_ads_struct(ndr, "ads", r->in.ads);
     95                }
    10196                ndr->depth--;
    10297                ndr_print_uint8(ndr, "debug", r->in.debug);
  • vendor/current/source3/librpc/gen_ndr/ndr_libnet_join.h

    r414 r740  
    77#define _HEADER_NDR_libnetjoin
    88
     9#include "ads.h"
    910#define NDR_LIBNETJOIN_CALL_COUNT (0)
    1011enum ndr_err_code ndr_push_libnet_JoinCtx(struct ndr_push *ndr, int flags, const struct libnet_JoinCtx *r);
  • vendor/current/source3/librpc/gen_ndr/ndr_libnetapi.c

    r414 r740  
    44#include "librpc/gen_ndr/ndr_libnetapi.h"
    55
     6#include "librpc/gen_ndr/ndr_misc.h"
    67_PUBLIC_ enum ndr_err_code ndr_push_NET_API_STATUS(struct ndr_push *ndr, int ndr_flags, enum NET_API_STATUS r)
    78{
     
    7374        uint32_t cntr_sub_auths_0;
    7475        ndr_print_struct(ndr, name, "domsid");
     76        if (r == NULL) { ndr_print_null(ndr); return; }
    7577        ndr->depth++;
    7678        ndr_print_uint8(ndr, "sid_rev_num", r->sid_rev_num);
     
    8082        ndr->depth++;
    8183        for (cntr_sub_auths_0=0;cntr_sub_auths_0<MAXSUBAUTHS;cntr_sub_auths_0++) {
    82                 char *idx_0=NULL;
    83                 if (asprintf(&idx_0, "[%d]", cntr_sub_auths_0) != -1) {
    84                         ndr_print_uint32(ndr, "sub_auths", r->sub_auths[cntr_sub_auths_0]);
    85                         free(idx_0);
    86                 }
     84                ndr_print_uint32(ndr, "sub_auths", r->sub_auths[cntr_sub_auths_0]);
    8785        }
    8886        ndr->depth--;
     
    152150{
    153151        ndr_print_struct(ndr, name, "SERVER_INFO_100");
     152        if (r == NULL) { ndr_print_null(ndr); return; }
    154153        ndr->depth++;
    155154        ndr_print_uint32(ndr, "sv100_platform_id", r->sv100_platform_id);
     
    195194{
    196195        ndr_print_struct(ndr, name, "SERVER_INFO_101");
     196        if (r == NULL) { ndr_print_null(ndr); return; }
    197197        ndr->depth++;
    198198        ndr_print_uint32(ndr, "sv101_platform_id", r->sv101_platform_id);
     
    256256{
    257257        ndr_print_struct(ndr, name, "SERVER_INFO_102");
     258        if (r == NULL) { ndr_print_null(ndr); return; }
    258259        ndr->depth++;
    259260        ndr_print_uint32(ndr, "sv102_platform_id", r->sv102_platform_id);
     
    360361{
    361362        ndr_print_struct(ndr, name, "SERVER_INFO_402");
     363        if (r == NULL) { ndr_print_null(ndr); return; }
    362364        ndr->depth++;
    363365        ndr_print_uint32(ndr, "sv402_ulist_mtime", r->sv402_ulist_mtime);
     
    488490{
    489491        ndr_print_struct(ndr, name, "SERVER_INFO_403");
     492        if (r == NULL) { ndr_print_null(ndr); return; }
    490493        ndr->depth++;
    491494        ndr_print_uint32(ndr, "sv403_ulist_mtime", r->sv403_ulist_mtime);
     
    587590{
    588591        ndr_print_struct(ndr, name, "SERVER_INFO_502");
     592        if (r == NULL) { ndr_print_null(ndr); return; }
    589593        ndr->depth++;
    590594        ndr_print_uint32(ndr, "sv502_sessopens", r->sv502_sessopens);
     
    718722{
    719723        ndr_print_struct(ndr, name, "SERVER_INFO_503");
     724        if (r == NULL) { ndr_print_null(ndr); return; }
    720725        ndr->depth++;
    721726        ndr_print_uint32(ndr, "sv503_sessopens", r->sv503_sessopens);
     
    901906{
    902907        ndr_print_struct(ndr, name, "SERVER_INFO_599");
     908        if (r == NULL) { ndr_print_null(ndr); return; }
    903909        ndr->depth++;
    904910        ndr_print_uint32(ndr, "sv599_sessopens", r->sv599_sessopens);
     
    10101016        }
    10111017        if (ndr_flags & NDR_BUFFERS) {
    1012                 NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->sv598_serverguid));
    10131018        }
    10141019        return NDR_ERR_SUCCESS;
     
    10641069        }
    10651070        if (ndr_flags & NDR_BUFFERS) {
    1066                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->sv598_serverguid));
    10671071        }
    10681072        return NDR_ERR_SUCCESS;
     
    10721076{
    10731077        ndr_print_struct(ndr, name, "SERVER_INFO_598");
     1078        if (r == NULL) { ndr_print_null(ndr); return; }
    10741079        ndr->depth++;
    10751080        ndr_print_uint32(ndr, "sv598_maxrawworkitems", r->sv598_maxrawworkitems);
     
    11451150{
    11461151        ndr_print_struct(ndr, name, "SERVER_INFO_1005");
     1152        if (r == NULL) { ndr_print_null(ndr); return; }
    11471153        ndr->depth++;
    11481154        ndr_print_string(ndr, "sv1005_comment", r->sv1005_comment);
     
    11771183{
    11781184        ndr_print_struct(ndr, name, "SERVER_INFO_1107");
     1185        if (r == NULL) { ndr_print_null(ndr); return; }
    11791186        ndr->depth++;
    11801187        ndr_print_uint32(ndr, "sv1107_users", r->sv1107_users);
     
    12091216{
    12101217        ndr_print_struct(ndr, name, "SERVER_INFO_1010");
     1218        if (r == NULL) { ndr_print_null(ndr); return; }
    12111219        ndr->depth++;
    12121220        ndr_print_int32(ndr, "sv1010_disc", r->sv1010_disc);
     
    12411249{
    12421250        ndr_print_struct(ndr, name, "SERVER_INFO_1016");
     1251        if (r == NULL) { ndr_print_null(ndr); return; }
    12431252        ndr->depth++;
    12441253        ndr_print_uint8(ndr, "sv1016_hidden", r->sv1016_hidden);
     
    12731282{
    12741283        ndr_print_struct(ndr, name, "SERVER_INFO_1017");
     1284        if (r == NULL) { ndr_print_null(ndr); return; }
    12751285        ndr->depth++;
    12761286        ndr_print_uint32(ndr, "sv1017_announce", r->sv1017_announce);
     
    13051315{
    13061316        ndr_print_struct(ndr, name, "SERVER_INFO_1018");
     1317        if (r == NULL) { ndr_print_null(ndr); return; }
    13071318        ndr->depth++;
    13081319        ndr_print_uint32(ndr, "sv1018_anndelta", r->sv1018_anndelta);
     
    13371348{
    13381349        ndr_print_struct(ndr, name, "SERVER_INFO_1501");
     1350        if (r == NULL) { ndr_print_null(ndr); return; }
    13391351        ndr->depth++;
    13401352        ndr_print_uint32(ndr, "sv1501_sessopens", r->sv1501_sessopens);
     
    13691381{
    13701382        ndr_print_struct(ndr, name, "SERVER_INFO_1502");
     1383        if (r == NULL) { ndr_print_null(ndr); return; }
    13711384        ndr->depth++;
    13721385        ndr_print_uint32(ndr, "sv1502_sessvcs", r->sv1502_sessvcs);
     
    14011414{
    14021415        ndr_print_struct(ndr, name, "SERVER_INFO_1503");
     1416        if (r == NULL) { ndr_print_null(ndr); return; }
    14031417        ndr->depth++;
    14041418        ndr_print_uint32(ndr, "sv1503_opensearch", r->sv1503_opensearch);
     
    14331447{
    14341448        ndr_print_struct(ndr, name, "SERVER_INFO_1506");
     1449        if (r == NULL) { ndr_print_null(ndr); return; }
    14351450        ndr->depth++;
    14361451        ndr_print_uint32(ndr, "sv1506_maxworkitems", r->sv1506_maxworkitems);
     
    14651480{
    14661481        ndr_print_struct(ndr, name, "SERVER_INFO_1509");
     1482        if (r == NULL) { ndr_print_null(ndr); return; }
    14671483        ndr->depth++;
    14681484        ndr_print_uint32(ndr, "sv1509_maxrawbuflen", r->sv1509_maxrawbuflen);
     
    14971513{
    14981514        ndr_print_struct(ndr, name, "SERVER_INFO_1510");
     1515        if (r == NULL) { ndr_print_null(ndr); return; }
    14991516        ndr->depth++;
    15001517        ndr_print_uint32(ndr, "sv1510_sessusers", r->sv1510_sessusers);
     
    15291546{
    15301547        ndr_print_struct(ndr, name, "SERVER_INFO_1511");
     1548        if (r == NULL) { ndr_print_null(ndr); return; }
    15311549        ndr->depth++;
    15321550        ndr_print_uint32(ndr, "sv1511_sessconns", r->sv1511_sessconns);
     
    15611579{
    15621580        ndr_print_struct(ndr, name, "SERVER_INFO_1512");
     1581        if (r == NULL) { ndr_print_null(ndr); return; }
    15631582        ndr->depth++;
    15641583        ndr_print_uint32(ndr, "sv1512_maxnonpagedmemoryusage", r->sv1512_maxnonpagedmemoryusage);
     
    15931612{
    15941613        ndr_print_struct(ndr, name, "SERVER_INFO_1513");
     1614        if (r == NULL) { ndr_print_null(ndr); return; }
    15951615        ndr->depth++;
    15961616        ndr_print_uint32(ndr, "sv1513_maxpagedmemoryusage", r->sv1513_maxpagedmemoryusage);
     
    16251645{
    16261646        ndr_print_struct(ndr, name, "SERVER_INFO_1514");
     1647        if (r == NULL) { ndr_print_null(ndr); return; }
    16271648        ndr->depth++;
    16281649        ndr_print_uint8(ndr, "sv1514_enablesoftcompat", r->sv1514_enablesoftcompat);
     
    16571678{
    16581679        ndr_print_struct(ndr, name, "SERVER_INFO_1515");
     1680        if (r == NULL) { ndr_print_null(ndr); return; }
    16591681        ndr->depth++;
    16601682        ndr_print_uint8(ndr, "sv1515_enableforcedlogoff", r->sv1515_enableforcedlogoff);
     
    16891711{
    16901712        ndr_print_struct(ndr, name, "SERVER_INFO_1516");
     1713        if (r == NULL) { ndr_print_null(ndr); return; }
    16911714        ndr->depth++;
    16921715        ndr_print_uint8(ndr, "sv1516_timesource", r->sv1516_timesource);
     
    17211744{
    17221745        ndr_print_struct(ndr, name, "SERVER_INFO_1518");
     1746        if (r == NULL) { ndr_print_null(ndr); return; }
    17231747        ndr->depth++;
    17241748        ndr_print_uint8(ndr, "sv1518_lmannounce", r->sv1518_lmannounce);
     
    17531777{
    17541778        ndr_print_struct(ndr, name, "SERVER_INFO_1520");
     1779        if (r == NULL) { ndr_print_null(ndr); return; }
    17551780        ndr->depth++;
    17561781        ndr_print_uint32(ndr, "sv1520_maxcopyreadlen", r->sv1520_maxcopyreadlen);
     
    17851810{
    17861811        ndr_print_struct(ndr, name, "SERVER_INFO_1521");
     1812        if (r == NULL) { ndr_print_null(ndr); return; }
    17871813        ndr->depth++;
    17881814        ndr_print_uint32(ndr, "sv1521_maxcopywritelen", r->sv1521_maxcopywritelen);
     
    18171843{
    18181844        ndr_print_struct(ndr, name, "SERVER_INFO_1522");
     1845        if (r == NULL) { ndr_print_null(ndr); return; }
    18191846        ndr->depth++;
    18201847        ndr_print_uint32(ndr, "sv1522_minkeepsearch", r->sv1522_minkeepsearch);
     
    18491876{
    18501877        ndr_print_struct(ndr, name, "SERVER_INFO_1523");
     1878        if (r == NULL) { ndr_print_null(ndr); return; }
    18511879        ndr->depth++;
    18521880        ndr_print_uint32(ndr, "sv1523_maxkeepsearch", r->sv1523_maxkeepsearch);
     
    18811909{
    18821910        ndr_print_struct(ndr, name, "SERVER_INFO_1524");
     1911        if (r == NULL) { ndr_print_null(ndr); return; }
    18831912        ndr->depth++;
    18841913        ndr_print_uint32(ndr, "sv1524_minkeepcomplsearch", r->sv1524_minkeepcomplsearch);
     
    19131942{
    19141943        ndr_print_struct(ndr, name, "SERVER_INFO_1525");
     1944        if (r == NULL) { ndr_print_null(ndr); return; }
    19151945        ndr->depth++;
    19161946        ndr_print_uint32(ndr, "sv1525_maxkeepcomplsearch", r->sv1525_maxkeepcomplsearch);
     
    19451975{
    19461976        ndr_print_struct(ndr, name, "SERVER_INFO_1528");
     1977        if (r == NULL) { ndr_print_null(ndr); return; }
    19471978        ndr->depth++;
    19481979        ndr_print_uint32(ndr, "sv1528_scavtimeout", r->sv1528_scavtimeout);
     
    19772008{
    19782009        ndr_print_struct(ndr, name, "SERVER_INFO_1529");
     2010        if (r == NULL) { ndr_print_null(ndr); return; }
    19792011        ndr->depth++;
    19802012        ndr_print_uint32(ndr, "sv1529_minrcvqueue", r->sv1529_minrcvqueue);
     
    20092041{
    20102042        ndr_print_struct(ndr, name, "SERVER_INFO_1530");
     2043        if (r == NULL) { ndr_print_null(ndr); return; }
    20112044        ndr->depth++;
    20122045        ndr_print_uint32(ndr, "sv1530_minfreeworkitems", r->sv1530_minfreeworkitems);
     
    20412074{
    20422075        ndr_print_struct(ndr, name, "SERVER_INFO_1533");
     2076        if (r == NULL) { ndr_print_null(ndr); return; }
    20432077        ndr->depth++;
    20442078        ndr_print_uint32(ndr, "sv1533_maxmpxct", r->sv1533_maxmpxct);
     
    20732107{
    20742108        ndr_print_struct(ndr, name, "SERVER_INFO_1534");
     2109        if (r == NULL) { ndr_print_null(ndr); return; }
    20752110        ndr->depth++;
    20762111        ndr_print_uint32(ndr, "sv1534_oplockbreakwait", r->sv1534_oplockbreakwait);
     
    21052140{
    21062141        ndr_print_struct(ndr, name, "SERVER_INFO_1535");
     2142        if (r == NULL) { ndr_print_null(ndr); return; }
    21072143        ndr->depth++;
    21082144        ndr_print_uint32(ndr, "sv1535_oplockbreakresponsewait", r->sv1535_oplockbreakresponsewait);
     
    21372173{
    21382174        ndr_print_struct(ndr, name, "SERVER_INFO_1536");
     2175        if (r == NULL) { ndr_print_null(ndr); return; }
    21392176        ndr->depth++;
    21402177        ndr_print_uint8(ndr, "sv1536_enableoplocks", r->sv1536_enableoplocks);
     
    21692206{
    21702207        ndr_print_struct(ndr, name, "SERVER_INFO_1537");
     2208        if (r == NULL) { ndr_print_null(ndr); return; }
    21712209        ndr->depth++;
    21722210        ndr_print_uint8(ndr, "sv1537_enableoplockforceclose", r->sv1537_enableoplockforceclose);
     
    22012239{
    22022240        ndr_print_struct(ndr, name, "SERVER_INFO_1538");
     2241        if (r == NULL) { ndr_print_null(ndr); return; }
    22032242        ndr->depth++;
    22042243        ndr_print_uint8(ndr, "sv1538_enablefcbopens", r->sv1538_enablefcbopens);
     
    22332272{
    22342273        ndr_print_struct(ndr, name, "SERVER_INFO_1539");
     2274        if (r == NULL) { ndr_print_null(ndr); return; }
    22352275        ndr->depth++;
    22362276        ndr_print_uint8(ndr, "sv1539_enableraw", r->sv1539_enableraw);
     
    22652305{
    22662306        ndr_print_struct(ndr, name, "SERVER_INFO_1540");
     2307        if (r == NULL) { ndr_print_null(ndr); return; }
    22672308        ndr->depth++;
    22682309        ndr_print_uint8(ndr, "sv1540_enablesharednetdrives", r->sv1540_enablesharednetdrives);
     
    22972338{
    22982339        ndr_print_struct(ndr, name, "SERVER_INFO_1541");
     2340        if (r == NULL) { ndr_print_null(ndr); return; }
    22992341        ndr->depth++;
    23002342        ndr_print_uint8(ndr, "sv1541_minfreeconnections", r->sv1541_minfreeconnections);
     
    23292371{
    23302372        ndr_print_struct(ndr, name, "SERVER_INFO_1542");
     2373        if (r == NULL) { ndr_print_null(ndr); return; }
    23312374        ndr->depth++;
    23322375        ndr_print_uint8(ndr, "sv1542_maxfreeconnections", r->sv1542_maxfreeconnections);
     
    23612404{
    23622405        ndr_print_struct(ndr, name, "SERVER_INFO_1543");
     2406        if (r == NULL) { ndr_print_null(ndr); return; }
    23632407        ndr->depth++;
    23642408        ndr_print_uint32(ndr, "sv1543_initsesstable", r->sv1543_initsesstable);
     
    23932437{
    23942438        ndr_print_struct(ndr, name, "SERVER_INFO_1544");
     2439        if (r == NULL) { ndr_print_null(ndr); return; }
    23952440        ndr->depth++;
    23962441        ndr_print_uint32(ndr, "sv1544_initconntable", r->sv1544_initconntable);
     
    24252470{
    24262471        ndr_print_struct(ndr, name, "SERVER_INFO_1545");
     2472        if (r == NULL) { ndr_print_null(ndr); return; }
    24272473        ndr->depth++;
    24282474        ndr_print_uint32(ndr, "sv1545_initfiletable", r->sv1545_initfiletable);
     
    24572503{
    24582504        ndr_print_struct(ndr, name, "SERVER_INFO_1546");
     2505        if (r == NULL) { ndr_print_null(ndr); return; }
    24592506        ndr->depth++;
    24602507        ndr_print_uint32(ndr, "sv1546_initsearchtable", r->sv1546_initsearchtable);
     
    24892536{
    24902537        ndr_print_struct(ndr, name, "SERVER_INFO_1547");
     2538        if (r == NULL) { ndr_print_null(ndr); return; }
    24912539        ndr->depth++;
    24922540        ndr_print_uint32(ndr, "sv1547_alertschedule", r->sv1547_alertschedule);
     
    25212569{
    25222570        ndr_print_struct(ndr, name, "SERVER_INFO_1548");
     2571        if (r == NULL) { ndr_print_null(ndr); return; }
    25232572        ndr->depth++;
    25242573        ndr_print_uint32(ndr, "sv1548_errorthreshold", r->sv1548_errorthreshold);
     
    25532602{
    25542603        ndr_print_struct(ndr, name, "SERVER_INFO_1549");
     2604        if (r == NULL) { ndr_print_null(ndr); return; }
    25552605        ndr->depth++;
    25562606        ndr_print_uint32(ndr, "sv1549_networkerrorthreshold", r->sv1549_networkerrorthreshold);
     
    25852635{
    25862636        ndr_print_struct(ndr, name, "SERVER_INFO_1550");
     2637        if (r == NULL) { ndr_print_null(ndr); return; }
    25872638        ndr->depth++;
    25882639        ndr_print_uint32(ndr, "sv1550_diskspacethreshold", r->sv1550_diskspacethreshold);
     
    26172668{
    26182669        ndr_print_struct(ndr, name, "SERVER_INFO_1552");
     2670        if (r == NULL) { ndr_print_null(ndr); return; }
    26192671        ndr->depth++;
    26202672        ndr_print_uint32(ndr, "sv1552_maxlinkdelay", r->sv1552_maxlinkdelay);
     
    26492701{
    26502702        ndr_print_struct(ndr, name, "SERVER_INFO_1553");
     2703        if (r == NULL) { ndr_print_null(ndr); return; }
    26512704        ndr->depth++;
    26522705        ndr_print_uint32(ndr, "sv1553_minlinkthroughput", r->sv1553_minlinkthroughput);
     
    26812734{
    26822735        ndr_print_struct(ndr, name, "SERVER_INFO_1554");
     2736        if (r == NULL) { ndr_print_null(ndr); return; }
    26832737        ndr->depth++;
    26842738        ndr_print_uint32(ndr, "sv1554_linkinfovalidtime", r->sv1554_linkinfovalidtime);
     
    27132767{
    27142768        ndr_print_struct(ndr, name, "SERVER_INFO_1555");
     2769        if (r == NULL) { ndr_print_null(ndr); return; }
    27152770        ndr->depth++;
    27162771        ndr_print_uint32(ndr, "sv1555_scavqosinfoupdatetime", r->sv1555_scavqosinfoupdatetime);
     
    27452800{
    27462801        ndr_print_struct(ndr, name, "SERVER_INFO_1556");
     2802        if (r == NULL) { ndr_print_null(ndr); return; }
    27472803        ndr->depth++;
    27482804        ndr_print_uint32(ndr, "sv1556_maxworkitemidletime", r->sv1556_maxworkitemidletime);
     
    27772833{
    27782834        ndr_print_struct(ndr, name, "SERVER_INFO_1557");
     2835        if (r == NULL) { ndr_print_null(ndr); return; }
    27792836        ndr->depth++;
    27802837        ndr_print_uint32(ndr, "sv1557_maxrawworkitems", r->sv1557_maxrawworkitems);
     
    28092866{
    28102867        ndr_print_struct(ndr, name, "SERVER_INFO_1560");
     2868        if (r == NULL) { ndr_print_null(ndr); return; }
    28112869        ndr->depth++;
    28122870        ndr_print_uint32(ndr, "sv1560_producttype", r->sv1560_producttype);
     
    28412899{
    28422900        ndr_print_struct(ndr, name, "SERVER_INFO_1561");
     2901        if (r == NULL) { ndr_print_null(ndr); return; }
    28432902        ndr->depth++;
    28442903        ndr_print_uint32(ndr, "sv1561_serversize", r->sv1561_serversize);
     
    28732932{
    28742933        ndr_print_struct(ndr, name, "SERVER_INFO_1562");
     2934        if (r == NULL) { ndr_print_null(ndr); return; }
    28752935        ndr->depth++;
    28762936        ndr_print_uint32(ndr, "sv1562_connectionlessautodisc", r->sv1562_connectionlessautodisc);
     
    29052965{
    29062966        ndr_print_struct(ndr, name, "SERVER_INFO_1563");
     2967        if (r == NULL) { ndr_print_null(ndr); return; }
    29072968        ndr->depth++;
    29082969        ndr_print_uint32(ndr, "sv1563_sharingviolationretries", r->sv1563_sharingviolationretries);
     
    29372998{
    29382999        ndr_print_struct(ndr, name, "SERVER_INFO_1564");
     3000        if (r == NULL) { ndr_print_null(ndr); return; }
    29393001        ndr->depth++;
    29403002        ndr_print_uint32(ndr, "sv1564_sharingviolationdelay", r->sv1564_sharingviolationdelay);
     
    29693031{
    29703032        ndr_print_struct(ndr, name, "SERVER_INFO_1565");
     3033        if (r == NULL) { ndr_print_null(ndr); return; }
    29713034        ndr->depth++;
    29723035        ndr_print_uint32(ndr, "sv1565_maxglobalopensearch", r->sv1565_maxglobalopensearch);
     
    30013064{
    30023065        ndr_print_struct(ndr, name, "SERVER_INFO_1566");
     3066        if (r == NULL) { ndr_print_null(ndr); return; }
    30033067        ndr->depth++;
    30043068        ndr_print_uint8(ndr, "sv1566_removeduplicatesearches", r->sv1566_removeduplicatesearches);
     
    30333097{
    30343098        ndr_print_struct(ndr, name, "SERVER_INFO_1567");
     3099        if (r == NULL) { ndr_print_null(ndr); return; }
    30353100        ndr->depth++;
    30363101        ndr_print_uint32(ndr, "sv1567_lockviolationretries", r->sv1567_lockviolationretries);
     
    30653130{
    30663131        ndr_print_struct(ndr, name, "SERVER_INFO_1568");
     3132        if (r == NULL) { ndr_print_null(ndr); return; }
    30673133        ndr->depth++;
    30683134        ndr_print_uint32(ndr, "sv1568_lockviolationoffset", r->sv1568_lockviolationoffset);
     
    30973163{
    30983164        ndr_print_struct(ndr, name, "SERVER_INFO_1569");
     3165        if (r == NULL) { ndr_print_null(ndr); return; }
    30993166        ndr->depth++;
    31003167        ndr_print_uint32(ndr, "sv1569_lockviolationdelay", r->sv1569_lockviolationdelay);
     
    31293196{
    31303197        ndr_print_struct(ndr, name, "SERVER_INFO_1570");
     3198        if (r == NULL) { ndr_print_null(ndr); return; }
    31313199        ndr->depth++;
    31323200        ndr_print_uint32(ndr, "sv1570_mdlreadswitchover", r->sv1570_mdlreadswitchover);
     
    31613229{
    31623230        ndr_print_struct(ndr, name, "SERVER_INFO_1571");
     3231        if (r == NULL) { ndr_print_null(ndr); return; }
    31633232        ndr->depth++;
    31643233        ndr_print_uint32(ndr, "sv1571_cachedopenlimit", r->sv1571_cachedopenlimit);
     
    31933262{
    31943263        ndr_print_struct(ndr, name, "SERVER_INFO_1572");
     3264        if (r == NULL) { ndr_print_null(ndr); return; }
    31953265        ndr->depth++;
    31963266        ndr_print_uint32(ndr, "sv1572_criticalthreads", r->sv1572_criticalthreads);
     
    32253295{
    32263296        ndr_print_struct(ndr, name, "SERVER_INFO_1573");
     3297        if (r == NULL) { ndr_print_null(ndr); return; }
    32273298        ndr->depth++;
    32283299        ndr_print_uint32(ndr, "sv1573_restrictnullsessaccess", r->sv1573_restrictnullsessaccess);
     
    32573328{
    32583329        ndr_print_struct(ndr, name, "SERVER_INFO_1574");
     3330        if (r == NULL) { ndr_print_null(ndr); return; }
    32593331        ndr->depth++;
    32603332        ndr_print_uint32(ndr, "sv1574_enablewfw311directipx", r->sv1574_enablewfw311directipx);
     
    32893361{
    32903362        ndr_print_struct(ndr, name, "SERVER_INFO_1575");
     3363        if (r == NULL) { ndr_print_null(ndr); return; }
    32913364        ndr->depth++;
    32923365        ndr_print_uint32(ndr, "sv1575_otherqueueaffinity", r->sv1575_otherqueueaffinity);
     
    33213394{
    33223395        ndr_print_struct(ndr, name, "SERVER_INFO_1576");
     3396        if (r == NULL) { ndr_print_null(ndr); return; }
    33233397        ndr->depth++;
    33243398        ndr_print_uint32(ndr, "sv1576_queuesamplesecs", r->sv1576_queuesamplesecs);
     
    33533427{
    33543428        ndr_print_struct(ndr, name, "SERVER_INFO_1577");
     3429        if (r == NULL) { ndr_print_null(ndr); return; }
    33553430        ndr->depth++;
    33563431        ndr_print_uint32(ndr, "sv1577_balancecount", r->sv1577_balancecount);
     
    33853460{
    33863461        ndr_print_struct(ndr, name, "SERVER_INFO_1578");
     3462        if (r == NULL) { ndr_print_null(ndr); return; }
    33873463        ndr->depth++;
    33883464        ndr_print_uint32(ndr, "sv1578_preferredaffinity", r->sv1578_preferredaffinity);
     
    34173493{
    34183494        ndr_print_struct(ndr, name, "SERVER_INFO_1579");
     3495        if (r == NULL) { ndr_print_null(ndr); return; }
    34193496        ndr->depth++;
    34203497        ndr_print_uint32(ndr, "sv1579_maxfreerfcbs", r->sv1579_maxfreerfcbs);
     
    34493526{
    34503527        ndr_print_struct(ndr, name, "SERVER_INFO_1580");
     3528        if (r == NULL) { ndr_print_null(ndr); return; }
    34513529        ndr->depth++;
    34523530        ndr_print_uint32(ndr, "sv1580_maxfreemfcbs", r->sv1580_maxfreemfcbs);
     
    34813559{
    34823560        ndr_print_struct(ndr, name, "SERVER_INFO_1581");
     3561        if (r == NULL) { ndr_print_null(ndr); return; }
    34833562        ndr->depth++;
    34843563        ndr_print_uint32(ndr, "sv1581_maxfreemlcbs", r->sv1581_maxfreemlcbs);
     
    35133592{
    35143593        ndr_print_struct(ndr, name, "SERVER_INFO_1582");
     3594        if (r == NULL) { ndr_print_null(ndr); return; }
    35153595        ndr->depth++;
    35163596        ndr_print_uint32(ndr, "sv1582_maxfreepagedpoolchunks", r->sv1582_maxfreepagedpoolchunks);
     
    35453625{
    35463626        ndr_print_struct(ndr, name, "SERVER_INFO_1583");
     3627        if (r == NULL) { ndr_print_null(ndr); return; }
    35473628        ndr->depth++;
    35483629        ndr_print_uint32(ndr, "sv1583_minpagedpoolchunksize", r->sv1583_minpagedpoolchunksize);
     
    35773658{
    35783659        ndr_print_struct(ndr, name, "SERVER_INFO_1584");
     3660        if (r == NULL) { ndr_print_null(ndr); return; }
    35793661        ndr->depth++;
    35803662        ndr_print_uint32(ndr, "sv1584_maxpagedpoolchunksize", r->sv1584_maxpagedpoolchunksize);
     
    36093691{
    36103692        ndr_print_struct(ndr, name, "SERVER_INFO_1585");
     3693        if (r == NULL) { ndr_print_null(ndr); return; }
    36113694        ndr->depth++;
    36123695        ndr_print_uint8(ndr, "sv1585_sendsfrompreferredprocessor", r->sv1585_sendsfrompreferredprocessor);
     
    36413724{
    36423725        ndr_print_struct(ndr, name, "SERVER_INFO_1586");
     3726        if (r == NULL) { ndr_print_null(ndr); return; }
    36433727        ndr->depth++;
    36443728        ndr_print_uint32(ndr, "sv1586_maxthreadsperqueue", r->sv1586_maxthreadsperqueue);
     
    36733757{
    36743758        ndr_print_struct(ndr, name, "SERVER_INFO_1587");
     3759        if (r == NULL) { ndr_print_null(ndr); return; }
    36753760        ndr->depth++;
    36763761        ndr_print_uint32(ndr, "sv1587_cacheddirectorylimit", r->sv1587_cacheddirectorylimit);
     
    37053790{
    37063791        ndr_print_struct(ndr, name, "SERVER_INFO_1588");
     3792        if (r == NULL) { ndr_print_null(ndr); return; }
    37073793        ndr->depth++;
    37083794        ndr_print_uint32(ndr, "sv1588_maxcopylength", r->sv1588_maxcopylength);
     
    37373823{
    37383824        ndr_print_struct(ndr, name, "SERVER_INFO_1590");
     3825        if (r == NULL) { ndr_print_null(ndr); return; }
    37393826        ndr->depth++;
    37403827        ndr_print_uint32(ndr, "sv1590_enablecompression", r->sv1590_enablecompression);
     
    37693856{
    37703857        ndr_print_struct(ndr, name, "SERVER_INFO_1591");
     3858        if (r == NULL) { ndr_print_null(ndr); return; }
    37713859        ndr->depth++;
    37723860        ndr_print_uint32(ndr, "sv1591_autosharewks", r->sv1591_autosharewks);
     
    38013889{
    38023890        ndr_print_struct(ndr, name, "SERVER_INFO_1592");
     3891        if (r == NULL) { ndr_print_null(ndr); return; }
    38033892        ndr->depth++;
    38043893        ndr_print_uint32(ndr, "sv1592_autosharewks", r->sv1592_autosharewks);
     
    38333922{
    38343923        ndr_print_struct(ndr, name, "SERVER_INFO_1593");
     3924        if (r == NULL) { ndr_print_null(ndr); return; }
    38353925        ndr->depth++;
    38363926        ndr_print_uint32(ndr, "sv1593_enablesecuritysignature", r->sv1593_enablesecuritysignature);
     
    38653955{
    38663956        ndr_print_struct(ndr, name, "SERVER_INFO_1594");
     3957        if (r == NULL) { ndr_print_null(ndr); return; }
    38673958        ndr->depth++;
    38683959        ndr_print_uint32(ndr, "sv1594_requiresecuritysignature", r->sv1594_requiresecuritysignature);
     
    38973988{
    38983989        ndr_print_struct(ndr, name, "SERVER_INFO_1595");
     3990        if (r == NULL) { ndr_print_null(ndr); return; }
    38993991        ndr->depth++;
    39003992        ndr_print_uint32(ndr, "sv1595_minclientbuffersize", r->sv1595_minclientbuffersize);
     
    39294021{
    39304022        ndr_print_struct(ndr, name, "SERVER_INFO_1596");
     4023        if (r == NULL) { ndr_print_null(ndr); return; }
    39314024        ndr->depth++;
    39324025        ndr_print_uint32(ndr, "sv1596_ConnectionNoSessionsTimeout", r->sv1596_ConnectionNoSessionsTimeout);
     
    39614054{
    39624055        ndr_print_struct(ndr, name, "SERVER_INFO_1597");
     4056        if (r == NULL) { ndr_print_null(ndr); return; }
    39634057        ndr->depth++;
    39644058        ndr_print_uint32(ndr, "sv1597_IdleThreadTimeOut", r->sv1597_IdleThreadTimeOut);
     
    39934087{
    39944088        ndr_print_struct(ndr, name, "SERVER_INFO_1598");
     4089        if (r == NULL) { ndr_print_null(ndr); return; }
    39954090        ndr->depth++;
    39964091        ndr_print_uint32(ndr, "sv1598_enableW9xsecuritysignature", r->sv1598_enableW9xsecuritysignature);
     
    40254120{
    40264121        ndr_print_struct(ndr, name, "SERVER_INFO_1599");
     4122        if (r == NULL) { ndr_print_null(ndr); return; }
    40274123        ndr->depth++;
    40284124        ndr_print_uint8(ndr, "sv1598_enforcekerberosreauthentication", r->sv1598_enforcekerberosreauthentication);
     
    40574153{
    40584154        ndr_print_struct(ndr, name, "SERVER_INFO_1600");
     4155        if (r == NULL) { ndr_print_null(ndr); return; }
    40594156        ndr->depth++;
    40604157        ndr_print_uint8(ndr, "sv1598_disabledos", r->sv1598_disabledos);
     
    40894186{
    40904187        ndr_print_struct(ndr, name, "SERVER_INFO_1601");
     4188        if (r == NULL) { ndr_print_null(ndr); return; }
    40914189        ndr->depth++;
    40924190        ndr_print_uint32(ndr, "sv1598_lowdiskspaceminimum", r->sv1598_lowdiskspaceminimum);
     
    41214219{
    41224220        ndr_print_struct(ndr, name, "SERVER_INFO_1602");
     4221        if (r == NULL) { ndr_print_null(ndr); return; }
    41234222        ndr->depth++;
    41244223        ndr_print_uint8(ndr, "sv_1598_disablestrictnamechecking", r->sv_1598_disablestrictnamechecking);
    41254224        ndr->depth--;
     4225}
     4226
     4227_PUBLIC_ enum ndr_err_code ndr_push_DOMAIN_CONTROLLER_INFO_FLAGS(struct ndr_push *ndr, int ndr_flags, enum DOMAIN_CONTROLLER_INFO_FLAGS r)
     4228{
     4229        NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
     4230        return NDR_ERR_SUCCESS;
     4231}
     4232
     4233_PUBLIC_ enum ndr_err_code ndr_pull_DOMAIN_CONTROLLER_INFO_FLAGS(struct ndr_pull *ndr, int ndr_flags, enum DOMAIN_CONTROLLER_INFO_FLAGS *r)
     4234{
     4235        uint32_t v;
     4236        NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
     4237        *r = v;
     4238        return NDR_ERR_SUCCESS;
     4239}
     4240
     4241_PUBLIC_ void ndr_print_DOMAIN_CONTROLLER_INFO_FLAGS(struct ndr_print *ndr, const char *name, enum DOMAIN_CONTROLLER_INFO_FLAGS r)
     4242{
     4243        const char *val = NULL;
     4244
     4245        switch (r) {
     4246                case DS_PDC_FLAG: val = "DS_PDC_FLAG"; break;
     4247                case DS_GC_FLAG: val = "DS_GC_FLAG"; break;
     4248                case DS_LDAP_FLAG: val = "DS_LDAP_FLAG"; break;
     4249                case DS_DS_FLAG: val = "DS_DS_FLAG"; break;
     4250                case DS_KDC_FLAG: val = "DS_KDC_FLAG"; break;
     4251                case DS_TIMESERV_FLAG: val = "DS_TIMESERV_FLAG"; break;
     4252                case DS_CLOSEST_FLAG: val = "DS_CLOSEST_FLAG"; break;
     4253                case DS_WRITABLE_FLAG: val = "DS_WRITABLE_FLAG"; break;
     4254                case DS_GOOD_TIMESERV_FLAG: val = "DS_GOOD_TIMESERV_FLAG"; break;
     4255                case DS_NDNC_FLAG: val = "DS_NDNC_FLAG"; break;
     4256                case DS_SELECT_SECRET_DOMAIN_6_FLAG: val = "DS_SELECT_SECRET_DOMAIN_6_FLAG"; break;
     4257                case DS_FULL_SECRET_DOMAIN_6_FLAG: val = "DS_FULL_SECRET_DOMAIN_6_FLAG"; break;
     4258                case DS_DNS_CONTROLLER_FLAG: val = "DS_DNS_CONTROLLER_FLAG"; break;
     4259                case DS_DNS_DOMAIN_FLAG: val = "DS_DNS_DOMAIN_FLAG"; break;
     4260                case DS_DNS_FOREST_FLAG: val = "DS_DNS_FOREST_FLAG"; break;
     4261        }
     4262        ndr_print_enum(ndr, name, "ENUM", val, r);
    41264263}
    41274264
     
    41364273                NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain_name));
    41374274                NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->dns_forest_name));
    4138                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
     4275                NDR_CHECK(ndr_push_DOMAIN_CONTROLLER_INFO_FLAGS(ndr, NDR_SCALARS, r->flags));
    41394276                NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->dc_site_name));
    41404277                NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->client_site_name));
     
    41424279        }
    41434280        if (ndr_flags & NDR_BUFFERS) {
    4144                 NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->domain_guid));
    41454281        }
    41464282        return NDR_ERR_SUCCESS;
     
    41574293                NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain_name));
    41584294                NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->dns_forest_name));
    4159                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
     4295                NDR_CHECK(ndr_pull_DOMAIN_CONTROLLER_INFO_FLAGS(ndr, NDR_SCALARS, &r->flags));
    41604296                NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->dc_site_name));
    41614297                NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->client_site_name));
     
    41634299        }
    41644300        if (ndr_flags & NDR_BUFFERS) {
    4165                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->domain_guid));
    41664301        }
    41674302        return NDR_ERR_SUCCESS;
     
    41714306{
    41724307        ndr_print_struct(ndr, name, "DOMAIN_CONTROLLER_INFO");
     4308        if (r == NULL) { ndr_print_null(ndr); return; }
    41734309        ndr->depth++;
    41744310        ndr_print_string(ndr, "domain_controller_name", r->domain_controller_name);
     
    41784314        ndr_print_string(ndr, "domain_name", r->domain_name);
    41794315        ndr_print_string(ndr, "dns_forest_name", r->dns_forest_name);
    4180         ndr_print_uint32(ndr, "flags", r->flags);
     4316        ndr_print_DOMAIN_CONTROLLER_INFO_FLAGS(ndr, "flags", r->flags);
    41814317        ndr_print_string(ndr, "dc_site_name", r->dc_site_name);
    41824318        ndr_print_string(ndr, "client_site_name", r->client_site_name);
     
    42114347{
    42124348        ndr_print_struct(ndr, name, "USER_INFO_0");
     4349        if (r == NULL) { ndr_print_null(ndr); return; }
    42134350        ndr->depth++;
    42144351        ndr_print_string(ndr, "usri0_name", r->usri0_name);
     
    42574394{
    42584395        ndr_print_struct(ndr, name, "USER_INFO_1");
     4396        if (r == NULL) { ndr_print_null(ndr); return; }
    42594397        ndr->depth++;
    42604398        ndr_print_string(ndr, "usri1_name", r->usri1_name);
     
    43584496{
    43594497        ndr_print_struct(ndr, name, "USER_INFO_2");
     4498        if (r == NULL) { ndr_print_null(ndr); return; }
    43604499        ndr->depth++;
    43614500        ndr_print_string(ndr, "usri2_name", r->usri2_name);
     
    44884627{
    44894628        ndr_print_struct(ndr, name, "USER_INFO_3");
     4629        if (r == NULL) { ndr_print_null(ndr); return; }
    44904630        ndr->depth++;
    44914631        ndr_print_string(ndr, "usri3_name", r->usri3_name);
     
    46404780{
    46414781        ndr_print_struct(ndr, name, "USER_INFO_4");
     4782        if (r == NULL) { ndr_print_null(ndr); return; }
    46424783        ndr->depth++;
    46434784        ndr_print_string(ndr, "usri4_name", r->usri4_name);
     
    47164857{
    47174858        ndr_print_struct(ndr, name, "USER_INFO_10");
     4859        if (r == NULL) { ndr_print_null(ndr); return; }
    47184860        ndr->depth++;
    47194861        ndr_print_string(ndr, "usri10_name", r->usri10_name);
     
    48054947{
    48064948        ndr_print_struct(ndr, name, "USER_INFO_11");
     4949        if (r == NULL) { ndr_print_null(ndr); return; }
    48074950        ndr->depth++;
    48084951        ndr_print_string(ndr, "usri11_name", r->usri11_name);
     
    48695012{
    48705013        ndr_print_struct(ndr, name, "USER_INFO_20");
     5014        if (r == NULL) { ndr_print_null(ndr); return; }
    48715015        ndr->depth++;
    48725016        ndr_print_string(ndr, "usri20_name", r->usri20_name);
     
    49065050{
    49075051        ndr_print_struct(ndr, name, "USER_INFO_21");
     5052        if (r == NULL) { ndr_print_null(ndr); return; }
    49085053        ndr->depth++;
    49095054        ndr_print_array_uint8(ndr, "usri21_password", r->usri21_password, ENCRYPTED_PWLEN);
     
    50015146{
    50025147        ndr_print_struct(ndr, name, "USER_INFO_22");
     5148        if (r == NULL) { ndr_print_null(ndr); return; }
    50035149        ndr->depth++;
    50045150        ndr_print_string(ndr, "usri22_name", r->usri22_name);
     
    50855231{
    50865232        ndr_print_struct(ndr, name, "USER_INFO_23");
     5233        if (r == NULL) { ndr_print_null(ndr); return; }
    50875234        ndr->depth++;
    50885235        ndr_print_string(ndr, "usri23_name", r->usri23_name);
     
    51265273{
    51275274        ndr_print_struct(ndr, name, "USER_INFO_1003");
     5275        if (r == NULL) { ndr_print_null(ndr); return; }
    51285276        ndr->depth++;
    51295277        ndr_print_string(ndr, "usri1003_password", r->usri1003_password);
     
    51585306{
    51595307        ndr_print_struct(ndr, name, "USER_INFO_1005");
     5308        if (r == NULL) { ndr_print_null(ndr); return; }
    51605309        ndr->depth++;
    51615310        ndr_print_uint32(ndr, "usri1005_priv", r->usri1005_priv);
     
    51905339{
    51915340        ndr_print_struct(ndr, name, "USER_INFO_1006");
     5341        if (r == NULL) { ndr_print_null(ndr); return; }
    51925342        ndr->depth++;
    51935343        ndr_print_string(ndr, "usri1006_home_dir", r->usri1006_home_dir);
     
    52225372{
    52235373        ndr_print_struct(ndr, name, "USER_INFO_1007");
     5374        if (r == NULL) { ndr_print_null(ndr); return; }
    52245375        ndr->depth++;
    52255376        ndr_print_string(ndr, "usri1007_comment", r->usri1007_comment);
     
    52545405{
    52555406        ndr_print_struct(ndr, name, "USER_INFO_1008");
     5407        if (r == NULL) { ndr_print_null(ndr); return; }
    52565408        ndr->depth++;
    52575409        ndr_print_uint32(ndr, "usri1008_flags", r->usri1008_flags);
     
    52865438{
    52875439        ndr_print_struct(ndr, name, "USER_INFO_1009");
     5440        if (r == NULL) { ndr_print_null(ndr); return; }
    52885441        ndr->depth++;
    52895442        ndr_print_string(ndr, "usri1009_script_path", r->usri1009_script_path);
     
    53185471{
    53195472        ndr_print_struct(ndr, name, "USER_INFO_1010");
     5473        if (r == NULL) { ndr_print_null(ndr); return; }
    53205474        ndr->depth++;
    53215475        ndr_print_uint32(ndr, "usri1010_auth_flags", r->usri1010_auth_flags);
     
    53505504{
    53515505        ndr_print_struct(ndr, name, "USER_INFO_1011");
     5506        if (r == NULL) { ndr_print_null(ndr); return; }
    53525507        ndr->depth++;
    53535508        ndr_print_string(ndr, "usri1011_full_name", r->usri1011_full_name);
     
    53825537{
    53835538        ndr_print_struct(ndr, name, "USER_INFO_1012");
     5539        if (r == NULL) { ndr_print_null(ndr); return; }
    53845540        ndr->depth++;
    53855541        ndr_print_string(ndr, "usri1012_usr_comment", r->usri1012_usr_comment);
     
    54145570{
    54155571        ndr_print_struct(ndr, name, "USER_INFO_1013");
     5572        if (r == NULL) { ndr_print_null(ndr); return; }
    54165573        ndr->depth++;
    54175574        ndr_print_string(ndr, "usri1013_parms", r->usri1013_parms);
     
    54465603{
    54475604        ndr_print_struct(ndr, name, "USER_INFO_1014");
     5605        if (r == NULL) { ndr_print_null(ndr); return; }
    54485606        ndr->depth++;
    54495607        ndr_print_string(ndr, "usri1014_workstations", r->usri1014_workstations);
     
    54785636{
    54795637        ndr_print_struct(ndr, name, "USER_INFO_1017");
     5638        if (r == NULL) { ndr_print_null(ndr); return; }
    54805639        ndr->depth++;
    54815640        ndr_print_uint32(ndr, "usri1017_acct_expires", r->usri1017_acct_expires);
     
    55105669{
    55115670        ndr_print_struct(ndr, name, "USER_INFO_1018");
     5671        if (r == NULL) { ndr_print_null(ndr); return; }
    55125672        ndr->depth++;
    55135673        ndr_print_uint32(ndr, "usri1018_max_storage", r->usri1018_max_storage);
     
    55605720{
    55615721        ndr_print_struct(ndr, name, "USER_INFO_1020");
     5722        if (r == NULL) { ndr_print_null(ndr); return; }
    55625723        ndr->depth++;
    55635724        ndr_print_uint32(ndr, "usri1020_units_per_week", r->usri1020_units_per_week);
     
    55985759{
    55995760        ndr_print_struct(ndr, name, "USER_INFO_1023");
     5761        if (r == NULL) { ndr_print_null(ndr); return; }
    56005762        ndr->depth++;
    56015763        ndr_print_string(ndr, "usri1023_logon_server", r->usri1023_logon_server);
     
    56305792{
    56315793        ndr_print_struct(ndr, name, "USER_INFO_1024");
     5794        if (r == NULL) { ndr_print_null(ndr); return; }
    56325795        ndr->depth++;
    56335796        ndr_print_uint32(ndr, "usri1024_country_code", r->usri1024_country_code);
     
    56625825{
    56635826        ndr_print_struct(ndr, name, "USER_INFO_1025");
     5827        if (r == NULL) { ndr_print_null(ndr); return; }
    56645828        ndr->depth++;
    56655829        ndr_print_uint32(ndr, "usri1025_code_page", r->usri1025_code_page);
     
    56945858{
    56955859        ndr_print_struct(ndr, name, "USER_INFO_1051");
     5860        if (r == NULL) { ndr_print_null(ndr); return; }
    56965861        ndr->depth++;
    56975862        ndr_print_uint32(ndr, "usri1051_primary_group_id", r->usri1051_primary_group_id);
     
    57265891{
    57275892        ndr_print_struct(ndr, name, "USER_INFO_1052");
     5893        if (r == NULL) { ndr_print_null(ndr); return; }
    57285894        ndr->depth++;
    57295895        ndr_print_string(ndr, "usri1052_profile", r->usri1052_profile);
     
    57585924{
    57595925        ndr_print_struct(ndr, name, "USER_INFO_1053");
     5926        if (r == NULL) { ndr_print_null(ndr); return; }
    57605927        ndr->depth++;
    57615928        ndr_print_string(ndr, "usri1053_home_dir_drive", r->usri1053_home_dir_drive);
     
    58626029{
    58636030        ndr_print_struct(ndr, name, "USER_INFO_X");
     6031        if (r == NULL) { ndr_print_null(ndr); return; }
    58646032        ndr->depth++;
    58656033        ndr_print_string(ndr, "usriX_name", r->usriX_name);
     
    59276095{
    59286096        ndr_print_struct(ndr, name, "GROUP_USERS_INFO_0");
     6097        if (r == NULL) { ndr_print_null(ndr); return; }
    59296098        ndr->depth++;
    59306099        ndr_print_string(ndr, "grui0_name", r->grui0_name);
     
    59616130{
    59626131        ndr_print_struct(ndr, name, "GROUP_USERS_INFO_1");
     6132        if (r == NULL) { ndr_print_null(ndr); return; }
    59636133        ndr->depth++;
    59646134        ndr_print_string(ndr, "grui1_name", r->grui1_name);
     
    60046174{
    60056175        ndr_print_struct(ndr, name, "NET_DISPLAY_USER");
     6176        if (r == NULL) { ndr_print_null(ndr); return; }
    60066177        ndr->depth++;
    60076178        ndr_print_string(ndr, "usri1_name", r->usri1_name);
     
    60496220{
    60506221        ndr_print_struct(ndr, name, "NET_DISPLAY_MACHINE");
     6222        if (r == NULL) { ndr_print_null(ndr); return; }
    60516223        ndr->depth++;
    60526224        ndr_print_string(ndr, "usri2_name", r->usri2_name);
     
    60936265{
    60946266        ndr_print_struct(ndr, name, "NET_DISPLAY_GROUP");
     6267        if (r == NULL) { ndr_print_null(ndr); return; }
    60956268        ndr->depth++;
    60966269        ndr_print_string(ndr, "grpi3_name", r->grpi3_name);
     
    61366309{
    61376310        ndr_print_struct(ndr, name, "NetJoinDomain");
     6311        if (r == NULL) { ndr_print_null(ndr); return; }
    61386312        ndr->depth++;
    61396313        if (flags & NDR_SET_VALUES) {
     
    61866360{
    61876361        ndr_print_struct(ndr, name, "NetUnjoinDomain");
     6362        if (r == NULL) { ndr_print_null(ndr); return; }
    61886363        ndr->depth++;
    61896364        if (flags & NDR_SET_VALUES) {
     
    62266401{
    62276402        ndr_print_struct(ndr, name, "NetGetJoinInformation");
     6403        if (r == NULL) { ndr_print_null(ndr); return; }
    62286404        ndr->depth++;
    62296405        if (flags & NDR_SET_VALUES) {
     
    62666442{
    62676443        ndr_print_struct(ndr, name, "NetGetJoinableOUs");
     6444        if (r == NULL) { ndr_print_null(ndr); return; }
    62686445        ndr->depth++;
    62696446        if (flags & NDR_SET_VALUES) {
     
    63276504{
    63286505        ndr_print_struct(ndr, name, "NetRenameMachineInDomain");
     6506        if (r == NULL) { ndr_print_null(ndr); return; }
    63296507        ndr->depth++;
    63306508        if (flags & NDR_SET_VALUES) {
     
    63536531{
    63546532        ndr_print_struct(ndr, name, "NetServerGetInfo");
     6533        if (r == NULL) { ndr_print_null(ndr); return; }
    63556534        ndr->depth++;
    63566535        if (flags & NDR_SET_VALUES) {
     
    63906569{
    63916570        ndr_print_struct(ndr, name, "NetServerSetInfo");
     6571        if (r == NULL) { ndr_print_null(ndr); return; }
    63926572        ndr->depth++;
    63936573        if (flags & NDR_SET_VALUES) {
     
    64266606{
    64276607        ndr_print_struct(ndr, name, "NetGetDCName");
     6608        if (r == NULL) { ndr_print_null(ndr); return; }
    64286609        ndr->depth++;
    64296610        if (flags & NDR_SET_VALUES) {
     
    64686649{
    64696650        ndr_print_struct(ndr, name, "NetGetAnyDCName");
     6651        if (r == NULL) { ndr_print_null(ndr); return; }
    64706652        ndr->depth++;
    64716653        if (flags & NDR_SET_VALUES) {
     
    65106692{
    65116693        ndr_print_struct(ndr, name, "DsGetDcName");
     6694        if (r == NULL) { ndr_print_null(ndr); return; }
    65126695        ndr->depth++;
    65136696        if (flags & NDR_SET_VALUES) {
     
    65636746{
    65646747        ndr_print_struct(ndr, name, "NetUserAdd");
     6748        if (r == NULL) { ndr_print_null(ndr); return; }
    65656749        ndr->depth++;
    65666750        if (flags & NDR_SET_VALUES) {
     
    65996783{
    66006784        ndr_print_struct(ndr, name, "NetUserDel");
     6785        if (r == NULL) { ndr_print_null(ndr); return; }
    66016786        ndr->depth++;
    66026787        if (flags & NDR_SET_VALUES) {
     
    66306815{
    66316816        ndr_print_struct(ndr, name, "NetUserEnum");
     6817        if (r == NULL) { ndr_print_null(ndr); return; }
    66326818        ndr->depth++;
    66336819        if (flags & NDR_SET_VALUES) {
     
    66856871{
    66866872        ndr_print_struct(ndr, name, "NetUserChangePassword");
     6873        if (r == NULL) { ndr_print_null(ndr); return; }
    66876874        ndr->depth++;
    66886875        if (flags & NDR_SET_VALUES) {
     
    67106897{
    67116898        ndr_print_struct(ndr, name, "NetUserGetInfo");
     6899        if (r == NULL) { ndr_print_null(ndr); return; }
    67126900        ndr->depth++;
    67136901        if (flags & NDR_SET_VALUES) {
     
    67436931{
    67446932        ndr_print_struct(ndr, name, "NetUserSetInfo");
     6933        if (r == NULL) { ndr_print_null(ndr); return; }
    67456934        ndr->depth++;
    67466935        if (flags & NDR_SET_VALUES) {
     
    67756964{
    67766965        ndr_print_struct(ndr, name, "NetUserGetGroups");
     6966        if (r == NULL) { ndr_print_null(ndr); return; }
    67776967        ndr->depth++;
    67786968        if (flags & NDR_SET_VALUES) {
     
    68177007{
    68187008        ndr_print_struct(ndr, name, "NetUserSetGroups");
     7009        if (r == NULL) { ndr_print_null(ndr); return; }
    68197010        ndr->depth++;
    68207011        if (flags & NDR_SET_VALUES) {
     
    68467037{
    68477038        ndr_print_struct(ndr, name, "NetUserGetLocalGroups");
     7039        if (r == NULL) { ndr_print_null(ndr); return; }
    68487040        ndr->depth++;
    68497041        if (flags & NDR_SET_VALUES) {
     
    68897081{
    68907082        ndr_print_struct(ndr, name, "NetUserModalsGet");
     7083        if (r == NULL) { ndr_print_null(ndr); return; }
    68917084        ndr->depth++;
    68927085        if (flags & NDR_SET_VALUES) {
     
    69217114{
    69227115        ndr_print_struct(ndr, name, "NetUserModalsSet");
     7116        if (r == NULL) { ndr_print_null(ndr); return; }
    69237117        ndr->depth++;
    69247118        if (flags & NDR_SET_VALUES) {
     
    69527146{
    69537147        ndr_print_struct(ndr, name, "NetQueryDisplayInformation");
     7148        if (r == NULL) { ndr_print_null(ndr); return; }
    69547149        ndr->depth++;
    69557150        if (flags & NDR_SET_VALUES) {
     
    69877182{
    69887183        ndr_print_struct(ndr, name, "NetGroupAdd");
     7184        if (r == NULL) { ndr_print_null(ndr); return; }
    69897185        ndr->depth++;
    69907186        if (flags & NDR_SET_VALUES) {
     
    70187214{
    70197215        ndr_print_struct(ndr, name, "NetGroupDel");
     7216        if (r == NULL) { ndr_print_null(ndr); return; }
    70207217        ndr->depth++;
    70217218        if (flags & NDR_SET_VALUES) {
     
    70417238{
    70427239        ndr_print_struct(ndr, name, "NetGroupEnum");
     7240        if (r == NULL) { ndr_print_null(ndr); return; }
    70437241        ndr->depth++;
    70447242        if (flags & NDR_SET_VALUES) {
     
    70907288{
    70917289        ndr_print_struct(ndr, name, "NetGroupSetInfo");
     7290        if (r == NULL) { ndr_print_null(ndr); return; }
    70927291        ndr->depth++;
    70937292        if (flags & NDR_SET_VALUES) {
     
    71227321{
    71237322        ndr_print_struct(ndr, name, "NetGroupGetInfo");
     7323        if (r == NULL) { ndr_print_null(ndr); return; }
    71247324        ndr->depth++;
    71257325        if (flags & NDR_SET_VALUES) {
     
    71557355{
    71567356        ndr_print_struct(ndr, name, "NetGroupAddUser");
     7357        if (r == NULL) { ndr_print_null(ndr); return; }
    71577358        ndr->depth++;
    71587359        if (flags & NDR_SET_VALUES) {
     
    71797380{
    71807381        ndr_print_struct(ndr, name, "NetGroupDelUser");
     7382        if (r == NULL) { ndr_print_null(ndr); return; }
    71817383        ndr->depth++;
    71827384        if (flags & NDR_SET_VALUES) {
     
    72037405{
    72047406        ndr_print_struct(ndr, name, "NetGroupGetUsers");
     7407        if (r == NULL) { ndr_print_null(ndr); return; }
    72057408        ndr->depth++;
    72067409        if (flags & NDR_SET_VALUES) {
     
    72537456{
    72547457        ndr_print_struct(ndr, name, "NetGroupSetUsers");
     7458        if (r == NULL) { ndr_print_null(ndr); return; }
    72557459        ndr->depth++;
    72567460        if (flags & NDR_SET_VALUES) {
     
    72827486{
    72837487        ndr_print_struct(ndr, name, "NetLocalGroupAdd");
     7488        if (r == NULL) { ndr_print_null(ndr); return; }
    72847489        ndr->depth++;
    72857490        if (flags & NDR_SET_VALUES) {
     
    73137518{
    73147519        ndr_print_struct(ndr, name, "NetLocalGroupDel");
     7520        if (r == NULL) { ndr_print_null(ndr); return; }
    73157521        ndr->depth++;
    73167522        if (flags & NDR_SET_VALUES) {
     
    73367542{
    73377543        ndr_print_struct(ndr, name, "NetLocalGroupGetInfo");
     7544        if (r == NULL) { ndr_print_null(ndr); return; }
    73387545        ndr->depth++;
    73397546        if (flags & NDR_SET_VALUES) {
     
    73697576{
    73707577        ndr_print_struct(ndr, name, "NetLocalGroupSetInfo");
     7578        if (r == NULL) { ndr_print_null(ndr); return; }
    73717579        ndr->depth++;
    73727580        if (flags & NDR_SET_VALUES) {
     
    74017609{
    74027610        ndr_print_struct(ndr, name, "NetLocalGroupEnum");
     7611        if (r == NULL) { ndr_print_null(ndr); return; }
    74037612        ndr->depth++;
    74047613        if (flags & NDR_SET_VALUES) {
     
    74507659{
    74517660        ndr_print_struct(ndr, name, "NetLocalGroupAddMembers");
     7661        if (r == NULL) { ndr_print_null(ndr); return; }
    74527662        ndr->depth++;
    74537663        if (flags & NDR_SET_VALUES) {
     
    74797689{
    74807690        ndr_print_struct(ndr, name, "NetLocalGroupDelMembers");
     7691        if (r == NULL) { ndr_print_null(ndr); return; }
    74817692        ndr->depth++;
    74827693        if (flags & NDR_SET_VALUES) {
     
    75087719{
    75097720        ndr_print_struct(ndr, name, "NetLocalGroupGetMembers");
     7721        if (r == NULL) { ndr_print_null(ndr); return; }
    75107722        ndr->depth++;
    75117723        if (flags & NDR_SET_VALUES) {
     
    75587770{
    75597771        ndr_print_struct(ndr, name, "NetLocalGroupSetMembers");
     7772        if (r == NULL) { ndr_print_null(ndr); return; }
    75607773        ndr->depth++;
    75617774        if (flags & NDR_SET_VALUES) {
     
    75877800{
    75887801        ndr_print_struct(ndr, name, "NetRemoteTOD");
     7802        if (r == NULL) { ndr_print_null(ndr); return; }
    75897803        ndr->depth++;
    75907804        if (flags & NDR_SET_VALUES) {
     
    76187832{
    76197833        ndr_print_struct(ndr, name, "NetShareAdd");
     7834        if (r == NULL) { ndr_print_null(ndr); return; }
    76207835        ndr->depth++;
    76217836        if (flags & NDR_SET_VALUES) {
     
    76497864{
    76507865        ndr_print_struct(ndr, name, "NetShareDel");
     7866        if (r == NULL) { ndr_print_null(ndr); return; }
    76517867        ndr->depth++;
    76527868        if (flags & NDR_SET_VALUES) {
     
    76737889{
    76747890        ndr_print_struct(ndr, name, "NetShareEnum");
     7891        if (r == NULL) { ndr_print_null(ndr); return; }
    76757892        ndr->depth++;
    76767893        if (flags & NDR_SET_VALUES) {
     
    77227939{
    77237940        ndr_print_struct(ndr, name, "NetShareGetInfo");
     7941        if (r == NULL) { ndr_print_null(ndr); return; }
    77247942        ndr->depth++;
    77257943        if (flags & NDR_SET_VALUES) {
     
    77557973{
    77567974        ndr_print_struct(ndr, name, "NetShareSetInfo");
     7975        if (r == NULL) { ndr_print_null(ndr); return; }
    77577976        ndr->depth++;
    77587977        if (flags & NDR_SET_VALUES) {
     
    77878006{
    77888007        ndr_print_struct(ndr, name, "NetFileClose");
     8008        if (r == NULL) { ndr_print_null(ndr); return; }
    77898009        ndr->depth++;
    77908010        if (flags & NDR_SET_VALUES) {
     
    78108030{
    78118031        ndr_print_struct(ndr, name, "NetFileGetInfo");
     8032        if (r == NULL) { ndr_print_null(ndr); return; }
    78128033        ndr->depth++;
    78138034        if (flags & NDR_SET_VALUES) {
     
    78438064{
    78448065        ndr_print_struct(ndr, name, "NetFileEnum");
     8066        if (r == NULL) { ndr_print_null(ndr); return; }
    78458067        ndr->depth++;
    78468068        if (flags & NDR_SET_VALUES) {
     
    78948116{
    78958117        ndr_print_struct(ndr, name, "NetShutdownInit");
     8118        if (r == NULL) { ndr_print_null(ndr); return; }
    78968119        ndr->depth++;
    78978120        if (flags & NDR_SET_VALUES) {
     
    79208143{
    79218144        ndr_print_struct(ndr, name, "NetShutdownAbort");
     8145        if (r == NULL) { ndr_print_null(ndr); return; }
    79228146        ndr->depth++;
    79238147        if (flags & NDR_SET_VALUES) {
     
    79428166{
    79438167        ndr_print_struct(ndr, name, "I_NetLogonControl");
     8168        if (r == NULL) { ndr_print_null(ndr); return; }
    79448169        ndr->depth++;
    79458170        if (flags & NDR_SET_VALUES) {
     
    79758200{
    79768201        ndr_print_struct(ndr, name, "I_NetLogonControl2");
     8202        if (r == NULL) { ndr_print_null(ndr); return; }
    79778203        ndr->depth++;
    79788204        if (flags & NDR_SET_VALUES) {
     
    79878213                ndr_print_ptr(ndr, "data", r->in.data);
    79888214                ndr->depth++;
    7989                 ndr_print_uint8(ndr, "data", *r->in.data);
     8215                if (r->in.data) {
     8216                        ndr_print_uint8(ndr, "data", *r->in.data);
     8217                }
    79908218                ndr->depth--;
    79918219                ndr->depth--;
  • vendor/current/source3/librpc/gen_ndr/ndr_libnetapi.h

    r414 r740  
    432432enum ndr_err_code ndr_pull_SERVER_INFO_1602(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1602 *r);
    433433void ndr_print_SERVER_INFO_1602(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1602 *r);
     434enum ndr_err_code ndr_push_DOMAIN_CONTROLLER_INFO_FLAGS(struct ndr_push *ndr, int ndr_flags, enum DOMAIN_CONTROLLER_INFO_FLAGS r);
     435enum ndr_err_code ndr_pull_DOMAIN_CONTROLLER_INFO_FLAGS(struct ndr_pull *ndr, int ndr_flags, enum DOMAIN_CONTROLLER_INFO_FLAGS *r);
     436void ndr_print_DOMAIN_CONTROLLER_INFO_FLAGS(struct ndr_print *ndr, const char *name, enum DOMAIN_CONTROLLER_INFO_FLAGS r);
    434437enum ndr_err_code ndr_push_DOMAIN_CONTROLLER_INFO(struct ndr_push *ndr, int ndr_flags, const struct DOMAIN_CONTROLLER_INFO *r);
    435438enum ndr_err_code ndr_pull_DOMAIN_CONTROLLER_INFO(struct ndr_pull *ndr, int ndr_flags, struct DOMAIN_CONTROLLER_INFO *r);
  • vendor/current/source3/librpc/gen_ndr/ndr_messaging.c

    r427 r740  
    44#include "librpc/gen_ndr/ndr_messaging.h"
    55
     6#include "librpc/gen_ndr/ndr_server_id.h"
    67_PUBLIC_ enum ndr_err_code ndr_push_messaging_type(struct ndr_push *ndr, int ndr_flags, enum messaging_type r)
    78{
     
    3637                case MSG_REQ_DMALLOC_LOG_CHANGED: val = "MSG_REQ_DMALLOC_LOG_CHANGED"; break;
    3738                case MSG_SHUTDOWN: val = "MSG_SHUTDOWN"; break;
     39                case MSG_IDMAP_FLUSH: val = "MSG_IDMAP_FLUSH"; break;
     40                case MSG_IDMAP_DELETE: val = "MSG_IDMAP_DELETE"; break;
     41                case MSG_IDMAP_KILL: val = "MSG_IDMAP_KILL"; break;
    3842                case MSG_FORCE_ELECTION: val = "MSG_FORCE_ELECTION"; break;
    3943                case MSG_WINS_NEW_ENTRY: val = "MSG_WINS_NEW_ENTRY"; break;
     
    4549                case MSG_PRINTER_UPDATE: val = "MSG_PRINTER_UPDATE"; break;
    4650                case MSG_PRINTER_MOD: val = "MSG_PRINTER_MOD"; break;
     51                case MSG_PRINTER_PCAP: val = "MSG_PRINTER_PCAP"; break;
    4752                case MSG_SMB_CONF_UPDATED: val = "MSG_SMB_CONF_UPDATED"; break;
    4853                case MSG_SMB_FORCE_TDIS: val = "MSG_SMB_FORCE_TDIS"; break;
     
    7378                case MSG_WINBIND_VALIDATE_CACHE: val = "MSG_WINBIND_VALIDATE_CACHE"; break;
    7479                case MSG_WINBIND_DUMP_DOMAIN_LIST: val = "MSG_WINBIND_DUMP_DOMAIN_LIST"; break;
     80                case MSG_WINBIND_IP_DROPPED: val = "MSG_WINBIND_IP_DROPPED"; break;
    7581                case MSG_DUMP_EVENT_LIST: val = "MSG_DUMP_EVENT_LIST"; break;
    7682                case MSG_DBWRAP_TDB2_CHANGES: val = "MSG_DBWRAP_TDB2_CHANGES"; break;
     
    9298        }
    9399        if (ndr_flags & NDR_BUFFERS) {
    94                 NDR_CHECK(ndr_push_server_id(ndr, NDR_BUFFERS, &r->dest));
    95                 NDR_CHECK(ndr_push_server_id(ndr, NDR_BUFFERS, &r->src));
    96100        }
    97101        return NDR_ERR_SUCCESS;
     
    110114        }
    111115        if (ndr_flags & NDR_BUFFERS) {
    112                 NDR_CHECK(ndr_pull_server_id(ndr, NDR_BUFFERS, &r->dest));
    113                 NDR_CHECK(ndr_pull_server_id(ndr, NDR_BUFFERS, &r->src));
    114116        }
    115117        return NDR_ERR_SUCCESS;
     
    119121{
    120122        ndr_print_struct(ndr, name, "messaging_rec");
     123        if (r == NULL) { ndr_print_null(ndr); return; }
    121124        ndr->depth++;
    122125        ndr_print_uint32(ndr, "msg_version", r->msg_version);
     
    140143        }
    141144        if (ndr_flags & NDR_BUFFERS) {
    142                 for (cntr_messages_0 = 0; cntr_messages_0 < r->num_messages; cntr_messages_0++) {
    143                         NDR_CHECK(ndr_push_messaging_rec(ndr, NDR_BUFFERS, &r->messages[cntr_messages_0]));
    144                 }
    145145        }
    146146        return NDR_ERR_SUCCESS;
     
    164164        }
    165165        if (ndr_flags & NDR_BUFFERS) {
    166                 _mem_save_messages_0 = NDR_PULL_GET_MEM_CTX(ndr);
    167                 NDR_PULL_SET_MEM_CTX(ndr, r->messages, 0);
    168                 for (cntr_messages_0 = 0; cntr_messages_0 < r->num_messages; cntr_messages_0++) {
    169                         NDR_CHECK(ndr_pull_messaging_rec(ndr, NDR_BUFFERS, &r->messages[cntr_messages_0]));
    170                 }
    171                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_messages_0, 0);
    172166        }
    173167        return NDR_ERR_SUCCESS;
     
    178172        uint32_t cntr_messages_0;
    179173        ndr_print_struct(ndr, name, "messaging_array");
     174        if (r == NULL) { ndr_print_null(ndr); return; }
    180175        ndr->depth++;
    181176        ndr_print_uint32(ndr, "num_messages", r->num_messages);
     
    183178        ndr->depth++;
    184179        for (cntr_messages_0=0;cntr_messages_0<r->num_messages;cntr_messages_0++) {
    185                 char *idx_0=NULL;
    186                 if (asprintf(&idx_0, "[%d]", cntr_messages_0) != -1) {
    187                         ndr_print_messaging_rec(ndr, "messages", &r->messages[cntr_messages_0]);
    188                         free(idx_0);
    189                 }
     180                ndr_print_messaging_rec(ndr, "messages", &r->messages[cntr_messages_0]);
    190181        }
    191182        ndr->depth--;
     
    255246        uint32_t cntr_keys_0;
    256247        ndr_print_struct(ndr, name, "dbwrap_tdb2_changes");
     248        if (r == NULL) { ndr_print_null(ndr); return; }
    257249        ndr->depth++;
    258250        ndr_print_string(ndr, "magic_string", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"TDB2":r->magic_string);
     
    266258        ndr->depth++;
    267259        for (cntr_keys_0=0;cntr_keys_0<r->num_keys;cntr_keys_0++) {
    268                 char *idx_0=NULL;
    269                 if (asprintf(&idx_0, "[%d]", cntr_keys_0) != -1) {
    270                         ndr_print_DATA_BLOB(ndr, "keys", r->keys[cntr_keys_0]);
    271                         free(idx_0);
    272                 }
    273         }
    274         ndr->depth--;
    275         ndr->depth--;
    276 }
    277 
     260                ndr_print_DATA_BLOB(ndr, "keys", r->keys[cntr_keys_0]);
     261        }
     262        ndr->depth--;
     263        ndr->depth--;
     264}
     265
  • vendor/current/source3/librpc/gen_ndr/ndr_notify.c

    r414 r740  
    44#include "librpc/gen_ndr/ndr_notify.h"
    55
     6#include "librpc/gen_ndr/ndr_file_id.h"
     7#include "librpc/gen_ndr/ndr_server_id.h"
    68_PUBLIC_ enum ndr_err_code ndr_push_notify_entry(struct ndr_push *ndr, int ndr_flags, const struct notify_entry *r)
    79{
     
    2426        }
    2527        if (ndr_flags & NDR_BUFFERS) {
    26                 NDR_CHECK(ndr_push_server_id(ndr, NDR_BUFFERS, &r->server));
    27                 NDR_CHECK(ndr_push_file_id(ndr, NDR_BUFFERS, &r->dir_id));
    2828        }
    2929        return NDR_ERR_SUCCESS;
     
    5050        }
    5151        if (ndr_flags & NDR_BUFFERS) {
    52                 NDR_CHECK(ndr_pull_server_id(ndr, NDR_BUFFERS, &r->server));
    53                 NDR_CHECK(ndr_pull_file_id(ndr, NDR_BUFFERS, &r->dir_id));
    5452        }
    5553        return NDR_ERR_SUCCESS;
     
    5957{
    6058        ndr_print_struct(ndr, name, "notify_entry");
     59        if (r == NULL) { ndr_print_null(ndr); return; }
    6160        ndr->depth++;
    6261        ndr_print_server_id(ndr, "server", &r->server);
     
    8382        }
    8483        if (ndr_flags & NDR_BUFFERS) {
    85                 for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) {
    86                         NDR_CHECK(ndr_push_notify_entry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_0]));
    87                 }
    8884        }
    8985        return NDR_ERR_SUCCESS;
     
    107103        }
    108104        if (ndr_flags & NDR_BUFFERS) {
    109                 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
    110                 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
    111                 for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) {
    112                         NDR_CHECK(ndr_pull_notify_entry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_0]));
    113                 }
    114                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
    115105        }
    116106        return NDR_ERR_SUCCESS;
     
    121111        uint32_t cntr_entries_0;
    122112        ndr_print_struct(ndr, name, "notify_entry_array");
     113        if (r == NULL) { ndr_print_null(ndr); return; }
    123114        ndr->depth++;
    124115        ndr_print_uint32(ndr, "num_entries", r->num_entries);
     
    126117        ndr->depth++;
    127118        for (cntr_entries_0=0;cntr_entries_0<r->num_entries;cntr_entries_0++) {
    128                 char *idx_0=NULL;
    129                 if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) {
    130                         ndr_print_notify_entry(ndr, "entries", &r->entries[cntr_entries_0]);
    131                         free(idx_0);
    132                 }
     119                ndr_print_notify_entry(ndr, "entries", &r->entries[cntr_entries_0]);
    133120        }
    134121        ndr->depth--;
     
    150137        }
    151138        if (ndr_flags & NDR_BUFFERS) {
    152                 for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) {
    153                         NDR_CHECK(ndr_push_notify_entry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_0]));
    154                 }
    155139        }
    156140        return NDR_ERR_SUCCESS;
     
    176160        }
    177161        if (ndr_flags & NDR_BUFFERS) {
    178                 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
    179                 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
    180                 for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) {
    181                         NDR_CHECK(ndr_pull_notify_entry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_0]));
    182                 }
    183                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
    184162        }
    185163        return NDR_ERR_SUCCESS;
     
    190168        uint32_t cntr_entries_0;
    191169        ndr_print_struct(ndr, name, "notify_depth");
     170        if (r == NULL) { ndr_print_null(ndr); return; }
    192171        ndr->depth++;
    193172        ndr_print_uint32(ndr, "max_mask", r->max_mask);
     
    197176        ndr->depth++;
    198177        for (cntr_entries_0=0;cntr_entries_0<r->num_entries;cntr_entries_0++) {
    199                 char *idx_0=NULL;
    200                 if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) {
    201                         ndr_print_notify_entry(ndr, "entries", &r->entries[cntr_entries_0]);
    202                         free(idx_0);
    203                 }
     178                ndr_print_notify_entry(ndr, "entries", &r->entries[cntr_entries_0]);
    204179        }
    205180        ndr->depth--;
     
    219194        }
    220195        if (ndr_flags & NDR_BUFFERS) {
    221                 for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) {
    222                         NDR_CHECK(ndr_push_notify_depth(ndr, NDR_BUFFERS, &r->depth[cntr_depth_0]));
    223                 }
    224196        }
    225197        return NDR_ERR_SUCCESS;
     
    243215        }
    244216        if (ndr_flags & NDR_BUFFERS) {
    245                 _mem_save_depth_0 = NDR_PULL_GET_MEM_CTX(ndr);
    246                 NDR_PULL_SET_MEM_CTX(ndr, r->depth, 0);
    247                 for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) {
    248                         NDR_CHECK(ndr_pull_notify_depth(ndr, NDR_BUFFERS, &r->depth[cntr_depth_0]));
    249                 }
    250                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_depth_0, 0);
    251217        }
    252218        return NDR_ERR_SUCCESS;
     
    257223        uint32_t cntr_depth_0;
    258224        ndr_print_struct(ndr, name, "notify_array");
     225        if (r == NULL) { ndr_print_null(ndr); return; }
    259226        ndr->depth++;
    260227        ndr_print_uint32(ndr, "num_depths", r->num_depths);
     
    262229        ndr->depth++;
    263230        for (cntr_depth_0=0;cntr_depth_0<r->num_depths;cntr_depth_0++) {
    264                 char *idx_0=NULL;
    265                 if (asprintf(&idx_0, "[%d]", cntr_depth_0) != -1) {
    266                         ndr_print_notify_depth(ndr, "depth", &r->depth[cntr_depth_0]);
    267                         free(idx_0);
    268                 }
     231                ndr_print_notify_depth(ndr, "depth", &r->depth[cntr_depth_0]);
    269232        }
    270233        ndr->depth--;
     
    313276{
    314277        ndr_print_struct(ndr, name, "notify_event");
     278        if (r == NULL) { ndr_print_null(ndr); return; }
    315279        ndr->depth++;
    316280        ndr_print_uint32(ndr, "action", r->action);
     
    320284}
    321285
     286static enum ndr_err_code ndr_push_FILE_NOTIFY_ACTION(struct ndr_push *ndr, int ndr_flags, enum FILE_NOTIFY_ACTION r)
     287{
     288        NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
     289        return NDR_ERR_SUCCESS;
     290}
     291
     292static enum ndr_err_code ndr_pull_FILE_NOTIFY_ACTION(struct ndr_pull *ndr, int ndr_flags, enum FILE_NOTIFY_ACTION *r)
     293{
     294        uint32_t v;
     295        NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
     296        *r = v;
     297        return NDR_ERR_SUCCESS;
     298}
     299
     300_PUBLIC_ void ndr_print_FILE_NOTIFY_ACTION(struct ndr_print *ndr, const char *name, enum FILE_NOTIFY_ACTION r)
     301{
     302        const char *val = NULL;
     303
     304        switch (r) {
     305                case FILE_ACTION_ADDED: val = "FILE_ACTION_ADDED"; break;
     306                case FILE_ACTION_REMOVED: val = "FILE_ACTION_REMOVED"; break;
     307                case FILE_ACTION_MODIFIED: val = "FILE_ACTION_MODIFIED"; break;
     308                case FILE_ACTION_RENAMED_OLD_NAME: val = "FILE_ACTION_RENAMED_OLD_NAME"; break;
     309                case FILE_ACTION_RENAMED_NEW_NAME: val = "FILE_ACTION_RENAMED_NEW_NAME"; break;
     310                case FILE_ACTION_ADDED_STREAM: val = "FILE_ACTION_ADDED_STREAM"; break;
     311                case FILE_ACTION_REMOVED_STREAM: val = "FILE_ACTION_REMOVED_STREAM"; break;
     312                case FILE_ACTION_MODIFIED_STREAM: val = "FILE_ACTION_MODIFIED_STREAM"; break;
     313        }
     314        ndr_print_enum(ndr, name, "ENUM", val, r);
     315}
     316
     317_PUBLIC_ enum ndr_err_code ndr_push_FILE_NOTIFY_INFORMATION(struct ndr_push *ndr, int ndr_flags, const struct FILE_NOTIFY_INFORMATION *r)
     318{
     319        {
     320                uint32_t _flags_save_STRUCT = ndr->flags;
     321                ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
     322                if (ndr_flags & NDR_SCALARS) {
     323                        NDR_CHECK(ndr_push_align(ndr, 4));
     324                        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->NextEntryOffset));
     325                        NDR_CHECK(ndr_push_FILE_NOTIFY_ACTION(ndr, NDR_SCALARS, r->Action));
     326                        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->FileName1) * 2));
     327                        {
     328                                uint32_t _flags_save_uint16 = ndr->flags;
     329                                ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM);
     330                                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->FileName1, strlen_m(r->FileName1) * 2, sizeof(uint16_t), CH_UTF16));
     331                                ndr->flags = _flags_save_uint16;
     332                        }
     333                        NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     334                }
     335                if (ndr_flags & NDR_BUFFERS) {
     336                }
     337                ndr->flags = _flags_save_STRUCT;
     338        }
     339        return NDR_ERR_SUCCESS;
     340}
     341
     342_PUBLIC_ enum ndr_err_code ndr_pull_FILE_NOTIFY_INFORMATION(struct ndr_pull *ndr, int ndr_flags, struct FILE_NOTIFY_INFORMATION *r)
     343{
     344        {
     345                uint32_t _flags_save_STRUCT = ndr->flags;
     346                ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
     347                if (ndr_flags & NDR_SCALARS) {
     348                        NDR_CHECK(ndr_pull_align(ndr, 4));
     349                        NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->NextEntryOffset));
     350                        NDR_CHECK(ndr_pull_FILE_NOTIFY_ACTION(ndr, NDR_SCALARS, &r->Action));
     351                        NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->FileNameLength));
     352                        {
     353                                uint32_t _flags_save_uint16 = ndr->flags;
     354                                ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM);
     355                                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->FileName1, r->FileNameLength, sizeof(uint16_t), CH_UTF16));
     356                                ndr->flags = _flags_save_uint16;
     357                        }
     358                        NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     359                }
     360                if (ndr_flags & NDR_BUFFERS) {
     361                }
     362                ndr->flags = _flags_save_STRUCT;
     363        }
     364        return NDR_ERR_SUCCESS;
     365}
     366
     367_PUBLIC_ void ndr_print_FILE_NOTIFY_INFORMATION(struct ndr_print *ndr, const char *name, const struct FILE_NOTIFY_INFORMATION *r)
     368{
     369        ndr_print_struct(ndr, name, "FILE_NOTIFY_INFORMATION");
     370        if (r == NULL) { ndr_print_null(ndr); return; }
     371        {
     372                uint32_t _flags_save_STRUCT = ndr->flags;
     373                ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
     374                ndr->depth++;
     375                ndr_print_uint32(ndr, "NextEntryOffset", r->NextEntryOffset);
     376                ndr_print_FILE_NOTIFY_ACTION(ndr, "Action", r->Action);
     377                ndr_print_uint32(ndr, "FileNameLength", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->FileName1) * 2:r->FileNameLength);
     378                ndr_print_string(ndr, "FileName1", r->FileName1);
     379                ndr->depth--;
     380                ndr->flags = _flags_save_STRUCT;
     381        }
     382}
     383
     384_PUBLIC_ size_t ndr_size_FILE_NOTIFY_INFORMATION(const struct FILE_NOTIFY_INFORMATION *r, int flags)
     385{
     386        flags |= LIBNDR_FLAG_ALIGN4;
     387        return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_FILE_NOTIFY_INFORMATION);
     388}
     389
  • vendor/current/source3/librpc/gen_ndr/ndr_notify.h

    r414 r740  
    2121enum ndr_err_code ndr_pull_notify_event(struct ndr_pull *ndr, int ndr_flags, struct notify_event *r);
    2222void ndr_print_notify_event(struct ndr_print *ndr, const char *name, const struct notify_event *r);
     23void ndr_print_FILE_NOTIFY_ACTION(struct ndr_print *ndr, const char *name, enum FILE_NOTIFY_ACTION r);
     24enum ndr_err_code ndr_push_FILE_NOTIFY_INFORMATION(struct ndr_push *ndr, int ndr_flags, const struct FILE_NOTIFY_INFORMATION *r);
     25enum ndr_err_code ndr_pull_FILE_NOTIFY_INFORMATION(struct ndr_pull *ndr, int ndr_flags, struct FILE_NOTIFY_INFORMATION *r);
     26void ndr_print_FILE_NOTIFY_INFORMATION(struct ndr_print *ndr, const char *name, const struct FILE_NOTIFY_INFORMATION *r);
     27size_t ndr_size_FILE_NOTIFY_INFORMATION(const struct FILE_NOTIFY_INFORMATION *r, int flags);
    2328#endif /* _HEADER_NDR_notify */
  • vendor/current/source3/librpc/gen_ndr/ndr_perfcount.c

    r414 r740  
    4545{
    4646        ndr_print_struct(ndr, name, "SYSTEMTIME");
     47        if (r == NULL) { ndr_print_null(ndr); return; }
    4748        ndr->depth++;
    4849        ndr_print_uint16(ndr, "year", r->year);
     
    102103{
    103104        ndr_print_struct(ndr, name, "PERF_COUNTER_DEFINITION");
     105        if (r == NULL) { ndr_print_null(ndr); return; }
    104106        ndr->depth++;
    105107        ndr_print_uint32(ndr, "ByteLength", r->ByteLength);
     
    146148{
    147149        ndr_print_struct(ndr, name, "PERF_COUNTER_BLOCK");
     150        if (r == NULL) { ndr_print_null(ndr); return; }
    148151        ndr->depth++;
    149152        ndr_print_uint32(ndr, "ByteLength", r->ByteLength);
     
    209212{
    210213        ndr_print_struct(ndr, name, "PERF_INSTANCE_DEFINITION");
     214        if (r == NULL) { ndr_print_null(ndr); return; }
    211215        ndr->depth++;
    212216        ndr_print_uint32(ndr, "ByteLength", r->ByteLength);
     
    318322        uint32_t cntr_instances_0;
    319323        ndr_print_struct(ndr, name, "PERF_OBJECT_TYPE");
     324        if (r == NULL) { ndr_print_null(ndr); return; }
    320325        ndr->depth++;
    321326        ndr_print_uint32(ndr, "TotalByteLength", r->TotalByteLength);
     
    336341        ndr->depth++;
    337342        for (cntr_counters_0=0;cntr_counters_0<r->NumCounters;cntr_counters_0++) {
    338                 char *idx_0=NULL;
    339                 if (asprintf(&idx_0, "[%d]", cntr_counters_0) != -1) {
    340                         ndr_print_PERF_COUNTER_DEFINITION(ndr, "counters", &r->counters[cntr_counters_0]);
    341                         free(idx_0);
    342                 }
     343                ndr_print_PERF_COUNTER_DEFINITION(ndr, "counters", &r->counters[cntr_counters_0]);
    343344        }
    344345        ndr->depth--;
     
    346347        ndr->depth++;
    347348        for (cntr_instances_0=0;cntr_instances_0<r->NumInstances;cntr_instances_0++) {
    348                 char *idx_0=NULL;
    349                 if (asprintf(&idx_0, "[%d]", cntr_instances_0) != -1) {
    350                         ndr_print_PERF_INSTANCE_DEFINITION(ndr, "instances", &r->instances[cntr_instances_0]);
    351                         free(idx_0);
    352                 }
     349                ndr_print_PERF_INSTANCE_DEFINITION(ndr, "instances", &r->instances[cntr_instances_0]);
    353350        }
    354351        ndr->depth--;
     
    460457        uint32_t cntr_objects_0;
    461458        ndr_print_struct(ndr, name, "PERF_DATA_BLOCK");
     459        if (r == NULL) { ndr_print_null(ndr); return; }
    462460        ndr->depth++;
    463461        ndr->print(ndr, "%s: ARRAY(%d)", "Signature", (int)4);
    464462        ndr->depth++;
    465463        for (cntr_Signature_0=0;cntr_Signature_0<4;cntr_Signature_0++) {
    466                 char *idx_0=NULL;
    467                 if (asprintf(&idx_0, "[%d]", cntr_Signature_0) != -1) {
    468                         ndr_print_uint16(ndr, "Signature", r->Signature[cntr_Signature_0]);
    469                         free(idx_0);
    470                 }
     464                ndr_print_uint16(ndr, "Signature", r->Signature[cntr_Signature_0]);
    471465        }
    472466        ndr->depth--;
     
    494488        ndr->depth++;
    495489        for (cntr_objects_0=0;cntr_objects_0<r->NumObjectTypes;cntr_objects_0++) {
    496                 char *idx_0=NULL;
    497                 if (asprintf(&idx_0, "[%d]", cntr_objects_0) != -1) {
    498                         ndr_print_PERF_OBJECT_TYPE(ndr, "objects", &r->objects[cntr_objects_0]);
    499                         free(idx_0);
    500                 }
    501         }
    502         ndr->depth--;
    503         ndr->depth--;
    504 }
    505 
     490                ndr_print_PERF_OBJECT_TYPE(ndr, "objects", &r->objects[cntr_objects_0]);
     491        }
     492        ndr->depth--;
     493        ndr->depth--;
     494}
     495
  • vendor/current/source3/librpc/gen_ndr/ndr_printcap.c

    r600 r740  
    77{
    88        if (ndr_flags & NDR_SCALARS) {
    9                 NDR_CHECK(ndr_push_align(ndr, 4));
     9                NDR_CHECK(ndr_push_align(ndr, 5));
    1010                NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
    1111                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
     12                NDR_CHECK(ndr_push_unique_ptr(ndr, r->location));
     13                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1214        }
    1315        if (ndr_flags & NDR_BUFFERS) {
    1416                if (r->name) {
    15                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF8)));
    16                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
    17                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF8)));
     17                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF8)));
     18                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     19                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF8)));
    1820                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
    1921                }
    2022                if (r->info) {
    21                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->info, CH_UTF8)));
    22                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
    23                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->info, CH_UTF8)));
     23                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->info, CH_UTF8)));
     24                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     25                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->info, CH_UTF8)));
    2426                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->info, ndr_charset_length(r->info, CH_UTF8), sizeof(uint8_t), CH_UTF8));
     27                }
     28                if (r->location) {
     29                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->location, CH_UTF8)));
     30                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     31                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->location, CH_UTF8)));
     32                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->location, ndr_charset_length(r->location, CH_UTF8), sizeof(uint8_t), CH_UTF8));
    2533                }
    2634        }
     
    3442        uint32_t _ptr_info;
    3543        TALLOC_CTX *_mem_save_info_0;
    36         if (ndr_flags & NDR_SCALARS) {
    37                 NDR_CHECK(ndr_pull_align(ndr, 4));
     44        uint32_t _ptr_location;
     45        TALLOC_CTX *_mem_save_location_0;
     46        if (ndr_flags & NDR_SCALARS) {
     47                NDR_CHECK(ndr_pull_align(ndr, 5));
    3848                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
    3949                if (_ptr_name) {
     
    4858                        r->info = NULL;
    4959                }
     60                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_location));
     61                if (_ptr_location) {
     62                        NDR_PULL_ALLOC(ndr, r->location);
     63                } else {
     64                        r->location = NULL;
     65                }
     66                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5067        }
    5168        if (ndr_flags & NDR_BUFFERS) {
     
    7491                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
    7592                }
     93                if (r->location) {
     94                        _mem_save_location_0 = NDR_PULL_GET_MEM_CTX(ndr);
     95                        NDR_PULL_SET_MEM_CTX(ndr, r->location, 0);
     96                        NDR_CHECK(ndr_pull_array_size(ndr, &r->location));
     97                        NDR_CHECK(ndr_pull_array_length(ndr, &r->location));
     98                        if (ndr_get_array_length(ndr, &r->location) > ndr_get_array_size(ndr, &r->location)) {
     99                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->location), ndr_get_array_length(ndr, &r->location));
     100                        }
     101                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->location), sizeof(uint8_t)));
     102                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->location, ndr_get_array_length(ndr, &r->location), sizeof(uint8_t), CH_UTF8));
     103                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_location_0, 0);
     104                }
    76105        }
    77106        return NDR_ERR_SUCCESS;
     
    81110{
    82111        ndr_print_struct(ndr, name, "pcap_printer");
     112        if (r == NULL) { ndr_print_null(ndr); return; }
    83113        ndr->depth++;
    84114        ndr_print_ptr(ndr, "name", r->name);
     
    94124        }
    95125        ndr->depth--;
     126        ndr_print_ptr(ndr, "location", r->location);
     127        ndr->depth++;
     128        if (r->location) {
     129                ndr_print_string(ndr, "location", r->location);
     130        }
     131        ndr->depth--;
    96132        ndr->depth--;
    97133}
     
    101137        uint32_t cntr_printers_0;
    102138        if (ndr_flags & NDR_SCALARS) {
    103                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    104                 NDR_CHECK(ndr_push_align(ndr, 4));
     139                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
     140                NDR_CHECK(ndr_push_align(ndr, 5));
    105141                NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status));
    106142                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
     
    108144                        NDR_CHECK(ndr_push_pcap_printer(ndr, NDR_SCALARS, &r->printers[cntr_printers_0]));
    109145                }
     146                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    110147        }
    111148        if (ndr_flags & NDR_BUFFERS) {
     
    123160        if (ndr_flags & NDR_SCALARS) {
    124161                NDR_CHECK(ndr_pull_array_size(ndr, &r->printers));
    125                 NDR_CHECK(ndr_pull_align(ndr, 4));
     162                NDR_CHECK(ndr_pull_align(ndr, 5));
    126163                NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
    127164                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
     
    136173                        NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->printers, r->count));
    137174                }
     175                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    138176        }
    139177        if (ndr_flags & NDR_BUFFERS) {
     
    152190        uint32_t cntr_printers_0;
    153191        ndr_print_struct(ndr, name, "pcap_data");
     192        if (r == NULL) { ndr_print_null(ndr); return; }
    154193        ndr->depth++;
    155194        ndr_print_NTSTATUS(ndr, "status", r->status);
     
    158197        ndr->depth++;
    159198        for (cntr_printers_0=0;cntr_printers_0<r->count;cntr_printers_0++) {
    160                 char *idx_0=NULL;
    161                 if (asprintf(&idx_0, "[%d]", cntr_printers_0) != -1) {
    162                         ndr_print_pcap_printer(ndr, "printers", &r->printers[cntr_printers_0]);
    163                         free(idx_0);
    164                 }
    165         }
    166         ndr->depth--;
    167         ndr->depth--;
    168 }
     199                ndr_print_pcap_printer(ndr, "printers", &r->printers[cntr_printers_0]);
     200        }
     201        ndr->depth--;
     202        ndr->depth--;
     203}
     204
  • vendor/current/source3/librpc/gen_ndr/ndr_secrets.c

    r594 r740  
    44#include "librpc/gen_ndr/ndr_secrets.h"
    55
     6#include "librpc/gen_ndr/ndr_security.h"
    67_PUBLIC_ enum ndr_err_code ndr_push_TRUSTED_DOM_PASS(struct ndr_push *ndr, int ndr_flags, const struct TRUSTED_DOM_PASS *r)
    78{
     
    6162{
    6263        ndr_print_struct(ndr, name, "TRUSTED_DOM_PASS");
     64        if (r == NULL) { ndr_print_null(ndr); return; }
    6365        {
    6466                uint32_t _flags_save_STRUCT = ndr->flags;
  • vendor/current/source3/librpc/gen_ndr/ndr_wbint.c

    r618 r740  
    66#include "librpc/gen_ndr/ndr_lsa.h"
    77#include "librpc/gen_ndr/ndr_netlogon.h"
     8#include "librpc/gen_ndr/ndr_misc.h"
     9#include "librpc/gen_ndr/ndr_security.h"
     10#include "librpc/gen_ndr/ndr_idmap.h"
     11static enum ndr_err_code ndr_push_wbint_TransID(struct ndr_push *ndr, int ndr_flags, const struct wbint_TransID *r)
     12{
     13        if (ndr_flags & NDR_SCALARS) {
     14                NDR_CHECK(ndr_push_align(ndr, 8));
     15                NDR_CHECK(ndr_push_id_type(ndr, NDR_SCALARS, r->type));
     16                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->domain_index));
     17                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
     18                NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unix_id));
     19                NDR_CHECK(ndr_push_trailer_align(ndr, 8));
     20        }
     21        if (ndr_flags & NDR_BUFFERS) {
     22        }
     23        return NDR_ERR_SUCCESS;
     24}
     25
     26static enum ndr_err_code ndr_pull_wbint_TransID(struct ndr_pull *ndr, int ndr_flags, struct wbint_TransID *r)
     27{
     28        if (ndr_flags & NDR_SCALARS) {
     29                NDR_CHECK(ndr_pull_align(ndr, 8));
     30                NDR_CHECK(ndr_pull_id_type(ndr, NDR_SCALARS, &r->type));
     31                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->domain_index));
     32                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
     33                NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unix_id));
     34                NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
     35        }
     36        if (ndr_flags & NDR_BUFFERS) {
     37        }
     38        return NDR_ERR_SUCCESS;
     39}
     40
     41_PUBLIC_ void ndr_print_wbint_TransID(struct ndr_print *ndr, const char *name, const struct wbint_TransID *r)
     42{
     43        ndr_print_struct(ndr, name, "wbint_TransID");
     44        if (r == NULL) { ndr_print_null(ndr); return; }
     45        ndr->depth++;
     46        ndr_print_id_type(ndr, "type", r->type);
     47        ndr_print_uint32(ndr, "domain_index", r->domain_index);
     48        ndr_print_uint32(ndr, "rid", r->rid);
     49        ndr_print_hyper(ndr, "unix_id", r->unix_id);
     50        ndr->depth--;
     51}
     52
     53static enum ndr_err_code ndr_push_wbint_TransIDArray(struct ndr_push *ndr, int ndr_flags, const struct wbint_TransIDArray *r)
     54{
     55        uint32_t cntr_ids_0;
     56        if (ndr_flags & NDR_SCALARS) {
     57                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_ids));
     58                NDR_CHECK(ndr_push_align(ndr, 8));
     59                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_ids));
     60                for (cntr_ids_0 = 0; cntr_ids_0 < r->num_ids; cntr_ids_0++) {
     61                        NDR_CHECK(ndr_push_wbint_TransID(ndr, NDR_SCALARS, &r->ids[cntr_ids_0]));
     62                }
     63                NDR_CHECK(ndr_push_trailer_align(ndr, 8));
     64        }
     65        if (ndr_flags & NDR_BUFFERS) {
     66        }
     67        return NDR_ERR_SUCCESS;
     68}
     69
     70static enum ndr_err_code ndr_pull_wbint_TransIDArray(struct ndr_pull *ndr, int ndr_flags, struct wbint_TransIDArray *r)
     71{
     72        uint32_t cntr_ids_0;
     73        TALLOC_CTX *_mem_save_ids_0;
     74        if (ndr_flags & NDR_SCALARS) {
     75                NDR_CHECK(ndr_pull_array_size(ndr, &r->ids));
     76                NDR_CHECK(ndr_pull_align(ndr, 8));
     77                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_ids));
     78                NDR_PULL_ALLOC_N(ndr, r->ids, ndr_get_array_size(ndr, &r->ids));
     79                _mem_save_ids_0 = NDR_PULL_GET_MEM_CTX(ndr);
     80                NDR_PULL_SET_MEM_CTX(ndr, r->ids, 0);
     81                for (cntr_ids_0 = 0; cntr_ids_0 < r->num_ids; cntr_ids_0++) {
     82                        NDR_CHECK(ndr_pull_wbint_TransID(ndr, NDR_SCALARS, &r->ids[cntr_ids_0]));
     83                }
     84                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ids_0, 0);
     85                if (r->ids) {
     86                        NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->ids, r->num_ids));
     87                }
     88                NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
     89        }
     90        if (ndr_flags & NDR_BUFFERS) {
     91        }
     92        return NDR_ERR_SUCCESS;
     93}
     94
     95_PUBLIC_ void ndr_print_wbint_TransIDArray(struct ndr_print *ndr, const char *name, const struct wbint_TransIDArray *r)
     96{
     97        uint32_t cntr_ids_0;
     98        ndr_print_struct(ndr, name, "wbint_TransIDArray");
     99        if (r == NULL) { ndr_print_null(ndr); return; }
     100        ndr->depth++;
     101        ndr_print_uint32(ndr, "num_ids", r->num_ids);
     102        ndr->print(ndr, "%s: ARRAY(%d)", "ids", (int)r->num_ids);
     103        ndr->depth++;
     104        for (cntr_ids_0=0;cntr_ids_0<r->num_ids;cntr_ids_0++) {
     105                ndr_print_wbint_TransID(ndr, "ids", &r->ids[cntr_ids_0]);
     106        }
     107        ndr->depth--;
     108        ndr->depth--;
     109}
     110
    8111_PUBLIC_ enum ndr_err_code ndr_push_wbint_userinfo(struct ndr_push *ndr, int ndr_flags, const struct wbint_userinfo *r)
    9112{
     
    145248{
    146249        ndr_print_struct(ndr, name, "wbint_userinfo");
     250        if (r == NULL) { ndr_print_null(ndr); return; }
    147251        ndr->depth++;
    148252        ndr_print_ptr(ndr, "acct_name", r->acct_name);
     
    222326        uint32_t cntr_sids_0;
    223327        ndr_print_struct(ndr, name, "wbint_SidArray");
     328        if (r == NULL) { ndr_print_null(ndr); return; }
    224329        ndr->depth++;
    225330        ndr_print_uint32(ndr, "num_sids", r->num_sids);
     
    227332        ndr->depth++;
    228333        for (cntr_sids_0=0;cntr_sids_0<r->num_sids;cntr_sids_0++) {
    229                 char *idx_0=NULL;
    230                 if (asprintf(&idx_0, "[%d]", cntr_sids_0) != -1) {
    231                         ndr_print_dom_sid(ndr, "sids", &r->sids[cntr_sids_0]);
    232                         free(idx_0);
    233                 }
     334                ndr_print_dom_sid(ndr, "sids", &r->sids[cntr_sids_0]);
    234335        }
    235336        ndr->depth--;
     
    283384        uint32_t cntr_rids_0;
    284385        ndr_print_struct(ndr, name, "wbint_RidArray");
     386        if (r == NULL) { ndr_print_null(ndr); return; }
    285387        ndr->depth++;
    286388        ndr_print_uint32(ndr, "num_rids", r->num_rids);
     
    288390        ndr->depth++;
    289391        for (cntr_rids_0=0;cntr_rids_0<r->num_rids;cntr_rids_0++) {
    290                 char *idx_0=NULL;
    291                 if (asprintf(&idx_0, "[%d]", cntr_rids_0) != -1) {
    292                         ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_0]);
    293                         free(idx_0);
    294                 }
     392                ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_0]);
    295393        }
    296394        ndr->depth--;
     
    354452{
    355453        ndr_print_struct(ndr, name, "wbint_Principal");
     454        if (r == NULL) { ndr_print_null(ndr); return; }
    356455        ndr->depth++;
    357456        ndr_print_dom_sid(ndr, "sid", &r->sid);
     
    421520        uint32_t cntr_principals_0;
    422521        ndr_print_struct(ndr, name, "wbint_Principals");
     522        if (r == NULL) { ndr_print_null(ndr); return; }
    423523        ndr->depth++;
    424524        ndr_print_int32(ndr, "num_principals", r->num_principals);
     
    426526        ndr->depth++;
    427527        for (cntr_principals_0=0;cntr_principals_0<r->num_principals;cntr_principals_0++) {
    428                 char *idx_0=NULL;
    429                 if (asprintf(&idx_0, "[%d]", cntr_principals_0) != -1) {
    430                         ndr_print_wbint_Principal(ndr, "principals", &r->principals[cntr_principals_0]);
    431                         free(idx_0);
    432                 }
     528                ndr_print_wbint_Principal(ndr, "principals", &r->principals[cntr_principals_0]);
    433529        }
    434530        ndr->depth--;
     
    491587        uint32_t cntr_userinfos_0;
    492588        ndr_print_struct(ndr, name, "wbint_userinfos");
     589        if (r == NULL) { ndr_print_null(ndr); return; }
    493590        ndr->depth++;
    494591        ndr_print_uint32(ndr, "num_userinfos", r->num_userinfos);
     
    496593        ndr->depth++;
    497594        for (cntr_userinfos_0=0;cntr_userinfos_0<r->num_userinfos;cntr_userinfos_0++) {
    498                 char *idx_0=NULL;
    499                 if (asprintf(&idx_0, "[%d]", cntr_userinfos_0) != -1) {
    500                         ndr_print_wbint_userinfo(ndr, "userinfos", &r->userinfos[cntr_userinfos_0]);
    501                         free(idx_0);
    502                 }
    503         }
    504         ndr->depth--;
    505         ndr->depth--;
    506 }
    507 
    508 _PUBLIC_ enum ndr_err_code ndr_push_wbint_IdType(struct ndr_push *ndr, int ndr_flags, enum wbint_IdType r)
    509 {
    510         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
    511         return NDR_ERR_SUCCESS;
    512 }
    513 
    514 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_IdType(struct ndr_pull *ndr, int ndr_flags, enum wbint_IdType *r)
    515 {
    516         uint16_t v;
    517         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
    518         *r = v;
    519         return NDR_ERR_SUCCESS;
    520 }
    521 
    522 _PUBLIC_ void ndr_print_wbint_IdType(struct ndr_print *ndr, const char *name, enum wbint_IdType r)
    523 {
    524         const char *val = NULL;
    525 
    526         switch (r) {
    527                 case WBINT_ID_TYPE_NOT_SPECIFIED: val = "WBINT_ID_TYPE_NOT_SPECIFIED"; break;
    528                 case WBINT_ID_TYPE_UID: val = "WBINT_ID_TYPE_UID"; break;
    529                 case WBINT_ID_TYPE_GID: val = "WBINT_ID_TYPE_GID"; break;
    530         }
    531         ndr_print_enum(ndr, name, "ENUM", val, r);
     595                ndr_print_wbint_userinfo(ndr, "userinfos", &r->userinfos[cntr_userinfos_0]);
     596        }
     597        ndr->depth--;
     598        ndr->depth--;
    532599}
    533600
     
    571638{
    572639        ndr_print_struct(ndr, name, "wbint_Ping");
     640        if (r == NULL) { ndr_print_null(ndr); return; }
    573641        ndr->depth++;
    574642        if (flags & NDR_SET_VALUES) {
     
    722790{
    723791        ndr_print_struct(ndr, name, "wbint_LookupSid");
     792        if (r == NULL) { ndr_print_null(ndr); return; }
    724793        ndr->depth++;
    725794        if (flags & NDR_SET_VALUES) {
     
    759828                }
    760829                ndr->depth--;
     830                ndr->depth--;
     831                ndr_print_NTSTATUS(ndr, "result", r->out.result);
     832                ndr->depth--;
     833        }
     834        ndr->depth--;
     835}
     836
     837static enum ndr_err_code ndr_push_wbint_LookupSids(struct ndr_push *ndr, int flags, const struct wbint_LookupSids *r)
     838{
     839        if (flags & NDR_IN) {
     840                if (r->in.sids == NULL) {
     841                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     842                }
     843                NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
     844        }
     845        if (flags & NDR_OUT) {
     846                if (r->out.domains == NULL) {
     847                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     848                }
     849                NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
     850                if (r->out.names == NULL) {
     851                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     852                }
     853                NDR_CHECK(ndr_push_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
     854                NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
     855        }
     856        return NDR_ERR_SUCCESS;
     857}
     858
     859static enum ndr_err_code ndr_pull_wbint_LookupSids(struct ndr_pull *ndr, int flags, struct wbint_LookupSids *r)
     860{
     861        TALLOC_CTX *_mem_save_sids_0;
     862        TALLOC_CTX *_mem_save_domains_0;
     863        TALLOC_CTX *_mem_save_names_0;
     864        if (flags & NDR_IN) {
     865                ZERO_STRUCT(r->out);
     866
     867                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     868                        NDR_PULL_ALLOC(ndr, r->in.sids);
     869                }
     870                _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
     871                NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
     872                NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
     873                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
     874                NDR_PULL_ALLOC(ndr, r->out.domains);
     875                ZERO_STRUCTP(r->out.domains);
     876                NDR_PULL_ALLOC(ndr, r->out.names);
     877                ZERO_STRUCTP(r->out.names);
     878        }
     879        if (flags & NDR_OUT) {
     880                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     881                        NDR_PULL_ALLOC(ndr, r->out.domains);
     882                }
     883                _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
     884                NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
     885                NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
     886                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
     887                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     888                        NDR_PULL_ALLOC(ndr, r->out.names);
     889                }
     890                _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
     891                NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
     892                NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
     893                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
     894                NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
     895        }
     896        return NDR_ERR_SUCCESS;
     897}
     898
     899_PUBLIC_ void ndr_print_wbint_LookupSids(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupSids *r)
     900{
     901        ndr_print_struct(ndr, name, "wbint_LookupSids");
     902        if (r == NULL) { ndr_print_null(ndr); return; }
     903        ndr->depth++;
     904        if (flags & NDR_SET_VALUES) {
     905                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
     906        }
     907        if (flags & NDR_IN) {
     908                ndr_print_struct(ndr, "in", "wbint_LookupSids");
     909                ndr->depth++;
     910                ndr_print_ptr(ndr, "sids", r->in.sids);
     911                ndr->depth++;
     912                ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
     913                ndr->depth--;
     914                ndr->depth--;
     915        }
     916        if (flags & NDR_OUT) {
     917                ndr_print_struct(ndr, "out", "wbint_LookupSids");
     918                ndr->depth++;
     919                ndr_print_ptr(ndr, "domains", r->out.domains);
     920                ndr->depth++;
     921                ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
     922                ndr->depth--;
     923                ndr_print_ptr(ndr, "names", r->out.names);
     924                ndr->depth++;
     925                ndr_print_lsa_TransNameArray(ndr, "names", r->out.names);
    761926                ndr->depth--;
    762927                ndr_print_NTSTATUS(ndr, "result", r->out.result);
     
    8491014{
    8501015        ndr_print_struct(ndr, name, "wbint_LookupName");
     1016        if (r == NULL) { ndr_print_null(ndr); return; }
    8511017        ndr->depth++;
    8521018        if (flags & NDR_SET_VALUES) {
     
    9621128{
    9631129        ndr_print_struct(ndr, name, "wbint_Sid2Uid");
     1130        if (r == NULL) { ndr_print_null(ndr); return; }
    9641131        ndr->depth++;
    9651132        if (flags & NDR_SET_VALUES) {
     
    10721239{
    10731240        ndr_print_struct(ndr, name, "wbint_Sid2Gid");
     1241        if (r == NULL) { ndr_print_null(ndr); return; }
    10741242        ndr->depth++;
    10751243        if (flags & NDR_SET_VALUES) {
     
    10971265                ndr->depth++;
    10981266                ndr_print_hyper(ndr, "gid", *r->out.gid);
     1267                ndr->depth--;
     1268                ndr_print_NTSTATUS(ndr, "result", r->out.result);
     1269                ndr->depth--;
     1270        }
     1271        ndr->depth--;
     1272}
     1273
     1274static enum ndr_err_code ndr_push_wbint_Sids2UnixIDs(struct ndr_push *ndr, int flags, const struct wbint_Sids2UnixIDs *r)
     1275{
     1276        if (flags & NDR_IN) {
     1277                if (r->in.domains == NULL) {
     1278                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     1279                }
     1280                NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domains));
     1281                if (r->in.ids == NULL) {
     1282                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     1283                }
     1284                NDR_CHECK(ndr_push_wbint_TransIDArray(ndr, NDR_SCALARS, r->in.ids));
     1285        }
     1286        if (flags & NDR_OUT) {
     1287                if (r->out.ids == NULL) {
     1288                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     1289                }
     1290                NDR_CHECK(ndr_push_wbint_TransIDArray(ndr, NDR_SCALARS, r->out.ids));
     1291                NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
     1292        }
     1293        return NDR_ERR_SUCCESS;
     1294}
     1295
     1296static enum ndr_err_code ndr_pull_wbint_Sids2UnixIDs(struct ndr_pull *ndr, int flags, struct wbint_Sids2UnixIDs *r)
     1297{
     1298        TALLOC_CTX *_mem_save_domains_0;
     1299        TALLOC_CTX *_mem_save_ids_0;
     1300        if (flags & NDR_IN) {
     1301                ZERO_STRUCT(r->out);
     1302
     1303                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     1304                        NDR_PULL_ALLOC(ndr, r->in.domains);
     1305                }
     1306                _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
     1307                NDR_PULL_SET_MEM_CTX(ndr, r->in.domains, LIBNDR_FLAG_REF_ALLOC);
     1308                NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domains));
     1309                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
     1310                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     1311                        NDR_PULL_ALLOC(ndr, r->in.ids);
     1312                }
     1313                _mem_save_ids_0 = NDR_PULL_GET_MEM_CTX(ndr);
     1314                NDR_PULL_SET_MEM_CTX(ndr, r->in.ids, LIBNDR_FLAG_REF_ALLOC);
     1315                NDR_CHECK(ndr_pull_wbint_TransIDArray(ndr, NDR_SCALARS, r->in.ids));
     1316                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ids_0, LIBNDR_FLAG_REF_ALLOC);
     1317                NDR_PULL_ALLOC(ndr, r->out.ids);
     1318                *r->out.ids = *r->in.ids;
     1319        }
     1320        if (flags & NDR_OUT) {
     1321                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     1322                        NDR_PULL_ALLOC(ndr, r->out.ids);
     1323                }
     1324                _mem_save_ids_0 = NDR_PULL_GET_MEM_CTX(ndr);
     1325                NDR_PULL_SET_MEM_CTX(ndr, r->out.ids, LIBNDR_FLAG_REF_ALLOC);
     1326                NDR_CHECK(ndr_pull_wbint_TransIDArray(ndr, NDR_SCALARS, r->out.ids));
     1327                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ids_0, LIBNDR_FLAG_REF_ALLOC);
     1328                NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
     1329        }
     1330        return NDR_ERR_SUCCESS;
     1331}
     1332
     1333_PUBLIC_ void ndr_print_wbint_Sids2UnixIDs(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Sids2UnixIDs *r)
     1334{
     1335        ndr_print_struct(ndr, name, "wbint_Sids2UnixIDs");
     1336        if (r == NULL) { ndr_print_null(ndr); return; }
     1337        ndr->depth++;
     1338        if (flags & NDR_SET_VALUES) {
     1339                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
     1340        }
     1341        if (flags & NDR_IN) {
     1342                ndr_print_struct(ndr, "in", "wbint_Sids2UnixIDs");
     1343                ndr->depth++;
     1344                ndr_print_ptr(ndr, "domains", r->in.domains);
     1345                ndr->depth++;
     1346                ndr_print_lsa_RefDomainList(ndr, "domains", r->in.domains);
     1347                ndr->depth--;
     1348                ndr_print_ptr(ndr, "ids", r->in.ids);
     1349                ndr->depth++;
     1350                ndr_print_wbint_TransIDArray(ndr, "ids", r->in.ids);
     1351                ndr->depth--;
     1352                ndr->depth--;
     1353        }
     1354        if (flags & NDR_OUT) {
     1355                ndr_print_struct(ndr, "out", "wbint_Sids2UnixIDs");
     1356                ndr->depth++;
     1357                ndr_print_ptr(ndr, "ids", r->out.ids);
     1358                ndr->depth++;
     1359                ndr_print_wbint_TransIDArray(ndr, "ids", r->out.ids);
    10991360                ndr->depth--;
    11001361                ndr_print_NTSTATUS(ndr, "result", r->out.result);
     
    11721433{
    11731434        ndr_print_struct(ndr, name, "wbint_Uid2Sid");
     1435        if (r == NULL) { ndr_print_null(ndr); return; }
    11741436        ndr->depth++;
    11751437        if (flags & NDR_SET_VALUES) {
     
    12691531{
    12701532        ndr_print_struct(ndr, name, "wbint_Gid2Sid");
     1533        if (r == NULL) { ndr_print_null(ndr); return; }
    12711534        ndr->depth++;
    12721535        if (flags & NDR_SET_VALUES) {
     
    13371600{
    13381601        ndr_print_struct(ndr, name, "wbint_AllocateUid");
     1602        if (r == NULL) { ndr_print_null(ndr); return; }
    13391603        ndr->depth++;
    13401604        if (flags & NDR_SET_VALUES) {
     
    13981662{
    13991663        ndr_print_struct(ndr, name, "wbint_AllocateGid");
     1664        if (r == NULL) { ndr_print_null(ndr); return; }
    14001665        ndr->depth++;
    14011666        if (flags & NDR_SET_VALUES) {
     
    14711736{
    14721737        ndr_print_struct(ndr, name, "wbint_QueryUser");
     1738        if (r == NULL) { ndr_print_null(ndr); return; }
    14731739        ndr->depth++;
    14741740        if (flags & NDR_SET_VALUES) {
     
    15481814{
    15491815        ndr_print_struct(ndr, name, "wbint_LookupUserAliases");
     1816        if (r == NULL) { ndr_print_null(ndr); return; }
    15501817        ndr->depth++;
    15511818        if (flags & NDR_SET_VALUES) {
     
    16251892{
    16261893        ndr_print_struct(ndr, name, "wbint_LookupUserGroups");
     1894        if (r == NULL) { ndr_print_null(ndr); return; }
    16271895        ndr->depth++;
    16281896        if (flags & NDR_SET_VALUES) {
     
    16901958{
    16911959        ndr_print_struct(ndr, name, "wbint_QuerySequenceNumber");
     1960        if (r == NULL) { ndr_print_null(ndr); return; }
    16921961        ndr->depth++;
    16931962        if (flags & NDR_SET_VALUES) {
     
    17652034{
    17662035        ndr_print_struct(ndr, name, "wbint_LookupGroupMembers");
     2036        if (r == NULL) { ndr_print_null(ndr); return; }
    17672037        ndr->depth++;
    17682038        if (flags & NDR_SET_VALUES) {
     
    18312101{
    18322102        ndr_print_struct(ndr, name, "wbint_QueryUserList");
     2103        if (r == NULL) { ndr_print_null(ndr); return; }
    18332104        ndr->depth++;
    18342105        if (flags & NDR_SET_VALUES) {
     
    18922163{
    18932164        ndr_print_struct(ndr, name, "wbint_QueryGroupList");
     2165        if (r == NULL) { ndr_print_null(ndr); return; }
    18942166        ndr->depth++;
    18952167        if (flags & NDR_SET_VALUES) {
     
    20302302{
    20312303        ndr_print_struct(ndr, name, "wbint_DsGetDcName");
     2304        if (r == NULL) { ndr_print_null(ndr); return; }
    20322305        ndr->depth++;
    20332306        if (flags & NDR_SET_VALUES) {
     
    21762449{
    21772450        ndr_print_struct(ndr, name, "wbint_LookupRids");
     2451        if (r == NULL) { ndr_print_null(ndr); return; }
    21782452        ndr->depth++;
    21792453        if (flags & NDR_SET_VALUES) {
     
    22382512{
    22392513        ndr_print_struct(ndr, name, "wbint_CheckMachineAccount");
     2514        if (r == NULL) { ndr_print_null(ndr); return; }
    22402515        ndr->depth++;
    22412516        if (flags & NDR_SET_VALUES) {
     
    22792554{
    22802555        ndr_print_struct(ndr, name, "wbint_ChangeMachineAccount");
     2556        if (r == NULL) { ndr_print_null(ndr); return; }
    22812557        ndr->depth++;
    22822558        if (flags & NDR_SET_VALUES) {
     
    23202596{
    23212597        ndr_print_struct(ndr, name, "wbint_PingDc");
     2598        if (r == NULL) { ndr_print_null(ndr); return; }
    23222599        ndr->depth++;
    23232600        if (flags & NDR_SET_VALUES) {
     
    23312608        if (flags & NDR_OUT) {
    23322609                ndr_print_struct(ndr, "out", "wbint_PingDc");
    2333                 ndr->depth++;
    2334                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    2335                 ndr->depth--;
    2336         }
    2337         ndr->depth--;
    2338 }
    2339 
    2340 static enum ndr_err_code ndr_push_wbint_SetMapping(struct ndr_push *ndr, int flags, const struct wbint_SetMapping *r)
    2341 {
    2342         if (flags & NDR_IN) {
    2343                 if (r->in.sid == NULL) {
    2344                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    2345                 }
    2346                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
    2347                 NDR_CHECK(ndr_push_wbint_IdType(ndr, NDR_SCALARS, r->in.type));
    2348                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.id));
    2349         }
    2350         if (flags & NDR_OUT) {
    2351                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    2352         }
    2353         return NDR_ERR_SUCCESS;
    2354 }
    2355 
    2356 static enum ndr_err_code ndr_pull_wbint_SetMapping(struct ndr_pull *ndr, int flags, struct wbint_SetMapping *r)
    2357 {
    2358         TALLOC_CTX *_mem_save_sid_0;
    2359         if (flags & NDR_IN) {
    2360                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    2361                         NDR_PULL_ALLOC(ndr, r->in.sid);
    2362                 }
    2363                 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2364                 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
    2365                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
    2366                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
    2367                 NDR_CHECK(ndr_pull_wbint_IdType(ndr, NDR_SCALARS, &r->in.type));
    2368                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.id));
    2369         }
    2370         if (flags & NDR_OUT) {
    2371                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    2372         }
    2373         return NDR_ERR_SUCCESS;
    2374 }
    2375 
    2376 _PUBLIC_ void ndr_print_wbint_SetMapping(struct ndr_print *ndr, const char *name, int flags, const struct wbint_SetMapping *r)
    2377 {
    2378         ndr_print_struct(ndr, name, "wbint_SetMapping");
    2379         ndr->depth++;
    2380         if (flags & NDR_SET_VALUES) {
    2381                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    2382         }
    2383         if (flags & NDR_IN) {
    2384                 ndr_print_struct(ndr, "in", "wbint_SetMapping");
    2385                 ndr->depth++;
    2386                 ndr_print_ptr(ndr, "sid", r->in.sid);
    2387                 ndr->depth++;
    2388                 ndr_print_dom_sid(ndr, "sid", r->in.sid);
    2389                 ndr->depth--;
    2390                 ndr_print_wbint_IdType(ndr, "type", r->in.type);
    2391                 ndr_print_hyper(ndr, "id", r->in.id);
    2392                 ndr->depth--;
    2393         }
    2394         if (flags & NDR_OUT) {
    2395                 ndr_print_struct(ndr, "out", "wbint_SetMapping");
    2396                 ndr->depth++;
    2397                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    2398                 ndr->depth--;
    2399         }
    2400         ndr->depth--;
    2401 }
    2402 
    2403 static enum ndr_err_code ndr_push_wbint_RemoveMapping(struct ndr_push *ndr, int flags, const struct wbint_RemoveMapping *r)
    2404 {
    2405         if (flags & NDR_IN) {
    2406                 if (r->in.sid == NULL) {
    2407                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    2408                 }
    2409                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
    2410                 NDR_CHECK(ndr_push_wbint_IdType(ndr, NDR_SCALARS, r->in.type));
    2411                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.id));
    2412         }
    2413         if (flags & NDR_OUT) {
    2414                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    2415         }
    2416         return NDR_ERR_SUCCESS;
    2417 }
    2418 
    2419 static enum ndr_err_code ndr_pull_wbint_RemoveMapping(struct ndr_pull *ndr, int flags, struct wbint_RemoveMapping *r)
    2420 {
    2421         TALLOC_CTX *_mem_save_sid_0;
    2422         if (flags & NDR_IN) {
    2423                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    2424                         NDR_PULL_ALLOC(ndr, r->in.sid);
    2425                 }
    2426                 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2427                 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
    2428                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
    2429                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
    2430                 NDR_CHECK(ndr_pull_wbint_IdType(ndr, NDR_SCALARS, &r->in.type));
    2431                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.id));
    2432         }
    2433         if (flags & NDR_OUT) {
    2434                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    2435         }
    2436         return NDR_ERR_SUCCESS;
    2437 }
    2438 
    2439 _PUBLIC_ void ndr_print_wbint_RemoveMapping(struct ndr_print *ndr, const char *name, int flags, const struct wbint_RemoveMapping *r)
    2440 {
    2441         ndr_print_struct(ndr, name, "wbint_RemoveMapping");
    2442         ndr->depth++;
    2443         if (flags & NDR_SET_VALUES) {
    2444                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    2445         }
    2446         if (flags & NDR_IN) {
    2447                 ndr_print_struct(ndr, "in", "wbint_RemoveMapping");
    2448                 ndr->depth++;
    2449                 ndr_print_ptr(ndr, "sid", r->in.sid);
    2450                 ndr->depth++;
    2451                 ndr_print_dom_sid(ndr, "sid", r->in.sid);
    2452                 ndr->depth--;
    2453                 ndr_print_wbint_IdType(ndr, "type", r->in.type);
    2454                 ndr_print_hyper(ndr, "id", r->in.id);
    2455                 ndr->depth--;
    2456         }
    2457         if (flags & NDR_OUT) {
    2458                 ndr_print_struct(ndr, "out", "wbint_RemoveMapping");
    2459                 ndr->depth++;
    2460                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    2461                 ndr->depth--;
    2462         }
    2463         ndr->depth--;
    2464 }
    2465 
    2466 static enum ndr_err_code ndr_push_wbint_SetHWM(struct ndr_push *ndr, int flags, const struct wbint_SetHWM *r)
    2467 {
    2468         if (flags & NDR_IN) {
    2469                 NDR_CHECK(ndr_push_wbint_IdType(ndr, NDR_SCALARS, r->in.type));
    2470                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.id));
    2471         }
    2472         if (flags & NDR_OUT) {
    2473                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    2474         }
    2475         return NDR_ERR_SUCCESS;
    2476 }
    2477 
    2478 static enum ndr_err_code ndr_pull_wbint_SetHWM(struct ndr_pull *ndr, int flags, struct wbint_SetHWM *r)
    2479 {
    2480         if (flags & NDR_IN) {
    2481                 NDR_CHECK(ndr_pull_wbint_IdType(ndr, NDR_SCALARS, &r->in.type));
    2482                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.id));
    2483         }
    2484         if (flags & NDR_OUT) {
    2485                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    2486         }
    2487         return NDR_ERR_SUCCESS;
    2488 }
    2489 
    2490 _PUBLIC_ void ndr_print_wbint_SetHWM(struct ndr_print *ndr, const char *name, int flags, const struct wbint_SetHWM *r)
    2491 {
    2492         ndr_print_struct(ndr, name, "wbint_SetHWM");
    2493         ndr->depth++;
    2494         if (flags & NDR_SET_VALUES) {
    2495                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    2496         }
    2497         if (flags & NDR_IN) {
    2498                 ndr_print_struct(ndr, "in", "wbint_SetHWM");
    2499                 ndr->depth++;
    2500                 ndr_print_wbint_IdType(ndr, "type", r->in.type);
    2501                 ndr_print_hyper(ndr, "id", r->in.id);
    2502                 ndr->depth--;
    2503         }
    2504         if (flags & NDR_OUT) {
    2505                 ndr_print_struct(ndr, "out", "wbint_SetHWM");
    25062610                ndr->depth++;
    25072611                ndr_print_NTSTATUS(ndr, "result", r->out.result);
     
    25182622                (ndr_pull_flags_fn_t) ndr_pull_wbint_Ping,
    25192623                (ndr_print_function_t) ndr_print_wbint_Ping,
    2520                 false,
     2624                { 0, NULL },
     2625                { 0, NULL },
    25212626        },
    25222627        {
     
    25262631                (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupSid,
    25272632                (ndr_print_function_t) ndr_print_wbint_LookupSid,
    2528                 false,
     2633                { 0, NULL },
     2634                { 0, NULL },
     2635        },
     2636        {
     2637                "wbint_LookupSids",
     2638                sizeof(struct wbint_LookupSids),
     2639                (ndr_push_flags_fn_t) ndr_push_wbint_LookupSids,
     2640                (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupSids,
     2641                (ndr_print_function_t) ndr_print_wbint_LookupSids,
     2642                { 0, NULL },
     2643                { 0, NULL },
    25292644        },
    25302645        {
     
    25342649                (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupName,
    25352650                (ndr_print_function_t) ndr_print_wbint_LookupName,
    2536                 false,
     2651                { 0, NULL },
     2652                { 0, NULL },
    25372653        },
    25382654        {
     
    25422658                (ndr_pull_flags_fn_t) ndr_pull_wbint_Sid2Uid,
    25432659                (ndr_print_function_t) ndr_print_wbint_Sid2Uid,
    2544                 false,
     2660                { 0, NULL },
     2661                { 0, NULL },
    25452662        },
    25462663        {
     
    25502667                (ndr_pull_flags_fn_t) ndr_pull_wbint_Sid2Gid,
    25512668                (ndr_print_function_t) ndr_print_wbint_Sid2Gid,
    2552                 false,
     2669                { 0, NULL },
     2670                { 0, NULL },
     2671        },
     2672        {
     2673                "wbint_Sids2UnixIDs",
     2674                sizeof(struct wbint_Sids2UnixIDs),
     2675                (ndr_push_flags_fn_t) ndr_push_wbint_Sids2UnixIDs,
     2676                (ndr_pull_flags_fn_t) ndr_pull_wbint_Sids2UnixIDs,
     2677                (ndr_print_function_t) ndr_print_wbint_Sids2UnixIDs,
     2678                { 0, NULL },
     2679                { 0, NULL },
    25532680        },
    25542681        {
     
    25582685                (ndr_pull_flags_fn_t) ndr_pull_wbint_Uid2Sid,
    25592686                (ndr_print_function_t) ndr_print_wbint_Uid2Sid,
    2560                 false,
     2687                { 0, NULL },
     2688                { 0, NULL },
    25612689        },
    25622690        {
     
    25662694                (ndr_pull_flags_fn_t) ndr_pull_wbint_Gid2Sid,
    25672695                (ndr_print_function_t) ndr_print_wbint_Gid2Sid,
    2568                 false,
     2696                { 0, NULL },
     2697                { 0, NULL },
    25692698        },
    25702699        {
     
    25742703                (ndr_pull_flags_fn_t) ndr_pull_wbint_AllocateUid,
    25752704                (ndr_print_function_t) ndr_print_wbint_AllocateUid,
    2576                 false,
     2705                { 0, NULL },
     2706                { 0, NULL },
    25772707        },
    25782708        {
     
    25822712                (ndr_pull_flags_fn_t) ndr_pull_wbint_AllocateGid,
    25832713                (ndr_print_function_t) ndr_print_wbint_AllocateGid,
    2584                 false,
     2714                { 0, NULL },
     2715                { 0, NULL },
    25852716        },
    25862717        {
     
    25902721                (ndr_pull_flags_fn_t) ndr_pull_wbint_QueryUser,
    25912722                (ndr_print_function_t) ndr_print_wbint_QueryUser,
    2592                 false,
     2723                { 0, NULL },
     2724                { 0, NULL },
    25932725        },
    25942726        {
     
    25982730                (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupUserAliases,
    25992731                (ndr_print_function_t) ndr_print_wbint_LookupUserAliases,
    2600                 false,
     2732                { 0, NULL },
     2733                { 0, NULL },
    26012734        },
    26022735        {
     
    26062739                (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupUserGroups,
    26072740                (ndr_print_function_t) ndr_print_wbint_LookupUserGroups,
    2608                 false,
     2741                { 0, NULL },
     2742                { 0, NULL },
    26092743        },
    26102744        {
     
    26142748                (ndr_pull_flags_fn_t) ndr_pull_wbint_QuerySequenceNumber,
    26152749                (ndr_print_function_t) ndr_print_wbint_QuerySequenceNumber,
    2616                 false,
     2750                { 0, NULL },
     2751                { 0, NULL },
    26172752        },
    26182753        {
     
    26222757                (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupGroupMembers,
    26232758                (ndr_print_function_t) ndr_print_wbint_LookupGroupMembers,
    2624                 false,
     2759                { 0, NULL },
     2760                { 0, NULL },
    26252761        },
    26262762        {
     
    26302766                (ndr_pull_flags_fn_t) ndr_pull_wbint_QueryUserList,
    26312767                (ndr_print_function_t) ndr_print_wbint_QueryUserList,
    2632                 false,
     2768                { 0, NULL },
     2769                { 0, NULL },
    26332770        },
    26342771        {
     
    26382775                (ndr_pull_flags_fn_t) ndr_pull_wbint_QueryGroupList,
    26392776                (ndr_print_function_t) ndr_print_wbint_QueryGroupList,
    2640                 false,
     2777                { 0, NULL },
     2778                { 0, NULL },
    26412779        },
    26422780        {
     
    26462784                (ndr_pull_flags_fn_t) ndr_pull_wbint_DsGetDcName,
    26472785                (ndr_print_function_t) ndr_print_wbint_DsGetDcName,
    2648                 false,
     2786                { 0, NULL },
     2787                { 0, NULL },
    26492788        },
    26502789        {
     
    26542793                (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupRids,
    26552794                (ndr_print_function_t) ndr_print_wbint_LookupRids,
    2656                 false,
     2795                { 0, NULL },
     2796                { 0, NULL },
    26572797        },
    26582798        {
     
    26622802                (ndr_pull_flags_fn_t) ndr_pull_wbint_CheckMachineAccount,
    26632803                (ndr_print_function_t) ndr_print_wbint_CheckMachineAccount,
    2664                 false,
     2804                { 0, NULL },
     2805                { 0, NULL },
    26652806        },
    26662807        {
     
    26702811                (ndr_pull_flags_fn_t) ndr_pull_wbint_ChangeMachineAccount,
    26712812                (ndr_print_function_t) ndr_print_wbint_ChangeMachineAccount,
    2672                 false,
     2813                { 0, NULL },
     2814                { 0, NULL },
    26732815        },
    26742816        {
     
    26782820                (ndr_pull_flags_fn_t) ndr_pull_wbint_PingDc,
    26792821                (ndr_print_function_t) ndr_print_wbint_PingDc,
    2680                 false,
     2822                { 0, NULL },
     2823                { 0, NULL },
    26812824        },
    2682         {
    2683                 "wbint_SetMapping",
    2684                 sizeof(struct wbint_SetMapping),
    2685                 (ndr_push_flags_fn_t) ndr_push_wbint_SetMapping,
    2686                 (ndr_pull_flags_fn_t) ndr_pull_wbint_SetMapping,
    2687                 (ndr_print_function_t) ndr_print_wbint_SetMapping,
    2688                 false,
    2689         },
    2690         {
    2691                 "wbint_RemoveMapping",
    2692                 sizeof(struct wbint_RemoveMapping),
    2693                 (ndr_push_flags_fn_t) ndr_push_wbint_RemoveMapping,
    2694                 (ndr_pull_flags_fn_t) ndr_pull_wbint_RemoveMapping,
    2695                 (ndr_print_function_t) ndr_print_wbint_RemoveMapping,
    2696                 false,
    2697         },
    2698         {
    2699                 "wbint_SetHWM",
    2700                 sizeof(struct wbint_SetHWM),
    2701                 (ndr_push_flags_fn_t) ndr_push_wbint_SetHWM,
    2702                 (ndr_pull_flags_fn_t) ndr_pull_wbint_SetHWM,
    2703                 (ndr_print_function_t) ndr_print_wbint_SetHWM,
    2704                 false,
    2705         },
    2706         { NULL, 0, NULL, NULL, NULL, false }
     2825        { NULL, 0, NULL, NULL, NULL }
    27072826};
    27082827
     
    27332852        },
    27342853        .helpstring     = NDR_WBINT_HELPSTRING,
    2735         .num_calls      = 24,
     2854        .num_calls      = 23,
    27362855        .calls          = wbint_calls,
    27372856        .endpoints      = &wbint_endpoints,
  • vendor/current/source3/librpc/gen_ndr/ndr_wbint.h

    r414 r740  
    1616#define NDR_WBINT_LOOKUPSID (0x01)
    1717
    18 #define NDR_WBINT_LOOKUPNAME (0x02)
     18#define NDR_WBINT_LOOKUPSIDS (0x02)
    1919
    20 #define NDR_WBINT_SID2UID (0x03)
     20#define NDR_WBINT_LOOKUPNAME (0x03)
    2121
    22 #define NDR_WBINT_SID2GID (0x04)
     22#define NDR_WBINT_SID2UID (0x04)
    2323
    24 #define NDR_WBINT_UID2SID (0x05)
     24#define NDR_WBINT_SID2GID (0x05)
    2525
    26 #define NDR_WBINT_GID2SID (0x06)
     26#define NDR_WBINT_SIDS2UNIXIDS (0x06)
    2727
    28 #define NDR_WBINT_ALLOCATEUID (0x07)
     28#define NDR_WBINT_UID2SID (0x07)
    2929
    30 #define NDR_WBINT_ALLOCATEGID (0x08)
     30#define NDR_WBINT_GID2SID (0x08)
    3131
    32 #define NDR_WBINT_QUERYUSER (0x09)
     32#define NDR_WBINT_ALLOCATEUID (0x09)
    3333
    34 #define NDR_WBINT_LOOKUPUSERALIASES (0x0a)
     34#define NDR_WBINT_ALLOCATEGID (0x0a)
    3535
    36 #define NDR_WBINT_LOOKUPUSERGROUPS (0x0b)
     36#define NDR_WBINT_QUERYUSER (0x0b)
    3737
    38 #define NDR_WBINT_QUERYSEQUENCENUMBER (0x0c)
     38#define NDR_WBINT_LOOKUPUSERALIASES (0x0c)
    3939
    40 #define NDR_WBINT_LOOKUPGROUPMEMBERS (0x0d)
     40#define NDR_WBINT_LOOKUPUSERGROUPS (0x0d)
    4141
    42 #define NDR_WBINT_QUERYUSERLIST (0x0e)
     42#define NDR_WBINT_QUERYSEQUENCENUMBER (0x0e)
    4343
    44 #define NDR_WBINT_QUERYGROUPLIST (0x0f)
     44#define NDR_WBINT_LOOKUPGROUPMEMBERS (0x0f)
    4545
    46 #define NDR_WBINT_DSGETDCNAME (0x10)
     46#define NDR_WBINT_QUERYUSERLIST (0x10)
    4747
    48 #define NDR_WBINT_LOOKUPRIDS (0x11)
     48#define NDR_WBINT_QUERYGROUPLIST (0x11)
    4949
    50 #define NDR_WBINT_CHECKMACHINEACCOUNT (0x12)
     50#define NDR_WBINT_DSGETDCNAME (0x12)
    5151
    52 #define NDR_WBINT_CHANGEMACHINEACCOUNT (0x13)
     52#define NDR_WBINT_LOOKUPRIDS (0x13)
    5353
    54 #define NDR_WBINT_PINGDC (0x14)
     54#define NDR_WBINT_CHECKMACHINEACCOUNT (0x14)
    5555
    56 #define NDR_WBINT_SETMAPPING (0x15)
     56#define NDR_WBINT_CHANGEMACHINEACCOUNT (0x15)
    5757
    58 #define NDR_WBINT_REMOVEMAPPING (0x16)
     58#define NDR_WBINT_PINGDC (0x16)
    5959
    60 #define NDR_WBINT_SETHWM (0x17)
    61 
    62 #define NDR_WBINT_CALL_COUNT (24)
     60#define NDR_WBINT_CALL_COUNT (23)
     61void ndr_print_wbint_TransID(struct ndr_print *ndr, const char *name, const struct wbint_TransID *r);
     62void ndr_print_wbint_TransIDArray(struct ndr_print *ndr, const char *name, const struct wbint_TransIDArray *r);
    6363enum ndr_err_code ndr_push_wbint_userinfo(struct ndr_push *ndr, int ndr_flags, const struct wbint_userinfo *r);
    6464enum ndr_err_code ndr_pull_wbint_userinfo(struct ndr_pull *ndr, int ndr_flags, struct wbint_userinfo *r);
     
    7979enum ndr_err_code ndr_pull_wbint_userinfos(struct ndr_pull *ndr, int ndr_flags, struct wbint_userinfos *r);
    8080void ndr_print_wbint_userinfos(struct ndr_print *ndr, const char *name, const struct wbint_userinfos *r);
    81 enum ndr_err_code ndr_push_wbint_IdType(struct ndr_push *ndr, int ndr_flags, enum wbint_IdType r);
    82 enum ndr_err_code ndr_pull_wbint_IdType(struct ndr_pull *ndr, int ndr_flags, enum wbint_IdType *r);
    83 void ndr_print_wbint_IdType(struct ndr_print *ndr, const char *name, enum wbint_IdType r);
    8481void ndr_print_wbint_Ping(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Ping *r);
    8582void ndr_print_wbint_LookupSid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupSid *r);
     83void ndr_print_wbint_LookupSids(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupSids *r);
    8684void ndr_print_wbint_LookupName(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupName *r);
    8785void ndr_print_wbint_Sid2Uid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Sid2Uid *r);
    8886void ndr_print_wbint_Sid2Gid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Sid2Gid *r);
     87void ndr_print_wbint_Sids2UnixIDs(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Sids2UnixIDs *r);
    8988void ndr_print_wbint_Uid2Sid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Uid2Sid *r);
    9089void ndr_print_wbint_Gid2Sid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Gid2Sid *r);
     
    103102void ndr_print_wbint_ChangeMachineAccount(struct ndr_print *ndr, const char *name, int flags, const struct wbint_ChangeMachineAccount *r);
    104103void ndr_print_wbint_PingDc(struct ndr_print *ndr, const char *name, int flags, const struct wbint_PingDc *r);
    105 void ndr_print_wbint_SetMapping(struct ndr_print *ndr, const char *name, int flags, const struct wbint_SetMapping *r);
    106 void ndr_print_wbint_RemoveMapping(struct ndr_print *ndr, const char *name, int flags, const struct wbint_RemoveMapping *r);
    107 void ndr_print_wbint_SetHWM(struct ndr_print *ndr, const char *name, int flags, const struct wbint_SetHWM *r);
    108104#endif /* _HEADER_NDR_wbint */
  • vendor/current/source3/librpc/gen_ndr/notify.h

    r414 r740  
    11/* header auto-generated by pidl */
     2
     3#ifndef _PIDL_HEADER_notify
     4#define _PIDL_HEADER_notify
    25
    36#include <stdint.h>
     
    58#include "libcli/util/ntstatus.h"
    69
     10#include "librpc/gen_ndr/file_id.h"
     11#include "librpc/gen_ndr/server_id.h"
    712#ifndef _HEADER_notify
    813#define _HEADER_notify
     
    4247}/* [public] */;
    4348
     49enum FILE_NOTIFY_ACTION
     50#ifndef USE_UINT_ENUMS
     51 {
     52        FILE_ACTION_ADDED=(int)(0x00000001),
     53        FILE_ACTION_REMOVED=(int)(0x00000002),
     54        FILE_ACTION_MODIFIED=(int)(0x00000003),
     55        FILE_ACTION_RENAMED_OLD_NAME=(int)(0x00000004),
     56        FILE_ACTION_RENAMED_NEW_NAME=(int)(0x00000005),
     57        FILE_ACTION_ADDED_STREAM=(int)(0x00000006),
     58        FILE_ACTION_REMOVED_STREAM=(int)(0x00000007),
     59        FILE_ACTION_MODIFIED_STREAM=(int)(0x00000008)
     60}
     61#else
     62 { __donnot_use_enum_FILE_NOTIFY_ACTION=0x7FFFFFFF}
     63#define FILE_ACTION_ADDED ( 0x00000001 )
     64#define FILE_ACTION_REMOVED ( 0x00000002 )
     65#define FILE_ACTION_MODIFIED ( 0x00000003 )
     66#define FILE_ACTION_RENAMED_OLD_NAME ( 0x00000004 )
     67#define FILE_ACTION_RENAMED_NEW_NAME ( 0x00000005 )
     68#define FILE_ACTION_ADDED_STREAM ( 0x00000006 )
     69#define FILE_ACTION_REMOVED_STREAM ( 0x00000007 )
     70#define FILE_ACTION_MODIFIED_STREAM ( 0x00000008 )
     71#endif
     72;
     73
     74struct FILE_NOTIFY_INFORMATION {
     75        uint32_t NextEntryOffset;
     76        enum FILE_NOTIFY_ACTION Action;
     77        uint32_t FileNameLength;/* [value(strlen_m(FileName1)*2)] */
     78        const char *FileName1;/* [charset(UTF16),flag(LIBNDR_FLAG_STR_NOTERM)] */
     79}/* [gensize,public,flag(LIBNDR_FLAG_ALIGN4)] */;
     80
    4481#endif /* _HEADER_notify */
     82#endif /* _PIDL_HEADER_notify */
  • vendor/current/source3/librpc/gen_ndr/perfcount.h

    r414 r740  
    11/* header auto-generated by pidl */
     2
     3#ifndef _PIDL_HEADER_perfcount
     4#define _PIDL_HEADER_perfcount
    25
    36#include <stdint.h>
     
    128131
    129132#endif /* _HEADER_perfcount */
     133#endif /* _PIDL_HEADER_perfcount */
  • vendor/current/source3/librpc/gen_ndr/printcap.h

    r600 r740  
    11/* header auto-generated by pidl */
     2
     3#ifndef _PIDL_HEADER_printcap
     4#define _PIDL_HEADER_printcap
    25
    36#include <stdint.h>
     
    1114        const char *name;/* [unique,charset(UTF8)] */
    1215        const char *info;/* [unique,charset(UTF8)] */
     16        const char *location;/* [unique,charset(UTF8)] */
    1317};
    1418
     
    2024
    2125#endif /* _HEADER_printcap */
     26#endif /* _PIDL_HEADER_printcap */
  • vendor/current/source3/librpc/gen_ndr/secrets.h

    r414 r740  
    11/* header auto-generated by pidl */
     2
     3#ifndef _PIDL_HEADER_secrets
     4#define _PIDL_HEADER_secrets
    25
    36#include <stdint.h>
     
    58#include "libcli/util/ntstatus.h"
    69
     10#include "librpc/gen_ndr/security.h"
    711#ifndef _HEADER_secrets
    812#define _HEADER_secrets
     
    1822
    1923#endif /* _HEADER_secrets */
     24#endif /* _PIDL_HEADER_secrets */
  • vendor/current/source3/librpc/gen_ndr/srv_wbint.c

    r594 r740  
    55
    66#include "includes.h"
     7#include "ntdomain.h"
    78#include "librpc/gen_ndr/srv_wbint.h"
    89
    9 static bool api_wbint_Ping(pipes_struct *p)
    10 {
    11         const struct ndr_interface_call *call;
    12         struct ndr_pull *pull;
    13         struct ndr_push *push;
    14         enum ndr_err_code ndr_err;
    15         DATA_BLOB blob;
     10static bool api_wbint_Ping(struct pipes_struct *p)
     11{
     12        const struct ndr_interface_call *call;
     13        struct ndr_pull *pull;
     14        struct ndr_push *push;
     15        enum ndr_err_code ndr_err;
    1616        struct wbint_Ping *r;
    1717
     
    2323        }
    2424
    25         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    26                 talloc_free(r);
    27                 return false;
    28         }
    29 
    30         pull = ndr_pull_init_blob(&blob, r, NULL);
    31         if (pull == NULL) {
    32                 talloc_free(r);
    33                 return false;
    34         }
    35 
    36         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    37         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    38         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    39                 talloc_free(r);
    40                 return false;
    41         }
    42 
    43         if (DEBUGLEVEL >= 10) {
    44                 NDR_PRINT_IN_DEBUG(wbint_Ping, r);
     25        pull = ndr_pull_init_blob(&p->in_data.data, r);
     26        if (pull == NULL) {
     27                talloc_free(r);
     28                return false;
     29        }
     30
     31        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     32        if (p->endian) {
     33                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     34        }
     35        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     36        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     37                talloc_free(r);
     38                return false;
     39        }
     40
     41        if (DEBUGLEVEL >= 10) {
     42                NDR_PRINT_FUNCTION_DEBUG(wbint_Ping, NDR_IN, r);
    4543        }
    4644
     
    6159
    6260        if (DEBUGLEVEL >= 10) {
    63                 NDR_PRINT_OUT_DEBUG(wbint_Ping, r);
    64         }
    65 
    66         push = ndr_push_init_ctx(r, NULL);
    67         if (push == NULL) {
    68                 talloc_free(r);
    69                 return false;
    70         }
    71 
    72         ndr_err = call->ndr_push(push, NDR_OUT, r);
    73         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    74                 talloc_free(r);
    75                 return false;
    76         }
    77 
    78         blob = ndr_push_blob(push);
    79         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    80                 talloc_free(r);
    81                 return false;
    82         }
    83 
    84         talloc_free(r);
    85 
    86         return true;
    87 }
    88 
    89 static bool api_wbint_LookupSid(pipes_struct *p)
    90 {
    91         const struct ndr_interface_call *call;
    92         struct ndr_pull *pull;
    93         struct ndr_push *push;
    94         enum ndr_err_code ndr_err;
    95         DATA_BLOB blob;
     61                NDR_PRINT_FUNCTION_DEBUG(wbint_Ping, NDR_OUT | NDR_SET_VALUES, r);
     62        }
     63
     64        push = ndr_push_init_ctx(r);
     65        if (push == NULL) {
     66                talloc_free(r);
     67                return false;
     68        }
     69
     70        /*
     71         * carry over the pointer count to the reply in case we are
     72         * using full pointer. See NDR specification for full pointers
     73         */
     74        push->ptr_count = pull->ptr_count;
     75
     76        ndr_err = call->ndr_push(push, NDR_OUT, r);
     77        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     78                talloc_free(r);
     79                return false;
     80        }
     81
     82        p->out_data.rdata = ndr_push_blob(push);
     83        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     84
     85        talloc_free(r);
     86
     87        return true;
     88}
     89
     90static bool api_wbint_LookupSid(struct pipes_struct *p)
     91{
     92        const struct ndr_interface_call *call;
     93        struct ndr_pull *pull;
     94        struct ndr_push *push;
     95        enum ndr_err_code ndr_err;
    9696        struct wbint_LookupSid *r;
    9797
     
    103103        }
    104104
    105         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    106                 talloc_free(r);
    107                 return false;
    108         }
    109 
    110         pull = ndr_pull_init_blob(&blob, r, NULL);
    111         if (pull == NULL) {
    112                 talloc_free(r);
    113                 return false;
    114         }
    115 
    116         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    117         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    118         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    119                 talloc_free(r);
    120                 return false;
    121         }
    122 
    123         if (DEBUGLEVEL >= 10) {
    124                 NDR_PRINT_IN_DEBUG(wbint_LookupSid, r);
     105        pull = ndr_pull_init_blob(&p->in_data.data, r);
     106        if (pull == NULL) {
     107                talloc_free(r);
     108                return false;
     109        }
     110
     111        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     112        if (p->endian) {
     113                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     114        }
     115        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     116        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     117                talloc_free(r);
     118                return false;
     119        }
     120
     121        if (DEBUGLEVEL >= 10) {
     122                NDR_PRINT_FUNCTION_DEBUG(wbint_LookupSid, NDR_IN, r);
    125123        }
    126124
     
    153151
    154152        if (DEBUGLEVEL >= 10) {
    155                 NDR_PRINT_OUT_DEBUG(wbint_LookupSid, r);
    156         }
    157 
    158         push = ndr_push_init_ctx(r, NULL);
    159         if (push == NULL) {
    160                 talloc_free(r);
    161                 return false;
    162         }
    163 
    164         ndr_err = call->ndr_push(push, NDR_OUT, r);
    165         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    166                 talloc_free(r);
    167                 return false;
    168         }
    169 
    170         blob = ndr_push_blob(push);
    171         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    172                 talloc_free(r);
    173                 return false;
    174         }
    175 
    176         talloc_free(r);
    177 
    178         return true;
    179 }
    180 
    181 static bool api_wbint_LookupName(pipes_struct *p)
    182 {
    183         const struct ndr_interface_call *call;
    184         struct ndr_pull *pull;
    185         struct ndr_push *push;
    186         enum ndr_err_code ndr_err;
    187         DATA_BLOB blob;
     153                NDR_PRINT_FUNCTION_DEBUG(wbint_LookupSid, NDR_OUT | NDR_SET_VALUES, r);
     154        }
     155
     156        push = ndr_push_init_ctx(r);
     157        if (push == NULL) {
     158                talloc_free(r);
     159                return false;
     160        }
     161
     162        /*
     163         * carry over the pointer count to the reply in case we are
     164         * using full pointer. See NDR specification for full pointers
     165         */
     166        push->ptr_count = pull->ptr_count;
     167
     168        ndr_err = call->ndr_push(push, NDR_OUT, r);
     169        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     170                talloc_free(r);
     171                return false;
     172        }
     173
     174        p->out_data.rdata = ndr_push_blob(push);
     175        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     176
     177        talloc_free(r);
     178
     179        return true;
     180}
     181
     182static bool api_wbint_LookupSids(struct pipes_struct *p)
     183{
     184        const struct ndr_interface_call *call;
     185        struct ndr_pull *pull;
     186        struct ndr_push *push;
     187        enum ndr_err_code ndr_err;
     188        struct wbint_LookupSids *r;
     189
     190        call = &ndr_table_wbint.calls[NDR_WBINT_LOOKUPSIDS];
     191
     192        r = talloc(talloc_tos(), struct wbint_LookupSids);
     193        if (r == NULL) {
     194                return false;
     195        }
     196
     197        pull = ndr_pull_init_blob(&p->in_data.data, r);
     198        if (pull == NULL) {
     199                talloc_free(r);
     200                return false;
     201        }
     202
     203        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     204        if (p->endian) {
     205                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     206        }
     207        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     208        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     209                talloc_free(r);
     210                return false;
     211        }
     212
     213        if (DEBUGLEVEL >= 10) {
     214                NDR_PRINT_FUNCTION_DEBUG(wbint_LookupSids, NDR_IN, r);
     215        }
     216
     217        ZERO_STRUCT(r->out);
     218        r->out.domains = talloc_zero(r, struct lsa_RefDomainList);
     219        if (r->out.domains == NULL) {
     220                talloc_free(r);
     221                return false;
     222        }
     223
     224        r->out.names = talloc_zero(r, struct lsa_TransNameArray);
     225        if (r->out.names == NULL) {
     226                talloc_free(r);
     227                return false;
     228        }
     229
     230        r->out.result = _wbint_LookupSids(p, r);
     231
     232        if (p->rng_fault_state) {
     233                talloc_free(r);
     234                /* Return true here, srv_pipe_hnd.c will take care */
     235                return true;
     236        }
     237
     238        if (DEBUGLEVEL >= 10) {
     239                NDR_PRINT_FUNCTION_DEBUG(wbint_LookupSids, NDR_OUT | NDR_SET_VALUES, r);
     240        }
     241
     242        push = ndr_push_init_ctx(r);
     243        if (push == NULL) {
     244                talloc_free(r);
     245                return false;
     246        }
     247
     248        /*
     249         * carry over the pointer count to the reply in case we are
     250         * using full pointer. See NDR specification for full pointers
     251         */
     252        push->ptr_count = pull->ptr_count;
     253
     254        ndr_err = call->ndr_push(push, NDR_OUT, r);
     255        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     256                talloc_free(r);
     257                return false;
     258        }
     259
     260        p->out_data.rdata = ndr_push_blob(push);
     261        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     262
     263        talloc_free(r);
     264
     265        return true;
     266}
     267
     268static bool api_wbint_LookupName(struct pipes_struct *p)
     269{
     270        const struct ndr_interface_call *call;
     271        struct ndr_pull *pull;
     272        struct ndr_push *push;
     273        enum ndr_err_code ndr_err;
    188274        struct wbint_LookupName *r;
    189275
     
    195281        }
    196282
    197         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    198                 talloc_free(r);
    199                 return false;
    200         }
    201 
    202         pull = ndr_pull_init_blob(&blob, r, NULL);
    203         if (pull == NULL) {
    204                 talloc_free(r);
    205                 return false;
    206         }
    207 
    208         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    209         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    210         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    211                 talloc_free(r);
    212                 return false;
    213         }
    214 
    215         if (DEBUGLEVEL >= 10) {
    216                 NDR_PRINT_IN_DEBUG(wbint_LookupName, r);
     283        pull = ndr_pull_init_blob(&p->in_data.data, r);
     284        if (pull == NULL) {
     285                talloc_free(r);
     286                return false;
     287        }
     288
     289        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     290        if (p->endian) {
     291                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     292        }
     293        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     294        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     295                talloc_free(r);
     296                return false;
     297        }
     298
     299        if (DEBUGLEVEL >= 10) {
     300                NDR_PRINT_FUNCTION_DEBUG(wbint_LookupName, NDR_IN, r);
    217301        }
    218302
     
    239323
    240324        if (DEBUGLEVEL >= 10) {
    241                 NDR_PRINT_OUT_DEBUG(wbint_LookupName, r);
    242         }
    243 
    244         push = ndr_push_init_ctx(r, NULL);
    245         if (push == NULL) {
    246                 talloc_free(r);
    247                 return false;
    248         }
    249 
    250         ndr_err = call->ndr_push(push, NDR_OUT, r);
    251         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    252                 talloc_free(r);
    253                 return false;
    254         }
    255 
    256         blob = ndr_push_blob(push);
    257         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    258                 talloc_free(r);
    259                 return false;
    260         }
    261 
    262         talloc_free(r);
    263 
    264         return true;
    265 }
    266 
    267 static bool api_wbint_Sid2Uid(pipes_struct *p)
    268 {
    269         const struct ndr_interface_call *call;
    270         struct ndr_pull *pull;
    271         struct ndr_push *push;
    272         enum ndr_err_code ndr_err;
    273         DATA_BLOB blob;
     325                NDR_PRINT_FUNCTION_DEBUG(wbint_LookupName, NDR_OUT | NDR_SET_VALUES, r);
     326        }
     327
     328        push = ndr_push_init_ctx(r);
     329        if (push == NULL) {
     330                talloc_free(r);
     331                return false;
     332        }
     333
     334        /*
     335         * carry over the pointer count to the reply in case we are
     336         * using full pointer. See NDR specification for full pointers
     337         */
     338        push->ptr_count = pull->ptr_count;
     339
     340        ndr_err = call->ndr_push(push, NDR_OUT, r);
     341        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     342                talloc_free(r);
     343                return false;
     344        }
     345
     346        p->out_data.rdata = ndr_push_blob(push);
     347        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     348
     349        talloc_free(r);
     350
     351        return true;
     352}
     353
     354static bool api_wbint_Sid2Uid(struct pipes_struct *p)
     355{
     356        const struct ndr_interface_call *call;
     357        struct ndr_pull *pull;
     358        struct ndr_push *push;
     359        enum ndr_err_code ndr_err;
    274360        struct wbint_Sid2Uid *r;
    275361
     
    281367        }
    282368
    283         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    284                 talloc_free(r);
    285                 return false;
    286         }
    287 
    288         pull = ndr_pull_init_blob(&blob, r, NULL);
    289         if (pull == NULL) {
    290                 talloc_free(r);
    291                 return false;
    292         }
    293 
    294         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    295         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    296         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    297                 talloc_free(r);
    298                 return false;
    299         }
    300 
    301         if (DEBUGLEVEL >= 10) {
    302                 NDR_PRINT_IN_DEBUG(wbint_Sid2Uid, r);
     369        pull = ndr_pull_init_blob(&p->in_data.data, r);
     370        if (pull == NULL) {
     371                talloc_free(r);
     372                return false;
     373        }
     374
     375        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     376        if (p->endian) {
     377                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     378        }
     379        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     380        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     381                talloc_free(r);
     382                return false;
     383        }
     384
     385        if (DEBUGLEVEL >= 10) {
     386                NDR_PRINT_FUNCTION_DEBUG(wbint_Sid2Uid, NDR_IN, r);
    303387        }
    304388
     
    319403
    320404        if (DEBUGLEVEL >= 10) {
    321                 NDR_PRINT_OUT_DEBUG(wbint_Sid2Uid, r);
    322         }
    323 
    324         push = ndr_push_init_ctx(r, NULL);
    325         if (push == NULL) {
    326                 talloc_free(r);
    327                 return false;
    328         }
    329 
    330         ndr_err = call->ndr_push(push, NDR_OUT, r);
    331         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    332                 talloc_free(r);
    333                 return false;
    334         }
    335 
    336         blob = ndr_push_blob(push);
    337         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    338                 talloc_free(r);
    339                 return false;
    340         }
    341 
    342         talloc_free(r);
    343 
    344         return true;
    345 }
    346 
    347 static bool api_wbint_Sid2Gid(pipes_struct *p)
    348 {
    349         const struct ndr_interface_call *call;
    350         struct ndr_pull *pull;
    351         struct ndr_push *push;
    352         enum ndr_err_code ndr_err;
    353         DATA_BLOB blob;
     405                NDR_PRINT_FUNCTION_DEBUG(wbint_Sid2Uid, NDR_OUT | NDR_SET_VALUES, r);
     406        }
     407
     408        push = ndr_push_init_ctx(r);
     409        if (push == NULL) {
     410                talloc_free(r);
     411                return false;
     412        }
     413
     414        /*
     415         * carry over the pointer count to the reply in case we are
     416         * using full pointer. See NDR specification for full pointers
     417         */
     418        push->ptr_count = pull->ptr_count;
     419
     420        ndr_err = call->ndr_push(push, NDR_OUT, r);
     421        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     422                talloc_free(r);
     423                return false;
     424        }
     425
     426        p->out_data.rdata = ndr_push_blob(push);
     427        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     428
     429        talloc_free(r);
     430
     431        return true;
     432}
     433
     434static bool api_wbint_Sid2Gid(struct pipes_struct *p)
     435{
     436        const struct ndr_interface_call *call;
     437        struct ndr_pull *pull;
     438        struct ndr_push *push;
     439        enum ndr_err_code ndr_err;
    354440        struct wbint_Sid2Gid *r;
    355441
     
    361447        }
    362448
    363         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    364                 talloc_free(r);
    365                 return false;
    366         }
    367 
    368         pull = ndr_pull_init_blob(&blob, r, NULL);
    369         if (pull == NULL) {
    370                 talloc_free(r);
    371                 return false;
    372         }
    373 
    374         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    375         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    376         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    377                 talloc_free(r);
    378                 return false;
    379         }
    380 
    381         if (DEBUGLEVEL >= 10) {
    382                 NDR_PRINT_IN_DEBUG(wbint_Sid2Gid, r);
     449        pull = ndr_pull_init_blob(&p->in_data.data, r);
     450        if (pull == NULL) {
     451                talloc_free(r);
     452                return false;
     453        }
     454
     455        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     456        if (p->endian) {
     457                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     458        }
     459        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     460        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     461                talloc_free(r);
     462                return false;
     463        }
     464
     465        if (DEBUGLEVEL >= 10) {
     466                NDR_PRINT_FUNCTION_DEBUG(wbint_Sid2Gid, NDR_IN, r);
    383467        }
    384468
     
    399483
    400484        if (DEBUGLEVEL >= 10) {
    401                 NDR_PRINT_OUT_DEBUG(wbint_Sid2Gid, r);
    402         }
    403 
    404         push = ndr_push_init_ctx(r, NULL);
    405         if (push == NULL) {
    406                 talloc_free(r);
    407                 return false;
    408         }
    409 
    410         ndr_err = call->ndr_push(push, NDR_OUT, r);
    411         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    412                 talloc_free(r);
    413                 return false;
    414         }
    415 
    416         blob = ndr_push_blob(push);
    417         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    418                 talloc_free(r);
    419                 return false;
    420         }
    421 
    422         talloc_free(r);
    423 
    424         return true;
    425 }
    426 
    427 static bool api_wbint_Uid2Sid(pipes_struct *p)
    428 {
    429         const struct ndr_interface_call *call;
    430         struct ndr_pull *pull;
    431         struct ndr_push *push;
    432         enum ndr_err_code ndr_err;
    433         DATA_BLOB blob;
     485                NDR_PRINT_FUNCTION_DEBUG(wbint_Sid2Gid, NDR_OUT | NDR_SET_VALUES, r);
     486        }
     487
     488        push = ndr_push_init_ctx(r);
     489        if (push == NULL) {
     490                talloc_free(r);
     491                return false;
     492        }
     493
     494        /*
     495         * carry over the pointer count to the reply in case we are
     496         * using full pointer. See NDR specification for full pointers
     497         */
     498        push->ptr_count = pull->ptr_count;
     499
     500        ndr_err = call->ndr_push(push, NDR_OUT, r);
     501        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     502                talloc_free(r);
     503                return false;
     504        }
     505
     506        p->out_data.rdata = ndr_push_blob(push);
     507        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     508
     509        talloc_free(r);
     510
     511        return true;
     512}
     513
     514static bool api_wbint_Sids2UnixIDs(struct pipes_struct *p)
     515{
     516        const struct ndr_interface_call *call;
     517        struct ndr_pull *pull;
     518        struct ndr_push *push;
     519        enum ndr_err_code ndr_err;
     520        struct wbint_Sids2UnixIDs *r;
     521
     522        call = &ndr_table_wbint.calls[NDR_WBINT_SIDS2UNIXIDS];
     523
     524        r = talloc(talloc_tos(), struct wbint_Sids2UnixIDs);
     525        if (r == NULL) {
     526                return false;
     527        }
     528
     529        pull = ndr_pull_init_blob(&p->in_data.data, r);
     530        if (pull == NULL) {
     531                talloc_free(r);
     532                return false;
     533        }
     534
     535        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     536        if (p->endian) {
     537                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     538        }
     539        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     540        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     541                talloc_free(r);
     542                return false;
     543        }
     544
     545        if (DEBUGLEVEL >= 10) {
     546                NDR_PRINT_FUNCTION_DEBUG(wbint_Sids2UnixIDs, NDR_IN, r);
     547        }
     548
     549        ZERO_STRUCT(r->out);
     550        r->out.ids = r->in.ids;
     551        r->out.result = _wbint_Sids2UnixIDs(p, r);
     552
     553        if (p->rng_fault_state) {
     554                talloc_free(r);
     555                /* Return true here, srv_pipe_hnd.c will take care */
     556                return true;
     557        }
     558
     559        if (DEBUGLEVEL >= 10) {
     560                NDR_PRINT_FUNCTION_DEBUG(wbint_Sids2UnixIDs, NDR_OUT | NDR_SET_VALUES, r);
     561        }
     562
     563        push = ndr_push_init_ctx(r);
     564        if (push == NULL) {
     565                talloc_free(r);
     566                return false;
     567        }
     568
     569        /*
     570         * carry over the pointer count to the reply in case we are
     571         * using full pointer. See NDR specification for full pointers
     572         */
     573        push->ptr_count = pull->ptr_count;
     574
     575        ndr_err = call->ndr_push(push, NDR_OUT, r);
     576        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     577                talloc_free(r);
     578                return false;
     579        }
     580
     581        p->out_data.rdata = ndr_push_blob(push);
     582        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     583
     584        talloc_free(r);
     585
     586        return true;
     587}
     588
     589static bool api_wbint_Uid2Sid(struct pipes_struct *p)
     590{
     591        const struct ndr_interface_call *call;
     592        struct ndr_pull *pull;
     593        struct ndr_push *push;
     594        enum ndr_err_code ndr_err;
    434595        struct wbint_Uid2Sid *r;
    435596
     
    441602        }
    442603
    443         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    444                 talloc_free(r);
    445                 return false;
    446         }
    447 
    448         pull = ndr_pull_init_blob(&blob, r, NULL);
    449         if (pull == NULL) {
    450                 talloc_free(r);
    451                 return false;
    452         }
    453 
    454         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    455         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    456         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    457                 talloc_free(r);
    458                 return false;
    459         }
    460 
    461         if (DEBUGLEVEL >= 10) {
    462                 NDR_PRINT_IN_DEBUG(wbint_Uid2Sid, r);
     604        pull = ndr_pull_init_blob(&p->in_data.data, r);
     605        if (pull == NULL) {
     606                talloc_free(r);
     607                return false;
     608        }
     609
     610        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     611        if (p->endian) {
     612                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     613        }
     614        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     615        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     616                talloc_free(r);
     617                return false;
     618        }
     619
     620        if (DEBUGLEVEL >= 10) {
     621                NDR_PRINT_FUNCTION_DEBUG(wbint_Uid2Sid, NDR_IN, r);
    463622        }
    464623
     
    479638
    480639        if (DEBUGLEVEL >= 10) {
    481                 NDR_PRINT_OUT_DEBUG(wbint_Uid2Sid, r);
    482         }
    483 
    484         push = ndr_push_init_ctx(r, NULL);
    485         if (push == NULL) {
    486                 talloc_free(r);
    487                 return false;
    488         }
    489 
    490         ndr_err = call->ndr_push(push, NDR_OUT, r);
    491         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    492                 talloc_free(r);
    493                 return false;
    494         }
    495 
    496         blob = ndr_push_blob(push);
    497         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    498                 talloc_free(r);
    499                 return false;
    500         }
    501 
    502         talloc_free(r);
    503 
    504         return true;
    505 }
    506 
    507 static bool api_wbint_Gid2Sid(pipes_struct *p)
    508 {
    509         const struct ndr_interface_call *call;
    510         struct ndr_pull *pull;
    511         struct ndr_push *push;
    512         enum ndr_err_code ndr_err;
    513         DATA_BLOB blob;
     640                NDR_PRINT_FUNCTION_DEBUG(wbint_Uid2Sid, NDR_OUT | NDR_SET_VALUES, r);
     641        }
     642
     643        push = ndr_push_init_ctx(r);
     644        if (push == NULL) {
     645                talloc_free(r);
     646                return false;
     647        }
     648
     649        /*
     650         * carry over the pointer count to the reply in case we are
     651         * using full pointer. See NDR specification for full pointers
     652         */
     653        push->ptr_count = pull->ptr_count;
     654
     655        ndr_err = call->ndr_push(push, NDR_OUT, r);
     656        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     657                talloc_free(r);
     658                return false;
     659        }
     660
     661        p->out_data.rdata = ndr_push_blob(push);
     662        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     663
     664        talloc_free(r);
     665
     666        return true;
     667}
     668
     669static bool api_wbint_Gid2Sid(struct pipes_struct *p)
     670{
     671        const struct ndr_interface_call *call;
     672        struct ndr_pull *pull;
     673        struct ndr_push *push;
     674        enum ndr_err_code ndr_err;
    514675        struct wbint_Gid2Sid *r;
    515676
     
    521682        }
    522683
    523         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    524                 talloc_free(r);
    525                 return false;
    526         }
    527 
    528         pull = ndr_pull_init_blob(&blob, r, NULL);
    529         if (pull == NULL) {
    530                 talloc_free(r);
    531                 return false;
    532         }
    533 
    534         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    535         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    536         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    537                 talloc_free(r);
    538                 return false;
    539         }
    540 
    541         if (DEBUGLEVEL >= 10) {
    542                 NDR_PRINT_IN_DEBUG(wbint_Gid2Sid, r);
     684        pull = ndr_pull_init_blob(&p->in_data.data, r);
     685        if (pull == NULL) {
     686                talloc_free(r);
     687                return false;
     688        }
     689
     690        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     691        if (p->endian) {
     692                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     693        }
     694        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     695        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     696                talloc_free(r);
     697                return false;
     698        }
     699
     700        if (DEBUGLEVEL >= 10) {
     701                NDR_PRINT_FUNCTION_DEBUG(wbint_Gid2Sid, NDR_IN, r);
    543702        }
    544703
     
    559718
    560719        if (DEBUGLEVEL >= 10) {
    561                 NDR_PRINT_OUT_DEBUG(wbint_Gid2Sid, r);
    562         }
    563 
    564         push = ndr_push_init_ctx(r, NULL);
    565         if (push == NULL) {
    566                 talloc_free(r);
    567                 return false;
    568         }
    569 
    570         ndr_err = call->ndr_push(push, NDR_OUT, r);
    571         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    572                 talloc_free(r);
    573                 return false;
    574         }
    575 
    576         blob = ndr_push_blob(push);
    577         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    578                 talloc_free(r);
    579                 return false;
    580         }
    581 
    582         talloc_free(r);
    583 
    584         return true;
    585 }
    586 
    587 static bool api_wbint_AllocateUid(pipes_struct *p)
    588 {
    589         const struct ndr_interface_call *call;
    590         struct ndr_pull *pull;
    591         struct ndr_push *push;
    592         enum ndr_err_code ndr_err;
    593         DATA_BLOB blob;
     720                NDR_PRINT_FUNCTION_DEBUG(wbint_Gid2Sid, NDR_OUT | NDR_SET_VALUES, r);
     721        }
     722
     723        push = ndr_push_init_ctx(r);
     724        if (push == NULL) {
     725                talloc_free(r);
     726                return false;
     727        }
     728
     729        /*
     730         * carry over the pointer count to the reply in case we are
     731         * using full pointer. See NDR specification for full pointers
     732         */
     733        push->ptr_count = pull->ptr_count;
     734
     735        ndr_err = call->ndr_push(push, NDR_OUT, r);
     736        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     737                talloc_free(r);
     738                return false;
     739        }
     740
     741        p->out_data.rdata = ndr_push_blob(push);
     742        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     743
     744        talloc_free(r);
     745
     746        return true;
     747}
     748
     749static bool api_wbint_AllocateUid(struct pipes_struct *p)
     750{
     751        const struct ndr_interface_call *call;
     752        struct ndr_pull *pull;
     753        struct ndr_push *push;
     754        enum ndr_err_code ndr_err;
    594755        struct wbint_AllocateUid *r;
    595756
     
    601762        }
    602763
    603         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    604                 talloc_free(r);
    605                 return false;
    606         }
    607 
    608         pull = ndr_pull_init_blob(&blob, r, NULL);
    609         if (pull == NULL) {
    610                 talloc_free(r);
    611                 return false;
    612         }
    613 
    614         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    615         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    616         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    617                 talloc_free(r);
    618                 return false;
    619         }
    620 
    621         if (DEBUGLEVEL >= 10) {
    622                 NDR_PRINT_IN_DEBUG(wbint_AllocateUid, r);
     764        pull = ndr_pull_init_blob(&p->in_data.data, r);
     765        if (pull == NULL) {
     766                talloc_free(r);
     767                return false;
     768        }
     769
     770        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     771        if (p->endian) {
     772                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     773        }
     774        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     775        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     776                talloc_free(r);
     777                return false;
     778        }
     779
     780        if (DEBUGLEVEL >= 10) {
     781                NDR_PRINT_FUNCTION_DEBUG(wbint_AllocateUid, NDR_IN, r);
    623782        }
    624783
     
    639798
    640799        if (DEBUGLEVEL >= 10) {
    641                 NDR_PRINT_OUT_DEBUG(wbint_AllocateUid, r);
    642         }
    643 
    644         push = ndr_push_init_ctx(r, NULL);
    645         if (push == NULL) {
    646                 talloc_free(r);
    647                 return false;
    648         }
    649 
    650         ndr_err = call->ndr_push(push, NDR_OUT, r);
    651         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    652                 talloc_free(r);
    653                 return false;
    654         }
    655 
    656         blob = ndr_push_blob(push);
    657         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    658                 talloc_free(r);
    659                 return false;
    660         }
    661 
    662         talloc_free(r);
    663 
    664         return true;
    665 }
    666 
    667 static bool api_wbint_AllocateGid(pipes_struct *p)
    668 {
    669         const struct ndr_interface_call *call;
    670         struct ndr_pull *pull;
    671         struct ndr_push *push;
    672         enum ndr_err_code ndr_err;
    673         DATA_BLOB blob;
     800                NDR_PRINT_FUNCTION_DEBUG(wbint_AllocateUid, NDR_OUT | NDR_SET_VALUES, r);
     801        }
     802
     803        push = ndr_push_init_ctx(r);
     804        if (push == NULL) {
     805                talloc_free(r);
     806                return false;
     807        }
     808
     809        /*
     810         * carry over the pointer count to the reply in case we are
     811         * using full pointer. See NDR specification for full pointers
     812         */
     813        push->ptr_count = pull->ptr_count;
     814
     815        ndr_err = call->ndr_push(push, NDR_OUT, r);
     816        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     817                talloc_free(r);
     818                return false;
     819        }
     820
     821        p->out_data.rdata = ndr_push_blob(push);
     822        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     823
     824        talloc_free(r);
     825
     826        return true;
     827}
     828
     829static bool api_wbint_AllocateGid(struct pipes_struct *p)
     830{
     831        const struct ndr_interface_call *call;
     832        struct ndr_pull *pull;
     833        struct ndr_push *push;
     834        enum ndr_err_code ndr_err;
    674835        struct wbint_AllocateGid *r;
    675836
     
    681842        }
    682843
    683         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    684                 talloc_free(r);
    685                 return false;
    686         }
    687 
    688         pull = ndr_pull_init_blob(&blob, r, NULL);
    689         if (pull == NULL) {
    690                 talloc_free(r);
    691                 return false;
    692         }
    693 
    694         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    695         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    696         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    697                 talloc_free(r);
    698                 return false;
    699         }
    700 
    701         if (DEBUGLEVEL >= 10) {
    702                 NDR_PRINT_IN_DEBUG(wbint_AllocateGid, r);
     844        pull = ndr_pull_init_blob(&p->in_data.data, r);
     845        if (pull == NULL) {
     846                talloc_free(r);
     847                return false;
     848        }
     849
     850        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     851        if (p->endian) {
     852                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     853        }
     854        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     855        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     856                talloc_free(r);
     857                return false;
     858        }
     859
     860        if (DEBUGLEVEL >= 10) {
     861                NDR_PRINT_FUNCTION_DEBUG(wbint_AllocateGid, NDR_IN, r);
    703862        }
    704863
     
    719878
    720879        if (DEBUGLEVEL >= 10) {
    721                 NDR_PRINT_OUT_DEBUG(wbint_AllocateGid, r);
    722         }
    723 
    724         push = ndr_push_init_ctx(r, NULL);
    725         if (push == NULL) {
    726                 talloc_free(r);
    727                 return false;
    728         }
    729 
    730         ndr_err = call->ndr_push(push, NDR_OUT, r);
    731         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    732                 talloc_free(r);
    733                 return false;
    734         }
    735 
    736         blob = ndr_push_blob(push);
    737         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    738                 talloc_free(r);
    739                 return false;
    740         }
    741 
    742         talloc_free(r);
    743 
    744         return true;
    745 }
    746 
    747 static bool api_wbint_QueryUser(pipes_struct *p)
    748 {
    749         const struct ndr_interface_call *call;
    750         struct ndr_pull *pull;
    751         struct ndr_push *push;
    752         enum ndr_err_code ndr_err;
    753         DATA_BLOB blob;
     880                NDR_PRINT_FUNCTION_DEBUG(wbint_AllocateGid, NDR_OUT | NDR_SET_VALUES, r);
     881        }
     882
     883        push = ndr_push_init_ctx(r);
     884        if (push == NULL) {
     885                talloc_free(r);
     886                return false;
     887        }
     888
     889        /*
     890         * carry over the pointer count to the reply in case we are
     891         * using full pointer. See NDR specification for full pointers
     892         */
     893        push->ptr_count = pull->ptr_count;
     894
     895        ndr_err = call->ndr_push(push, NDR_OUT, r);
     896        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     897                talloc_free(r);
     898                return false;
     899        }
     900
     901        p->out_data.rdata = ndr_push_blob(push);
     902        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     903
     904        talloc_free(r);
     905
     906        return true;
     907}
     908
     909static bool api_wbint_QueryUser(struct pipes_struct *p)
     910{
     911        const struct ndr_interface_call *call;
     912        struct ndr_pull *pull;
     913        struct ndr_push *push;
     914        enum ndr_err_code ndr_err;
    754915        struct wbint_QueryUser *r;
    755916
     
    761922        }
    762923
    763         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    764                 talloc_free(r);
    765                 return false;
    766         }
    767 
    768         pull = ndr_pull_init_blob(&blob, r, NULL);
    769         if (pull == NULL) {
    770                 talloc_free(r);
    771                 return false;
    772         }
    773 
    774         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    775         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    776         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    777                 talloc_free(r);
    778                 return false;
    779         }
    780 
    781         if (DEBUGLEVEL >= 10) {
    782                 NDR_PRINT_IN_DEBUG(wbint_QueryUser, r);
     924        pull = ndr_pull_init_blob(&p->in_data.data, r);
     925        if (pull == NULL) {
     926                talloc_free(r);
     927                return false;
     928        }
     929
     930        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     931        if (p->endian) {
     932                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     933        }
     934        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     935        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     936                talloc_free(r);
     937                return false;
     938        }
     939
     940        if (DEBUGLEVEL >= 10) {
     941                NDR_PRINT_FUNCTION_DEBUG(wbint_QueryUser, NDR_IN, r);
    783942        }
    784943
     
    799958
    800959        if (DEBUGLEVEL >= 10) {
    801                 NDR_PRINT_OUT_DEBUG(wbint_QueryUser, r);
    802         }
    803 
    804         push = ndr_push_init_ctx(r, NULL);
    805         if (push == NULL) {
    806                 talloc_free(r);
    807                 return false;
    808         }
    809 
    810         ndr_err = call->ndr_push(push, NDR_OUT, r);
    811         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    812                 talloc_free(r);
    813                 return false;
    814         }
    815 
    816         blob = ndr_push_blob(push);
    817         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    818                 talloc_free(r);
    819                 return false;
    820         }
    821 
    822         talloc_free(r);
    823 
    824         return true;
    825 }
    826 
    827 static bool api_wbint_LookupUserAliases(pipes_struct *p)
    828 {
    829         const struct ndr_interface_call *call;
    830         struct ndr_pull *pull;
    831         struct ndr_push *push;
    832         enum ndr_err_code ndr_err;
    833         DATA_BLOB blob;
     960                NDR_PRINT_FUNCTION_DEBUG(wbint_QueryUser, NDR_OUT | NDR_SET_VALUES, r);
     961        }
     962
     963        push = ndr_push_init_ctx(r);
     964        if (push == NULL) {
     965                talloc_free(r);
     966                return false;
     967        }
     968
     969        /*
     970         * carry over the pointer count to the reply in case we are
     971         * using full pointer. See NDR specification for full pointers
     972         */
     973        push->ptr_count = pull->ptr_count;
     974
     975        ndr_err = call->ndr_push(push, NDR_OUT, r);
     976        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     977                talloc_free(r);
     978                return false;
     979        }
     980
     981        p->out_data.rdata = ndr_push_blob(push);
     982        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     983
     984        talloc_free(r);
     985
     986        return true;
     987}
     988
     989static bool api_wbint_LookupUserAliases(struct pipes_struct *p)
     990{
     991        const struct ndr_interface_call *call;
     992        struct ndr_pull *pull;
     993        struct ndr_push *push;
     994        enum ndr_err_code ndr_err;
    834995        struct wbint_LookupUserAliases *r;
    835996
     
    8411002        }
    8421003
    843         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    844                 talloc_free(r);
    845                 return false;
    846         }
    847 
    848         pull = ndr_pull_init_blob(&blob, r, NULL);
    849         if (pull == NULL) {
    850                 talloc_free(r);
    851                 return false;
    852         }
    853 
    854         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    855         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    856         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    857                 talloc_free(r);
    858                 return false;
    859         }
    860 
    861         if (DEBUGLEVEL >= 10) {
    862                 NDR_PRINT_IN_DEBUG(wbint_LookupUserAliases, r);
     1004        pull = ndr_pull_init_blob(&p->in_data.data, r);
     1005        if (pull == NULL) {
     1006                talloc_free(r);
     1007                return false;
     1008        }
     1009
     1010        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     1011        if (p->endian) {
     1012                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     1013        }
     1014        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     1015        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1016                talloc_free(r);
     1017                return false;
     1018        }
     1019
     1020        if (DEBUGLEVEL >= 10) {
     1021                NDR_PRINT_FUNCTION_DEBUG(wbint_LookupUserAliases, NDR_IN, r);
    8631022        }
    8641023
     
    8791038
    8801039        if (DEBUGLEVEL >= 10) {
    881                 NDR_PRINT_OUT_DEBUG(wbint_LookupUserAliases, r);
    882         }
    883 
    884         push = ndr_push_init_ctx(r, NULL);
    885         if (push == NULL) {
    886                 talloc_free(r);
    887                 return false;
    888         }
    889 
    890         ndr_err = call->ndr_push(push, NDR_OUT, r);
    891         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    892                 talloc_free(r);
    893                 return false;
    894         }
    895 
    896         blob = ndr_push_blob(push);
    897         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    898                 talloc_free(r);
    899                 return false;
    900         }
    901 
    902         talloc_free(r);
    903 
    904         return true;
    905 }
    906 
    907 static bool api_wbint_LookupUserGroups(pipes_struct *p)
    908 {
    909         const struct ndr_interface_call *call;
    910         struct ndr_pull *pull;
    911         struct ndr_push *push;
    912         enum ndr_err_code ndr_err;
    913         DATA_BLOB blob;
     1040                NDR_PRINT_FUNCTION_DEBUG(wbint_LookupUserAliases, NDR_OUT | NDR_SET_VALUES, r);
     1041        }
     1042
     1043        push = ndr_push_init_ctx(r);
     1044        if (push == NULL) {
     1045                talloc_free(r);
     1046                return false;
     1047        }
     1048
     1049        /*
     1050         * carry over the pointer count to the reply in case we are
     1051         * using full pointer. See NDR specification for full pointers
     1052         */
     1053        push->ptr_count = pull->ptr_count;
     1054
     1055        ndr_err = call->ndr_push(push, NDR_OUT, r);
     1056        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1057                talloc_free(r);
     1058                return false;
     1059        }
     1060
     1061        p->out_data.rdata = ndr_push_blob(push);
     1062        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     1063
     1064        talloc_free(r);
     1065
     1066        return true;
     1067}
     1068
     1069static bool api_wbint_LookupUserGroups(struct pipes_struct *p)
     1070{
     1071        const struct ndr_interface_call *call;
     1072        struct ndr_pull *pull;
     1073        struct ndr_push *push;
     1074        enum ndr_err_code ndr_err;
    9141075        struct wbint_LookupUserGroups *r;
    9151076
     
    9211082        }
    9221083
    923         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    924                 talloc_free(r);
    925                 return false;
    926         }
    927 
    928         pull = ndr_pull_init_blob(&blob, r, NULL);
    929         if (pull == NULL) {
    930                 talloc_free(r);
    931                 return false;
    932         }
    933 
    934         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    935         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    936         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    937                 talloc_free(r);
    938                 return false;
    939         }
    940 
    941         if (DEBUGLEVEL >= 10) {
    942                 NDR_PRINT_IN_DEBUG(wbint_LookupUserGroups, r);
     1084        pull = ndr_pull_init_blob(&p->in_data.data, r);
     1085        if (pull == NULL) {
     1086                talloc_free(r);
     1087                return false;
     1088        }
     1089
     1090        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     1091        if (p->endian) {
     1092                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     1093        }
     1094        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     1095        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1096                talloc_free(r);
     1097                return false;
     1098        }
     1099
     1100        if (DEBUGLEVEL >= 10) {
     1101                NDR_PRINT_FUNCTION_DEBUG(wbint_LookupUserGroups, NDR_IN, r);
    9431102        }
    9441103
     
    9591118
    9601119        if (DEBUGLEVEL >= 10) {
    961                 NDR_PRINT_OUT_DEBUG(wbint_LookupUserGroups, r);
    962         }
    963 
    964         push = ndr_push_init_ctx(r, NULL);
    965         if (push == NULL) {
    966                 talloc_free(r);
    967                 return false;
    968         }
    969 
    970         ndr_err = call->ndr_push(push, NDR_OUT, r);
    971         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    972                 talloc_free(r);
    973                 return false;
    974         }
    975 
    976         blob = ndr_push_blob(push);
    977         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    978                 talloc_free(r);
    979                 return false;
    980         }
    981 
    982         talloc_free(r);
    983 
    984         return true;
    985 }
    986 
    987 static bool api_wbint_QuerySequenceNumber(pipes_struct *p)
    988 {
    989         const struct ndr_interface_call *call;
    990         struct ndr_pull *pull;
    991         struct ndr_push *push;
    992         enum ndr_err_code ndr_err;
    993         DATA_BLOB blob;
     1120                NDR_PRINT_FUNCTION_DEBUG(wbint_LookupUserGroups, NDR_OUT | NDR_SET_VALUES, r);
     1121        }
     1122
     1123        push = ndr_push_init_ctx(r);
     1124        if (push == NULL) {
     1125                talloc_free(r);
     1126                return false;
     1127        }
     1128
     1129        /*
     1130         * carry over the pointer count to the reply in case we are
     1131         * using full pointer. See NDR specification for full pointers
     1132         */
     1133        push->ptr_count = pull->ptr_count;
     1134
     1135        ndr_err = call->ndr_push(push, NDR_OUT, r);
     1136        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1137                talloc_free(r);
     1138                return false;
     1139        }
     1140
     1141        p->out_data.rdata = ndr_push_blob(push);
     1142        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     1143
     1144        talloc_free(r);
     1145
     1146        return true;
     1147}
     1148
     1149static bool api_wbint_QuerySequenceNumber(struct pipes_struct *p)
     1150{
     1151        const struct ndr_interface_call *call;
     1152        struct ndr_pull *pull;
     1153        struct ndr_push *push;
     1154        enum ndr_err_code ndr_err;
    9941155        struct wbint_QuerySequenceNumber *r;
    9951156
     
    10011162        }
    10021163
    1003         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    1004                 talloc_free(r);
    1005                 return false;
    1006         }
    1007 
    1008         pull = ndr_pull_init_blob(&blob, r, NULL);
    1009         if (pull == NULL) {
    1010                 talloc_free(r);
    1011                 return false;
    1012         }
    1013 
    1014         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    1015         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    1016         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1017                 talloc_free(r);
    1018                 return false;
    1019         }
    1020 
    1021         if (DEBUGLEVEL >= 10) {
    1022                 NDR_PRINT_IN_DEBUG(wbint_QuerySequenceNumber, r);
     1164        pull = ndr_pull_init_blob(&p->in_data.data, r);
     1165        if (pull == NULL) {
     1166                talloc_free(r);
     1167                return false;
     1168        }
     1169
     1170        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     1171        if (p->endian) {
     1172                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     1173        }
     1174        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     1175        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1176                talloc_free(r);
     1177                return false;
     1178        }
     1179
     1180        if (DEBUGLEVEL >= 10) {
     1181                NDR_PRINT_FUNCTION_DEBUG(wbint_QuerySequenceNumber, NDR_IN, r);
    10231182        }
    10241183
     
    10391198
    10401199        if (DEBUGLEVEL >= 10) {
    1041                 NDR_PRINT_OUT_DEBUG(wbint_QuerySequenceNumber, r);
    1042         }
    1043 
    1044         push = ndr_push_init_ctx(r, NULL);
    1045         if (push == NULL) {
    1046                 talloc_free(r);
    1047                 return false;
    1048         }
    1049 
    1050         ndr_err = call->ndr_push(push, NDR_OUT, r);
    1051         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1052                 talloc_free(r);
    1053                 return false;
    1054         }
    1055 
    1056         blob = ndr_push_blob(push);
    1057         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    1058                 talloc_free(r);
    1059                 return false;
    1060         }
    1061 
    1062         talloc_free(r);
    1063 
    1064         return true;
    1065 }
    1066 
    1067 static bool api_wbint_LookupGroupMembers(pipes_struct *p)
    1068 {
    1069         const struct ndr_interface_call *call;
    1070         struct ndr_pull *pull;
    1071         struct ndr_push *push;
    1072         enum ndr_err_code ndr_err;
    1073         DATA_BLOB blob;
     1200                NDR_PRINT_FUNCTION_DEBUG(wbint_QuerySequenceNumber, NDR_OUT | NDR_SET_VALUES, r);
     1201        }
     1202
     1203        push = ndr_push_init_ctx(r);
     1204        if (push == NULL) {
     1205                talloc_free(r);
     1206                return false;
     1207        }
     1208
     1209        /*
     1210         * carry over the pointer count to the reply in case we are
     1211         * using full pointer. See NDR specification for full pointers
     1212         */
     1213        push->ptr_count = pull->ptr_count;
     1214
     1215        ndr_err = call->ndr_push(push, NDR_OUT, r);
     1216        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1217                talloc_free(r);
     1218                return false;
     1219        }
     1220
     1221        p->out_data.rdata = ndr_push_blob(push);
     1222        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     1223
     1224        talloc_free(r);
     1225
     1226        return true;
     1227}
     1228
     1229static bool api_wbint_LookupGroupMembers(struct pipes_struct *p)
     1230{
     1231        const struct ndr_interface_call *call;
     1232        struct ndr_pull *pull;
     1233        struct ndr_push *push;
     1234        enum ndr_err_code ndr_err;
    10741235        struct wbint_LookupGroupMembers *r;
    10751236
     
    10811242        }
    10821243
    1083         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    1084                 talloc_free(r);
    1085                 return false;
    1086         }
    1087 
    1088         pull = ndr_pull_init_blob(&blob, r, NULL);
    1089         if (pull == NULL) {
    1090                 talloc_free(r);
    1091                 return false;
    1092         }
    1093 
    1094         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    1095         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    1096         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1097                 talloc_free(r);
    1098                 return false;
    1099         }
    1100 
    1101         if (DEBUGLEVEL >= 10) {
    1102                 NDR_PRINT_IN_DEBUG(wbint_LookupGroupMembers, r);
     1244        pull = ndr_pull_init_blob(&p->in_data.data, r);
     1245        if (pull == NULL) {
     1246                talloc_free(r);
     1247                return false;
     1248        }
     1249
     1250        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     1251        if (p->endian) {
     1252                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     1253        }
     1254        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     1255        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1256                talloc_free(r);
     1257                return false;
     1258        }
     1259
     1260        if (DEBUGLEVEL >= 10) {
     1261                NDR_PRINT_FUNCTION_DEBUG(wbint_LookupGroupMembers, NDR_IN, r);
    11031262        }
    11041263
     
    11191278
    11201279        if (DEBUGLEVEL >= 10) {
    1121                 NDR_PRINT_OUT_DEBUG(wbint_LookupGroupMembers, r);
    1122         }
    1123 
    1124         push = ndr_push_init_ctx(r, NULL);
    1125         if (push == NULL) {
    1126                 talloc_free(r);
    1127                 return false;
    1128         }
    1129 
    1130         ndr_err = call->ndr_push(push, NDR_OUT, r);
    1131         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1132                 talloc_free(r);
    1133                 return false;
    1134         }
    1135 
    1136         blob = ndr_push_blob(push);
    1137         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    1138                 talloc_free(r);
    1139                 return false;
    1140         }
    1141 
    1142         talloc_free(r);
    1143 
    1144         return true;
    1145 }
    1146 
    1147 static bool api_wbint_QueryUserList(pipes_struct *p)
    1148 {
    1149         const struct ndr_interface_call *call;
    1150         struct ndr_pull *pull;
    1151         struct ndr_push *push;
    1152         enum ndr_err_code ndr_err;
    1153         DATA_BLOB blob;
     1280                NDR_PRINT_FUNCTION_DEBUG(wbint_LookupGroupMembers, NDR_OUT | NDR_SET_VALUES, r);
     1281        }
     1282
     1283        push = ndr_push_init_ctx(r);
     1284        if (push == NULL) {
     1285                talloc_free(r);
     1286                return false;
     1287        }
     1288
     1289        /*
     1290         * carry over the pointer count to the reply in case we are
     1291         * using full pointer. See NDR specification for full pointers
     1292         */
     1293        push->ptr_count = pull->ptr_count;
     1294
     1295        ndr_err = call->ndr_push(push, NDR_OUT, r);
     1296        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1297                talloc_free(r);
     1298                return false;
     1299        }
     1300
     1301        p->out_data.rdata = ndr_push_blob(push);
     1302        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     1303
     1304        talloc_free(r);
     1305
     1306        return true;
     1307}
     1308
     1309static bool api_wbint_QueryUserList(struct pipes_struct *p)
     1310{
     1311        const struct ndr_interface_call *call;
     1312        struct ndr_pull *pull;
     1313        struct ndr_push *push;
     1314        enum ndr_err_code ndr_err;
    11541315        struct wbint_QueryUserList *r;
    11551316
     
    11611322        }
    11621323
    1163         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    1164                 talloc_free(r);
    1165                 return false;
    1166         }
    1167 
    1168         pull = ndr_pull_init_blob(&blob, r, NULL);
    1169         if (pull == NULL) {
    1170                 talloc_free(r);
    1171                 return false;
    1172         }
    1173 
    1174         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    1175         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    1176         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1177                 talloc_free(r);
    1178                 return false;
    1179         }
    1180 
    1181         if (DEBUGLEVEL >= 10) {
    1182                 NDR_PRINT_IN_DEBUG(wbint_QueryUserList, r);
     1324        pull = ndr_pull_init_blob(&p->in_data.data, r);
     1325        if (pull == NULL) {
     1326                talloc_free(r);
     1327                return false;
     1328        }
     1329
     1330        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     1331        if (p->endian) {
     1332                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     1333        }
     1334        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     1335        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1336                talloc_free(r);
     1337                return false;
     1338        }
     1339
     1340        if (DEBUGLEVEL >= 10) {
     1341                NDR_PRINT_FUNCTION_DEBUG(wbint_QueryUserList, NDR_IN, r);
    11831342        }
    11841343
     
    11991358
    12001359        if (DEBUGLEVEL >= 10) {
    1201                 NDR_PRINT_OUT_DEBUG(wbint_QueryUserList, r);
    1202         }
    1203 
    1204         push = ndr_push_init_ctx(r, NULL);
    1205         if (push == NULL) {
    1206                 talloc_free(r);
    1207                 return false;
    1208         }
    1209 
    1210         ndr_err = call->ndr_push(push, NDR_OUT, r);
    1211         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1212                 talloc_free(r);
    1213                 return false;
    1214         }
    1215 
    1216         blob = ndr_push_blob(push);
    1217         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    1218                 talloc_free(r);
    1219                 return false;
    1220         }
    1221 
    1222         talloc_free(r);
    1223 
    1224         return true;
    1225 }
    1226 
    1227 static bool api_wbint_QueryGroupList(pipes_struct *p)
    1228 {
    1229         const struct ndr_interface_call *call;
    1230         struct ndr_pull *pull;
    1231         struct ndr_push *push;
    1232         enum ndr_err_code ndr_err;
    1233         DATA_BLOB blob;
     1360                NDR_PRINT_FUNCTION_DEBUG(wbint_QueryUserList, NDR_OUT | NDR_SET_VALUES, r);
     1361        }
     1362
     1363        push = ndr_push_init_ctx(r);
     1364        if (push == NULL) {
     1365                talloc_free(r);
     1366                return false;
     1367        }
     1368
     1369        /*
     1370         * carry over the pointer count to the reply in case we are
     1371         * using full pointer. See NDR specification for full pointers
     1372         */
     1373        push->ptr_count = pull->ptr_count;
     1374
     1375        ndr_err = call->ndr_push(push, NDR_OUT, r);
     1376        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1377                talloc_free(r);
     1378                return false;
     1379        }
     1380
     1381        p->out_data.rdata = ndr_push_blob(push);
     1382        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     1383
     1384        talloc_free(r);
     1385
     1386        return true;
     1387}
     1388
     1389static bool api_wbint_QueryGroupList(struct pipes_struct *p)
     1390{
     1391        const struct ndr_interface_call *call;
     1392        struct ndr_pull *pull;
     1393        struct ndr_push *push;
     1394        enum ndr_err_code ndr_err;
    12341395        struct wbint_QueryGroupList *r;
    12351396
     
    12411402        }
    12421403
    1243         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    1244                 talloc_free(r);
    1245                 return false;
    1246         }
    1247 
    1248         pull = ndr_pull_init_blob(&blob, r, NULL);
    1249         if (pull == NULL) {
    1250                 talloc_free(r);
    1251                 return false;
    1252         }
    1253 
    1254         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    1255         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    1256         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1257                 talloc_free(r);
    1258                 return false;
    1259         }
    1260 
    1261         if (DEBUGLEVEL >= 10) {
    1262                 NDR_PRINT_IN_DEBUG(wbint_QueryGroupList, r);
     1404        pull = ndr_pull_init_blob(&p->in_data.data, r);
     1405        if (pull == NULL) {
     1406                talloc_free(r);
     1407                return false;
     1408        }
     1409
     1410        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     1411        if (p->endian) {
     1412                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     1413        }
     1414        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     1415        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1416                talloc_free(r);
     1417                return false;
     1418        }
     1419
     1420        if (DEBUGLEVEL >= 10) {
     1421                NDR_PRINT_FUNCTION_DEBUG(wbint_QueryGroupList, NDR_IN, r);
    12631422        }
    12641423
     
    12791438
    12801439        if (DEBUGLEVEL >= 10) {
    1281                 NDR_PRINT_OUT_DEBUG(wbint_QueryGroupList, r);
    1282         }
    1283 
    1284         push = ndr_push_init_ctx(r, NULL);
    1285         if (push == NULL) {
    1286                 talloc_free(r);
    1287                 return false;
    1288         }
    1289 
    1290         ndr_err = call->ndr_push(push, NDR_OUT, r);
    1291         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1292                 talloc_free(r);
    1293                 return false;
    1294         }
    1295 
    1296         blob = ndr_push_blob(push);
    1297         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    1298                 talloc_free(r);
    1299                 return false;
    1300         }
    1301 
    1302         talloc_free(r);
    1303 
    1304         return true;
    1305 }
    1306 
    1307 static bool api_wbint_DsGetDcName(pipes_struct *p)
    1308 {
    1309         const struct ndr_interface_call *call;
    1310         struct ndr_pull *pull;
    1311         struct ndr_push *push;
    1312         enum ndr_err_code ndr_err;
    1313         DATA_BLOB blob;
     1440                NDR_PRINT_FUNCTION_DEBUG(wbint_QueryGroupList, NDR_OUT | NDR_SET_VALUES, r);
     1441        }
     1442
     1443        push = ndr_push_init_ctx(r);
     1444        if (push == NULL) {
     1445                talloc_free(r);
     1446                return false;
     1447        }
     1448
     1449        /*
     1450         * carry over the pointer count to the reply in case we are
     1451         * using full pointer. See NDR specification for full pointers
     1452         */
     1453        push->ptr_count = pull->ptr_count;
     1454
     1455        ndr_err = call->ndr_push(push, NDR_OUT, r);
     1456        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1457                talloc_free(r);
     1458                return false;
     1459        }
     1460
     1461        p->out_data.rdata = ndr_push_blob(push);
     1462        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     1463
     1464        talloc_free(r);
     1465
     1466        return true;
     1467}
     1468
     1469static bool api_wbint_DsGetDcName(struct pipes_struct *p)
     1470{
     1471        const struct ndr_interface_call *call;
     1472        struct ndr_pull *pull;
     1473        struct ndr_push *push;
     1474        enum ndr_err_code ndr_err;
    13141475        struct wbint_DsGetDcName *r;
    13151476
     
    13211482        }
    13221483
    1323         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    1324                 talloc_free(r);
    1325                 return false;
    1326         }
    1327 
    1328         pull = ndr_pull_init_blob(&blob, r, NULL);
    1329         if (pull == NULL) {
    1330                 talloc_free(r);
    1331                 return false;
    1332         }
    1333 
    1334         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    1335         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    1336         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1337                 talloc_free(r);
    1338                 return false;
    1339         }
    1340 
    1341         if (DEBUGLEVEL >= 10) {
    1342                 NDR_PRINT_IN_DEBUG(wbint_DsGetDcName, r);
     1484        pull = ndr_pull_init_blob(&p->in_data.data, r);
     1485        if (pull == NULL) {
     1486                talloc_free(r);
     1487                return false;
     1488        }
     1489
     1490        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     1491        if (p->endian) {
     1492                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     1493        }
     1494        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     1495        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1496                talloc_free(r);
     1497                return false;
     1498        }
     1499
     1500        if (DEBUGLEVEL >= 10) {
     1501                NDR_PRINT_FUNCTION_DEBUG(wbint_DsGetDcName, NDR_IN, r);
    13431502        }
    13441503
     
    13591518
    13601519        if (DEBUGLEVEL >= 10) {
    1361                 NDR_PRINT_OUT_DEBUG(wbint_DsGetDcName, r);
    1362         }
    1363 
    1364         push = ndr_push_init_ctx(r, NULL);
    1365         if (push == NULL) {
    1366                 talloc_free(r);
    1367                 return false;
    1368         }
    1369 
    1370         ndr_err = call->ndr_push(push, NDR_OUT, r);
    1371         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1372                 talloc_free(r);
    1373                 return false;
    1374         }
    1375 
    1376         blob = ndr_push_blob(push);
    1377         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    1378                 talloc_free(r);
    1379                 return false;
    1380         }
    1381 
    1382         talloc_free(r);
    1383 
    1384         return true;
    1385 }
    1386 
    1387 static bool api_wbint_LookupRids(pipes_struct *p)
    1388 {
    1389         const struct ndr_interface_call *call;
    1390         struct ndr_pull *pull;
    1391         struct ndr_push *push;
    1392         enum ndr_err_code ndr_err;
    1393         DATA_BLOB blob;
     1520                NDR_PRINT_FUNCTION_DEBUG(wbint_DsGetDcName, NDR_OUT | NDR_SET_VALUES, r);
     1521        }
     1522
     1523        push = ndr_push_init_ctx(r);
     1524        if (push == NULL) {
     1525                talloc_free(r);
     1526                return false;
     1527        }
     1528
     1529        /*
     1530         * carry over the pointer count to the reply in case we are
     1531         * using full pointer. See NDR specification for full pointers
     1532         */
     1533        push->ptr_count = pull->ptr_count;
     1534
     1535        ndr_err = call->ndr_push(push, NDR_OUT, r);
     1536        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1537                talloc_free(r);
     1538                return false;
     1539        }
     1540
     1541        p->out_data.rdata = ndr_push_blob(push);
     1542        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     1543
     1544        talloc_free(r);
     1545
     1546        return true;
     1547}
     1548
     1549static bool api_wbint_LookupRids(struct pipes_struct *p)
     1550{
     1551        const struct ndr_interface_call *call;
     1552        struct ndr_pull *pull;
     1553        struct ndr_push *push;
     1554        enum ndr_err_code ndr_err;
    13941555        struct wbint_LookupRids *r;
    13951556
     
    14011562        }
    14021563
    1403         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    1404                 talloc_free(r);
    1405                 return false;
    1406         }
    1407 
    1408         pull = ndr_pull_init_blob(&blob, r, NULL);
    1409         if (pull == NULL) {
    1410                 talloc_free(r);
    1411                 return false;
    1412         }
    1413 
    1414         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    1415         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    1416         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1417                 talloc_free(r);
    1418                 return false;
    1419         }
    1420 
    1421         if (DEBUGLEVEL >= 10) {
    1422                 NDR_PRINT_IN_DEBUG(wbint_LookupRids, r);
     1564        pull = ndr_pull_init_blob(&p->in_data.data, r);
     1565        if (pull == NULL) {
     1566                talloc_free(r);
     1567                return false;
     1568        }
     1569
     1570        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     1571        if (p->endian) {
     1572                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     1573        }
     1574        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     1575        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1576                talloc_free(r);
     1577                return false;
     1578        }
     1579
     1580        if (DEBUGLEVEL >= 10) {
     1581                NDR_PRINT_FUNCTION_DEBUG(wbint_LookupRids, NDR_IN, r);
    14231582        }
    14241583
     
    14451604
    14461605        if (DEBUGLEVEL >= 10) {
    1447                 NDR_PRINT_OUT_DEBUG(wbint_LookupRids, r);
    1448         }
    1449 
    1450         push = ndr_push_init_ctx(r, NULL);
    1451         if (push == NULL) {
    1452                 talloc_free(r);
    1453                 return false;
    1454         }
    1455 
    1456         ndr_err = call->ndr_push(push, NDR_OUT, r);
    1457         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1458                 talloc_free(r);
    1459                 return false;
    1460         }
    1461 
    1462         blob = ndr_push_blob(push);
    1463         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    1464                 talloc_free(r);
    1465                 return false;
    1466         }
    1467 
    1468         talloc_free(r);
    1469 
    1470         return true;
    1471 }
    1472 
    1473 static bool api_wbint_CheckMachineAccount(pipes_struct *p)
    1474 {
    1475         const struct ndr_interface_call *call;
    1476         struct ndr_pull *pull;
    1477         struct ndr_push *push;
    1478         enum ndr_err_code ndr_err;
    1479         DATA_BLOB blob;
     1606                NDR_PRINT_FUNCTION_DEBUG(wbint_LookupRids, NDR_OUT | NDR_SET_VALUES, r);
     1607        }
     1608
     1609        push = ndr_push_init_ctx(r);
     1610        if (push == NULL) {
     1611                talloc_free(r);
     1612                return false;
     1613        }
     1614
     1615        /*
     1616         * carry over the pointer count to the reply in case we are
     1617         * using full pointer. See NDR specification for full pointers
     1618         */
     1619        push->ptr_count = pull->ptr_count;
     1620
     1621        ndr_err = call->ndr_push(push, NDR_OUT, r);
     1622        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1623                talloc_free(r);
     1624                return false;
     1625        }
     1626
     1627        p->out_data.rdata = ndr_push_blob(push);
     1628        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     1629
     1630        talloc_free(r);
     1631
     1632        return true;
     1633}
     1634
     1635static bool api_wbint_CheckMachineAccount(struct pipes_struct *p)
     1636{
     1637        const struct ndr_interface_call *call;
     1638        struct ndr_pull *pull;
     1639        struct ndr_push *push;
     1640        enum ndr_err_code ndr_err;
    14801641        struct wbint_CheckMachineAccount *r;
    14811642
     
    14871648        }
    14881649
    1489         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    1490                 talloc_free(r);
    1491                 return false;
    1492         }
    1493 
    1494         pull = ndr_pull_init_blob(&blob, r, NULL);
    1495         if (pull == NULL) {
    1496                 talloc_free(r);
    1497                 return false;
    1498         }
    1499 
    1500         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    1501         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    1502         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1503                 talloc_free(r);
    1504                 return false;
    1505         }
    1506 
    1507         if (DEBUGLEVEL >= 10) {
    1508                 NDR_PRINT_IN_DEBUG(wbint_CheckMachineAccount, r);
     1650        pull = ndr_pull_init_blob(&p->in_data.data, r);
     1651        if (pull == NULL) {
     1652                talloc_free(r);
     1653                return false;
     1654        }
     1655
     1656        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     1657        if (p->endian) {
     1658                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     1659        }
     1660        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     1661        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1662                talloc_free(r);
     1663                return false;
     1664        }
     1665
     1666        if (DEBUGLEVEL >= 10) {
     1667                NDR_PRINT_FUNCTION_DEBUG(wbint_CheckMachineAccount, NDR_IN, r);
    15091668        }
    15101669
     
    15181677
    15191678        if (DEBUGLEVEL >= 10) {
    1520                 NDR_PRINT_OUT_DEBUG(wbint_CheckMachineAccount, r);
    1521         }
    1522 
    1523         push = ndr_push_init_ctx(r, NULL);
    1524         if (push == NULL) {
    1525                 talloc_free(r);
    1526                 return false;
    1527         }
    1528 
    1529         ndr_err = call->ndr_push(push, NDR_OUT, r);
    1530         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1531                 talloc_free(r);
    1532                 return false;
    1533         }
    1534 
    1535         blob = ndr_push_blob(push);
    1536         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    1537                 talloc_free(r);
    1538                 return false;
    1539         }
    1540 
    1541         talloc_free(r);
    1542 
    1543         return true;
    1544 }
    1545 
    1546 static bool api_wbint_ChangeMachineAccount(pipes_struct *p)
    1547 {
    1548         const struct ndr_interface_call *call;
    1549         struct ndr_pull *pull;
    1550         struct ndr_push *push;
    1551         enum ndr_err_code ndr_err;
    1552         DATA_BLOB blob;
     1679                NDR_PRINT_FUNCTION_DEBUG(wbint_CheckMachineAccount, NDR_OUT | NDR_SET_VALUES, r);
     1680        }
     1681
     1682        push = ndr_push_init_ctx(r);
     1683        if (push == NULL) {
     1684                talloc_free(r);
     1685                return false;
     1686        }
     1687
     1688        /*
     1689         * carry over the pointer count to the reply in case we are
     1690         * using full pointer. See NDR specification for full pointers
     1691         */
     1692        push->ptr_count = pull->ptr_count;
     1693
     1694        ndr_err = call->ndr_push(push, NDR_OUT, r);
     1695        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1696                talloc_free(r);
     1697                return false;
     1698        }
     1699
     1700        p->out_data.rdata = ndr_push_blob(push);
     1701        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     1702
     1703        talloc_free(r);
     1704
     1705        return true;
     1706}
     1707
     1708static bool api_wbint_ChangeMachineAccount(struct pipes_struct *p)
     1709{
     1710        const struct ndr_interface_call *call;
     1711        struct ndr_pull *pull;
     1712        struct ndr_push *push;
     1713        enum ndr_err_code ndr_err;
    15531714        struct wbint_ChangeMachineAccount *r;
    15541715
     
    15601721        }
    15611722
    1562         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    1563                 talloc_free(r);
    1564                 return false;
    1565         }
    1566 
    1567         pull = ndr_pull_init_blob(&blob, r, NULL);
    1568         if (pull == NULL) {
    1569                 talloc_free(r);
    1570                 return false;
    1571         }
    1572 
    1573         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    1574         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    1575         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1576                 talloc_free(r);
    1577                 return false;
    1578         }
    1579 
    1580         if (DEBUGLEVEL >= 10) {
    1581                 NDR_PRINT_IN_DEBUG(wbint_ChangeMachineAccount, r);
     1723        pull = ndr_pull_init_blob(&p->in_data.data, r);
     1724        if (pull == NULL) {
     1725                talloc_free(r);
     1726                return false;
     1727        }
     1728
     1729        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     1730        if (p->endian) {
     1731                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     1732        }
     1733        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     1734        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1735                talloc_free(r);
     1736                return false;
     1737        }
     1738
     1739        if (DEBUGLEVEL >= 10) {
     1740                NDR_PRINT_FUNCTION_DEBUG(wbint_ChangeMachineAccount, NDR_IN, r);
    15821741        }
    15831742
     
    15911750
    15921751        if (DEBUGLEVEL >= 10) {
    1593                 NDR_PRINT_OUT_DEBUG(wbint_ChangeMachineAccount, r);
    1594         }
    1595 
    1596         push = ndr_push_init_ctx(r, NULL);
    1597         if (push == NULL) {
    1598                 talloc_free(r);
    1599                 return false;
    1600         }
    1601 
    1602         ndr_err = call->ndr_push(push, NDR_OUT, r);
    1603         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1604                 talloc_free(r);
    1605                 return false;
    1606         }
    1607 
    1608         blob = ndr_push_blob(push);
    1609         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    1610                 talloc_free(r);
    1611                 return false;
    1612         }
    1613 
    1614         talloc_free(r);
    1615 
    1616         return true;
    1617 }
    1618 
    1619 static bool api_wbint_PingDc(pipes_struct *p)
    1620 {
    1621         const struct ndr_interface_call *call;
    1622         struct ndr_pull *pull;
    1623         struct ndr_push *push;
    1624         enum ndr_err_code ndr_err;
    1625         DATA_BLOB blob;
     1752                NDR_PRINT_FUNCTION_DEBUG(wbint_ChangeMachineAccount, NDR_OUT | NDR_SET_VALUES, r);
     1753        }
     1754
     1755        push = ndr_push_init_ctx(r);
     1756        if (push == NULL) {
     1757                talloc_free(r);
     1758                return false;
     1759        }
     1760
     1761        /*
     1762         * carry over the pointer count to the reply in case we are
     1763         * using full pointer. See NDR specification for full pointers
     1764         */
     1765        push->ptr_count = pull->ptr_count;
     1766
     1767        ndr_err = call->ndr_push(push, NDR_OUT, r);
     1768        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1769                talloc_free(r);
     1770                return false;
     1771        }
     1772
     1773        p->out_data.rdata = ndr_push_blob(push);
     1774        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
     1775
     1776        talloc_free(r);
     1777
     1778        return true;
     1779}
     1780
     1781static bool api_wbint_PingDc(struct pipes_struct *p)
     1782{
     1783        const struct ndr_interface_call *call;
     1784        struct ndr_pull *pull;
     1785        struct ndr_push *push;
     1786        enum ndr_err_code ndr_err;
    16261787        struct wbint_PingDc *r;
    16271788
     
    16331794        }
    16341795
    1635         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    1636                 talloc_free(r);
    1637                 return false;
    1638         }
    1639 
    1640         pull = ndr_pull_init_blob(&blob, r, NULL);
    1641         if (pull == NULL) {
    1642                 talloc_free(r);
    1643                 return false;
    1644         }
    1645 
    1646         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    1647         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    1648         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1649                 talloc_free(r);
    1650                 return false;
    1651         }
    1652 
    1653         if (DEBUGLEVEL >= 10) {
    1654                 NDR_PRINT_IN_DEBUG(wbint_PingDc, r);
     1796        pull = ndr_pull_init_blob(&p->in_data.data, r);
     1797        if (pull == NULL) {
     1798                talloc_free(r);
     1799                return false;
     1800        }
     1801
     1802        pull->flags |= LIBNDR_FLAG_REF_ALLOC;
     1803        if (p->endian) {
     1804                pull->flags |= LIBNDR_FLAG_BIGENDIAN;
     1805        }
     1806        ndr_err = call->ndr_pull(pull, NDR_IN, r);
     1807        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1808                talloc_free(r);
     1809                return false;
     1810        }
     1811
     1812        if (DEBUGLEVEL >= 10) {
     1813                NDR_PRINT_FUNCTION_DEBUG(wbint_PingDc, NDR_IN, r);
    16551814        }
    16561815
     
    16641823
    16651824        if (DEBUGLEVEL >= 10) {
    1666                 NDR_PRINT_OUT_DEBUG(wbint_PingDc, r);
    1667         }
    1668 
    1669         push = ndr_push_init_ctx(r, NULL);
    1670         if (push == NULL) {
    1671                 talloc_free(r);
    1672                 return false;
    1673         }
    1674 
    1675         ndr_err = call->ndr_push(push, NDR_OUT, r);
    1676         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1677                 talloc_free(r);
    1678                 return false;
    1679         }
    1680 
    1681         blob = ndr_push_blob(push);
    1682         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    1683                 talloc_free(r);
    1684                 return false;
    1685         }
    1686 
    1687         talloc_free(r);
    1688 
    1689         return true;
    1690 }
    1691 
    1692 static bool api_wbint_SetMapping(pipes_struct *p)
    1693 {
    1694         const struct ndr_interface_call *call;
    1695         struct ndr_pull *pull;
    1696         struct ndr_push *push;
    1697         enum ndr_err_code ndr_err;
    1698         DATA_BLOB blob;
    1699         struct wbint_SetMapping *r;
    1700 
    1701         call = &ndr_table_wbint.calls[NDR_WBINT_SETMAPPING];
    1702 
    1703         r = talloc(talloc_tos(), struct wbint_SetMapping);
    1704         if (r == NULL) {
    1705                 return false;
    1706         }
    1707 
    1708         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    1709                 talloc_free(r);
    1710                 return false;
    1711         }
    1712 
    1713         pull = ndr_pull_init_blob(&blob, r, NULL);
    1714         if (pull == NULL) {
    1715                 talloc_free(r);
    1716                 return false;
    1717         }
    1718 
    1719         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    1720         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    1721         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1722                 talloc_free(r);
    1723                 return false;
    1724         }
    1725 
    1726         if (DEBUGLEVEL >= 10) {
    1727                 NDR_PRINT_IN_DEBUG(wbint_SetMapping, r);
    1728         }
    1729 
    1730         r->out.result = _wbint_SetMapping(p, r);
    1731 
    1732         if (p->rng_fault_state) {
    1733                 talloc_free(r);
    1734                 /* Return true here, srv_pipe_hnd.c will take care */
    1735                 return true;
    1736         }
    1737 
    1738         if (DEBUGLEVEL >= 10) {
    1739                 NDR_PRINT_OUT_DEBUG(wbint_SetMapping, r);
    1740         }
    1741 
    1742         push = ndr_push_init_ctx(r, NULL);
    1743         if (push == NULL) {
    1744                 talloc_free(r);
    1745                 return false;
    1746         }
    1747 
    1748         ndr_err = call->ndr_push(push, NDR_OUT, r);
    1749         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1750                 talloc_free(r);
    1751                 return false;
    1752         }
    1753 
    1754         blob = ndr_push_blob(push);
    1755         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    1756                 talloc_free(r);
    1757                 return false;
    1758         }
    1759 
    1760         talloc_free(r);
    1761 
    1762         return true;
    1763 }
    1764 
    1765 static bool api_wbint_RemoveMapping(pipes_struct *p)
    1766 {
    1767         const struct ndr_interface_call *call;
    1768         struct ndr_pull *pull;
    1769         struct ndr_push *push;
    1770         enum ndr_err_code ndr_err;
    1771         DATA_BLOB blob;
    1772         struct wbint_RemoveMapping *r;
    1773 
    1774         call = &ndr_table_wbint.calls[NDR_WBINT_REMOVEMAPPING];
    1775 
    1776         r = talloc(talloc_tos(), struct wbint_RemoveMapping);
    1777         if (r == NULL) {
    1778                 return false;
    1779         }
    1780 
    1781         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    1782                 talloc_free(r);
    1783                 return false;
    1784         }
    1785 
    1786         pull = ndr_pull_init_blob(&blob, r, NULL);
    1787         if (pull == NULL) {
    1788                 talloc_free(r);
    1789                 return false;
    1790         }
    1791 
    1792         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    1793         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    1794         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1795                 talloc_free(r);
    1796                 return false;
    1797         }
    1798 
    1799         if (DEBUGLEVEL >= 10) {
    1800                 NDR_PRINT_IN_DEBUG(wbint_RemoveMapping, r);
    1801         }
    1802 
    1803         r->out.result = _wbint_RemoveMapping(p, r);
    1804 
    1805         if (p->rng_fault_state) {
    1806                 talloc_free(r);
    1807                 /* Return true here, srv_pipe_hnd.c will take care */
    1808                 return true;
    1809         }
    1810 
    1811         if (DEBUGLEVEL >= 10) {
    1812                 NDR_PRINT_OUT_DEBUG(wbint_RemoveMapping, r);
    1813         }
    1814 
    1815         push = ndr_push_init_ctx(r, NULL);
    1816         if (push == NULL) {
    1817                 talloc_free(r);
    1818                 return false;
    1819         }
    1820 
    1821         ndr_err = call->ndr_push(push, NDR_OUT, r);
    1822         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1823                 talloc_free(r);
    1824                 return false;
    1825         }
    1826 
    1827         blob = ndr_push_blob(push);
    1828         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    1829                 talloc_free(r);
    1830                 return false;
    1831         }
    1832 
    1833         talloc_free(r);
    1834 
    1835         return true;
    1836 }
    1837 
    1838 static bool api_wbint_SetHWM(pipes_struct *p)
    1839 {
    1840         const struct ndr_interface_call *call;
    1841         struct ndr_pull *pull;
    1842         struct ndr_push *push;
    1843         enum ndr_err_code ndr_err;
    1844         DATA_BLOB blob;
    1845         struct wbint_SetHWM *r;
    1846 
    1847         call = &ndr_table_wbint.calls[NDR_WBINT_SETHWM];
    1848 
    1849         r = talloc(talloc_tos(), struct wbint_SetHWM);
    1850         if (r == NULL) {
    1851                 return false;
    1852         }
    1853 
    1854         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
    1855                 talloc_free(r);
    1856                 return false;
    1857         }
    1858 
    1859         pull = ndr_pull_init_blob(&blob, r, NULL);
    1860         if (pull == NULL) {
    1861                 talloc_free(r);
    1862                 return false;
    1863         }
    1864 
    1865         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
    1866         ndr_err = call->ndr_pull(pull, NDR_IN, r);
    1867         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1868                 talloc_free(r);
    1869                 return false;
    1870         }
    1871 
    1872         if (DEBUGLEVEL >= 10) {
    1873                 NDR_PRINT_IN_DEBUG(wbint_SetHWM, r);
    1874         }
    1875 
    1876         r->out.result = _wbint_SetHWM(p, r);
    1877 
    1878         if (p->rng_fault_state) {
    1879                 talloc_free(r);
    1880                 /* Return true here, srv_pipe_hnd.c will take care */
    1881                 return true;
    1882         }
    1883 
    1884         if (DEBUGLEVEL >= 10) {
    1885                 NDR_PRINT_OUT_DEBUG(wbint_SetHWM, r);
    1886         }
    1887 
    1888         push = ndr_push_init_ctx(r, NULL);
    1889         if (push == NULL) {
    1890                 talloc_free(r);
    1891                 return false;
    1892         }
    1893 
    1894         ndr_err = call->ndr_push(push, NDR_OUT, r);
    1895         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1896                 talloc_free(r);
    1897                 return false;
    1898         }
    1899 
    1900         blob = ndr_push_blob(push);
    1901         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
    1902                 talloc_free(r);
    1903                 return false;
    1904         }
     1825                NDR_PRINT_FUNCTION_DEBUG(wbint_PingDc, NDR_OUT | NDR_SET_VALUES, r);
     1826        }
     1827
     1828        push = ndr_push_init_ctx(r);
     1829        if (push == NULL) {
     1830                talloc_free(r);
     1831                return false;
     1832        }
     1833
     1834        /*
     1835         * carry over the pointer count to the reply in case we are
     1836         * using full pointer. See NDR specification for full pointers
     1837         */
     1838        push->ptr_count = pull->ptr_count;
     1839
     1840        ndr_err = call->ndr_push(push, NDR_OUT, r);
     1841        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
     1842                talloc_free(r);
     1843                return false;
     1844        }
     1845
     1846        p->out_data.rdata = ndr_push_blob(push);
     1847        talloc_steal(p->mem_ctx, p->out_data.rdata.data);
    19051848
    19061849        talloc_free(r);
     
    19151858        {"WBINT_PING", NDR_WBINT_PING, api_wbint_Ping},
    19161859        {"WBINT_LOOKUPSID", NDR_WBINT_LOOKUPSID, api_wbint_LookupSid},
     1860        {"WBINT_LOOKUPSIDS", NDR_WBINT_LOOKUPSIDS, api_wbint_LookupSids},
    19171861        {"WBINT_LOOKUPNAME", NDR_WBINT_LOOKUPNAME, api_wbint_LookupName},
    19181862        {"WBINT_SID2UID", NDR_WBINT_SID2UID, api_wbint_Sid2Uid},
    19191863        {"WBINT_SID2GID", NDR_WBINT_SID2GID, api_wbint_Sid2Gid},
     1864        {"WBINT_SIDS2UNIXIDS", NDR_WBINT_SIDS2UNIXIDS, api_wbint_Sids2UnixIDs},
    19201865        {"WBINT_UID2SID", NDR_WBINT_UID2SID, api_wbint_Uid2Sid},
    19211866        {"WBINT_GID2SID", NDR_WBINT_GID2SID, api_wbint_Gid2Sid},
     
    19341879        {"WBINT_CHANGEMACHINEACCOUNT", NDR_WBINT_CHANGEMACHINEACCOUNT, api_wbint_ChangeMachineAccount},
    19351880        {"WBINT_PINGDC", NDR_WBINT_PINGDC, api_wbint_PingDc},
    1936         {"WBINT_SETMAPPING", NDR_WBINT_SETMAPPING, api_wbint_SetMapping},
    1937         {"WBINT_REMOVEMAPPING", NDR_WBINT_REMOVEMAPPING, api_wbint_RemoveMapping},
    1938         {"WBINT_SETHWM", NDR_WBINT_SETHWM, api_wbint_SetHWM},
    19391881};
    19401882
     
    19451887}
    19461888
    1947 NTSTATUS rpc_wbint_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *_r)
    1948 {
    1949         if (cli->pipes_struct == NULL) {
    1950                 return NT_STATUS_INVALID_PARAMETER;
    1951         }
    1952 
    1953         switch (opnum)
    1954         {
    1955                 case NDR_WBINT_PING: {
    1956                         struct wbint_Ping *r = (struct wbint_Ping *)_r;
    1957                         ZERO_STRUCT(r->out);
    1958                         r->out.out_data = talloc_zero(mem_ctx, uint32_t);
    1959                         if (r->out.out_data == NULL) {
    1960                         return NT_STATUS_NO_MEMORY;
    1961                         }
    1962 
    1963                         _wbint_Ping(cli->pipes_struct, r);
    1964                         return NT_STATUS_OK;
    1965                 }
    1966 
    1967                 case NDR_WBINT_LOOKUPSID: {
    1968                         struct wbint_LookupSid *r = (struct wbint_LookupSid *)_r;
    1969                         ZERO_STRUCT(r->out);
    1970                         r->out.type = talloc_zero(mem_ctx, enum lsa_SidType);
    1971                         if (r->out.type == NULL) {
    1972                         return NT_STATUS_NO_MEMORY;
    1973                         }
    1974 
    1975                         r->out.domain = talloc_zero(mem_ctx, const char *);
    1976                         if (r->out.domain == NULL) {
    1977                         return NT_STATUS_NO_MEMORY;
    1978                         }
    1979 
    1980                         r->out.name = talloc_zero(mem_ctx, const char *);
    1981                         if (r->out.name == NULL) {
    1982                         return NT_STATUS_NO_MEMORY;
    1983                         }
    1984 
    1985                         r->out.result = _wbint_LookupSid(cli->pipes_struct, r);
    1986                         return NT_STATUS_OK;
    1987                 }
    1988 
    1989                 case NDR_WBINT_LOOKUPNAME: {
    1990                         struct wbint_LookupName *r = (struct wbint_LookupName *)_r;
    1991                         ZERO_STRUCT(r->out);
    1992                         r->out.type = talloc_zero(mem_ctx, enum lsa_SidType);
    1993                         if (r->out.type == NULL) {
    1994                         return NT_STATUS_NO_MEMORY;
    1995                         }
    1996 
    1997                         r->out.sid = talloc_zero(mem_ctx, struct dom_sid);
    1998                         if (r->out.sid == NULL) {
    1999                         return NT_STATUS_NO_MEMORY;
    2000                         }
    2001 
    2002                         r->out.result = _wbint_LookupName(cli->pipes_struct, r);
    2003                         return NT_STATUS_OK;
    2004                 }
    2005 
    2006                 case NDR_WBINT_SID2UID: {
    2007                         struct wbint_Sid2Uid *r = (struct wbint_Sid2Uid *)_r;
    2008                         ZERO_STRUCT(r->out);
    2009                         r->out.uid = talloc_zero(mem_ctx, uint64_t);
    2010                         if (r->out.uid == NULL) {
    2011                         return NT_STATUS_NO_MEMORY;
    2012                         }
    2013 
    2014                         r->out.result = _wbint_Sid2Uid(cli->pipes_struct, r);
    2015                         return NT_STATUS_OK;
    2016                 }
    2017 
    2018                 case NDR_WBINT_SID2GID: {
    2019                         struct wbint_Sid2Gid *r = (struct wbint_Sid2Gid *)_r;
    2020                         ZERO_STRUCT(r->out);
    2021                         r->out.gid = talloc_zero(mem_ctx, uint64_t);
    2022                         if (r->out.gid == NULL) {
    2023                         return NT_STATUS_NO_MEMORY;
    2024                         }
    2025 
    2026                         r->out.result = _wbint_Sid2Gid(cli->pipes_struct, r);
    2027                         return NT_STATUS_OK;
    2028                 }
    2029 
    2030                 case NDR_WBINT_UID2SID: {
    2031                         struct wbint_Uid2Sid *r = (struct wbint_Uid2Sid *)_r;
    2032                         ZERO_STRUCT(r->out);
    2033                         r->out.sid = talloc_zero(mem_ctx, struct dom_sid);
    2034                         if (r->out.sid == NULL) {
    2035                         return NT_STATUS_NO_MEMORY;
    2036                         }
    2037 
    2038                         r->out.result = _wbint_Uid2Sid(cli->pipes_struct, r);
    2039                         return NT_STATUS_OK;
    2040                 }
    2041 
    2042                 case NDR_WBINT_GID2SID: {
    2043                         struct wbint_Gid2Sid *r = (struct wbint_Gid2Sid *)_r;
    2044                         ZERO_STRUCT(r->out);
    2045                         r->out.sid = talloc_zero(mem_ctx, struct dom_sid);
    2046                         if (r->out.sid == NULL) {
    2047                         return NT_STATUS_NO_MEMORY;
    2048                         }
    2049 
    2050                         r->out.result = _wbint_Gid2Sid(cli->pipes_struct, r);
    2051                         return NT_STATUS_OK;
    2052                 }
    2053 
    2054                 case NDR_WBINT_ALLOCATEUID: {
    2055                         struct wbint_AllocateUid *r = (struct wbint_AllocateUid *)_r;
    2056                         ZERO_STRUCT(r->out);
    2057                         r->out.uid = talloc_zero(mem_ctx, uint64_t);
    2058                         if (r->out.uid == NULL) {
    2059                         return NT_STATUS_NO_MEMORY;
    2060                         }
    2061 
    2062                         r->out.result = _wbint_AllocateUid(cli->pipes_struct, r);
    2063                         return NT_STATUS_OK;
    2064                 }
    2065 
    2066                 case NDR_WBINT_ALLOCATEGID: {
    2067                         struct wbint_AllocateGid *r = (struct wbint_AllocateGid *)_r;
    2068                         ZERO_STRUCT(r->out);
    2069                         r->out.gid = talloc_zero(mem_ctx, uint64_t);
    2070                         if (r->out.gid == NULL) {
    2071                         return NT_STATUS_NO_MEMORY;
    2072                         }
    2073 
    2074                         r->out.result = _wbint_AllocateGid(cli->pipes_struct, r);
    2075                         return NT_STATUS_OK;
    2076                 }
    2077 
    2078                 case NDR_WBINT_QUERYUSER: {
    2079                         struct wbint_QueryUser *r = (struct wbint_QueryUser *)_r;
    2080                         ZERO_STRUCT(r->out);
    2081                         r->out.info = talloc_zero(mem_ctx, struct wbint_userinfo);
    2082                         if (r->out.info == NULL) {
    2083                         return NT_STATUS_NO_MEMORY;
    2084                         }
    2085 
    2086                         r->out.result = _wbint_QueryUser(cli->pipes_struct, r);
    2087                         return NT_STATUS_OK;
    2088                 }
    2089 
    2090                 case NDR_WBINT_LOOKUPUSERALIASES: {
    2091                         struct wbint_LookupUserAliases *r = (struct wbint_LookupUserAliases *)_r;
    2092                         ZERO_STRUCT(r->out);
    2093                         r->out.rids = talloc_zero(mem_ctx, struct wbint_RidArray);
    2094                         if (r->out.rids == NULL) {
    2095                         return NT_STATUS_NO_MEMORY;
    2096                         }
    2097 
    2098                         r->out.result = _wbint_LookupUserAliases(cli->pipes_struct, r);
    2099                         return NT_STATUS_OK;
    2100                 }
    2101 
    2102                 case NDR_WBINT_LOOKUPUSERGROUPS: {
    2103                         struct wbint_LookupUserGroups *r = (struct wbint_LookupUserGroups *)_r;
    2104                         ZERO_STRUCT(r->out);
    2105                         r->out.sids = talloc_zero(mem_ctx, struct wbint_SidArray);
    2106                         if (r->out.sids == NULL) {
    2107                         return NT_STATUS_NO_MEMORY;
    2108                         }
    2109 
    2110                         r->out.result = _wbint_LookupUserGroups(cli->pipes_struct, r);
    2111                         return NT_STATUS_OK;
    2112                 }
    2113 
    2114                 case NDR_WBINT_QUERYSEQUENCENUMBER: {
    2115                         struct wbint_QuerySequenceNumber *r = (struct wbint_QuerySequenceNumber *)_r;
    2116                         ZERO_STRUCT(r->out);
    2117                         r->out.sequence = talloc_zero(mem_ctx, uint32_t);
    2118                         if (r->out.sequence == NULL) {
    2119                         return NT_STATUS_NO_MEMORY;
    2120                         }
    2121 
    2122                         r->out.result = _wbint_QuerySequenceNumber(cli->pipes_struct, r);
    2123                         return NT_STATUS_OK;
    2124                 }
    2125 
    2126                 case NDR_WBINT_LOOKUPGROUPMEMBERS: {
    2127                         struct wbint_LookupGroupMembers *r = (struct wbint_LookupGroupMembers *)_r;
    2128                         ZERO_STRUCT(r->out);
    2129                         r->out.members = talloc_zero(mem_ctx, struct wbint_Principals);
    2130                         if (r->out.members == NULL) {
    2131                         return NT_STATUS_NO_MEMORY;
    2132                         }
    2133 
    2134                         r->out.result = _wbint_LookupGroupMembers(cli->pipes_struct, r);
    2135                         return NT_STATUS_OK;
    2136                 }
    2137 
    2138                 case NDR_WBINT_QUERYUSERLIST: {
    2139                         struct wbint_QueryUserList *r = (struct wbint_QueryUserList *)_r;
    2140                         ZERO_STRUCT(r->out);
    2141                         r->out.users = talloc_zero(mem_ctx, struct wbint_userinfos);
    2142                         if (r->out.users == NULL) {
    2143                         return NT_STATUS_NO_MEMORY;
    2144                         }
    2145 
    2146                         r->out.result = _wbint_QueryUserList(cli->pipes_struct, r);
    2147                         return NT_STATUS_OK;
    2148                 }
    2149 
    2150                 case NDR_WBINT_QUERYGROUPLIST: {
    2151                         struct wbint_QueryGroupList *r = (struct wbint_QueryGroupList *)_r;
    2152                         ZERO_STRUCT(r->out);
    2153                         r->out.groups = talloc_zero(mem_ctx, struct wbint_Principals);
    2154                         if (r->out.groups == NULL) {
    2155                         return NT_STATUS_NO_MEMORY;
    2156                         }
    2157 
    2158                         r->out.result = _wbint_QueryGroupList(cli->pipes_struct, r);
    2159                         return NT_STATUS_OK;
    2160                 }
    2161 
    2162                 case NDR_WBINT_DSGETDCNAME: {
    2163                         struct wbint_DsGetDcName *r = (struct wbint_DsGetDcName *)_r;
    2164                         ZERO_STRUCT(r->out);
    2165                         r->out.dc_info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo *);
    2166                         if (r->out.dc_info == NULL) {
    2167                         return NT_STATUS_NO_MEMORY;
    2168                         }
    2169 
    2170                         r->out.result = _wbint_DsGetDcName(cli->pipes_struct, r);
    2171                         return NT_STATUS_OK;
    2172                 }
    2173 
    2174                 case NDR_WBINT_LOOKUPRIDS: {
    2175                         struct wbint_LookupRids *r = (struct wbint_LookupRids *)_r;
    2176                         ZERO_STRUCT(r->out);
    2177                         r->out.domain_name = talloc_zero(mem_ctx, const char *);
    2178                         if (r->out.domain_name == NULL) {
    2179                         return NT_STATUS_NO_MEMORY;
    2180                         }
    2181 
    2182                         r->out.names = talloc_zero(mem_ctx, struct wbint_Principals);
    2183                         if (r->out.names == NULL) {
    2184                         return NT_STATUS_NO_MEMORY;
    2185                         }
    2186 
    2187                         r->out.result = _wbint_LookupRids(cli->pipes_struct, r);
    2188                         return NT_STATUS_OK;
    2189                 }
    2190 
    2191                 case NDR_WBINT_CHECKMACHINEACCOUNT: {
    2192                         struct wbint_CheckMachineAccount *r = (struct wbint_CheckMachineAccount *)_r;
    2193                         r->out.result = _wbint_CheckMachineAccount(cli->pipes_struct, r);
    2194                         return NT_STATUS_OK;
    2195                 }
    2196 
    2197                 case NDR_WBINT_CHANGEMACHINEACCOUNT: {
    2198                         struct wbint_ChangeMachineAccount *r = (struct wbint_ChangeMachineAccount *)_r;
    2199                         r->out.result = _wbint_ChangeMachineAccount(cli->pipes_struct, r);
    2200                         return NT_STATUS_OK;
    2201                 }
    2202 
    2203                 case NDR_WBINT_PINGDC: {
    2204                         struct wbint_PingDc *r = (struct wbint_PingDc *)_r;
    2205                         r->out.result = _wbint_PingDc(cli->pipes_struct, r);
    2206                         return NT_STATUS_OK;
    2207                 }
    2208 
    2209                 case NDR_WBINT_SETMAPPING: {
    2210                         struct wbint_SetMapping *r = (struct wbint_SetMapping *)_r;
    2211                         r->out.result = _wbint_SetMapping(cli->pipes_struct, r);
    2212                         return NT_STATUS_OK;
    2213                 }
    2214 
    2215                 case NDR_WBINT_REMOVEMAPPING: {
    2216                         struct wbint_RemoveMapping *r = (struct wbint_RemoveMapping *)_r;
    2217                         r->out.result = _wbint_RemoveMapping(cli->pipes_struct, r);
    2218                         return NT_STATUS_OK;
    2219                 }
    2220 
    2221                 case NDR_WBINT_SETHWM: {
    2222                         struct wbint_SetHWM *r = (struct wbint_SetHWM *)_r;
    2223                         r->out.result = _wbint_SetHWM(cli->pipes_struct, r);
    2224                         return NT_STATUS_OK;
    2225                 }
    2226 
    2227                 default:
    2228                         return NT_STATUS_NOT_IMPLEMENTED;
    2229         }
    2230 }
    2231 
    2232 NTSTATUS rpc_wbint_init(void)
    2233 {
    2234         return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "wbint", "wbint", &ndr_table_wbint, api_wbint_cmds, sizeof(api_wbint_cmds) / sizeof(struct api_struct));
    2235 }
  • vendor/current/source3/librpc/gen_ndr/srv_wbint.h

    r414 r740  
    22#ifndef __SRV_WBINT__
    33#define __SRV_WBINT__
    4 void _wbint_Ping(pipes_struct *p, struct wbint_Ping *r);
    5 NTSTATUS _wbint_LookupSid(pipes_struct *p, struct wbint_LookupSid *r);
    6 NTSTATUS _wbint_LookupName(pipes_struct *p, struct wbint_LookupName *r);
    7 NTSTATUS _wbint_Sid2Uid(pipes_struct *p, struct wbint_Sid2Uid *r);
    8 NTSTATUS _wbint_Sid2Gid(pipes_struct *p, struct wbint_Sid2Gid *r);
    9 NTSTATUS _wbint_Uid2Sid(pipes_struct *p, struct wbint_Uid2Sid *r);
    10 NTSTATUS _wbint_Gid2Sid(pipes_struct *p, struct wbint_Gid2Sid *r);
    11 NTSTATUS _wbint_AllocateUid(pipes_struct *p, struct wbint_AllocateUid *r);
    12 NTSTATUS _wbint_AllocateGid(pipes_struct *p, struct wbint_AllocateGid *r);
    13 NTSTATUS _wbint_QueryUser(pipes_struct *p, struct wbint_QueryUser *r);
    14 NTSTATUS _wbint_LookupUserAliases(pipes_struct *p, struct wbint_LookupUserAliases *r);
    15 NTSTATUS _wbint_LookupUserGroups(pipes_struct *p, struct wbint_LookupUserGroups *r);
    16 NTSTATUS _wbint_QuerySequenceNumber(pipes_struct *p, struct wbint_QuerySequenceNumber *r);
    17 NTSTATUS _wbint_LookupGroupMembers(pipes_struct *p, struct wbint_LookupGroupMembers *r);
    18 NTSTATUS _wbint_QueryUserList(pipes_struct *p, struct wbint_QueryUserList *r);
    19 NTSTATUS _wbint_QueryGroupList(pipes_struct *p, struct wbint_QueryGroupList *r);
    20 NTSTATUS _wbint_DsGetDcName(pipes_struct *p, struct wbint_DsGetDcName *r);
    21 NTSTATUS _wbint_LookupRids(pipes_struct *p, struct wbint_LookupRids *r);
    22 NTSTATUS _wbint_CheckMachineAccount(pipes_struct *p, struct wbint_CheckMachineAccount *r);
    23 NTSTATUS _wbint_ChangeMachineAccount(pipes_struct *p, struct wbint_ChangeMachineAccount *r);
    24 NTSTATUS _wbint_PingDc(pipes_struct *p, struct wbint_PingDc *r);
    25 NTSTATUS _wbint_SetMapping(pipes_struct *p, struct wbint_SetMapping *r);
    26 NTSTATUS _wbint_RemoveMapping(pipes_struct *p, struct wbint_RemoveMapping *r);
    27 NTSTATUS _wbint_SetHWM(pipes_struct *p, struct wbint_SetHWM *r);
     4void _wbint_Ping(struct pipes_struct *p, struct wbint_Ping *r);
     5NTSTATUS _wbint_LookupSid(struct pipes_struct *p, struct wbint_LookupSid *r);
     6NTSTATUS _wbint_LookupSids(struct pipes_struct *p, struct wbint_LookupSids *r);
     7NTSTATUS _wbint_LookupName(struct pipes_struct *p, struct wbint_LookupName *r);
     8NTSTATUS _wbint_Sid2Uid(struct pipes_struct *p, struct wbint_Sid2Uid *r);
     9NTSTATUS _wbint_Sid2Gid(struct pipes_struct *p, struct wbint_Sid2Gid *r);
     10NTSTATUS _wbint_Sids2UnixIDs(struct pipes_struct *p, struct wbint_Sids2UnixIDs *r);
     11NTSTATUS _wbint_Uid2Sid(struct pipes_struct *p, struct wbint_Uid2Sid *r);
     12NTSTATUS _wbint_Gid2Sid(struct pipes_struct *p, struct wbint_Gid2Sid *r);
     13NTSTATUS _wbint_AllocateUid(struct pipes_struct *p, struct wbint_AllocateUid *r);
     14NTSTATUS _wbint_AllocateGid(struct pipes_struct *p, struct wbint_AllocateGid *r);
     15NTSTATUS _wbint_QueryUser(struct pipes_struct *p, struct wbint_QueryUser *r);
     16NTSTATUS _wbint_LookupUserAliases(struct pipes_struct *p, struct wbint_LookupUserAliases *r);
     17NTSTATUS _wbint_LookupUserGroups(struct pipes_struct *p, struct wbint_LookupUserGroups *r);
     18NTSTATUS _wbint_QuerySequenceNumber(struct pipes_struct *p, struct wbint_QuerySequenceNumber *r);
     19NTSTATUS _wbint_LookupGroupMembers(struct pipes_struct *p, struct wbint_LookupGroupMembers *r);
     20NTSTATUS _wbint_QueryUserList(struct pipes_struct *p, struct wbint_QueryUserList *r);
     21NTSTATUS _wbint_QueryGroupList(struct pipes_struct *p, struct wbint_QueryGroupList *r);
     22NTSTATUS _wbint_DsGetDcName(struct pipes_struct *p, struct wbint_DsGetDcName *r);
     23NTSTATUS _wbint_LookupRids(struct pipes_struct *p, struct wbint_LookupRids *r);
     24NTSTATUS _wbint_CheckMachineAccount(struct pipes_struct *p, struct wbint_CheckMachineAccount *r);
     25NTSTATUS _wbint_ChangeMachineAccount(struct pipes_struct *p, struct wbint_ChangeMachineAccount *r);
     26NTSTATUS _wbint_PingDc(struct pipes_struct *p, struct wbint_PingDc *r);
    2827void wbint_get_pipe_fns(struct api_struct **fns, int *n_fns);
    29 NTSTATUS rpc_wbint_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *r);
    30 void _wbint_Ping(pipes_struct *p, struct wbint_Ping *r);
    31 NTSTATUS _wbint_LookupSid(pipes_struct *p, struct wbint_LookupSid *r);
    32 NTSTATUS _wbint_LookupName(pipes_struct *p, struct wbint_LookupName *r);
    33 NTSTATUS _wbint_Sid2Uid(pipes_struct *p, struct wbint_Sid2Uid *r);
    34 NTSTATUS _wbint_Sid2Gid(pipes_struct *p, struct wbint_Sid2Gid *r);
    35 NTSTATUS _wbint_Uid2Sid(pipes_struct *p, struct wbint_Uid2Sid *r);
    36 NTSTATUS _wbint_Gid2Sid(pipes_struct *p, struct wbint_Gid2Sid *r);
    37 NTSTATUS _wbint_AllocateUid(pipes_struct *p, struct wbint_AllocateUid *r);
    38 NTSTATUS _wbint_AllocateGid(pipes_struct *p, struct wbint_AllocateGid *r);
    39 NTSTATUS _wbint_QueryUser(pipes_struct *p, struct wbint_QueryUser *r);
    40 NTSTATUS _wbint_LookupUserAliases(pipes_struct *p, struct wbint_LookupUserAliases *r);
    41 NTSTATUS _wbint_LookupUserGroups(pipes_struct *p, struct wbint_LookupUserGroups *r);
    42 NTSTATUS _wbint_QuerySequenceNumber(pipes_struct *p, struct wbint_QuerySequenceNumber *r);
    43 NTSTATUS _wbint_LookupGroupMembers(pipes_struct *p, struct wbint_LookupGroupMembers *r);
    44 NTSTATUS _wbint_QueryUserList(pipes_struct *p, struct wbint_QueryUserList *r);
    45 NTSTATUS _wbint_QueryGroupList(pipes_struct *p, struct wbint_QueryGroupList *r);
    46 NTSTATUS _wbint_DsGetDcName(pipes_struct *p, struct wbint_DsGetDcName *r);
    47 NTSTATUS _wbint_LookupRids(pipes_struct *p, struct wbint_LookupRids *r);
    48 NTSTATUS _wbint_CheckMachineAccount(pipes_struct *p, struct wbint_CheckMachineAccount *r);
    49 NTSTATUS _wbint_ChangeMachineAccount(pipes_struct *p, struct wbint_ChangeMachineAccount *r);
    50 NTSTATUS _wbint_PingDc(pipes_struct *p, struct wbint_PingDc *r);
    51 NTSTATUS _wbint_SetMapping(pipes_struct *p, struct wbint_SetMapping *r);
    52 NTSTATUS _wbint_RemoveMapping(pipes_struct *p, struct wbint_RemoveMapping *r);
    53 NTSTATUS _wbint_SetHWM(pipes_struct *p, struct wbint_SetHWM *r);
    54 NTSTATUS rpc_wbint_init(void);
    5528#endif /* __SRV_WBINT__ */
  • vendor/current/source3/librpc/gen_ndr/wbint.h

    r618 r740  
    11/* header auto-generated by pidl */
     2
     3#ifndef _PIDL_HEADER_wbint
     4#define _PIDL_HEADER_wbint
    25
    36#include <stdint.h>
     
    710#include "librpc/gen_ndr/lsa.h"
    811#include "librpc/gen_ndr/netlogon.h"
     12#include "librpc/gen_ndr/misc.h"
     13#include "librpc/gen_ndr/security.h"
     14#include "librpc/gen_ndr/idmap.h"
    915#ifndef _HEADER_wbint
    1016#define _HEADER_wbint
     17
     18struct wbint_TransID {
     19        enum id_type type;
     20        uint32_t domain_index;
     21        uint32_t rid;
     22        uint64_t unix_id;
     23};
     24
     25struct wbint_TransIDArray {
     26        uint32_t num_ids;
     27        struct wbint_TransID *ids;/* [size_is(num_ids)] */
     28};
    1129
    1230struct wbint_userinfo {
     
    4664}/* [public] */;
    4765
    48 enum wbint_IdType
    49 #ifndef USE_UINT_ENUMS
    50  {
    51         WBINT_ID_TYPE_NOT_SPECIFIED,
    52         WBINT_ID_TYPE_UID,
    53         WBINT_ID_TYPE_GID
    54 }
    55 #else
    56  { __donnot_use_enum_wbint_IdType=0x7FFFFFFF}
    57 #define WBINT_ID_TYPE_NOT_SPECIFIED ( 0 )
    58 #define WBINT_ID_TYPE_UID ( 1 )
    59 #define WBINT_ID_TYPE_GID ( 2 )
    60 #endif
    61 ;
    62 
    6366
    6467struct wbint_Ping {
     
    8992
    9093
     94struct wbint_LookupSids {
     95        struct {
     96                struct lsa_SidArray *sids;/* [ref] */
     97        } in;
     98
     99        struct {
     100                struct lsa_RefDomainList *domains;/* [ref] */
     101                struct lsa_TransNameArray *names;/* [ref] */
     102                NTSTATUS result;
     103        } out;
     104
     105};
     106
     107
    91108struct wbint_LookupName {
    92109        struct {
     
    127144        struct {
    128145                uint64_t *gid;/* [ref] */
     146                NTSTATUS result;
     147        } out;
     148
     149};
     150
     151
     152struct wbint_Sids2UnixIDs {
     153        struct {
     154                struct lsa_RefDomainList *domains;/* [ref] */
     155                struct wbint_TransIDArray *ids;/* [ref] */
     156        } in;
     157
     158        struct {
     159                struct wbint_TransIDArray *ids;/* [ref] */
    129160                NTSTATUS result;
    130161        } out;
     
    313344};
    314345
    315 
    316 struct wbint_SetMapping {
    317         struct {
    318                 struct dom_sid *sid;/* [ref] */
    319                 enum wbint_IdType type;
    320                 uint64_t id;
    321         } in;
    322 
    323         struct {
    324                 NTSTATUS result;
    325         } out;
    326 
    327 };
    328 
    329 
    330 struct wbint_RemoveMapping {
    331         struct {
    332                 struct dom_sid *sid;/* [ref] */
    333                 enum wbint_IdType type;
    334                 uint64_t id;
    335         } in;
    336 
    337         struct {
    338                 NTSTATUS result;
    339         } out;
    340 
    341 };
    342 
    343 
    344 struct wbint_SetHWM {
    345         struct {
    346                 enum wbint_IdType type;
    347                 uint64_t id;
    348         } in;
    349 
    350         struct {
    351                 NTSTATUS result;
    352         } out;
    353 
    354 };
    355 
    356346#endif /* _HEADER_wbint */
     347#endif /* _PIDL_HEADER_wbint */
  • vendor/current/source3/librpc/idl/libnet_join.idl

    r414 r740  
    11#include "idl_types.h"
    22
    3 import "wkssvc.idl", "security.idl";
     3import "wkssvc.idl", "security.idl", "misc.idl";
    44
    55/*
     
    88
    99[
    10         pointer_default(unique)
     10        pointer_default(unique),
     11        helper("ads.h")
    1112]
    1213interface libnetjoin
     
    2122                [in] string account_ou,
    2223                [in] string admin_account,
    23                 [in] string admin_password,
     24                [in,noprint] string admin_password,
    2425                [in] string machine_password,
    2526                [in] wkssvc_joinflags join_flags,
     
    2930                [in] string upn,
    3031                [in] boolean8 modify_config,
    31                 [in] ads_struct *ads,
     32                [in,unique] ads_struct *ads,
    3233                [in] boolean8 debug,
    3334                [in] boolean8 use_kerberos,
     
    5152                [in] string account_ou,
    5253                [in] string admin_account,
    53                 [in] string admin_password,
     54                [in,noprint] string admin_password,
    5455                [in] string machine_password,
    5556                [in] wkssvc_joinflags unjoin_flags,
     
    5758                [in] boolean8 modify_config,
    5859                [in] dom_sid *domain_sid,
    59                 [in] ads_struct *ads,
     60                [in,unique] ads_struct *ads,
    6061                [in] boolean8 debug,
    6162                [in] boolean8 use_kerberos,
  • vendor/current/source3/librpc/idl/libnetapi.idl

    r414 r740  
    77cpp_quote("#define MAXSUBAUTHS 15 /* max sub authorities in a SID */")
    88cpp_quote("#endif")
     9
     10import "misc.idl";
    911
    1012[
     
    799801        /*******************************************/
    800802
     803        [public] typedef [v1_enum] enum {
     804                DS_PDC_FLAG                     = 0x00000001,
     805                DS_GC_FLAG                      = 0x00000004,
     806                DS_LDAP_FLAG                    = 0x00000008,
     807                DS_DS_FLAG                      = 0x00000010,
     808                DS_KDC_FLAG                     = 0x00000020,
     809                DS_TIMESERV_FLAG                = 0x00000040,
     810                DS_CLOSEST_FLAG                 = 0x00000080,
     811                DS_WRITABLE_FLAG                = 0x00000100,
     812                DS_GOOD_TIMESERV_FLAG           = 0x00000200,
     813                DS_NDNC_FLAG                    = 0x00000400,
     814                DS_SELECT_SECRET_DOMAIN_6_FLAG  = 0x00000800,
     815                DS_FULL_SECRET_DOMAIN_6_FLAG    = 0x00001000,
     816                DS_DNS_CONTROLLER_FLAG          = 0x20000000,
     817                DS_DNS_DOMAIN_FLAG              = 0x40000000,
     818                DS_DNS_FOREST_FLAG              = 0x80000000
     819        } DOMAIN_CONTROLLER_INFO_FLAGS;
     820
    801821        [public] typedef struct {
    802822                string domain_controller_name;
     
    806826                string domain_name;
    807827                string dns_forest_name;
    808                 uint32 flags;
     828                DOMAIN_CONTROLLER_INFO_FLAGS flags;
    809829                string dc_site_name;
    810830                string client_site_name;
     
    19171937                [in] uint32 function_code,
    19181938                [in] uint32 query_level,
    1919                 [in] uint8 *data,
     1939                [in,unique] uint8 *data,
    19201940                [out,ref] uint8 **buffer
    19211941        );
  • vendor/current/source3/librpc/idl/messaging.idl

    r427 r740  
    11#include "idl_types.h"
     2
     3import "server_id.idl";
    24
    35/*
     
    3436                MSG_SHUTDOWN                    = 0x000D,
    3537
     38                MSG_IDMAP_FLUSH                 = 0x000E,
     39                MSG_IDMAP_DELETE                = 0x000F,
     40                MSG_IDMAP_KILL                  = 0x0010,
     41
    3642                /* nmbd messages */
    3743                MSG_FORCE_ELECTION              = 0x0101,
     
    4652                MSG_PRINTER_UPDATE              = 0x0205,
    4753                MSG_PRINTER_MOD                 = 0x0206,
     54                MSG_PRINTER_PCAP                = 0x0207,
    4855
    4956                /* smbd messages */
     
    8491                MSG_WINBIND_VALIDATE_CACHE      = 0x0408,
    8592                MSG_WINBIND_DUMP_DOMAIN_LIST    = 0x0409,
     93                MSG_WINBIND_IP_DROPPED          = 0x040A,
    8694
    8795                /* event messages */
  • vendor/current/source3/librpc/idl/notify.idl

    r414 r740  
    11#include "idl_types.h"
     2
     3import "file_id.idl", "server_id.idl";
    24
    35/*
     
    6163        } notify_event;
    6264
     65        typedef [v1_enum] enum {
     66                FILE_ACTION_ADDED               = 0x00000001,
     67                FILE_ACTION_REMOVED             = 0x00000002,
     68                FILE_ACTION_MODIFIED            = 0x00000003,
     69                FILE_ACTION_RENAMED_OLD_NAME    = 0x00000004,
     70                FILE_ACTION_RENAMED_NEW_NAME    = 0x00000005,
     71                FILE_ACTION_ADDED_STREAM        = 0x00000006,
     72                FILE_ACTION_REMOVED_STREAM      = 0x00000007,
     73                FILE_ACTION_MODIFIED_STREAM     = 0x00000008
     74        } FILE_NOTIFY_ACTION;
     75
     76        /* structure sent at the CIFS layer */
     77        /* Align on 4-byte boundary according to MS-CIFS 2.2.7.4.2 */
     78        typedef [public,gensize,flag(NDR_ALIGN4)] struct {
     79                uint32 NextEntryOffset;
     80                FILE_NOTIFY_ACTION Action;
     81                [value(strlen_m(FileName1)*2)] uint32 FileNameLength;
     82                [charset(UTF16),flag(STR_NOTERM)] uint16 FileName1[FileNameLength];
     83        } FILE_NOTIFY_INFORMATION;
    6384}
  • vendor/current/source3/librpc/idl/secrets.idl

    r414 r740  
    11#include "idl_types.h"
     2
     3import "security.idl";
    24
    35/*
  • vendor/current/source3/librpc/idl/wbint.idl

    r618 r740  
    11#include "idl_types.h"
    2 import "lsa.idl", "netlogon.idl";
     2import "lsa.idl", "netlogon.idl", "misc.idl", "security.idl", "idmap.idl";
    33
    44[
     
    77    pointer_default(unique),
    88    version(1.0),
    9     helpstring("winbind parent-child protocol")
     9    helpstring("winbind parent-child protocol"),
     10    no_srv_register
    1011]
    1112interface wbint
     
    2122        [out,string,charset(UTF8)] char **domain,
    2223        [out,string,charset(UTF8)] char **name
     24        );
     25
     26    NTSTATUS wbint_LookupSids(
     27        [in] lsa_SidArray *sids,
     28        [out,ref] lsa_RefDomainList *domains,
     29        [out,ref] lsa_TransNameArray *names
    2330        );
    2431
     
    4148        [in] dom_sid *sid,
    4249        [out] hyper *gid
     50        );
     51
     52    typedef struct {
     53        id_type type;
     54        uint32 domain_index;
     55        uint32 rid;
     56        hyper unix_id;
     57    } wbint_TransID;
     58
     59    typedef struct {
     60        uint32 num_ids;
     61        [size_is(num_ids)] wbint_TransID ids[];
     62    } wbint_TransIDArray;
     63
     64    NTSTATUS wbint_Sids2UnixIDs(
     65        [in] lsa_RefDomainList *domains,
     66        [in,out] wbint_TransIDArray *ids
    4367        );
    4468
     
    155179    NTSTATUS wbint_PingDc(
    156180        );
    157 
    158     typedef [public] enum {
    159         WBINT_ID_TYPE_NOT_SPECIFIED,
    160         WBINT_ID_TYPE_UID,
    161         WBINT_ID_TYPE_GID
    162     } wbint_IdType;
    163 
    164     NTSTATUS wbint_SetMapping(
    165         [in] dom_sid *sid,
    166         [in] wbint_IdType type,
    167         [in] hyper id
    168         );
    169 
    170     NTSTATUS wbint_RemoveMapping(
    171         [in] dom_sid *sid,
    172         [in] wbint_IdType type,
    173         [in] hyper id
    174         );
    175 
    176     NTSTATUS wbint_SetHWM(
    177         [in] wbint_IdType type,
    178         [in] hyper id
    179         );
    180181}
  • vendor/current/source3/librpc/ndr/util.c

    r414 r740  
    2121
    2222#include "includes.h"
    23 
    24 NTSTATUS ndr_map_error2ntstatus(enum ndr_err_code ndr_err)
    25 {
    26         switch (ndr_err) {
    27         case NDR_ERR_SUCCESS:
    28                 return NT_STATUS_OK;
    29         case NDR_ERR_BUFSIZE:
    30                 return NT_STATUS_BUFFER_TOO_SMALL;
    31         case NDR_ERR_TOKEN:
    32                 return NT_STATUS_INTERNAL_ERROR;
    33         case NDR_ERR_ALLOC:
    34                 return NT_STATUS_NO_MEMORY;
    35         case NDR_ERR_ARRAY_SIZE:
    36                 return NT_STATUS_ARRAY_BOUNDS_EXCEEDED;
    37         case NDR_ERR_INVALID_POINTER:
    38                 return NT_STATUS_INVALID_PARAMETER_MIX;
    39         case NDR_ERR_UNREAD_BYTES:
    40                 return NT_STATUS_PORT_MESSAGE_TOO_LONG;
    41         default:
    42                 break;
    43         }
    44 
    45         /* we should map all error codes to different status codes */
    46         return NT_STATUS_INVALID_PARAMETER;
    47 }
    48 
    49 /*
    50  * Convert an ndr error to string
    51  */
    52 
    53 const char *ndr_errstr(enum ndr_err_code err)
    54 {
    55         switch (err) {
    56         case NDR_ERR_SUCCESS:
    57                 return "NDR_ERR_SUCCESS";
    58                 break;
    59         case NDR_ERR_ARRAY_SIZE:
    60                 return "NDR_ERR_ARRAY_SIZE";
    61                 break;
    62         case NDR_ERR_BAD_SWITCH:
    63                 return "NDR_ERR_BAD_SWITCH";
    64                 break;
    65         case NDR_ERR_OFFSET:
    66                 return "NDR_ERR_OFFSET";
    67                 break;
    68         case NDR_ERR_RELATIVE:
    69                 return "NDR_ERR_RELATIVE";
    70                 break;
    71         case NDR_ERR_CHARCNV:
    72                 return "NDR_ERR_CHARCNV";
    73                 break;
    74         case NDR_ERR_LENGTH:
    75                 return "NDR_ERR_LENGTH";
    76                 break;
    77         case NDR_ERR_SUBCONTEXT:
    78                 return "NDR_ERR_SUBCONTEXT";
    79                 break;
    80         case NDR_ERR_COMPRESSION:
    81                 return "NDR_ERR_COMPRESSION";
    82                 break;
    83         case NDR_ERR_STRING:
    84                 return "NDR_ERR_STRING";
    85                 break;
    86         case NDR_ERR_VALIDATE:
    87                 return "NDR_ERR_VALIDATE";
    88                 break;
    89         case NDR_ERR_BUFSIZE:
    90                 return "NDR_ERR_BUFSIZE";
    91                 break;
    92         case NDR_ERR_ALLOC:
    93                 return "NDR_ERR_ALLOC";
    94                 break;
    95         case NDR_ERR_RANGE:
    96                 return "NDR_ERR_RANGE";
    97                 break;
    98         case NDR_ERR_TOKEN:
    99                 return "NDR_ERR_TOKEN";
    100                 break;
    101         case NDR_ERR_IPV4ADDRESS:
    102                 return "NDR_ERR_IPV4ADDRESS";
    103                 break;
    104         case NDR_ERR_INVALID_POINTER:
    105                 return "NDR_ERR_INVALID_POINTER";
    106                 break;
    107         case NDR_ERR_UNREAD_BYTES:
    108                 return "NDR_ERR_UNREAD_BYTES";
    109                 break;
    110         case NDR_ERR_NDR64:
    111                 return "NDR_ERR_NDR64";
    112                 break;
    113         }
    114 
    115         return talloc_asprintf(talloc_tos(), "Unknown NDR error: %d", err);
    116 }
    117 
    118 enum ndr_err_code ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, const struct server_id *r)
    119 {
    120         if (ndr_flags & NDR_SCALARS) {
    121                 NDR_CHECK(ndr_push_align(ndr, 4));
    122                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS,
    123                                           (uint32_t)r->pid));
    124 #ifdef CLUSTER_SUPPORT
    125                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS,
    126                                           (uint32_t)r->vnn));
    127 #endif
    128         }
    129         if (ndr_flags & NDR_BUFFERS) {
    130         }
    131         return NDR_ERR_SUCCESS;
    132 }
    133 
    134 enum ndr_err_code ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, struct server_id *r)
    135 {
    136         if (ndr_flags & NDR_SCALARS) {
    137                 uint32_t pid;
    138                 NDR_CHECK(ndr_pull_align(ndr, 4));
    139                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &pid));
    140 #ifdef CLUSTER_SUPPORT
    141                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vnn));
    142 #endif
    143                 r->pid = (pid_t)pid;
    144         }
    145         if (ndr_flags & NDR_BUFFERS) {
    146         }
    147         return NDR_ERR_SUCCESS;
    148 }
    149 
    150 void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct server_id *r)
    151 {
    152         ndr_print_struct(ndr, name, "server_id");
    153         ndr->depth++;
    154         ndr_print_uint32(ndr, "id", (uint32_t)r->pid);
    155 #ifdef CLUSTER_SUPPORT
    156         ndr_print_uint32(ndr, "vnn", (uint32_t)r->vnn);
    157 #endif
    158         ndr->depth--;
    159 }
    160 
    161 enum ndr_err_code ndr_push_file_id(struct ndr_push *ndr, int ndr_flags, const struct file_id *r)
    162 {
    163         if (ndr_flags & NDR_SCALARS) {
    164                 NDR_CHECK(ndr_push_align(ndr, 4));
    165                 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS,
    166                                           (uint64_t)r->devid));
    167                 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS,
    168                                           (uint64_t)r->inode));
    169                 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS,
    170                                           (uint64_t)r->extid));
    171         }
    172         if (ndr_flags & NDR_BUFFERS) {
    173         }
    174         return NDR_ERR_SUCCESS;
    175 }
    176 
    177 enum ndr_err_code ndr_pull_file_id(struct ndr_pull *ndr, int ndr_flags, struct file_id *r)
    178 {
    179         if (ndr_flags & NDR_SCALARS) {
    180                 NDR_CHECK(ndr_pull_align(ndr, 4));
    181                 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->devid));
    182                 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->inode));
    183                 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->extid));
    184         }
    185         if (ndr_flags & NDR_BUFFERS) {
    186         }
    187         return NDR_ERR_SUCCESS;
    188 }
    189 
    190 void ndr_print_file_id(struct ndr_print *ndr, const char *name, const struct file_id *r)
    191 {
    192         ndr_print_struct(ndr, name, "file_id");
    193         ndr->depth++;
    194         ndr_print_udlong(ndr, "devid", (uint64_t)r->devid);
    195         ndr_print_udlong(ndr, "inode", (uint64_t)r->inode);
    196         ndr_print_udlong(ndr, "extid", (uint64_t)r->extid);
    197         ndr->depth--;
    198 }
    199 
    200 _PUBLIC_ void ndr_print_bool(struct ndr_print *ndr, const char *name, const bool b)
    201 {
    202         ndr->print(ndr, "%-25s: %s", name, b?"true":"false");
    203 }
     23#include "../librpc/ndr/libndr.h"
     24#include "librpc/ndr/util.h"
    20425
    20526_PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss)
     
    20829        ndr->print(ndr, "%-25s: %s", name, print_sockaddr(addr, sizeof(addr), ss));
    20930}
    210 
    211 void *cmdline_lp_ctx;
    212 struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx)
    213 {
    214         return NULL;
    215 }
    216 
    217 const struct ndr_syntax_id null_ndr_syntax_id =
    218 { { 0, 0, 0, { 0, 0 }, { 0, 0, 0, 0, 0, 0 } }, 0 };
  • vendor/current/source3/librpc/rpc/dcerpc.h

    r414 r740  
    2424 * the so version number. */
    2525
    26 #ifndef __DCERPC_H__
    27 #define __DCERPC_H__
     26#ifndef _S3_DCERPC_H__
     27#define _S3_DCERPC_H__
    2828
    29 #include "includes.h"
    30 #include "librpc/rpc/dcerpc.h"
    31 #include "librpc/gen_ndr/epmapper.h"
     29#include "librpc/gen_ndr/dcerpc.h"
     30#include "../librpc/ndr/libndr.h"
     31#include "../librpc/rpc/rpc_common.h"
    3232
    33 struct loadparm_context;
    34 struct cli_credentials;
     33#define SMB_RPC_INTERFACE_VERSION 1
    3534
    36 /**
    37  * Connection to a particular DCE/RPC interface.
    38  */
    39 struct dcerpc_pipe {
    40         const struct ndr_interface_table *table;
     35struct NL_AUTH_MESSAGE;
    4136
    42         /** SMB context used when transport is ncacn_np. */
    43         struct cli_state *cli;
     37/* auth state for all bind types. */
    4438
    45         /** Samba 3 DCE/RPC client context. */
    46         struct rpc_pipe_client *rpc_cli;
     39struct pipe_auth_data {
     40        enum dcerpc_AuthType auth_type;
     41        enum dcerpc_AuthLevel auth_level;
     42
     43        void *auth_ctx;
     44
     45        /* Only the client code uses these 3 for now */
     46        char *domain;
     47        char *user_name;
     48        DATA_BLOB user_session_key;
    4749};
    4850
    49 struct rpc_request {
    50         const struct ndr_interface_call *call;
    51         prs_struct q_ps;
    52         uint32_t opnum;
    53         struct dcerpc_pipe *pipe;
    54         void *r;
    55 };
     51/* The following definitions come from librpc/rpc/dcerpc_helpers.c  */
     52NTSTATUS dcerpc_push_ncacn_packet(TALLOC_CTX *mem_ctx,
     53                                  enum dcerpc_pkt_type ptype,
     54                                  uint8_t pfc_flags,
     55                                  uint16_t auth_length,
     56                                  uint32_t call_id,
     57                                  union dcerpc_payload *u,
     58                                  DATA_BLOB *blob);
     59NTSTATUS dcerpc_pull_ncacn_packet(TALLOC_CTX *mem_ctx,
     60                                  const DATA_BLOB *blob,
     61                                  struct ncacn_packet *r,
     62                                  bool bigendian);
     63NTSTATUS dcerpc_push_schannel_bind(TALLOC_CTX *mem_ctx,
     64                                   struct NL_AUTH_MESSAGE *r,
     65                                   DATA_BLOB *blob);
     66NTSTATUS dcerpc_push_dcerpc_auth(TALLOC_CTX *mem_ctx,
     67                                 enum dcerpc_AuthType auth_type,
     68                                 enum dcerpc_AuthLevel auth_level,
     69                                 uint8_t auth_pad_length,
     70                                 uint32_t auth_context_id,
     71                                 const DATA_BLOB *credentials,
     72                                 DATA_BLOB *blob);
     73NTSTATUS dcerpc_pull_dcerpc_auth(TALLOC_CTX *mem_ctx,
     74                                 const DATA_BLOB *blob,
     75                                 struct dcerpc_auth *r,
     76                                 bool bigendian);
     77NTSTATUS dcerpc_guess_sizes(struct pipe_auth_data *auth,
     78                            size_t header_len, size_t data_left,
     79                            size_t max_xmit_frag, size_t pad_alignment,
     80                            size_t *data_to_send, size_t *frag_len,
     81                            size_t *auth_len, size_t *pad_len);
     82NTSTATUS dcerpc_add_auth_footer(struct pipe_auth_data *auth,
     83                                size_t pad_len, DATA_BLOB *rpc_out);
     84NTSTATUS dcerpc_check_auth(struct pipe_auth_data *auth,
     85                           struct ncacn_packet *pkt,
     86                           DATA_BLOB *pkt_trailer,
     87                           size_t header_size,
     88                           DATA_BLOB *raw_pkt,
     89                           size_t *pad_len);
    5690
    57 enum dcerpc_transport_t {
    58         NCA_UNKNOWN, NCACN_NP, NCACN_IP_TCP, NCACN_IP_UDP, NCACN_VNS_IPC,
    59         NCACN_VNS_SPP, NCACN_AT_DSP, NCADG_AT_DDP, NCALRPC, NCACN_UNIX_STREAM,
    60         NCADG_UNIX_DGRAM, NCACN_HTTP, NCADG_IPX, NCACN_SPX, NCACN_INTERNAL };
     91/* The following definitions come from librpc/rpc/rpc_common.c  */
    6192
     93bool smb_register_ndr_interface(const struct ndr_interface_table *interface);
     94const struct ndr_interface_table *get_iface_from_syntax(
     95        const struct ndr_syntax_id *syntax);
     96const char *get_pipe_name_from_syntax(TALLOC_CTX *mem_ctx,
     97                                     const struct ndr_syntax_id *syntax);
    6298
    63 /** this describes a binding to a particular transport/pipe */
    64 struct dcerpc_binding {
    65         enum dcerpc_transport_t transport;
    66         struct ndr_syntax_id object;
    67         const char *host;
    68         const char *target_hostname;
    69         const char *endpoint;
    70         const char **options;
    71         uint32_t flags;
    72         uint32_t assoc_group_id;
    73 };
    74 
    75 
    76 /* dcerpc pipe flags */
    77 #define DCERPC_DEBUG_PRINT_IN          (1<<0)
    78 #define DCERPC_DEBUG_PRINT_OUT         (1<<1)
    79 #define DCERPC_DEBUG_PRINT_BOTH (DCERPC_DEBUG_PRINT_IN | DCERPC_DEBUG_PRINT_OUT)
    80 
    81 #define DCERPC_DEBUG_VALIDATE_IN       (1<<2)
    82 #define DCERPC_DEBUG_VALIDATE_OUT      (1<<3)
    83 #define DCERPC_DEBUG_VALIDATE_BOTH (DCERPC_DEBUG_VALIDATE_IN | DCERPC_DEBUG_VALIDATE_OUT)
    84 
    85 #define DCERPC_CONNECT                 (1<<4)
    86 #define DCERPC_SIGN                    (1<<5)
    87 #define DCERPC_SEAL                    (1<<6)
    88 
    89 #define DCERPC_PUSH_BIGENDIAN          (1<<7)
    90 #define DCERPC_PULL_BIGENDIAN          (1<<8)
    91 
    92 #define DCERPC_SCHANNEL                (1<<9)
    93 
    94 /* use a 128 bit session key */
    95 #define DCERPC_SCHANNEL_128            (1<<12)
    96 
    97 /* check incoming pad bytes */
    98 #define DCERPC_DEBUG_PAD_CHECK         (1<<13)
    99 
    100 /* set LIBNDR_FLAG_REF_ALLOC flag when decoding NDR */
    101 #define DCERPC_NDR_REF_ALLOC           (1<<14)
    102 
    103 #define DCERPC_AUTH_OPTIONS    (DCERPC_SEAL|DCERPC_SIGN|DCERPC_SCHANNEL|DCERPC_AUTH_SPNEGO|DCERPC_AUTH_KRB5|DCERPC_AUTH_NTLM)
    104 
    105 /* select spnego auth */
    106 #define DCERPC_AUTH_SPNEGO             (1<<15)
    107 
    108 /* select krb5 auth */
    109 #define DCERPC_AUTH_KRB5               (1<<16)
    110 
    111 #define DCERPC_SMB2                    (1<<17)
    112 
    113 /* select NTLM auth */
    114 #define DCERPC_AUTH_NTLM               (1<<18)
    115 
    116 /* this triggers the DCERPC_PFC_FLAG_CONC_MPX flag in the bind request */
    117 #define DCERPC_CONCURRENT_MULTIPLEX     (1<<19)
    118 
    119 /* this triggers the DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN flag in the bind request */
    120 #define DCERPC_HEADER_SIGNING          (1<<20)
    121 
    122 /* use NDR64 transport */
    123 #define DCERPC_NDR64                   (1<<21)
    124 
    125 
    126 #endif /* __DCERPC_H__ */
     99#endif /* __S3_DCERPC_H__ */
Note: See TracChangeset for help on using the changeset viewer.