Changeset 740 for vendor/current/source3/librpc
- Timestamp:
- Nov 14, 2012, 12:59:34 PM (13 years ago)
- 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 1 1 /* header auto-generated by pidl */ 2 3 #ifndef _PIDL_HEADER_libnetjoin 4 #define _PIDL_HEADER_libnetjoin 2 5 3 6 #include <stdint.h> … … 7 10 #include "librpc/gen_ndr/wkssvc.h" 8 11 #include "librpc/gen_ndr/security.h" 12 #include "librpc/gen_ndr/misc.h" 9 13 #ifndef _HEADER_libnetjoin 10 14 #define _HEADER_libnetjoin … … 18 22 const char * account_ou; 19 23 const char * admin_account; 20 const char * admin_password; 24 const char * admin_password;/* [noprint] */ 21 25 const char * machine_password; 22 26 uint32_t join_flags; … … 26 30 const char * upn; 27 31 uint8_t modify_config; 28 struct ads_struct *ads;/* [ ref] */32 struct ads_struct *ads;/* [unique] */ 29 33 uint8_t debug; 30 34 uint8_t use_kerberos; … … 56 60 const char * account_ou; 57 61 const char * admin_account; 58 const char * admin_password; 62 const char * admin_password;/* [noprint] */ 59 63 const char * machine_password; 60 64 uint32_t unjoin_flags; … … 62 66 uint8_t modify_config; 63 67 struct dom_sid *domain_sid;/* [ref] */ 64 struct ads_struct *ads;/* [ ref] */68 struct ads_struct *ads;/* [unique] */ 65 69 uint8_t debug; 66 70 uint8_t use_kerberos; … … 82 86 83 87 #endif /* _HEADER_libnetjoin */ 88 #endif /* _PIDL_HEADER_libnetjoin */ -
vendor/current/source3/librpc/gen_ndr/libnetapi.h
r414 r740 1 1 /* header auto-generated by pidl */ 2 3 #ifndef _PIDL_HEADER_libnetapi 4 #define _PIDL_HEADER_libnetapi 2 5 3 6 #include <stdint.h> … … 9 12 #define MAXSUBAUTHS 15 /* max sub authorities in a SID */ 10 13 #endif 14 #include "librpc/gen_ndr/misc.h" 11 15 #ifndef _HEADER_libnetapi 12 16 #define _HEADER_libnetapi … … 727 731 }; 728 732 733 enum 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 729 772 struct DOMAIN_CONTROLLER_INFO { 730 773 const char * domain_controller_name; … … 734 777 const char * domain_name; 735 778 const char * dns_forest_name; 736 uint32_tflags;779 enum DOMAIN_CONTROLLER_INFO_FLAGS flags; 737 780 const char * dc_site_name; 738 781 const char * client_site_name; … … 2148 2191 uint32_t function_code; 2149 2192 uint32_t query_level; 2150 uint8_t *data;/* [ ref] */2193 uint8_t *data;/* [unique] */ 2151 2194 } in; 2152 2195 … … 2159 2202 2160 2203 #endif /* _HEADER_libnetapi */ 2204 #endif /* _PIDL_HEADER_libnetapi */ -
vendor/current/source3/librpc/gen_ndr/messaging.h
r427 r740 1 1 /* header auto-generated by pidl */ 2 3 #ifndef _PIDL_HEADER_messaging 4 #define _PIDL_HEADER_messaging 2 5 3 6 #include <stdint.h> … … 5 8 #include "libcli/util/ntstatus.h" 6 9 10 #include "librpc/gen_ndr/server_id.h" 7 11 #ifndef _HEADER_messaging 8 12 #define _HEADER_messaging … … 25 29 MSG_REQ_DMALLOC_LOG_CHANGED=(int)(0x000C), 26 30 MSG_SHUTDOWN=(int)(0x000D), 31 MSG_IDMAP_FLUSH=(int)(0x000E), 32 MSG_IDMAP_DELETE=(int)(0x000F), 33 MSG_IDMAP_KILL=(int)(0x0010), 27 34 MSG_FORCE_ELECTION=(int)(0x0101), 28 35 MSG_WINS_NEW_ENTRY=(int)(0x0102), … … 34 41 MSG_PRINTER_UPDATE=(int)(0x0205), 35 42 MSG_PRINTER_MOD=(int)(0x0206), 43 MSG_PRINTER_PCAP=(int)(0x0207), 36 44 MSG_SMB_CONF_UPDATED=(int)(0x0301), 37 45 MSG_SMB_FORCE_TDIS=(int)(0x0302), … … 62 70 MSG_WINBIND_VALIDATE_CACHE=(int)(0x0408), 63 71 MSG_WINBIND_DUMP_DOMAIN_LIST=(int)(0x0409), 72 MSG_WINBIND_IP_DROPPED=(int)(0x040A), 64 73 MSG_DUMP_EVENT_LIST=(int)(0x0500), 65 74 MSG_DBWRAP_TDB2_CHANGES=(int)(4001), … … 81 90 #define MSG_REQ_DMALLOC_LOG_CHANGED ( 0x000C ) 82 91 #define MSG_SHUTDOWN ( 0x000D ) 92 #define MSG_IDMAP_FLUSH ( 0x000E ) 93 #define MSG_IDMAP_DELETE ( 0x000F ) 94 #define MSG_IDMAP_KILL ( 0x0010 ) 83 95 #define MSG_FORCE_ELECTION ( 0x0101 ) 84 96 #define MSG_WINS_NEW_ENTRY ( 0x0102 ) … … 90 102 #define MSG_PRINTER_UPDATE ( 0x0205 ) 91 103 #define MSG_PRINTER_MOD ( 0x0206 ) 104 #define MSG_PRINTER_PCAP ( 0x0207 ) 92 105 #define MSG_SMB_CONF_UPDATED ( 0x0301 ) 93 106 #define MSG_SMB_FORCE_TDIS ( 0x0302 ) … … 118 131 #define MSG_WINBIND_VALIDATE_CACHE ( 0x0408 ) 119 132 #define MSG_WINBIND_DUMP_DOMAIN_LIST ( 0x0409 ) 133 #define MSG_WINBIND_IP_DROPPED ( 0x040A ) 120 134 #define MSG_DUMP_EVENT_LIST ( 0x0500 ) 121 135 #define MSG_DBWRAP_TDB2_CHANGES ( 4001 ) … … 149 163 150 164 #endif /* _HEADER_messaging */ 165 #endif /* _PIDL_HEADER_messaging */ -
vendor/current/source3/librpc/gen_ndr/ndr_libnet_join.c
r414 r740 6 6 #include "librpc/gen_ndr/ndr_wkssvc.h" 7 7 #include "librpc/gen_ndr/ndr_security.h" 8 #include "librpc/gen_ndr/ndr_misc.h" 8 9 _PUBLIC_ void ndr_print_libnet_JoinCtx(struct ndr_print *ndr, const char *name, int flags, const struct libnet_JoinCtx *r) 9 10 { 10 11 ndr_print_struct(ndr, name, "libnet_JoinCtx"); 12 if (r == NULL) { ndr_print_null(ndr); return; } 11 13 ndr->depth++; 12 14 if (flags & NDR_SET_VALUES) { … … 24 26 ndr_print_string(ndr, "account_ou", r->in.account_ou); 25 27 ndr_print_string(ndr, "admin_account", r->in.admin_account); 26 #ifdef DEBUG_PASSWORD27 ndr_print_string(ndr, "admin_password", r->in.admin_password);28 28 ndr_print_string(ndr, "machine_password", r->in.machine_password); 29 #else30 ndr_print_ptr(ndr, "admin_password", r->in.admin_password);31 ndr_print_ptr(ndr, "machine_password", r->in.machine_password);32 #endif33 29 ndr_print_wkssvc_joinflags(ndr, "join_flags", r->in.join_flags); 34 30 ndr_print_string(ndr, "os_version", r->in.os_version); … … 39 35 ndr_print_ptr(ndr, "ads", r->in.ads); 40 36 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 } 42 40 ndr->depth--; 43 41 ndr_print_uint8(ndr, "debug", r->in.debug); … … 70 68 { 71 69 ndr_print_struct(ndr, name, "libnet_UnjoinCtx"); 70 if (r == NULL) { ndr_print_null(ndr); return; } 72 71 ndr->depth++; 73 72 if (flags & NDR_SET_VALUES) { … … 82 81 ndr_print_string(ndr, "account_ou", r->in.account_ou); 83 82 ndr_print_string(ndr, "admin_account", r->in.admin_account); 84 #ifdef DEBUG_PASSWORD85 ndr_print_string(ndr, "admin_password", r->in.admin_password);86 83 ndr_print_string(ndr, "machine_password", r->in.machine_password); 87 #else88 ndr_print_ptr(ndr, "admin_password", r->in.admin_password);89 ndr_print_ptr(ndr, "machine_password", r->in.machine_password);90 #endif91 84 ndr_print_wkssvc_joinflags(ndr, "unjoin_flags", r->in.unjoin_flags); 92 85 ndr_print_uint8(ndr, "delete_machine_account", r->in.delete_machine_account); … … 98 91 ndr_print_ptr(ndr, "ads", r->in.ads); 99 92 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 } 101 96 ndr->depth--; 102 97 ndr_print_uint8(ndr, "debug", r->in.debug); -
vendor/current/source3/librpc/gen_ndr/ndr_libnet_join.h
r414 r740 7 7 #define _HEADER_NDR_libnetjoin 8 8 9 #include "ads.h" 9 10 #define NDR_LIBNETJOIN_CALL_COUNT (0) 10 11 enum 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 4 4 #include "librpc/gen_ndr/ndr_libnetapi.h" 5 5 6 #include "librpc/gen_ndr/ndr_misc.h" 6 7 _PUBLIC_ enum ndr_err_code ndr_push_NET_API_STATUS(struct ndr_push *ndr, int ndr_flags, enum NET_API_STATUS r) 7 8 { … … 73 74 uint32_t cntr_sub_auths_0; 74 75 ndr_print_struct(ndr, name, "domsid"); 76 if (r == NULL) { ndr_print_null(ndr); return; } 75 77 ndr->depth++; 76 78 ndr_print_uint8(ndr, "sid_rev_num", r->sid_rev_num); … … 80 82 ndr->depth++; 81 83 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]); 87 85 } 88 86 ndr->depth--; … … 152 150 { 153 151 ndr_print_struct(ndr, name, "SERVER_INFO_100"); 152 if (r == NULL) { ndr_print_null(ndr); return; } 154 153 ndr->depth++; 155 154 ndr_print_uint32(ndr, "sv100_platform_id", r->sv100_platform_id); … … 195 194 { 196 195 ndr_print_struct(ndr, name, "SERVER_INFO_101"); 196 if (r == NULL) { ndr_print_null(ndr); return; } 197 197 ndr->depth++; 198 198 ndr_print_uint32(ndr, "sv101_platform_id", r->sv101_platform_id); … … 256 256 { 257 257 ndr_print_struct(ndr, name, "SERVER_INFO_102"); 258 if (r == NULL) { ndr_print_null(ndr); return; } 258 259 ndr->depth++; 259 260 ndr_print_uint32(ndr, "sv102_platform_id", r->sv102_platform_id); … … 360 361 { 361 362 ndr_print_struct(ndr, name, "SERVER_INFO_402"); 363 if (r == NULL) { ndr_print_null(ndr); return; } 362 364 ndr->depth++; 363 365 ndr_print_uint32(ndr, "sv402_ulist_mtime", r->sv402_ulist_mtime); … … 488 490 { 489 491 ndr_print_struct(ndr, name, "SERVER_INFO_403"); 492 if (r == NULL) { ndr_print_null(ndr); return; } 490 493 ndr->depth++; 491 494 ndr_print_uint32(ndr, "sv403_ulist_mtime", r->sv403_ulist_mtime); … … 587 590 { 588 591 ndr_print_struct(ndr, name, "SERVER_INFO_502"); 592 if (r == NULL) { ndr_print_null(ndr); return; } 589 593 ndr->depth++; 590 594 ndr_print_uint32(ndr, "sv502_sessopens", r->sv502_sessopens); … … 718 722 { 719 723 ndr_print_struct(ndr, name, "SERVER_INFO_503"); 724 if (r == NULL) { ndr_print_null(ndr); return; } 720 725 ndr->depth++; 721 726 ndr_print_uint32(ndr, "sv503_sessopens", r->sv503_sessopens); … … 901 906 { 902 907 ndr_print_struct(ndr, name, "SERVER_INFO_599"); 908 if (r == NULL) { ndr_print_null(ndr); return; } 903 909 ndr->depth++; 904 910 ndr_print_uint32(ndr, "sv599_sessopens", r->sv599_sessopens); … … 1010 1016 } 1011 1017 if (ndr_flags & NDR_BUFFERS) { 1012 NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->sv598_serverguid));1013 1018 } 1014 1019 return NDR_ERR_SUCCESS; … … 1064 1069 } 1065 1070 if (ndr_flags & NDR_BUFFERS) { 1066 NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->sv598_serverguid));1067 1071 } 1068 1072 return NDR_ERR_SUCCESS; … … 1072 1076 { 1073 1077 ndr_print_struct(ndr, name, "SERVER_INFO_598"); 1078 if (r == NULL) { ndr_print_null(ndr); return; } 1074 1079 ndr->depth++; 1075 1080 ndr_print_uint32(ndr, "sv598_maxrawworkitems", r->sv598_maxrawworkitems); … … 1145 1150 { 1146 1151 ndr_print_struct(ndr, name, "SERVER_INFO_1005"); 1152 if (r == NULL) { ndr_print_null(ndr); return; } 1147 1153 ndr->depth++; 1148 1154 ndr_print_string(ndr, "sv1005_comment", r->sv1005_comment); … … 1177 1183 { 1178 1184 ndr_print_struct(ndr, name, "SERVER_INFO_1107"); 1185 if (r == NULL) { ndr_print_null(ndr); return; } 1179 1186 ndr->depth++; 1180 1187 ndr_print_uint32(ndr, "sv1107_users", r->sv1107_users); … … 1209 1216 { 1210 1217 ndr_print_struct(ndr, name, "SERVER_INFO_1010"); 1218 if (r == NULL) { ndr_print_null(ndr); return; } 1211 1219 ndr->depth++; 1212 1220 ndr_print_int32(ndr, "sv1010_disc", r->sv1010_disc); … … 1241 1249 { 1242 1250 ndr_print_struct(ndr, name, "SERVER_INFO_1016"); 1251 if (r == NULL) { ndr_print_null(ndr); return; } 1243 1252 ndr->depth++; 1244 1253 ndr_print_uint8(ndr, "sv1016_hidden", r->sv1016_hidden); … … 1273 1282 { 1274 1283 ndr_print_struct(ndr, name, "SERVER_INFO_1017"); 1284 if (r == NULL) { ndr_print_null(ndr); return; } 1275 1285 ndr->depth++; 1276 1286 ndr_print_uint32(ndr, "sv1017_announce", r->sv1017_announce); … … 1305 1315 { 1306 1316 ndr_print_struct(ndr, name, "SERVER_INFO_1018"); 1317 if (r == NULL) { ndr_print_null(ndr); return; } 1307 1318 ndr->depth++; 1308 1319 ndr_print_uint32(ndr, "sv1018_anndelta", r->sv1018_anndelta); … … 1337 1348 { 1338 1349 ndr_print_struct(ndr, name, "SERVER_INFO_1501"); 1350 if (r == NULL) { ndr_print_null(ndr); return; } 1339 1351 ndr->depth++; 1340 1352 ndr_print_uint32(ndr, "sv1501_sessopens", r->sv1501_sessopens); … … 1369 1381 { 1370 1382 ndr_print_struct(ndr, name, "SERVER_INFO_1502"); 1383 if (r == NULL) { ndr_print_null(ndr); return; } 1371 1384 ndr->depth++; 1372 1385 ndr_print_uint32(ndr, "sv1502_sessvcs", r->sv1502_sessvcs); … … 1401 1414 { 1402 1415 ndr_print_struct(ndr, name, "SERVER_INFO_1503"); 1416 if (r == NULL) { ndr_print_null(ndr); return; } 1403 1417 ndr->depth++; 1404 1418 ndr_print_uint32(ndr, "sv1503_opensearch", r->sv1503_opensearch); … … 1433 1447 { 1434 1448 ndr_print_struct(ndr, name, "SERVER_INFO_1506"); 1449 if (r == NULL) { ndr_print_null(ndr); return; } 1435 1450 ndr->depth++; 1436 1451 ndr_print_uint32(ndr, "sv1506_maxworkitems", r->sv1506_maxworkitems); … … 1465 1480 { 1466 1481 ndr_print_struct(ndr, name, "SERVER_INFO_1509"); 1482 if (r == NULL) { ndr_print_null(ndr); return; } 1467 1483 ndr->depth++; 1468 1484 ndr_print_uint32(ndr, "sv1509_maxrawbuflen", r->sv1509_maxrawbuflen); … … 1497 1513 { 1498 1514 ndr_print_struct(ndr, name, "SERVER_INFO_1510"); 1515 if (r == NULL) { ndr_print_null(ndr); return; } 1499 1516 ndr->depth++; 1500 1517 ndr_print_uint32(ndr, "sv1510_sessusers", r->sv1510_sessusers); … … 1529 1546 { 1530 1547 ndr_print_struct(ndr, name, "SERVER_INFO_1511"); 1548 if (r == NULL) { ndr_print_null(ndr); return; } 1531 1549 ndr->depth++; 1532 1550 ndr_print_uint32(ndr, "sv1511_sessconns", r->sv1511_sessconns); … … 1561 1579 { 1562 1580 ndr_print_struct(ndr, name, "SERVER_INFO_1512"); 1581 if (r == NULL) { ndr_print_null(ndr); return; } 1563 1582 ndr->depth++; 1564 1583 ndr_print_uint32(ndr, "sv1512_maxnonpagedmemoryusage", r->sv1512_maxnonpagedmemoryusage); … … 1593 1612 { 1594 1613 ndr_print_struct(ndr, name, "SERVER_INFO_1513"); 1614 if (r == NULL) { ndr_print_null(ndr); return; } 1595 1615 ndr->depth++; 1596 1616 ndr_print_uint32(ndr, "sv1513_maxpagedmemoryusage", r->sv1513_maxpagedmemoryusage); … … 1625 1645 { 1626 1646 ndr_print_struct(ndr, name, "SERVER_INFO_1514"); 1647 if (r == NULL) { ndr_print_null(ndr); return; } 1627 1648 ndr->depth++; 1628 1649 ndr_print_uint8(ndr, "sv1514_enablesoftcompat", r->sv1514_enablesoftcompat); … … 1657 1678 { 1658 1679 ndr_print_struct(ndr, name, "SERVER_INFO_1515"); 1680 if (r == NULL) { ndr_print_null(ndr); return; } 1659 1681 ndr->depth++; 1660 1682 ndr_print_uint8(ndr, "sv1515_enableforcedlogoff", r->sv1515_enableforcedlogoff); … … 1689 1711 { 1690 1712 ndr_print_struct(ndr, name, "SERVER_INFO_1516"); 1713 if (r == NULL) { ndr_print_null(ndr); return; } 1691 1714 ndr->depth++; 1692 1715 ndr_print_uint8(ndr, "sv1516_timesource", r->sv1516_timesource); … … 1721 1744 { 1722 1745 ndr_print_struct(ndr, name, "SERVER_INFO_1518"); 1746 if (r == NULL) { ndr_print_null(ndr); return; } 1723 1747 ndr->depth++; 1724 1748 ndr_print_uint8(ndr, "sv1518_lmannounce", r->sv1518_lmannounce); … … 1753 1777 { 1754 1778 ndr_print_struct(ndr, name, "SERVER_INFO_1520"); 1779 if (r == NULL) { ndr_print_null(ndr); return; } 1755 1780 ndr->depth++; 1756 1781 ndr_print_uint32(ndr, "sv1520_maxcopyreadlen", r->sv1520_maxcopyreadlen); … … 1785 1810 { 1786 1811 ndr_print_struct(ndr, name, "SERVER_INFO_1521"); 1812 if (r == NULL) { ndr_print_null(ndr); return; } 1787 1813 ndr->depth++; 1788 1814 ndr_print_uint32(ndr, "sv1521_maxcopywritelen", r->sv1521_maxcopywritelen); … … 1817 1843 { 1818 1844 ndr_print_struct(ndr, name, "SERVER_INFO_1522"); 1845 if (r == NULL) { ndr_print_null(ndr); return; } 1819 1846 ndr->depth++; 1820 1847 ndr_print_uint32(ndr, "sv1522_minkeepsearch", r->sv1522_minkeepsearch); … … 1849 1876 { 1850 1877 ndr_print_struct(ndr, name, "SERVER_INFO_1523"); 1878 if (r == NULL) { ndr_print_null(ndr); return; } 1851 1879 ndr->depth++; 1852 1880 ndr_print_uint32(ndr, "sv1523_maxkeepsearch", r->sv1523_maxkeepsearch); … … 1881 1909 { 1882 1910 ndr_print_struct(ndr, name, "SERVER_INFO_1524"); 1911 if (r == NULL) { ndr_print_null(ndr); return; } 1883 1912 ndr->depth++; 1884 1913 ndr_print_uint32(ndr, "sv1524_minkeepcomplsearch", r->sv1524_minkeepcomplsearch); … … 1913 1942 { 1914 1943 ndr_print_struct(ndr, name, "SERVER_INFO_1525"); 1944 if (r == NULL) { ndr_print_null(ndr); return; } 1915 1945 ndr->depth++; 1916 1946 ndr_print_uint32(ndr, "sv1525_maxkeepcomplsearch", r->sv1525_maxkeepcomplsearch); … … 1945 1975 { 1946 1976 ndr_print_struct(ndr, name, "SERVER_INFO_1528"); 1977 if (r == NULL) { ndr_print_null(ndr); return; } 1947 1978 ndr->depth++; 1948 1979 ndr_print_uint32(ndr, "sv1528_scavtimeout", r->sv1528_scavtimeout); … … 1977 2008 { 1978 2009 ndr_print_struct(ndr, name, "SERVER_INFO_1529"); 2010 if (r == NULL) { ndr_print_null(ndr); return; } 1979 2011 ndr->depth++; 1980 2012 ndr_print_uint32(ndr, "sv1529_minrcvqueue", r->sv1529_minrcvqueue); … … 2009 2041 { 2010 2042 ndr_print_struct(ndr, name, "SERVER_INFO_1530"); 2043 if (r == NULL) { ndr_print_null(ndr); return; } 2011 2044 ndr->depth++; 2012 2045 ndr_print_uint32(ndr, "sv1530_minfreeworkitems", r->sv1530_minfreeworkitems); … … 2041 2074 { 2042 2075 ndr_print_struct(ndr, name, "SERVER_INFO_1533"); 2076 if (r == NULL) { ndr_print_null(ndr); return; } 2043 2077 ndr->depth++; 2044 2078 ndr_print_uint32(ndr, "sv1533_maxmpxct", r->sv1533_maxmpxct); … … 2073 2107 { 2074 2108 ndr_print_struct(ndr, name, "SERVER_INFO_1534"); 2109 if (r == NULL) { ndr_print_null(ndr); return; } 2075 2110 ndr->depth++; 2076 2111 ndr_print_uint32(ndr, "sv1534_oplockbreakwait", r->sv1534_oplockbreakwait); … … 2105 2140 { 2106 2141 ndr_print_struct(ndr, name, "SERVER_INFO_1535"); 2142 if (r == NULL) { ndr_print_null(ndr); return; } 2107 2143 ndr->depth++; 2108 2144 ndr_print_uint32(ndr, "sv1535_oplockbreakresponsewait", r->sv1535_oplockbreakresponsewait); … … 2137 2173 { 2138 2174 ndr_print_struct(ndr, name, "SERVER_INFO_1536"); 2175 if (r == NULL) { ndr_print_null(ndr); return; } 2139 2176 ndr->depth++; 2140 2177 ndr_print_uint8(ndr, "sv1536_enableoplocks", r->sv1536_enableoplocks); … … 2169 2206 { 2170 2207 ndr_print_struct(ndr, name, "SERVER_INFO_1537"); 2208 if (r == NULL) { ndr_print_null(ndr); return; } 2171 2209 ndr->depth++; 2172 2210 ndr_print_uint8(ndr, "sv1537_enableoplockforceclose", r->sv1537_enableoplockforceclose); … … 2201 2239 { 2202 2240 ndr_print_struct(ndr, name, "SERVER_INFO_1538"); 2241 if (r == NULL) { ndr_print_null(ndr); return; } 2203 2242 ndr->depth++; 2204 2243 ndr_print_uint8(ndr, "sv1538_enablefcbopens", r->sv1538_enablefcbopens); … … 2233 2272 { 2234 2273 ndr_print_struct(ndr, name, "SERVER_INFO_1539"); 2274 if (r == NULL) { ndr_print_null(ndr); return; } 2235 2275 ndr->depth++; 2236 2276 ndr_print_uint8(ndr, "sv1539_enableraw", r->sv1539_enableraw); … … 2265 2305 { 2266 2306 ndr_print_struct(ndr, name, "SERVER_INFO_1540"); 2307 if (r == NULL) { ndr_print_null(ndr); return; } 2267 2308 ndr->depth++; 2268 2309 ndr_print_uint8(ndr, "sv1540_enablesharednetdrives", r->sv1540_enablesharednetdrives); … … 2297 2338 { 2298 2339 ndr_print_struct(ndr, name, "SERVER_INFO_1541"); 2340 if (r == NULL) { ndr_print_null(ndr); return; } 2299 2341 ndr->depth++; 2300 2342 ndr_print_uint8(ndr, "sv1541_minfreeconnections", r->sv1541_minfreeconnections); … … 2329 2371 { 2330 2372 ndr_print_struct(ndr, name, "SERVER_INFO_1542"); 2373 if (r == NULL) { ndr_print_null(ndr); return; } 2331 2374 ndr->depth++; 2332 2375 ndr_print_uint8(ndr, "sv1542_maxfreeconnections", r->sv1542_maxfreeconnections); … … 2361 2404 { 2362 2405 ndr_print_struct(ndr, name, "SERVER_INFO_1543"); 2406 if (r == NULL) { ndr_print_null(ndr); return; } 2363 2407 ndr->depth++; 2364 2408 ndr_print_uint32(ndr, "sv1543_initsesstable", r->sv1543_initsesstable); … … 2393 2437 { 2394 2438 ndr_print_struct(ndr, name, "SERVER_INFO_1544"); 2439 if (r == NULL) { ndr_print_null(ndr); return; } 2395 2440 ndr->depth++; 2396 2441 ndr_print_uint32(ndr, "sv1544_initconntable", r->sv1544_initconntable); … … 2425 2470 { 2426 2471 ndr_print_struct(ndr, name, "SERVER_INFO_1545"); 2472 if (r == NULL) { ndr_print_null(ndr); return; } 2427 2473 ndr->depth++; 2428 2474 ndr_print_uint32(ndr, "sv1545_initfiletable", r->sv1545_initfiletable); … … 2457 2503 { 2458 2504 ndr_print_struct(ndr, name, "SERVER_INFO_1546"); 2505 if (r == NULL) { ndr_print_null(ndr); return; } 2459 2506 ndr->depth++; 2460 2507 ndr_print_uint32(ndr, "sv1546_initsearchtable", r->sv1546_initsearchtable); … … 2489 2536 { 2490 2537 ndr_print_struct(ndr, name, "SERVER_INFO_1547"); 2538 if (r == NULL) { ndr_print_null(ndr); return; } 2491 2539 ndr->depth++; 2492 2540 ndr_print_uint32(ndr, "sv1547_alertschedule", r->sv1547_alertschedule); … … 2521 2569 { 2522 2570 ndr_print_struct(ndr, name, "SERVER_INFO_1548"); 2571 if (r == NULL) { ndr_print_null(ndr); return; } 2523 2572 ndr->depth++; 2524 2573 ndr_print_uint32(ndr, "sv1548_errorthreshold", r->sv1548_errorthreshold); … … 2553 2602 { 2554 2603 ndr_print_struct(ndr, name, "SERVER_INFO_1549"); 2604 if (r == NULL) { ndr_print_null(ndr); return; } 2555 2605 ndr->depth++; 2556 2606 ndr_print_uint32(ndr, "sv1549_networkerrorthreshold", r->sv1549_networkerrorthreshold); … … 2585 2635 { 2586 2636 ndr_print_struct(ndr, name, "SERVER_INFO_1550"); 2637 if (r == NULL) { ndr_print_null(ndr); return; } 2587 2638 ndr->depth++; 2588 2639 ndr_print_uint32(ndr, "sv1550_diskspacethreshold", r->sv1550_diskspacethreshold); … … 2617 2668 { 2618 2669 ndr_print_struct(ndr, name, "SERVER_INFO_1552"); 2670 if (r == NULL) { ndr_print_null(ndr); return; } 2619 2671 ndr->depth++; 2620 2672 ndr_print_uint32(ndr, "sv1552_maxlinkdelay", r->sv1552_maxlinkdelay); … … 2649 2701 { 2650 2702 ndr_print_struct(ndr, name, "SERVER_INFO_1553"); 2703 if (r == NULL) { ndr_print_null(ndr); return; } 2651 2704 ndr->depth++; 2652 2705 ndr_print_uint32(ndr, "sv1553_minlinkthroughput", r->sv1553_minlinkthroughput); … … 2681 2734 { 2682 2735 ndr_print_struct(ndr, name, "SERVER_INFO_1554"); 2736 if (r == NULL) { ndr_print_null(ndr); return; } 2683 2737 ndr->depth++; 2684 2738 ndr_print_uint32(ndr, "sv1554_linkinfovalidtime", r->sv1554_linkinfovalidtime); … … 2713 2767 { 2714 2768 ndr_print_struct(ndr, name, "SERVER_INFO_1555"); 2769 if (r == NULL) { ndr_print_null(ndr); return; } 2715 2770 ndr->depth++; 2716 2771 ndr_print_uint32(ndr, "sv1555_scavqosinfoupdatetime", r->sv1555_scavqosinfoupdatetime); … … 2745 2800 { 2746 2801 ndr_print_struct(ndr, name, "SERVER_INFO_1556"); 2802 if (r == NULL) { ndr_print_null(ndr); return; } 2747 2803 ndr->depth++; 2748 2804 ndr_print_uint32(ndr, "sv1556_maxworkitemidletime", r->sv1556_maxworkitemidletime); … … 2777 2833 { 2778 2834 ndr_print_struct(ndr, name, "SERVER_INFO_1557"); 2835 if (r == NULL) { ndr_print_null(ndr); return; } 2779 2836 ndr->depth++; 2780 2837 ndr_print_uint32(ndr, "sv1557_maxrawworkitems", r->sv1557_maxrawworkitems); … … 2809 2866 { 2810 2867 ndr_print_struct(ndr, name, "SERVER_INFO_1560"); 2868 if (r == NULL) { ndr_print_null(ndr); return; } 2811 2869 ndr->depth++; 2812 2870 ndr_print_uint32(ndr, "sv1560_producttype", r->sv1560_producttype); … … 2841 2899 { 2842 2900 ndr_print_struct(ndr, name, "SERVER_INFO_1561"); 2901 if (r == NULL) { ndr_print_null(ndr); return; } 2843 2902 ndr->depth++; 2844 2903 ndr_print_uint32(ndr, "sv1561_serversize", r->sv1561_serversize); … … 2873 2932 { 2874 2933 ndr_print_struct(ndr, name, "SERVER_INFO_1562"); 2934 if (r == NULL) { ndr_print_null(ndr); return; } 2875 2935 ndr->depth++; 2876 2936 ndr_print_uint32(ndr, "sv1562_connectionlessautodisc", r->sv1562_connectionlessautodisc); … … 2905 2965 { 2906 2966 ndr_print_struct(ndr, name, "SERVER_INFO_1563"); 2967 if (r == NULL) { ndr_print_null(ndr); return; } 2907 2968 ndr->depth++; 2908 2969 ndr_print_uint32(ndr, "sv1563_sharingviolationretries", r->sv1563_sharingviolationretries); … … 2937 2998 { 2938 2999 ndr_print_struct(ndr, name, "SERVER_INFO_1564"); 3000 if (r == NULL) { ndr_print_null(ndr); return; } 2939 3001 ndr->depth++; 2940 3002 ndr_print_uint32(ndr, "sv1564_sharingviolationdelay", r->sv1564_sharingviolationdelay); … … 2969 3031 { 2970 3032 ndr_print_struct(ndr, name, "SERVER_INFO_1565"); 3033 if (r == NULL) { ndr_print_null(ndr); return; } 2971 3034 ndr->depth++; 2972 3035 ndr_print_uint32(ndr, "sv1565_maxglobalopensearch", r->sv1565_maxglobalopensearch); … … 3001 3064 { 3002 3065 ndr_print_struct(ndr, name, "SERVER_INFO_1566"); 3066 if (r == NULL) { ndr_print_null(ndr); return; } 3003 3067 ndr->depth++; 3004 3068 ndr_print_uint8(ndr, "sv1566_removeduplicatesearches", r->sv1566_removeduplicatesearches); … … 3033 3097 { 3034 3098 ndr_print_struct(ndr, name, "SERVER_INFO_1567"); 3099 if (r == NULL) { ndr_print_null(ndr); return; } 3035 3100 ndr->depth++; 3036 3101 ndr_print_uint32(ndr, "sv1567_lockviolationretries", r->sv1567_lockviolationretries); … … 3065 3130 { 3066 3131 ndr_print_struct(ndr, name, "SERVER_INFO_1568"); 3132 if (r == NULL) { ndr_print_null(ndr); return; } 3067 3133 ndr->depth++; 3068 3134 ndr_print_uint32(ndr, "sv1568_lockviolationoffset", r->sv1568_lockviolationoffset); … … 3097 3163 { 3098 3164 ndr_print_struct(ndr, name, "SERVER_INFO_1569"); 3165 if (r == NULL) { ndr_print_null(ndr); return; } 3099 3166 ndr->depth++; 3100 3167 ndr_print_uint32(ndr, "sv1569_lockviolationdelay", r->sv1569_lockviolationdelay); … … 3129 3196 { 3130 3197 ndr_print_struct(ndr, name, "SERVER_INFO_1570"); 3198 if (r == NULL) { ndr_print_null(ndr); return; } 3131 3199 ndr->depth++; 3132 3200 ndr_print_uint32(ndr, "sv1570_mdlreadswitchover", r->sv1570_mdlreadswitchover); … … 3161 3229 { 3162 3230 ndr_print_struct(ndr, name, "SERVER_INFO_1571"); 3231 if (r == NULL) { ndr_print_null(ndr); return; } 3163 3232 ndr->depth++; 3164 3233 ndr_print_uint32(ndr, "sv1571_cachedopenlimit", r->sv1571_cachedopenlimit); … … 3193 3262 { 3194 3263 ndr_print_struct(ndr, name, "SERVER_INFO_1572"); 3264 if (r == NULL) { ndr_print_null(ndr); return; } 3195 3265 ndr->depth++; 3196 3266 ndr_print_uint32(ndr, "sv1572_criticalthreads", r->sv1572_criticalthreads); … … 3225 3295 { 3226 3296 ndr_print_struct(ndr, name, "SERVER_INFO_1573"); 3297 if (r == NULL) { ndr_print_null(ndr); return; } 3227 3298 ndr->depth++; 3228 3299 ndr_print_uint32(ndr, "sv1573_restrictnullsessaccess", r->sv1573_restrictnullsessaccess); … … 3257 3328 { 3258 3329 ndr_print_struct(ndr, name, "SERVER_INFO_1574"); 3330 if (r == NULL) { ndr_print_null(ndr); return; } 3259 3331 ndr->depth++; 3260 3332 ndr_print_uint32(ndr, "sv1574_enablewfw311directipx", r->sv1574_enablewfw311directipx); … … 3289 3361 { 3290 3362 ndr_print_struct(ndr, name, "SERVER_INFO_1575"); 3363 if (r == NULL) { ndr_print_null(ndr); return; } 3291 3364 ndr->depth++; 3292 3365 ndr_print_uint32(ndr, "sv1575_otherqueueaffinity", r->sv1575_otherqueueaffinity); … … 3321 3394 { 3322 3395 ndr_print_struct(ndr, name, "SERVER_INFO_1576"); 3396 if (r == NULL) { ndr_print_null(ndr); return; } 3323 3397 ndr->depth++; 3324 3398 ndr_print_uint32(ndr, "sv1576_queuesamplesecs", r->sv1576_queuesamplesecs); … … 3353 3427 { 3354 3428 ndr_print_struct(ndr, name, "SERVER_INFO_1577"); 3429 if (r == NULL) { ndr_print_null(ndr); return; } 3355 3430 ndr->depth++; 3356 3431 ndr_print_uint32(ndr, "sv1577_balancecount", r->sv1577_balancecount); … … 3385 3460 { 3386 3461 ndr_print_struct(ndr, name, "SERVER_INFO_1578"); 3462 if (r == NULL) { ndr_print_null(ndr); return; } 3387 3463 ndr->depth++; 3388 3464 ndr_print_uint32(ndr, "sv1578_preferredaffinity", r->sv1578_preferredaffinity); … … 3417 3493 { 3418 3494 ndr_print_struct(ndr, name, "SERVER_INFO_1579"); 3495 if (r == NULL) { ndr_print_null(ndr); return; } 3419 3496 ndr->depth++; 3420 3497 ndr_print_uint32(ndr, "sv1579_maxfreerfcbs", r->sv1579_maxfreerfcbs); … … 3449 3526 { 3450 3527 ndr_print_struct(ndr, name, "SERVER_INFO_1580"); 3528 if (r == NULL) { ndr_print_null(ndr); return; } 3451 3529 ndr->depth++; 3452 3530 ndr_print_uint32(ndr, "sv1580_maxfreemfcbs", r->sv1580_maxfreemfcbs); … … 3481 3559 { 3482 3560 ndr_print_struct(ndr, name, "SERVER_INFO_1581"); 3561 if (r == NULL) { ndr_print_null(ndr); return; } 3483 3562 ndr->depth++; 3484 3563 ndr_print_uint32(ndr, "sv1581_maxfreemlcbs", r->sv1581_maxfreemlcbs); … … 3513 3592 { 3514 3593 ndr_print_struct(ndr, name, "SERVER_INFO_1582"); 3594 if (r == NULL) { ndr_print_null(ndr); return; } 3515 3595 ndr->depth++; 3516 3596 ndr_print_uint32(ndr, "sv1582_maxfreepagedpoolchunks", r->sv1582_maxfreepagedpoolchunks); … … 3545 3625 { 3546 3626 ndr_print_struct(ndr, name, "SERVER_INFO_1583"); 3627 if (r == NULL) { ndr_print_null(ndr); return; } 3547 3628 ndr->depth++; 3548 3629 ndr_print_uint32(ndr, "sv1583_minpagedpoolchunksize", r->sv1583_minpagedpoolchunksize); … … 3577 3658 { 3578 3659 ndr_print_struct(ndr, name, "SERVER_INFO_1584"); 3660 if (r == NULL) { ndr_print_null(ndr); return; } 3579 3661 ndr->depth++; 3580 3662 ndr_print_uint32(ndr, "sv1584_maxpagedpoolchunksize", r->sv1584_maxpagedpoolchunksize); … … 3609 3691 { 3610 3692 ndr_print_struct(ndr, name, "SERVER_INFO_1585"); 3693 if (r == NULL) { ndr_print_null(ndr); return; } 3611 3694 ndr->depth++; 3612 3695 ndr_print_uint8(ndr, "sv1585_sendsfrompreferredprocessor", r->sv1585_sendsfrompreferredprocessor); … … 3641 3724 { 3642 3725 ndr_print_struct(ndr, name, "SERVER_INFO_1586"); 3726 if (r == NULL) { ndr_print_null(ndr); return; } 3643 3727 ndr->depth++; 3644 3728 ndr_print_uint32(ndr, "sv1586_maxthreadsperqueue", r->sv1586_maxthreadsperqueue); … … 3673 3757 { 3674 3758 ndr_print_struct(ndr, name, "SERVER_INFO_1587"); 3759 if (r == NULL) { ndr_print_null(ndr); return; } 3675 3760 ndr->depth++; 3676 3761 ndr_print_uint32(ndr, "sv1587_cacheddirectorylimit", r->sv1587_cacheddirectorylimit); … … 3705 3790 { 3706 3791 ndr_print_struct(ndr, name, "SERVER_INFO_1588"); 3792 if (r == NULL) { ndr_print_null(ndr); return; } 3707 3793 ndr->depth++; 3708 3794 ndr_print_uint32(ndr, "sv1588_maxcopylength", r->sv1588_maxcopylength); … … 3737 3823 { 3738 3824 ndr_print_struct(ndr, name, "SERVER_INFO_1590"); 3825 if (r == NULL) { ndr_print_null(ndr); return; } 3739 3826 ndr->depth++; 3740 3827 ndr_print_uint32(ndr, "sv1590_enablecompression", r->sv1590_enablecompression); … … 3769 3856 { 3770 3857 ndr_print_struct(ndr, name, "SERVER_INFO_1591"); 3858 if (r == NULL) { ndr_print_null(ndr); return; } 3771 3859 ndr->depth++; 3772 3860 ndr_print_uint32(ndr, "sv1591_autosharewks", r->sv1591_autosharewks); … … 3801 3889 { 3802 3890 ndr_print_struct(ndr, name, "SERVER_INFO_1592"); 3891 if (r == NULL) { ndr_print_null(ndr); return; } 3803 3892 ndr->depth++; 3804 3893 ndr_print_uint32(ndr, "sv1592_autosharewks", r->sv1592_autosharewks); … … 3833 3922 { 3834 3923 ndr_print_struct(ndr, name, "SERVER_INFO_1593"); 3924 if (r == NULL) { ndr_print_null(ndr); return; } 3835 3925 ndr->depth++; 3836 3926 ndr_print_uint32(ndr, "sv1593_enablesecuritysignature", r->sv1593_enablesecuritysignature); … … 3865 3955 { 3866 3956 ndr_print_struct(ndr, name, "SERVER_INFO_1594"); 3957 if (r == NULL) { ndr_print_null(ndr); return; } 3867 3958 ndr->depth++; 3868 3959 ndr_print_uint32(ndr, "sv1594_requiresecuritysignature", r->sv1594_requiresecuritysignature); … … 3897 3988 { 3898 3989 ndr_print_struct(ndr, name, "SERVER_INFO_1595"); 3990 if (r == NULL) { ndr_print_null(ndr); return; } 3899 3991 ndr->depth++; 3900 3992 ndr_print_uint32(ndr, "sv1595_minclientbuffersize", r->sv1595_minclientbuffersize); … … 3929 4021 { 3930 4022 ndr_print_struct(ndr, name, "SERVER_INFO_1596"); 4023 if (r == NULL) { ndr_print_null(ndr); return; } 3931 4024 ndr->depth++; 3932 4025 ndr_print_uint32(ndr, "sv1596_ConnectionNoSessionsTimeout", r->sv1596_ConnectionNoSessionsTimeout); … … 3961 4054 { 3962 4055 ndr_print_struct(ndr, name, "SERVER_INFO_1597"); 4056 if (r == NULL) { ndr_print_null(ndr); return; } 3963 4057 ndr->depth++; 3964 4058 ndr_print_uint32(ndr, "sv1597_IdleThreadTimeOut", r->sv1597_IdleThreadTimeOut); … … 3993 4087 { 3994 4088 ndr_print_struct(ndr, name, "SERVER_INFO_1598"); 4089 if (r == NULL) { ndr_print_null(ndr); return; } 3995 4090 ndr->depth++; 3996 4091 ndr_print_uint32(ndr, "sv1598_enableW9xsecuritysignature", r->sv1598_enableW9xsecuritysignature); … … 4025 4120 { 4026 4121 ndr_print_struct(ndr, name, "SERVER_INFO_1599"); 4122 if (r == NULL) { ndr_print_null(ndr); return; } 4027 4123 ndr->depth++; 4028 4124 ndr_print_uint8(ndr, "sv1598_enforcekerberosreauthentication", r->sv1598_enforcekerberosreauthentication); … … 4057 4153 { 4058 4154 ndr_print_struct(ndr, name, "SERVER_INFO_1600"); 4155 if (r == NULL) { ndr_print_null(ndr); return; } 4059 4156 ndr->depth++; 4060 4157 ndr_print_uint8(ndr, "sv1598_disabledos", r->sv1598_disabledos); … … 4089 4186 { 4090 4187 ndr_print_struct(ndr, name, "SERVER_INFO_1601"); 4188 if (r == NULL) { ndr_print_null(ndr); return; } 4091 4189 ndr->depth++; 4092 4190 ndr_print_uint32(ndr, "sv1598_lowdiskspaceminimum", r->sv1598_lowdiskspaceminimum); … … 4121 4219 { 4122 4220 ndr_print_struct(ndr, name, "SERVER_INFO_1602"); 4221 if (r == NULL) { ndr_print_null(ndr); return; } 4123 4222 ndr->depth++; 4124 4223 ndr_print_uint8(ndr, "sv_1598_disablestrictnamechecking", r->sv_1598_disablestrictnamechecking); 4125 4224 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); 4126 4263 } 4127 4264 … … 4136 4273 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain_name)); 4137 4274 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)); 4139 4276 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->dc_site_name)); 4140 4277 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->client_site_name)); … … 4142 4279 } 4143 4280 if (ndr_flags & NDR_BUFFERS) { 4144 NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->domain_guid));4145 4281 } 4146 4282 return NDR_ERR_SUCCESS; … … 4157 4293 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain_name)); 4158 4294 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)); 4160 4296 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->dc_site_name)); 4161 4297 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->client_site_name)); … … 4163 4299 } 4164 4300 if (ndr_flags & NDR_BUFFERS) { 4165 NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->domain_guid));4166 4301 } 4167 4302 return NDR_ERR_SUCCESS; … … 4171 4306 { 4172 4307 ndr_print_struct(ndr, name, "DOMAIN_CONTROLLER_INFO"); 4308 if (r == NULL) { ndr_print_null(ndr); return; } 4173 4309 ndr->depth++; 4174 4310 ndr_print_string(ndr, "domain_controller_name", r->domain_controller_name); … … 4178 4314 ndr_print_string(ndr, "domain_name", r->domain_name); 4179 4315 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); 4181 4317 ndr_print_string(ndr, "dc_site_name", r->dc_site_name); 4182 4318 ndr_print_string(ndr, "client_site_name", r->client_site_name); … … 4211 4347 { 4212 4348 ndr_print_struct(ndr, name, "USER_INFO_0"); 4349 if (r == NULL) { ndr_print_null(ndr); return; } 4213 4350 ndr->depth++; 4214 4351 ndr_print_string(ndr, "usri0_name", r->usri0_name); … … 4257 4394 { 4258 4395 ndr_print_struct(ndr, name, "USER_INFO_1"); 4396 if (r == NULL) { ndr_print_null(ndr); return; } 4259 4397 ndr->depth++; 4260 4398 ndr_print_string(ndr, "usri1_name", r->usri1_name); … … 4358 4496 { 4359 4497 ndr_print_struct(ndr, name, "USER_INFO_2"); 4498 if (r == NULL) { ndr_print_null(ndr); return; } 4360 4499 ndr->depth++; 4361 4500 ndr_print_string(ndr, "usri2_name", r->usri2_name); … … 4488 4627 { 4489 4628 ndr_print_struct(ndr, name, "USER_INFO_3"); 4629 if (r == NULL) { ndr_print_null(ndr); return; } 4490 4630 ndr->depth++; 4491 4631 ndr_print_string(ndr, "usri3_name", r->usri3_name); … … 4640 4780 { 4641 4781 ndr_print_struct(ndr, name, "USER_INFO_4"); 4782 if (r == NULL) { ndr_print_null(ndr); return; } 4642 4783 ndr->depth++; 4643 4784 ndr_print_string(ndr, "usri4_name", r->usri4_name); … … 4716 4857 { 4717 4858 ndr_print_struct(ndr, name, "USER_INFO_10"); 4859 if (r == NULL) { ndr_print_null(ndr); return; } 4718 4860 ndr->depth++; 4719 4861 ndr_print_string(ndr, "usri10_name", r->usri10_name); … … 4805 4947 { 4806 4948 ndr_print_struct(ndr, name, "USER_INFO_11"); 4949 if (r == NULL) { ndr_print_null(ndr); return; } 4807 4950 ndr->depth++; 4808 4951 ndr_print_string(ndr, "usri11_name", r->usri11_name); … … 4869 5012 { 4870 5013 ndr_print_struct(ndr, name, "USER_INFO_20"); 5014 if (r == NULL) { ndr_print_null(ndr); return; } 4871 5015 ndr->depth++; 4872 5016 ndr_print_string(ndr, "usri20_name", r->usri20_name); … … 4906 5050 { 4907 5051 ndr_print_struct(ndr, name, "USER_INFO_21"); 5052 if (r == NULL) { ndr_print_null(ndr); return; } 4908 5053 ndr->depth++; 4909 5054 ndr_print_array_uint8(ndr, "usri21_password", r->usri21_password, ENCRYPTED_PWLEN); … … 5001 5146 { 5002 5147 ndr_print_struct(ndr, name, "USER_INFO_22"); 5148 if (r == NULL) { ndr_print_null(ndr); return; } 5003 5149 ndr->depth++; 5004 5150 ndr_print_string(ndr, "usri22_name", r->usri22_name); … … 5085 5231 { 5086 5232 ndr_print_struct(ndr, name, "USER_INFO_23"); 5233 if (r == NULL) { ndr_print_null(ndr); return; } 5087 5234 ndr->depth++; 5088 5235 ndr_print_string(ndr, "usri23_name", r->usri23_name); … … 5126 5273 { 5127 5274 ndr_print_struct(ndr, name, "USER_INFO_1003"); 5275 if (r == NULL) { ndr_print_null(ndr); return; } 5128 5276 ndr->depth++; 5129 5277 ndr_print_string(ndr, "usri1003_password", r->usri1003_password); … … 5158 5306 { 5159 5307 ndr_print_struct(ndr, name, "USER_INFO_1005"); 5308 if (r == NULL) { ndr_print_null(ndr); return; } 5160 5309 ndr->depth++; 5161 5310 ndr_print_uint32(ndr, "usri1005_priv", r->usri1005_priv); … … 5190 5339 { 5191 5340 ndr_print_struct(ndr, name, "USER_INFO_1006"); 5341 if (r == NULL) { ndr_print_null(ndr); return; } 5192 5342 ndr->depth++; 5193 5343 ndr_print_string(ndr, "usri1006_home_dir", r->usri1006_home_dir); … … 5222 5372 { 5223 5373 ndr_print_struct(ndr, name, "USER_INFO_1007"); 5374 if (r == NULL) { ndr_print_null(ndr); return; } 5224 5375 ndr->depth++; 5225 5376 ndr_print_string(ndr, "usri1007_comment", r->usri1007_comment); … … 5254 5405 { 5255 5406 ndr_print_struct(ndr, name, "USER_INFO_1008"); 5407 if (r == NULL) { ndr_print_null(ndr); return; } 5256 5408 ndr->depth++; 5257 5409 ndr_print_uint32(ndr, "usri1008_flags", r->usri1008_flags); … … 5286 5438 { 5287 5439 ndr_print_struct(ndr, name, "USER_INFO_1009"); 5440 if (r == NULL) { ndr_print_null(ndr); return; } 5288 5441 ndr->depth++; 5289 5442 ndr_print_string(ndr, "usri1009_script_path", r->usri1009_script_path); … … 5318 5471 { 5319 5472 ndr_print_struct(ndr, name, "USER_INFO_1010"); 5473 if (r == NULL) { ndr_print_null(ndr); return; } 5320 5474 ndr->depth++; 5321 5475 ndr_print_uint32(ndr, "usri1010_auth_flags", r->usri1010_auth_flags); … … 5350 5504 { 5351 5505 ndr_print_struct(ndr, name, "USER_INFO_1011"); 5506 if (r == NULL) { ndr_print_null(ndr); return; } 5352 5507 ndr->depth++; 5353 5508 ndr_print_string(ndr, "usri1011_full_name", r->usri1011_full_name); … … 5382 5537 { 5383 5538 ndr_print_struct(ndr, name, "USER_INFO_1012"); 5539 if (r == NULL) { ndr_print_null(ndr); return; } 5384 5540 ndr->depth++; 5385 5541 ndr_print_string(ndr, "usri1012_usr_comment", r->usri1012_usr_comment); … … 5414 5570 { 5415 5571 ndr_print_struct(ndr, name, "USER_INFO_1013"); 5572 if (r == NULL) { ndr_print_null(ndr); return; } 5416 5573 ndr->depth++; 5417 5574 ndr_print_string(ndr, "usri1013_parms", r->usri1013_parms); … … 5446 5603 { 5447 5604 ndr_print_struct(ndr, name, "USER_INFO_1014"); 5605 if (r == NULL) { ndr_print_null(ndr); return; } 5448 5606 ndr->depth++; 5449 5607 ndr_print_string(ndr, "usri1014_workstations", r->usri1014_workstations); … … 5478 5636 { 5479 5637 ndr_print_struct(ndr, name, "USER_INFO_1017"); 5638 if (r == NULL) { ndr_print_null(ndr); return; } 5480 5639 ndr->depth++; 5481 5640 ndr_print_uint32(ndr, "usri1017_acct_expires", r->usri1017_acct_expires); … … 5510 5669 { 5511 5670 ndr_print_struct(ndr, name, "USER_INFO_1018"); 5671 if (r == NULL) { ndr_print_null(ndr); return; } 5512 5672 ndr->depth++; 5513 5673 ndr_print_uint32(ndr, "usri1018_max_storage", r->usri1018_max_storage); … … 5560 5720 { 5561 5721 ndr_print_struct(ndr, name, "USER_INFO_1020"); 5722 if (r == NULL) { ndr_print_null(ndr); return; } 5562 5723 ndr->depth++; 5563 5724 ndr_print_uint32(ndr, "usri1020_units_per_week", r->usri1020_units_per_week); … … 5598 5759 { 5599 5760 ndr_print_struct(ndr, name, "USER_INFO_1023"); 5761 if (r == NULL) { ndr_print_null(ndr); return; } 5600 5762 ndr->depth++; 5601 5763 ndr_print_string(ndr, "usri1023_logon_server", r->usri1023_logon_server); … … 5630 5792 { 5631 5793 ndr_print_struct(ndr, name, "USER_INFO_1024"); 5794 if (r == NULL) { ndr_print_null(ndr); return; } 5632 5795 ndr->depth++; 5633 5796 ndr_print_uint32(ndr, "usri1024_country_code", r->usri1024_country_code); … … 5662 5825 { 5663 5826 ndr_print_struct(ndr, name, "USER_INFO_1025"); 5827 if (r == NULL) { ndr_print_null(ndr); return; } 5664 5828 ndr->depth++; 5665 5829 ndr_print_uint32(ndr, "usri1025_code_page", r->usri1025_code_page); … … 5694 5858 { 5695 5859 ndr_print_struct(ndr, name, "USER_INFO_1051"); 5860 if (r == NULL) { ndr_print_null(ndr); return; } 5696 5861 ndr->depth++; 5697 5862 ndr_print_uint32(ndr, "usri1051_primary_group_id", r->usri1051_primary_group_id); … … 5726 5891 { 5727 5892 ndr_print_struct(ndr, name, "USER_INFO_1052"); 5893 if (r == NULL) { ndr_print_null(ndr); return; } 5728 5894 ndr->depth++; 5729 5895 ndr_print_string(ndr, "usri1052_profile", r->usri1052_profile); … … 5758 5924 { 5759 5925 ndr_print_struct(ndr, name, "USER_INFO_1053"); 5926 if (r == NULL) { ndr_print_null(ndr); return; } 5760 5927 ndr->depth++; 5761 5928 ndr_print_string(ndr, "usri1053_home_dir_drive", r->usri1053_home_dir_drive); … … 5862 6029 { 5863 6030 ndr_print_struct(ndr, name, "USER_INFO_X"); 6031 if (r == NULL) { ndr_print_null(ndr); return; } 5864 6032 ndr->depth++; 5865 6033 ndr_print_string(ndr, "usriX_name", r->usriX_name); … … 5927 6095 { 5928 6096 ndr_print_struct(ndr, name, "GROUP_USERS_INFO_0"); 6097 if (r == NULL) { ndr_print_null(ndr); return; } 5929 6098 ndr->depth++; 5930 6099 ndr_print_string(ndr, "grui0_name", r->grui0_name); … … 5961 6130 { 5962 6131 ndr_print_struct(ndr, name, "GROUP_USERS_INFO_1"); 6132 if (r == NULL) { ndr_print_null(ndr); return; } 5963 6133 ndr->depth++; 5964 6134 ndr_print_string(ndr, "grui1_name", r->grui1_name); … … 6004 6174 { 6005 6175 ndr_print_struct(ndr, name, "NET_DISPLAY_USER"); 6176 if (r == NULL) { ndr_print_null(ndr); return; } 6006 6177 ndr->depth++; 6007 6178 ndr_print_string(ndr, "usri1_name", r->usri1_name); … … 6049 6220 { 6050 6221 ndr_print_struct(ndr, name, "NET_DISPLAY_MACHINE"); 6222 if (r == NULL) { ndr_print_null(ndr); return; } 6051 6223 ndr->depth++; 6052 6224 ndr_print_string(ndr, "usri2_name", r->usri2_name); … … 6093 6265 { 6094 6266 ndr_print_struct(ndr, name, "NET_DISPLAY_GROUP"); 6267 if (r == NULL) { ndr_print_null(ndr); return; } 6095 6268 ndr->depth++; 6096 6269 ndr_print_string(ndr, "grpi3_name", r->grpi3_name); … … 6136 6309 { 6137 6310 ndr_print_struct(ndr, name, "NetJoinDomain"); 6311 if (r == NULL) { ndr_print_null(ndr); return; } 6138 6312 ndr->depth++; 6139 6313 if (flags & NDR_SET_VALUES) { … … 6186 6360 { 6187 6361 ndr_print_struct(ndr, name, "NetUnjoinDomain"); 6362 if (r == NULL) { ndr_print_null(ndr); return; } 6188 6363 ndr->depth++; 6189 6364 if (flags & NDR_SET_VALUES) { … … 6226 6401 { 6227 6402 ndr_print_struct(ndr, name, "NetGetJoinInformation"); 6403 if (r == NULL) { ndr_print_null(ndr); return; } 6228 6404 ndr->depth++; 6229 6405 if (flags & NDR_SET_VALUES) { … … 6266 6442 { 6267 6443 ndr_print_struct(ndr, name, "NetGetJoinableOUs"); 6444 if (r == NULL) { ndr_print_null(ndr); return; } 6268 6445 ndr->depth++; 6269 6446 if (flags & NDR_SET_VALUES) { … … 6327 6504 { 6328 6505 ndr_print_struct(ndr, name, "NetRenameMachineInDomain"); 6506 if (r == NULL) { ndr_print_null(ndr); return; } 6329 6507 ndr->depth++; 6330 6508 if (flags & NDR_SET_VALUES) { … … 6353 6531 { 6354 6532 ndr_print_struct(ndr, name, "NetServerGetInfo"); 6533 if (r == NULL) { ndr_print_null(ndr); return; } 6355 6534 ndr->depth++; 6356 6535 if (flags & NDR_SET_VALUES) { … … 6390 6569 { 6391 6570 ndr_print_struct(ndr, name, "NetServerSetInfo"); 6571 if (r == NULL) { ndr_print_null(ndr); return; } 6392 6572 ndr->depth++; 6393 6573 if (flags & NDR_SET_VALUES) { … … 6426 6606 { 6427 6607 ndr_print_struct(ndr, name, "NetGetDCName"); 6608 if (r == NULL) { ndr_print_null(ndr); return; } 6428 6609 ndr->depth++; 6429 6610 if (flags & NDR_SET_VALUES) { … … 6468 6649 { 6469 6650 ndr_print_struct(ndr, name, "NetGetAnyDCName"); 6651 if (r == NULL) { ndr_print_null(ndr); return; } 6470 6652 ndr->depth++; 6471 6653 if (flags & NDR_SET_VALUES) { … … 6510 6692 { 6511 6693 ndr_print_struct(ndr, name, "DsGetDcName"); 6694 if (r == NULL) { ndr_print_null(ndr); return; } 6512 6695 ndr->depth++; 6513 6696 if (flags & NDR_SET_VALUES) { … … 6563 6746 { 6564 6747 ndr_print_struct(ndr, name, "NetUserAdd"); 6748 if (r == NULL) { ndr_print_null(ndr); return; } 6565 6749 ndr->depth++; 6566 6750 if (flags & NDR_SET_VALUES) { … … 6599 6783 { 6600 6784 ndr_print_struct(ndr, name, "NetUserDel"); 6785 if (r == NULL) { ndr_print_null(ndr); return; } 6601 6786 ndr->depth++; 6602 6787 if (flags & NDR_SET_VALUES) { … … 6630 6815 { 6631 6816 ndr_print_struct(ndr, name, "NetUserEnum"); 6817 if (r == NULL) { ndr_print_null(ndr); return; } 6632 6818 ndr->depth++; 6633 6819 if (flags & NDR_SET_VALUES) { … … 6685 6871 { 6686 6872 ndr_print_struct(ndr, name, "NetUserChangePassword"); 6873 if (r == NULL) { ndr_print_null(ndr); return; } 6687 6874 ndr->depth++; 6688 6875 if (flags & NDR_SET_VALUES) { … … 6710 6897 { 6711 6898 ndr_print_struct(ndr, name, "NetUserGetInfo"); 6899 if (r == NULL) { ndr_print_null(ndr); return; } 6712 6900 ndr->depth++; 6713 6901 if (flags & NDR_SET_VALUES) { … … 6743 6931 { 6744 6932 ndr_print_struct(ndr, name, "NetUserSetInfo"); 6933 if (r == NULL) { ndr_print_null(ndr); return; } 6745 6934 ndr->depth++; 6746 6935 if (flags & NDR_SET_VALUES) { … … 6775 6964 { 6776 6965 ndr_print_struct(ndr, name, "NetUserGetGroups"); 6966 if (r == NULL) { ndr_print_null(ndr); return; } 6777 6967 ndr->depth++; 6778 6968 if (flags & NDR_SET_VALUES) { … … 6817 7007 { 6818 7008 ndr_print_struct(ndr, name, "NetUserSetGroups"); 7009 if (r == NULL) { ndr_print_null(ndr); return; } 6819 7010 ndr->depth++; 6820 7011 if (flags & NDR_SET_VALUES) { … … 6846 7037 { 6847 7038 ndr_print_struct(ndr, name, "NetUserGetLocalGroups"); 7039 if (r == NULL) { ndr_print_null(ndr); return; } 6848 7040 ndr->depth++; 6849 7041 if (flags & NDR_SET_VALUES) { … … 6889 7081 { 6890 7082 ndr_print_struct(ndr, name, "NetUserModalsGet"); 7083 if (r == NULL) { ndr_print_null(ndr); return; } 6891 7084 ndr->depth++; 6892 7085 if (flags & NDR_SET_VALUES) { … … 6921 7114 { 6922 7115 ndr_print_struct(ndr, name, "NetUserModalsSet"); 7116 if (r == NULL) { ndr_print_null(ndr); return; } 6923 7117 ndr->depth++; 6924 7118 if (flags & NDR_SET_VALUES) { … … 6952 7146 { 6953 7147 ndr_print_struct(ndr, name, "NetQueryDisplayInformation"); 7148 if (r == NULL) { ndr_print_null(ndr); return; } 6954 7149 ndr->depth++; 6955 7150 if (flags & NDR_SET_VALUES) { … … 6987 7182 { 6988 7183 ndr_print_struct(ndr, name, "NetGroupAdd"); 7184 if (r == NULL) { ndr_print_null(ndr); return; } 6989 7185 ndr->depth++; 6990 7186 if (flags & NDR_SET_VALUES) { … … 7018 7214 { 7019 7215 ndr_print_struct(ndr, name, "NetGroupDel"); 7216 if (r == NULL) { ndr_print_null(ndr); return; } 7020 7217 ndr->depth++; 7021 7218 if (flags & NDR_SET_VALUES) { … … 7041 7238 { 7042 7239 ndr_print_struct(ndr, name, "NetGroupEnum"); 7240 if (r == NULL) { ndr_print_null(ndr); return; } 7043 7241 ndr->depth++; 7044 7242 if (flags & NDR_SET_VALUES) { … … 7090 7288 { 7091 7289 ndr_print_struct(ndr, name, "NetGroupSetInfo"); 7290 if (r == NULL) { ndr_print_null(ndr); return; } 7092 7291 ndr->depth++; 7093 7292 if (flags & NDR_SET_VALUES) { … … 7122 7321 { 7123 7322 ndr_print_struct(ndr, name, "NetGroupGetInfo"); 7323 if (r == NULL) { ndr_print_null(ndr); return; } 7124 7324 ndr->depth++; 7125 7325 if (flags & NDR_SET_VALUES) { … … 7155 7355 { 7156 7356 ndr_print_struct(ndr, name, "NetGroupAddUser"); 7357 if (r == NULL) { ndr_print_null(ndr); return; } 7157 7358 ndr->depth++; 7158 7359 if (flags & NDR_SET_VALUES) { … … 7179 7380 { 7180 7381 ndr_print_struct(ndr, name, "NetGroupDelUser"); 7382 if (r == NULL) { ndr_print_null(ndr); return; } 7181 7383 ndr->depth++; 7182 7384 if (flags & NDR_SET_VALUES) { … … 7203 7405 { 7204 7406 ndr_print_struct(ndr, name, "NetGroupGetUsers"); 7407 if (r == NULL) { ndr_print_null(ndr); return; } 7205 7408 ndr->depth++; 7206 7409 if (flags & NDR_SET_VALUES) { … … 7253 7456 { 7254 7457 ndr_print_struct(ndr, name, "NetGroupSetUsers"); 7458 if (r == NULL) { ndr_print_null(ndr); return; } 7255 7459 ndr->depth++; 7256 7460 if (flags & NDR_SET_VALUES) { … … 7282 7486 { 7283 7487 ndr_print_struct(ndr, name, "NetLocalGroupAdd"); 7488 if (r == NULL) { ndr_print_null(ndr); return; } 7284 7489 ndr->depth++; 7285 7490 if (flags & NDR_SET_VALUES) { … … 7313 7518 { 7314 7519 ndr_print_struct(ndr, name, "NetLocalGroupDel"); 7520 if (r == NULL) { ndr_print_null(ndr); return; } 7315 7521 ndr->depth++; 7316 7522 if (flags & NDR_SET_VALUES) { … … 7336 7542 { 7337 7543 ndr_print_struct(ndr, name, "NetLocalGroupGetInfo"); 7544 if (r == NULL) { ndr_print_null(ndr); return; } 7338 7545 ndr->depth++; 7339 7546 if (flags & NDR_SET_VALUES) { … … 7369 7576 { 7370 7577 ndr_print_struct(ndr, name, "NetLocalGroupSetInfo"); 7578 if (r == NULL) { ndr_print_null(ndr); return; } 7371 7579 ndr->depth++; 7372 7580 if (flags & NDR_SET_VALUES) { … … 7401 7609 { 7402 7610 ndr_print_struct(ndr, name, "NetLocalGroupEnum"); 7611 if (r == NULL) { ndr_print_null(ndr); return; } 7403 7612 ndr->depth++; 7404 7613 if (flags & NDR_SET_VALUES) { … … 7450 7659 { 7451 7660 ndr_print_struct(ndr, name, "NetLocalGroupAddMembers"); 7661 if (r == NULL) { ndr_print_null(ndr); return; } 7452 7662 ndr->depth++; 7453 7663 if (flags & NDR_SET_VALUES) { … … 7479 7689 { 7480 7690 ndr_print_struct(ndr, name, "NetLocalGroupDelMembers"); 7691 if (r == NULL) { ndr_print_null(ndr); return; } 7481 7692 ndr->depth++; 7482 7693 if (flags & NDR_SET_VALUES) { … … 7508 7719 { 7509 7720 ndr_print_struct(ndr, name, "NetLocalGroupGetMembers"); 7721 if (r == NULL) { ndr_print_null(ndr); return; } 7510 7722 ndr->depth++; 7511 7723 if (flags & NDR_SET_VALUES) { … … 7558 7770 { 7559 7771 ndr_print_struct(ndr, name, "NetLocalGroupSetMembers"); 7772 if (r == NULL) { ndr_print_null(ndr); return; } 7560 7773 ndr->depth++; 7561 7774 if (flags & NDR_SET_VALUES) { … … 7587 7800 { 7588 7801 ndr_print_struct(ndr, name, "NetRemoteTOD"); 7802 if (r == NULL) { ndr_print_null(ndr); return; } 7589 7803 ndr->depth++; 7590 7804 if (flags & NDR_SET_VALUES) { … … 7618 7832 { 7619 7833 ndr_print_struct(ndr, name, "NetShareAdd"); 7834 if (r == NULL) { ndr_print_null(ndr); return; } 7620 7835 ndr->depth++; 7621 7836 if (flags & NDR_SET_VALUES) { … … 7649 7864 { 7650 7865 ndr_print_struct(ndr, name, "NetShareDel"); 7866 if (r == NULL) { ndr_print_null(ndr); return; } 7651 7867 ndr->depth++; 7652 7868 if (flags & NDR_SET_VALUES) { … … 7673 7889 { 7674 7890 ndr_print_struct(ndr, name, "NetShareEnum"); 7891 if (r == NULL) { ndr_print_null(ndr); return; } 7675 7892 ndr->depth++; 7676 7893 if (flags & NDR_SET_VALUES) { … … 7722 7939 { 7723 7940 ndr_print_struct(ndr, name, "NetShareGetInfo"); 7941 if (r == NULL) { ndr_print_null(ndr); return; } 7724 7942 ndr->depth++; 7725 7943 if (flags & NDR_SET_VALUES) { … … 7755 7973 { 7756 7974 ndr_print_struct(ndr, name, "NetShareSetInfo"); 7975 if (r == NULL) { ndr_print_null(ndr); return; } 7757 7976 ndr->depth++; 7758 7977 if (flags & NDR_SET_VALUES) { … … 7787 8006 { 7788 8007 ndr_print_struct(ndr, name, "NetFileClose"); 8008 if (r == NULL) { ndr_print_null(ndr); return; } 7789 8009 ndr->depth++; 7790 8010 if (flags & NDR_SET_VALUES) { … … 7810 8030 { 7811 8031 ndr_print_struct(ndr, name, "NetFileGetInfo"); 8032 if (r == NULL) { ndr_print_null(ndr); return; } 7812 8033 ndr->depth++; 7813 8034 if (flags & NDR_SET_VALUES) { … … 7843 8064 { 7844 8065 ndr_print_struct(ndr, name, "NetFileEnum"); 8066 if (r == NULL) { ndr_print_null(ndr); return; } 7845 8067 ndr->depth++; 7846 8068 if (flags & NDR_SET_VALUES) { … … 7894 8116 { 7895 8117 ndr_print_struct(ndr, name, "NetShutdownInit"); 8118 if (r == NULL) { ndr_print_null(ndr); return; } 7896 8119 ndr->depth++; 7897 8120 if (flags & NDR_SET_VALUES) { … … 7920 8143 { 7921 8144 ndr_print_struct(ndr, name, "NetShutdownAbort"); 8145 if (r == NULL) { ndr_print_null(ndr); return; } 7922 8146 ndr->depth++; 7923 8147 if (flags & NDR_SET_VALUES) { … … 7942 8166 { 7943 8167 ndr_print_struct(ndr, name, "I_NetLogonControl"); 8168 if (r == NULL) { ndr_print_null(ndr); return; } 7944 8169 ndr->depth++; 7945 8170 if (flags & NDR_SET_VALUES) { … … 7975 8200 { 7976 8201 ndr_print_struct(ndr, name, "I_NetLogonControl2"); 8202 if (r == NULL) { ndr_print_null(ndr); return; } 7977 8203 ndr->depth++; 7978 8204 if (flags & NDR_SET_VALUES) { … … 7987 8213 ndr_print_ptr(ndr, "data", r->in.data); 7988 8214 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 } 7990 8218 ndr->depth--; 7991 8219 ndr->depth--; -
vendor/current/source3/librpc/gen_ndr/ndr_libnetapi.h
r414 r740 432 432 enum ndr_err_code ndr_pull_SERVER_INFO_1602(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1602 *r); 433 433 void ndr_print_SERVER_INFO_1602(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1602 *r); 434 enum ndr_err_code ndr_push_DOMAIN_CONTROLLER_INFO_FLAGS(struct ndr_push *ndr, int ndr_flags, enum DOMAIN_CONTROLLER_INFO_FLAGS r); 435 enum ndr_err_code ndr_pull_DOMAIN_CONTROLLER_INFO_FLAGS(struct ndr_pull *ndr, int ndr_flags, enum DOMAIN_CONTROLLER_INFO_FLAGS *r); 436 void ndr_print_DOMAIN_CONTROLLER_INFO_FLAGS(struct ndr_print *ndr, const char *name, enum DOMAIN_CONTROLLER_INFO_FLAGS r); 434 437 enum ndr_err_code ndr_push_DOMAIN_CONTROLLER_INFO(struct ndr_push *ndr, int ndr_flags, const struct DOMAIN_CONTROLLER_INFO *r); 435 438 enum 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 4 4 #include "librpc/gen_ndr/ndr_messaging.h" 5 5 6 #include "librpc/gen_ndr/ndr_server_id.h" 6 7 _PUBLIC_ enum ndr_err_code ndr_push_messaging_type(struct ndr_push *ndr, int ndr_flags, enum messaging_type r) 7 8 { … … 36 37 case MSG_REQ_DMALLOC_LOG_CHANGED: val = "MSG_REQ_DMALLOC_LOG_CHANGED"; break; 37 38 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; 38 42 case MSG_FORCE_ELECTION: val = "MSG_FORCE_ELECTION"; break; 39 43 case MSG_WINS_NEW_ENTRY: val = "MSG_WINS_NEW_ENTRY"; break; … … 45 49 case MSG_PRINTER_UPDATE: val = "MSG_PRINTER_UPDATE"; break; 46 50 case MSG_PRINTER_MOD: val = "MSG_PRINTER_MOD"; break; 51 case MSG_PRINTER_PCAP: val = "MSG_PRINTER_PCAP"; break; 47 52 case MSG_SMB_CONF_UPDATED: val = "MSG_SMB_CONF_UPDATED"; break; 48 53 case MSG_SMB_FORCE_TDIS: val = "MSG_SMB_FORCE_TDIS"; break; … … 73 78 case MSG_WINBIND_VALIDATE_CACHE: val = "MSG_WINBIND_VALIDATE_CACHE"; break; 74 79 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; 75 81 case MSG_DUMP_EVENT_LIST: val = "MSG_DUMP_EVENT_LIST"; break; 76 82 case MSG_DBWRAP_TDB2_CHANGES: val = "MSG_DBWRAP_TDB2_CHANGES"; break; … … 92 98 } 93 99 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));96 100 } 97 101 return NDR_ERR_SUCCESS; … … 110 114 } 111 115 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));114 116 } 115 117 return NDR_ERR_SUCCESS; … … 119 121 { 120 122 ndr_print_struct(ndr, name, "messaging_rec"); 123 if (r == NULL) { ndr_print_null(ndr); return; } 121 124 ndr->depth++; 122 125 ndr_print_uint32(ndr, "msg_version", r->msg_version); … … 140 143 } 141 144 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 }145 145 } 146 146 return NDR_ERR_SUCCESS; … … 164 164 } 165 165 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);172 166 } 173 167 return NDR_ERR_SUCCESS; … … 178 172 uint32_t cntr_messages_0; 179 173 ndr_print_struct(ndr, name, "messaging_array"); 174 if (r == NULL) { ndr_print_null(ndr); return; } 180 175 ndr->depth++; 181 176 ndr_print_uint32(ndr, "num_messages", r->num_messages); … … 183 178 ndr->depth++; 184 179 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]); 190 181 } 191 182 ndr->depth--; … … 255 246 uint32_t cntr_keys_0; 256 247 ndr_print_struct(ndr, name, "dbwrap_tdb2_changes"); 248 if (r == NULL) { ndr_print_null(ndr); return; } 257 249 ndr->depth++; 258 250 ndr_print_string(ndr, "magic_string", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"TDB2":r->magic_string); … … 266 258 ndr->depth++; 267 259 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 4 4 #include "librpc/gen_ndr/ndr_notify.h" 5 5 6 #include "librpc/gen_ndr/ndr_file_id.h" 7 #include "librpc/gen_ndr/ndr_server_id.h" 6 8 _PUBLIC_ enum ndr_err_code ndr_push_notify_entry(struct ndr_push *ndr, int ndr_flags, const struct notify_entry *r) 7 9 { … … 24 26 } 25 27 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));28 28 } 29 29 return NDR_ERR_SUCCESS; … … 50 50 } 51 51 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));54 52 } 55 53 return NDR_ERR_SUCCESS; … … 59 57 { 60 58 ndr_print_struct(ndr, name, "notify_entry"); 59 if (r == NULL) { ndr_print_null(ndr); return; } 61 60 ndr->depth++; 62 61 ndr_print_server_id(ndr, "server", &r->server); … … 83 82 } 84 83 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 }88 84 } 89 85 return NDR_ERR_SUCCESS; … … 107 103 } 108 104 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);115 105 } 116 106 return NDR_ERR_SUCCESS; … … 121 111 uint32_t cntr_entries_0; 122 112 ndr_print_struct(ndr, name, "notify_entry_array"); 113 if (r == NULL) { ndr_print_null(ndr); return; } 123 114 ndr->depth++; 124 115 ndr_print_uint32(ndr, "num_entries", r->num_entries); … … 126 117 ndr->depth++; 127 118 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]); 133 120 } 134 121 ndr->depth--; … … 150 137 } 151 138 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 }155 139 } 156 140 return NDR_ERR_SUCCESS; … … 176 160 } 177 161 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);184 162 } 185 163 return NDR_ERR_SUCCESS; … … 190 168 uint32_t cntr_entries_0; 191 169 ndr_print_struct(ndr, name, "notify_depth"); 170 if (r == NULL) { ndr_print_null(ndr); return; } 192 171 ndr->depth++; 193 172 ndr_print_uint32(ndr, "max_mask", r->max_mask); … … 197 176 ndr->depth++; 198 177 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]); 204 179 } 205 180 ndr->depth--; … … 219 194 } 220 195 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 }224 196 } 225 197 return NDR_ERR_SUCCESS; … … 243 215 } 244 216 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);251 217 } 252 218 return NDR_ERR_SUCCESS; … … 257 223 uint32_t cntr_depth_0; 258 224 ndr_print_struct(ndr, name, "notify_array"); 225 if (r == NULL) { ndr_print_null(ndr); return; } 259 226 ndr->depth++; 260 227 ndr_print_uint32(ndr, "num_depths", r->num_depths); … … 262 229 ndr->depth++; 263 230 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]); 269 232 } 270 233 ndr->depth--; … … 313 276 { 314 277 ndr_print_struct(ndr, name, "notify_event"); 278 if (r == NULL) { ndr_print_null(ndr); return; } 315 279 ndr->depth++; 316 280 ndr_print_uint32(ndr, "action", r->action); … … 320 284 } 321 285 286 static 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 292 static 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 21 21 enum ndr_err_code ndr_pull_notify_event(struct ndr_pull *ndr, int ndr_flags, struct notify_event *r); 22 22 void ndr_print_notify_event(struct ndr_print *ndr, const char *name, const struct notify_event *r); 23 void ndr_print_FILE_NOTIFY_ACTION(struct ndr_print *ndr, const char *name, enum FILE_NOTIFY_ACTION r); 24 enum ndr_err_code ndr_push_FILE_NOTIFY_INFORMATION(struct ndr_push *ndr, int ndr_flags, const struct FILE_NOTIFY_INFORMATION *r); 25 enum ndr_err_code ndr_pull_FILE_NOTIFY_INFORMATION(struct ndr_pull *ndr, int ndr_flags, struct FILE_NOTIFY_INFORMATION *r); 26 void ndr_print_FILE_NOTIFY_INFORMATION(struct ndr_print *ndr, const char *name, const struct FILE_NOTIFY_INFORMATION *r); 27 size_t ndr_size_FILE_NOTIFY_INFORMATION(const struct FILE_NOTIFY_INFORMATION *r, int flags); 23 28 #endif /* _HEADER_NDR_notify */ -
vendor/current/source3/librpc/gen_ndr/ndr_perfcount.c
r414 r740 45 45 { 46 46 ndr_print_struct(ndr, name, "SYSTEMTIME"); 47 if (r == NULL) { ndr_print_null(ndr); return; } 47 48 ndr->depth++; 48 49 ndr_print_uint16(ndr, "year", r->year); … … 102 103 { 103 104 ndr_print_struct(ndr, name, "PERF_COUNTER_DEFINITION"); 105 if (r == NULL) { ndr_print_null(ndr); return; } 104 106 ndr->depth++; 105 107 ndr_print_uint32(ndr, "ByteLength", r->ByteLength); … … 146 148 { 147 149 ndr_print_struct(ndr, name, "PERF_COUNTER_BLOCK"); 150 if (r == NULL) { ndr_print_null(ndr); return; } 148 151 ndr->depth++; 149 152 ndr_print_uint32(ndr, "ByteLength", r->ByteLength); … … 209 212 { 210 213 ndr_print_struct(ndr, name, "PERF_INSTANCE_DEFINITION"); 214 if (r == NULL) { ndr_print_null(ndr); return; } 211 215 ndr->depth++; 212 216 ndr_print_uint32(ndr, "ByteLength", r->ByteLength); … … 318 322 uint32_t cntr_instances_0; 319 323 ndr_print_struct(ndr, name, "PERF_OBJECT_TYPE"); 324 if (r == NULL) { ndr_print_null(ndr); return; } 320 325 ndr->depth++; 321 326 ndr_print_uint32(ndr, "TotalByteLength", r->TotalByteLength); … … 336 341 ndr->depth++; 337 342 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]); 343 344 } 344 345 ndr->depth--; … … 346 347 ndr->depth++; 347 348 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]); 353 350 } 354 351 ndr->depth--; … … 460 457 uint32_t cntr_objects_0; 461 458 ndr_print_struct(ndr, name, "PERF_DATA_BLOCK"); 459 if (r == NULL) { ndr_print_null(ndr); return; } 462 460 ndr->depth++; 463 461 ndr->print(ndr, "%s: ARRAY(%d)", "Signature", (int)4); 464 462 ndr->depth++; 465 463 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]); 471 465 } 472 466 ndr->depth--; … … 494 488 ndr->depth++; 495 489 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 7 7 { 8 8 if (ndr_flags & NDR_SCALARS) { 9 NDR_CHECK(ndr_push_align(ndr, 4));9 NDR_CHECK(ndr_push_align(ndr, 5)); 10 10 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name)); 11 11 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)); 12 14 } 13 15 if (ndr_flags & NDR_BUFFERS) { 14 16 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))); 18 20 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF8), sizeof(uint8_t), CH_UTF8)); 19 21 } 20 22 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))); 24 26 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)); 25 33 } 26 34 } … … 34 42 uint32_t _ptr_info; 35 43 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)); 38 48 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name)); 39 49 if (_ptr_name) { … … 48 58 r->info = NULL; 49 59 } 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)); 50 67 } 51 68 if (ndr_flags & NDR_BUFFERS) { … … 74 91 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); 75 92 } 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 } 76 105 } 77 106 return NDR_ERR_SUCCESS; … … 81 110 { 82 111 ndr_print_struct(ndr, name, "pcap_printer"); 112 if (r == NULL) { ndr_print_null(ndr); return; } 83 113 ndr->depth++; 84 114 ndr_print_ptr(ndr, "name", r->name); … … 94 124 } 95 125 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--; 96 132 ndr->depth--; 97 133 } … … 101 137 uint32_t cntr_printers_0; 102 138 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)); 105 141 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status)); 106 142 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); … … 108 144 NDR_CHECK(ndr_push_pcap_printer(ndr, NDR_SCALARS, &r->printers[cntr_printers_0])); 109 145 } 146 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 110 147 } 111 148 if (ndr_flags & NDR_BUFFERS) { … … 123 160 if (ndr_flags & NDR_SCALARS) { 124 161 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)); 126 163 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status)); 127 164 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); … … 136 173 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->printers, r->count)); 137 174 } 175 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 138 176 } 139 177 if (ndr_flags & NDR_BUFFERS) { … … 152 190 uint32_t cntr_printers_0; 153 191 ndr_print_struct(ndr, name, "pcap_data"); 192 if (r == NULL) { ndr_print_null(ndr); return; } 154 193 ndr->depth++; 155 194 ndr_print_NTSTATUS(ndr, "status", r->status); … … 158 197 ndr->depth++; 159 198 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 4 4 #include "librpc/gen_ndr/ndr_secrets.h" 5 5 6 #include "librpc/gen_ndr/ndr_security.h" 6 7 _PUBLIC_ enum ndr_err_code ndr_push_TRUSTED_DOM_PASS(struct ndr_push *ndr, int ndr_flags, const struct TRUSTED_DOM_PASS *r) 7 8 { … … 61 62 { 62 63 ndr_print_struct(ndr, name, "TRUSTED_DOM_PASS"); 64 if (r == NULL) { ndr_print_null(ndr); return; } 63 65 { 64 66 uint32_t _flags_save_STRUCT = ndr->flags; -
vendor/current/source3/librpc/gen_ndr/ndr_wbint.c
r618 r740 6 6 #include "librpc/gen_ndr/ndr_lsa.h" 7 7 #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" 11 static 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 26 static 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 53 static 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 70 static 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 8 111 _PUBLIC_ enum ndr_err_code ndr_push_wbint_userinfo(struct ndr_push *ndr, int ndr_flags, const struct wbint_userinfo *r) 9 112 { … … 145 248 { 146 249 ndr_print_struct(ndr, name, "wbint_userinfo"); 250 if (r == NULL) { ndr_print_null(ndr); return; } 147 251 ndr->depth++; 148 252 ndr_print_ptr(ndr, "acct_name", r->acct_name); … … 222 326 uint32_t cntr_sids_0; 223 327 ndr_print_struct(ndr, name, "wbint_SidArray"); 328 if (r == NULL) { ndr_print_null(ndr); return; } 224 329 ndr->depth++; 225 330 ndr_print_uint32(ndr, "num_sids", r->num_sids); … … 227 332 ndr->depth++; 228 333 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]); 234 335 } 235 336 ndr->depth--; … … 283 384 uint32_t cntr_rids_0; 284 385 ndr_print_struct(ndr, name, "wbint_RidArray"); 386 if (r == NULL) { ndr_print_null(ndr); return; } 285 387 ndr->depth++; 286 388 ndr_print_uint32(ndr, "num_rids", r->num_rids); … … 288 390 ndr->depth++; 289 391 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]); 295 393 } 296 394 ndr->depth--; … … 354 452 { 355 453 ndr_print_struct(ndr, name, "wbint_Principal"); 454 if (r == NULL) { ndr_print_null(ndr); return; } 356 455 ndr->depth++; 357 456 ndr_print_dom_sid(ndr, "sid", &r->sid); … … 421 520 uint32_t cntr_principals_0; 422 521 ndr_print_struct(ndr, name, "wbint_Principals"); 522 if (r == NULL) { ndr_print_null(ndr); return; } 423 523 ndr->depth++; 424 524 ndr_print_int32(ndr, "num_principals", r->num_principals); … … 426 526 ndr->depth++; 427 527 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]); 433 529 } 434 530 ndr->depth--; … … 491 587 uint32_t cntr_userinfos_0; 492 588 ndr_print_struct(ndr, name, "wbint_userinfos"); 589 if (r == NULL) { ndr_print_null(ndr); return; } 493 590 ndr->depth++; 494 591 ndr_print_uint32(ndr, "num_userinfos", r->num_userinfos); … … 496 593 ndr->depth++; 497 594 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--; 532 599 } 533 600 … … 571 638 { 572 639 ndr_print_struct(ndr, name, "wbint_Ping"); 640 if (r == NULL) { ndr_print_null(ndr); return; } 573 641 ndr->depth++; 574 642 if (flags & NDR_SET_VALUES) { … … 722 790 { 723 791 ndr_print_struct(ndr, name, "wbint_LookupSid"); 792 if (r == NULL) { ndr_print_null(ndr); return; } 724 793 ndr->depth++; 725 794 if (flags & NDR_SET_VALUES) { … … 759 828 } 760 829 ndr->depth--; 830 ndr->depth--; 831 ndr_print_NTSTATUS(ndr, "result", r->out.result); 832 ndr->depth--; 833 } 834 ndr->depth--; 835 } 836 837 static 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 859 static 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); 761 926 ndr->depth--; 762 927 ndr_print_NTSTATUS(ndr, "result", r->out.result); … … 849 1014 { 850 1015 ndr_print_struct(ndr, name, "wbint_LookupName"); 1016 if (r == NULL) { ndr_print_null(ndr); return; } 851 1017 ndr->depth++; 852 1018 if (flags & NDR_SET_VALUES) { … … 962 1128 { 963 1129 ndr_print_struct(ndr, name, "wbint_Sid2Uid"); 1130 if (r == NULL) { ndr_print_null(ndr); return; } 964 1131 ndr->depth++; 965 1132 if (flags & NDR_SET_VALUES) { … … 1072 1239 { 1073 1240 ndr_print_struct(ndr, name, "wbint_Sid2Gid"); 1241 if (r == NULL) { ndr_print_null(ndr); return; } 1074 1242 ndr->depth++; 1075 1243 if (flags & NDR_SET_VALUES) { … … 1097 1265 ndr->depth++; 1098 1266 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 1274 static 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 1296 static 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); 1099 1360 ndr->depth--; 1100 1361 ndr_print_NTSTATUS(ndr, "result", r->out.result); … … 1172 1433 { 1173 1434 ndr_print_struct(ndr, name, "wbint_Uid2Sid"); 1435 if (r == NULL) { ndr_print_null(ndr); return; } 1174 1436 ndr->depth++; 1175 1437 if (flags & NDR_SET_VALUES) { … … 1269 1531 { 1270 1532 ndr_print_struct(ndr, name, "wbint_Gid2Sid"); 1533 if (r == NULL) { ndr_print_null(ndr); return; } 1271 1534 ndr->depth++; 1272 1535 if (flags & NDR_SET_VALUES) { … … 1337 1600 { 1338 1601 ndr_print_struct(ndr, name, "wbint_AllocateUid"); 1602 if (r == NULL) { ndr_print_null(ndr); return; } 1339 1603 ndr->depth++; 1340 1604 if (flags & NDR_SET_VALUES) { … … 1398 1662 { 1399 1663 ndr_print_struct(ndr, name, "wbint_AllocateGid"); 1664 if (r == NULL) { ndr_print_null(ndr); return; } 1400 1665 ndr->depth++; 1401 1666 if (flags & NDR_SET_VALUES) { … … 1471 1736 { 1472 1737 ndr_print_struct(ndr, name, "wbint_QueryUser"); 1738 if (r == NULL) { ndr_print_null(ndr); return; } 1473 1739 ndr->depth++; 1474 1740 if (flags & NDR_SET_VALUES) { … … 1548 1814 { 1549 1815 ndr_print_struct(ndr, name, "wbint_LookupUserAliases"); 1816 if (r == NULL) { ndr_print_null(ndr); return; } 1550 1817 ndr->depth++; 1551 1818 if (flags & NDR_SET_VALUES) { … … 1625 1892 { 1626 1893 ndr_print_struct(ndr, name, "wbint_LookupUserGroups"); 1894 if (r == NULL) { ndr_print_null(ndr); return; } 1627 1895 ndr->depth++; 1628 1896 if (flags & NDR_SET_VALUES) { … … 1690 1958 { 1691 1959 ndr_print_struct(ndr, name, "wbint_QuerySequenceNumber"); 1960 if (r == NULL) { ndr_print_null(ndr); return; } 1692 1961 ndr->depth++; 1693 1962 if (flags & NDR_SET_VALUES) { … … 1765 2034 { 1766 2035 ndr_print_struct(ndr, name, "wbint_LookupGroupMembers"); 2036 if (r == NULL) { ndr_print_null(ndr); return; } 1767 2037 ndr->depth++; 1768 2038 if (flags & NDR_SET_VALUES) { … … 1831 2101 { 1832 2102 ndr_print_struct(ndr, name, "wbint_QueryUserList"); 2103 if (r == NULL) { ndr_print_null(ndr); return; } 1833 2104 ndr->depth++; 1834 2105 if (flags & NDR_SET_VALUES) { … … 1892 2163 { 1893 2164 ndr_print_struct(ndr, name, "wbint_QueryGroupList"); 2165 if (r == NULL) { ndr_print_null(ndr); return; } 1894 2166 ndr->depth++; 1895 2167 if (flags & NDR_SET_VALUES) { … … 2030 2302 { 2031 2303 ndr_print_struct(ndr, name, "wbint_DsGetDcName"); 2304 if (r == NULL) { ndr_print_null(ndr); return; } 2032 2305 ndr->depth++; 2033 2306 if (flags & NDR_SET_VALUES) { … … 2176 2449 { 2177 2450 ndr_print_struct(ndr, name, "wbint_LookupRids"); 2451 if (r == NULL) { ndr_print_null(ndr); return; } 2178 2452 ndr->depth++; 2179 2453 if (flags & NDR_SET_VALUES) { … … 2238 2512 { 2239 2513 ndr_print_struct(ndr, name, "wbint_CheckMachineAccount"); 2514 if (r == NULL) { ndr_print_null(ndr); return; } 2240 2515 ndr->depth++; 2241 2516 if (flags & NDR_SET_VALUES) { … … 2279 2554 { 2280 2555 ndr_print_struct(ndr, name, "wbint_ChangeMachineAccount"); 2556 if (r == NULL) { ndr_print_null(ndr); return; } 2281 2557 ndr->depth++; 2282 2558 if (flags & NDR_SET_VALUES) { … … 2320 2596 { 2321 2597 ndr_print_struct(ndr, name, "wbint_PingDc"); 2598 if (r == NULL) { ndr_print_null(ndr); return; } 2322 2599 ndr->depth++; 2323 2600 if (flags & NDR_SET_VALUES) { … … 2331 2608 if (flags & NDR_OUT) { 2332 2609 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");2506 2610 ndr->depth++; 2507 2611 ndr_print_NTSTATUS(ndr, "result", r->out.result); … … 2518 2622 (ndr_pull_flags_fn_t) ndr_pull_wbint_Ping, 2519 2623 (ndr_print_function_t) ndr_print_wbint_Ping, 2520 false, 2624 { 0, NULL }, 2625 { 0, NULL }, 2521 2626 }, 2522 2627 { … … 2526 2631 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupSid, 2527 2632 (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 }, 2529 2644 }, 2530 2645 { … … 2534 2649 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupName, 2535 2650 (ndr_print_function_t) ndr_print_wbint_LookupName, 2536 false, 2651 { 0, NULL }, 2652 { 0, NULL }, 2537 2653 }, 2538 2654 { … … 2542 2658 (ndr_pull_flags_fn_t) ndr_pull_wbint_Sid2Uid, 2543 2659 (ndr_print_function_t) ndr_print_wbint_Sid2Uid, 2544 false, 2660 { 0, NULL }, 2661 { 0, NULL }, 2545 2662 }, 2546 2663 { … … 2550 2667 (ndr_pull_flags_fn_t) ndr_pull_wbint_Sid2Gid, 2551 2668 (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 }, 2553 2680 }, 2554 2681 { … … 2558 2685 (ndr_pull_flags_fn_t) ndr_pull_wbint_Uid2Sid, 2559 2686 (ndr_print_function_t) ndr_print_wbint_Uid2Sid, 2560 false, 2687 { 0, NULL }, 2688 { 0, NULL }, 2561 2689 }, 2562 2690 { … … 2566 2694 (ndr_pull_flags_fn_t) ndr_pull_wbint_Gid2Sid, 2567 2695 (ndr_print_function_t) ndr_print_wbint_Gid2Sid, 2568 false, 2696 { 0, NULL }, 2697 { 0, NULL }, 2569 2698 }, 2570 2699 { … … 2574 2703 (ndr_pull_flags_fn_t) ndr_pull_wbint_AllocateUid, 2575 2704 (ndr_print_function_t) ndr_print_wbint_AllocateUid, 2576 false, 2705 { 0, NULL }, 2706 { 0, NULL }, 2577 2707 }, 2578 2708 { … … 2582 2712 (ndr_pull_flags_fn_t) ndr_pull_wbint_AllocateGid, 2583 2713 (ndr_print_function_t) ndr_print_wbint_AllocateGid, 2584 false, 2714 { 0, NULL }, 2715 { 0, NULL }, 2585 2716 }, 2586 2717 { … … 2590 2721 (ndr_pull_flags_fn_t) ndr_pull_wbint_QueryUser, 2591 2722 (ndr_print_function_t) ndr_print_wbint_QueryUser, 2592 false, 2723 { 0, NULL }, 2724 { 0, NULL }, 2593 2725 }, 2594 2726 { … … 2598 2730 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupUserAliases, 2599 2731 (ndr_print_function_t) ndr_print_wbint_LookupUserAliases, 2600 false, 2732 { 0, NULL }, 2733 { 0, NULL }, 2601 2734 }, 2602 2735 { … … 2606 2739 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupUserGroups, 2607 2740 (ndr_print_function_t) ndr_print_wbint_LookupUserGroups, 2608 false, 2741 { 0, NULL }, 2742 { 0, NULL }, 2609 2743 }, 2610 2744 { … … 2614 2748 (ndr_pull_flags_fn_t) ndr_pull_wbint_QuerySequenceNumber, 2615 2749 (ndr_print_function_t) ndr_print_wbint_QuerySequenceNumber, 2616 false, 2750 { 0, NULL }, 2751 { 0, NULL }, 2617 2752 }, 2618 2753 { … … 2622 2757 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupGroupMembers, 2623 2758 (ndr_print_function_t) ndr_print_wbint_LookupGroupMembers, 2624 false, 2759 { 0, NULL }, 2760 { 0, NULL }, 2625 2761 }, 2626 2762 { … … 2630 2766 (ndr_pull_flags_fn_t) ndr_pull_wbint_QueryUserList, 2631 2767 (ndr_print_function_t) ndr_print_wbint_QueryUserList, 2632 false, 2768 { 0, NULL }, 2769 { 0, NULL }, 2633 2770 }, 2634 2771 { … … 2638 2775 (ndr_pull_flags_fn_t) ndr_pull_wbint_QueryGroupList, 2639 2776 (ndr_print_function_t) ndr_print_wbint_QueryGroupList, 2640 false, 2777 { 0, NULL }, 2778 { 0, NULL }, 2641 2779 }, 2642 2780 { … … 2646 2784 (ndr_pull_flags_fn_t) ndr_pull_wbint_DsGetDcName, 2647 2785 (ndr_print_function_t) ndr_print_wbint_DsGetDcName, 2648 false, 2786 { 0, NULL }, 2787 { 0, NULL }, 2649 2788 }, 2650 2789 { … … 2654 2793 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupRids, 2655 2794 (ndr_print_function_t) ndr_print_wbint_LookupRids, 2656 false, 2795 { 0, NULL }, 2796 { 0, NULL }, 2657 2797 }, 2658 2798 { … … 2662 2802 (ndr_pull_flags_fn_t) ndr_pull_wbint_CheckMachineAccount, 2663 2803 (ndr_print_function_t) ndr_print_wbint_CheckMachineAccount, 2664 false, 2804 { 0, NULL }, 2805 { 0, NULL }, 2665 2806 }, 2666 2807 { … … 2670 2811 (ndr_pull_flags_fn_t) ndr_pull_wbint_ChangeMachineAccount, 2671 2812 (ndr_print_function_t) ndr_print_wbint_ChangeMachineAccount, 2672 false, 2813 { 0, NULL }, 2814 { 0, NULL }, 2673 2815 }, 2674 2816 { … … 2678 2820 (ndr_pull_flags_fn_t) ndr_pull_wbint_PingDc, 2679 2821 (ndr_print_function_t) ndr_print_wbint_PingDc, 2680 false, 2822 { 0, NULL }, 2823 { 0, NULL }, 2681 2824 }, 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 } 2707 2826 }; 2708 2827 … … 2733 2852 }, 2734 2853 .helpstring = NDR_WBINT_HELPSTRING, 2735 .num_calls = 2 4,2854 .num_calls = 23, 2736 2855 .calls = wbint_calls, 2737 2856 .endpoints = &wbint_endpoints, -
vendor/current/source3/librpc/gen_ndr/ndr_wbint.h
r414 r740 16 16 #define NDR_WBINT_LOOKUPSID (0x01) 17 17 18 #define NDR_WBINT_LOOKUP NAME(0x02)18 #define NDR_WBINT_LOOKUPSIDS (0x02) 19 19 20 #define NDR_WBINT_ SID2UID(0x03)20 #define NDR_WBINT_LOOKUPNAME (0x03) 21 21 22 #define NDR_WBINT_SID2 GID (0x04)22 #define NDR_WBINT_SID2UID (0x04) 23 23 24 #define NDR_WBINT_ UID2SID (0x05)24 #define NDR_WBINT_SID2GID (0x05) 25 25 26 #define NDR_WBINT_ GID2SID(0x06)26 #define NDR_WBINT_SIDS2UNIXIDS (0x06) 27 27 28 #define NDR_WBINT_ ALLOCATEUID (0x07)28 #define NDR_WBINT_UID2SID (0x07) 29 29 30 #define NDR_WBINT_ ALLOCATEGID (0x08)30 #define NDR_WBINT_GID2SID (0x08) 31 31 32 #define NDR_WBINT_ QUERYUSER(0x09)32 #define NDR_WBINT_ALLOCATEUID (0x09) 33 33 34 #define NDR_WBINT_ LOOKUPUSERALIASES(0x0a)34 #define NDR_WBINT_ALLOCATEGID (0x0a) 35 35 36 #define NDR_WBINT_ LOOKUPUSERGROUPS(0x0b)36 #define NDR_WBINT_QUERYUSER (0x0b) 37 37 38 #define NDR_WBINT_ QUERYSEQUENCENUMBER(0x0c)38 #define NDR_WBINT_LOOKUPUSERALIASES (0x0c) 39 39 40 #define NDR_WBINT_LOOKUP GROUPMEMBERS (0x0d)40 #define NDR_WBINT_LOOKUPUSERGROUPS (0x0d) 41 41 42 #define NDR_WBINT_QUERY USERLIST(0x0e)42 #define NDR_WBINT_QUERYSEQUENCENUMBER (0x0e) 43 43 44 #define NDR_WBINT_ QUERYGROUPLIST(0x0f)44 #define NDR_WBINT_LOOKUPGROUPMEMBERS (0x0f) 45 45 46 #define NDR_WBINT_ DSGETDCNAME(0x10)46 #define NDR_WBINT_QUERYUSERLIST (0x10) 47 47 48 #define NDR_WBINT_ LOOKUPRIDS(0x11)48 #define NDR_WBINT_QUERYGROUPLIST (0x11) 49 49 50 #define NDR_WBINT_ CHECKMACHINEACCOUNT(0x12)50 #define NDR_WBINT_DSGETDCNAME (0x12) 51 51 52 #define NDR_WBINT_ CHANGEMACHINEACCOUNT(0x13)52 #define NDR_WBINT_LOOKUPRIDS (0x13) 53 53 54 #define NDR_WBINT_ PINGDC(0x14)54 #define NDR_WBINT_CHECKMACHINEACCOUNT (0x14) 55 55 56 #define NDR_WBINT_ SETMAPPING(0x15)56 #define NDR_WBINT_CHANGEMACHINEACCOUNT (0x15) 57 57 58 #define NDR_WBINT_ REMOVEMAPPING(0x16)58 #define NDR_WBINT_PINGDC (0x16) 59 59 60 #define NDR_WBINT_ SETHWM (0x17)61 62 #define NDR_WBINT_CALL_COUNT (24) 60 #define NDR_WBINT_CALL_COUNT (23) 61 void ndr_print_wbint_TransID(struct ndr_print *ndr, const char *name, const struct wbint_TransID *r); 62 void ndr_print_wbint_TransIDArray(struct ndr_print *ndr, const char *name, const struct wbint_TransIDArray *r); 63 63 enum ndr_err_code ndr_push_wbint_userinfo(struct ndr_push *ndr, int ndr_flags, const struct wbint_userinfo *r); 64 64 enum ndr_err_code ndr_pull_wbint_userinfo(struct ndr_pull *ndr, int ndr_flags, struct wbint_userinfo *r); … … 79 79 enum ndr_err_code ndr_pull_wbint_userinfos(struct ndr_pull *ndr, int ndr_flags, struct wbint_userinfos *r); 80 80 void 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);84 81 void ndr_print_wbint_Ping(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Ping *r); 85 82 void ndr_print_wbint_LookupSid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupSid *r); 83 void ndr_print_wbint_LookupSids(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupSids *r); 86 84 void ndr_print_wbint_LookupName(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupName *r); 87 85 void ndr_print_wbint_Sid2Uid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Sid2Uid *r); 88 86 void ndr_print_wbint_Sid2Gid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Sid2Gid *r); 87 void ndr_print_wbint_Sids2UnixIDs(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Sids2UnixIDs *r); 89 88 void ndr_print_wbint_Uid2Sid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Uid2Sid *r); 90 89 void ndr_print_wbint_Gid2Sid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Gid2Sid *r); … … 103 102 void ndr_print_wbint_ChangeMachineAccount(struct ndr_print *ndr, const char *name, int flags, const struct wbint_ChangeMachineAccount *r); 104 103 void 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);108 104 #endif /* _HEADER_NDR_wbint */ -
vendor/current/source3/librpc/gen_ndr/notify.h
r414 r740 1 1 /* header auto-generated by pidl */ 2 3 #ifndef _PIDL_HEADER_notify 4 #define _PIDL_HEADER_notify 2 5 3 6 #include <stdint.h> … … 5 8 #include "libcli/util/ntstatus.h" 6 9 10 #include "librpc/gen_ndr/file_id.h" 11 #include "librpc/gen_ndr/server_id.h" 7 12 #ifndef _HEADER_notify 8 13 #define _HEADER_notify … … 42 47 }/* [public] */; 43 48 49 enum 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 74 struct 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 44 81 #endif /* _HEADER_notify */ 82 #endif /* _PIDL_HEADER_notify */ -
vendor/current/source3/librpc/gen_ndr/perfcount.h
r414 r740 1 1 /* header auto-generated by pidl */ 2 3 #ifndef _PIDL_HEADER_perfcount 4 #define _PIDL_HEADER_perfcount 2 5 3 6 #include <stdint.h> … … 128 131 129 132 #endif /* _HEADER_perfcount */ 133 #endif /* _PIDL_HEADER_perfcount */ -
vendor/current/source3/librpc/gen_ndr/printcap.h
r600 r740 1 1 /* header auto-generated by pidl */ 2 3 #ifndef _PIDL_HEADER_printcap 4 #define _PIDL_HEADER_printcap 2 5 3 6 #include <stdint.h> … … 11 14 const char *name;/* [unique,charset(UTF8)] */ 12 15 const char *info;/* [unique,charset(UTF8)] */ 16 const char *location;/* [unique,charset(UTF8)] */ 13 17 }; 14 18 … … 20 24 21 25 #endif /* _HEADER_printcap */ 26 #endif /* _PIDL_HEADER_printcap */ -
vendor/current/source3/librpc/gen_ndr/secrets.h
r414 r740 1 1 /* header auto-generated by pidl */ 2 3 #ifndef _PIDL_HEADER_secrets 4 #define _PIDL_HEADER_secrets 2 5 3 6 #include <stdint.h> … … 5 8 #include "libcli/util/ntstatus.h" 6 9 10 #include "librpc/gen_ndr/security.h" 7 11 #ifndef _HEADER_secrets 8 12 #define _HEADER_secrets … … 18 22 19 23 #endif /* _HEADER_secrets */ 24 #endif /* _PIDL_HEADER_secrets */ -
vendor/current/source3/librpc/gen_ndr/srv_wbint.c
r594 r740 5 5 6 6 #include "includes.h" 7 #include "ntdomain.h" 7 8 #include "librpc/gen_ndr/srv_wbint.h" 8 9 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; 10 static 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; 16 16 struct wbint_Ping *r; 17 17 … … 23 23 } 24 24 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); 45 43 } 46 44 … … 61 59 62 60 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 90 static 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; 96 96 struct wbint_LookupSid *r; 97 97 … … 103 103 } 104 104 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); 125 123 } 126 124 … … 153 151 154 152 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 182 static 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 268 static 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; 188 274 struct wbint_LookupName *r; 189 275 … … 195 281 } 196 282 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); 217 301 } 218 302 … … 239 323 240 324 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 354 static 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; 274 360 struct wbint_Sid2Uid *r; 275 361 … … 281 367 } 282 368 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); 303 387 } 304 388 … … 319 403 320 404 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 434 static 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; 354 440 struct wbint_Sid2Gid *r; 355 441 … … 361 447 } 362 448 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); 383 467 } 384 468 … … 399 483 400 484 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 514 static 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 589 static 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; 434 595 struct wbint_Uid2Sid *r; 435 596 … … 441 602 } 442 603 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); 463 622 } 464 623 … … 479 638 480 639 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 669 static 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; 514 675 struct wbint_Gid2Sid *r; 515 676 … … 521 682 } 522 683 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); 543 702 } 544 703 … … 559 718 560 719 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 749 static 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; 594 755 struct wbint_AllocateUid *r; 595 756 … … 601 762 } 602 763 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); 623 782 } 624 783 … … 639 798 640 799 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 829 static 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; 674 835 struct wbint_AllocateGid *r; 675 836 … … 681 842 } 682 843 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); 703 862 } 704 863 … … 719 878 720 879 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 909 static 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; 754 915 struct wbint_QueryUser *r; 755 916 … … 761 922 } 762 923 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); 783 942 } 784 943 … … 799 958 800 959 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 989 static 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; 834 995 struct wbint_LookupUserAliases *r; 835 996 … … 841 1002 } 842 1003 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); 863 1022 } 864 1023 … … 879 1038 880 1039 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 1069 static 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; 914 1075 struct wbint_LookupUserGroups *r; 915 1076 … … 921 1082 } 922 1083 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); 943 1102 } 944 1103 … … 959 1118 960 1119 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 1149 static 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; 994 1155 struct wbint_QuerySequenceNumber *r; 995 1156 … … 1001 1162 } 1002 1163 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); 1023 1182 } 1024 1183 … … 1039 1198 1040 1199 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 1229 static 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; 1074 1235 struct wbint_LookupGroupMembers *r; 1075 1236 … … 1081 1242 } 1082 1243 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); 1103 1262 } 1104 1263 … … 1119 1278 1120 1279 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 1309 static 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; 1154 1315 struct wbint_QueryUserList *r; 1155 1316 … … 1161 1322 } 1162 1323 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); 1183 1342 } 1184 1343 … … 1199 1358 1200 1359 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 1389 static 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; 1234 1395 struct wbint_QueryGroupList *r; 1235 1396 … … 1241 1402 } 1242 1403 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); 1263 1422 } 1264 1423 … … 1279 1438 1280 1439 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 1469 static 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; 1314 1475 struct wbint_DsGetDcName *r; 1315 1476 … … 1321 1482 } 1322 1483 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); 1343 1502 } 1344 1503 … … 1359 1518 1360 1519 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 1549 static 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; 1394 1555 struct wbint_LookupRids *r; 1395 1556 … … 1401 1562 } 1402 1563 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); 1423 1582 } 1424 1583 … … 1445 1604 1446 1605 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 1635 static 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; 1480 1641 struct wbint_CheckMachineAccount *r; 1481 1642 … … 1487 1648 } 1488 1649 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); 1509 1668 } 1510 1669 … … 1518 1677 1519 1678 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 1708 static 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; 1553 1714 struct wbint_ChangeMachineAccount *r; 1554 1715 … … 1560 1721 } 1561 1722 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); 1582 1741 } 1583 1742 … … 1591 1750 1592 1751 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 1781 static 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; 1626 1787 struct wbint_PingDc *r; 1627 1788 … … 1633 1794 } 1634 1795 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); 1655 1814 } 1656 1815 … … 1664 1823 1665 1824 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); 1905 1848 1906 1849 talloc_free(r); … … 1915 1858 {"WBINT_PING", NDR_WBINT_PING, api_wbint_Ping}, 1916 1859 {"WBINT_LOOKUPSID", NDR_WBINT_LOOKUPSID, api_wbint_LookupSid}, 1860 {"WBINT_LOOKUPSIDS", NDR_WBINT_LOOKUPSIDS, api_wbint_LookupSids}, 1917 1861 {"WBINT_LOOKUPNAME", NDR_WBINT_LOOKUPNAME, api_wbint_LookupName}, 1918 1862 {"WBINT_SID2UID", NDR_WBINT_SID2UID, api_wbint_Sid2Uid}, 1919 1863 {"WBINT_SID2GID", NDR_WBINT_SID2GID, api_wbint_Sid2Gid}, 1864 {"WBINT_SIDS2UNIXIDS", NDR_WBINT_SIDS2UNIXIDS, api_wbint_Sids2UnixIDs}, 1920 1865 {"WBINT_UID2SID", NDR_WBINT_UID2SID, api_wbint_Uid2Sid}, 1921 1866 {"WBINT_GID2SID", NDR_WBINT_GID2SID, api_wbint_Gid2Sid}, … … 1934 1879 {"WBINT_CHANGEMACHINEACCOUNT", NDR_WBINT_CHANGEMACHINEACCOUNT, api_wbint_ChangeMachineAccount}, 1935 1880 {"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},1939 1881 }; 1940 1882 … … 1945 1887 } 1946 1888 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 2 2 #ifndef __SRV_WBINT__ 3 3 #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); 4 void _wbint_Ping(struct pipes_struct *p, struct wbint_Ping *r); 5 NTSTATUS _wbint_LookupSid(struct pipes_struct *p, struct wbint_LookupSid *r); 6 NTSTATUS _wbint_LookupSids(struct pipes_struct *p, struct wbint_LookupSids *r); 7 NTSTATUS _wbint_LookupName(struct pipes_struct *p, struct wbint_LookupName *r); 8 NTSTATUS _wbint_Sid2Uid(struct pipes_struct *p, struct wbint_Sid2Uid *r); 9 NTSTATUS _wbint_Sid2Gid(struct pipes_struct *p, struct wbint_Sid2Gid *r); 10 NTSTATUS _wbint_Sids2UnixIDs(struct pipes_struct *p, struct wbint_Sids2UnixIDs *r); 11 NTSTATUS _wbint_Uid2Sid(struct pipes_struct *p, struct wbint_Uid2Sid *r); 12 NTSTATUS _wbint_Gid2Sid(struct pipes_struct *p, struct wbint_Gid2Sid *r); 13 NTSTATUS _wbint_AllocateUid(struct pipes_struct *p, struct wbint_AllocateUid *r); 14 NTSTATUS _wbint_AllocateGid(struct pipes_struct *p, struct wbint_AllocateGid *r); 15 NTSTATUS _wbint_QueryUser(struct pipes_struct *p, struct wbint_QueryUser *r); 16 NTSTATUS _wbint_LookupUserAliases(struct pipes_struct *p, struct wbint_LookupUserAliases *r); 17 NTSTATUS _wbint_LookupUserGroups(struct pipes_struct *p, struct wbint_LookupUserGroups *r); 18 NTSTATUS _wbint_QuerySequenceNumber(struct pipes_struct *p, struct wbint_QuerySequenceNumber *r); 19 NTSTATUS _wbint_LookupGroupMembers(struct pipes_struct *p, struct wbint_LookupGroupMembers *r); 20 NTSTATUS _wbint_QueryUserList(struct pipes_struct *p, struct wbint_QueryUserList *r); 21 NTSTATUS _wbint_QueryGroupList(struct pipes_struct *p, struct wbint_QueryGroupList *r); 22 NTSTATUS _wbint_DsGetDcName(struct pipes_struct *p, struct wbint_DsGetDcName *r); 23 NTSTATUS _wbint_LookupRids(struct pipes_struct *p, struct wbint_LookupRids *r); 24 NTSTATUS _wbint_CheckMachineAccount(struct pipes_struct *p, struct wbint_CheckMachineAccount *r); 25 NTSTATUS _wbint_ChangeMachineAccount(struct pipes_struct *p, struct wbint_ChangeMachineAccount *r); 26 NTSTATUS _wbint_PingDc(struct pipes_struct *p, struct wbint_PingDc *r); 28 27 void 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);55 28 #endif /* __SRV_WBINT__ */ -
vendor/current/source3/librpc/gen_ndr/wbint.h
r618 r740 1 1 /* header auto-generated by pidl */ 2 3 #ifndef _PIDL_HEADER_wbint 4 #define _PIDL_HEADER_wbint 2 5 3 6 #include <stdint.h> … … 7 10 #include "librpc/gen_ndr/lsa.h" 8 11 #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" 9 15 #ifndef _HEADER_wbint 10 16 #define _HEADER_wbint 17 18 struct wbint_TransID { 19 enum id_type type; 20 uint32_t domain_index; 21 uint32_t rid; 22 uint64_t unix_id; 23 }; 24 25 struct wbint_TransIDArray { 26 uint32_t num_ids; 27 struct wbint_TransID *ids;/* [size_is(num_ids)] */ 28 }; 11 29 12 30 struct wbint_userinfo { … … 46 64 }/* [public] */; 47 65 48 enum wbint_IdType49 #ifndef USE_UINT_ENUMS50 {51 WBINT_ID_TYPE_NOT_SPECIFIED,52 WBINT_ID_TYPE_UID,53 WBINT_ID_TYPE_GID54 }55 #else56 { __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 #endif61 ;62 63 66 64 67 struct wbint_Ping { … … 89 92 90 93 94 struct 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 91 108 struct wbint_LookupName { 92 109 struct { … … 127 144 struct { 128 145 uint64_t *gid;/* [ref] */ 146 NTSTATUS result; 147 } out; 148 149 }; 150 151 152 struct 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] */ 129 160 NTSTATUS result; 130 161 } out; … … 313 344 }; 314 345 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 356 346 #endif /* _HEADER_wbint */ 347 #endif /* _PIDL_HEADER_wbint */ -
vendor/current/source3/librpc/idl/libnet_join.idl
r414 r740 1 1 #include "idl_types.h" 2 2 3 import "wkssvc.idl", "security.idl" ;3 import "wkssvc.idl", "security.idl", "misc.idl"; 4 4 5 5 /* … … 8 8 9 9 [ 10 pointer_default(unique) 10 pointer_default(unique), 11 helper("ads.h") 11 12 ] 12 13 interface libnetjoin … … 21 22 [in] string account_ou, 22 23 [in] string admin_account, 23 [in ] string admin_password,24 [in,noprint] string admin_password, 24 25 [in] string machine_password, 25 26 [in] wkssvc_joinflags join_flags, … … 29 30 [in] string upn, 30 31 [in] boolean8 modify_config, 31 [in ] ads_struct *ads,32 [in,unique] ads_struct *ads, 32 33 [in] boolean8 debug, 33 34 [in] boolean8 use_kerberos, … … 51 52 [in] string account_ou, 52 53 [in] string admin_account, 53 [in ] string admin_password,54 [in,noprint] string admin_password, 54 55 [in] string machine_password, 55 56 [in] wkssvc_joinflags unjoin_flags, … … 57 58 [in] boolean8 modify_config, 58 59 [in] dom_sid *domain_sid, 59 [in ] ads_struct *ads,60 [in,unique] ads_struct *ads, 60 61 [in] boolean8 debug, 61 62 [in] boolean8 use_kerberos, -
vendor/current/source3/librpc/idl/libnetapi.idl
r414 r740 7 7 cpp_quote("#define MAXSUBAUTHS 15 /* max sub authorities in a SID */") 8 8 cpp_quote("#endif") 9 10 import "misc.idl"; 9 11 10 12 [ … … 799 801 /*******************************************/ 800 802 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 801 821 [public] typedef struct { 802 822 string domain_controller_name; … … 806 826 string domain_name; 807 827 string dns_forest_name; 808 uint32flags;828 DOMAIN_CONTROLLER_INFO_FLAGS flags; 809 829 string dc_site_name; 810 830 string client_site_name; … … 1917 1937 [in] uint32 function_code, 1918 1938 [in] uint32 query_level, 1919 [in ] uint8 *data,1939 [in,unique] uint8 *data, 1920 1940 [out,ref] uint8 **buffer 1921 1941 ); -
vendor/current/source3/librpc/idl/messaging.idl
r427 r740 1 1 #include "idl_types.h" 2 3 import "server_id.idl"; 2 4 3 5 /* … … 34 36 MSG_SHUTDOWN = 0x000D, 35 37 38 MSG_IDMAP_FLUSH = 0x000E, 39 MSG_IDMAP_DELETE = 0x000F, 40 MSG_IDMAP_KILL = 0x0010, 41 36 42 /* nmbd messages */ 37 43 MSG_FORCE_ELECTION = 0x0101, … … 46 52 MSG_PRINTER_UPDATE = 0x0205, 47 53 MSG_PRINTER_MOD = 0x0206, 54 MSG_PRINTER_PCAP = 0x0207, 48 55 49 56 /* smbd messages */ … … 84 91 MSG_WINBIND_VALIDATE_CACHE = 0x0408, 85 92 MSG_WINBIND_DUMP_DOMAIN_LIST = 0x0409, 93 MSG_WINBIND_IP_DROPPED = 0x040A, 86 94 87 95 /* event messages */ -
vendor/current/source3/librpc/idl/notify.idl
r414 r740 1 1 #include "idl_types.h" 2 3 import "file_id.idl", "server_id.idl"; 2 4 3 5 /* … … 61 63 } notify_event; 62 64 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; 63 84 } -
vendor/current/source3/librpc/idl/secrets.idl
r414 r740 1 1 #include "idl_types.h" 2 3 import "security.idl"; 2 4 3 5 /* -
vendor/current/source3/librpc/idl/wbint.idl
r618 r740 1 1 #include "idl_types.h" 2 import "lsa.idl", "netlogon.idl" ;2 import "lsa.idl", "netlogon.idl", "misc.idl", "security.idl", "idmap.idl"; 3 3 4 4 [ … … 7 7 pointer_default(unique), 8 8 version(1.0), 9 helpstring("winbind parent-child protocol") 9 helpstring("winbind parent-child protocol"), 10 no_srv_register 10 11 ] 11 12 interface wbint … … 21 22 [out,string,charset(UTF8)] char **domain, 22 23 [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 23 30 ); 24 31 … … 41 48 [in] dom_sid *sid, 42 49 [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 43 67 ); 44 68 … … 155 179 NTSTATUS wbint_PingDc( 156 180 ); 157 158 typedef [public] enum {159 WBINT_ID_TYPE_NOT_SPECIFIED,160 WBINT_ID_TYPE_UID,161 WBINT_ID_TYPE_GID162 } wbint_IdType;163 164 NTSTATUS wbint_SetMapping(165 [in] dom_sid *sid,166 [in] wbint_IdType type,167 [in] hyper id168 );169 170 NTSTATUS wbint_RemoveMapping(171 [in] dom_sid *sid,172 [in] wbint_IdType type,173 [in] hyper id174 );175 176 NTSTATUS wbint_SetHWM(177 [in] wbint_IdType type,178 [in] hyper id179 );180 181 } -
vendor/current/source3/librpc/ndr/util.c
r414 r740 21 21 22 22 #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" 204 25 205 26 _PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss) … … 208 29 ndr->print(ndr, "%-25s: %s", name, print_sockaddr(addr, sizeof(addr), ss)); 209 30 } 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 24 24 * the so version number. */ 25 25 26 #ifndef _ _DCERPC_H__27 #define _ _DCERPC_H__26 #ifndef _S3_DCERPC_H__ 27 #define _S3_DCERPC_H__ 28 28 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" 32 32 33 struct loadparm_context; 34 struct cli_credentials; 33 #define SMB_RPC_INTERFACE_VERSION 1 35 34 36 /** 37 * Connection to a particular DCE/RPC interface. 38 */ 39 struct dcerpc_pipe { 40 const struct ndr_interface_table *table; 35 struct NL_AUTH_MESSAGE; 41 36 42 /** SMB context used when transport is ncacn_np. */ 43 struct cli_state *cli; 37 /* auth state for all bind types. */ 44 38 45 /** Samba 3 DCE/RPC client context. */ 46 struct rpc_pipe_client *rpc_cli; 39 struct 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; 47 49 }; 48 50 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 */ 52 NTSTATUS 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); 59 NTSTATUS dcerpc_pull_ncacn_packet(TALLOC_CTX *mem_ctx, 60 const DATA_BLOB *blob, 61 struct ncacn_packet *r, 62 bool bigendian); 63 NTSTATUS dcerpc_push_schannel_bind(TALLOC_CTX *mem_ctx, 64 struct NL_AUTH_MESSAGE *r, 65 DATA_BLOB *blob); 66 NTSTATUS 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); 73 NTSTATUS dcerpc_pull_dcerpc_auth(TALLOC_CTX *mem_ctx, 74 const DATA_BLOB *blob, 75 struct dcerpc_auth *r, 76 bool bigendian); 77 NTSTATUS 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); 82 NTSTATUS dcerpc_add_auth_footer(struct pipe_auth_data *auth, 83 size_t pad_len, DATA_BLOB *rpc_out); 84 NTSTATUS 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); 56 90 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 */ 61 92 93 bool smb_register_ndr_interface(const struct ndr_interface_table *interface); 94 const struct ndr_interface_table *get_iface_from_syntax( 95 const struct ndr_syntax_id *syntax); 96 const char *get_pipe_name_from_syntax(TALLOC_CTX *mem_ctx, 97 const struct ndr_syntax_id *syntax); 62 98 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.