Changeset 752 for trunk/server/librpc
- Timestamp:
- Nov 29, 2012, 2:06:31 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 746,748
- Property svn:mergeinfo changed
-
trunk/server/librpc/idl/ntprinting.idl
r745 r752 27 27 } ntprinting_form; 28 28 29 void decode_ntprinting_form(29 [public] void decode_ntprinting_form( 30 30 [in] ntprinting_form form 31 31 ); … … 47 47 } ntprinting_driver; 48 48 49 void decode_ntprinting_driver(49 [public] void decode_ntprinting_driver( 50 50 [in] ntprinting_driver driver 51 51 ); … … 147 147 } ntprinting_printer; 148 148 149 void decode_ntprinting_printer(149 [public] void decode_ntprinting_printer( 150 150 [in] ntprinting_printer printer 151 151 ); -
trunk/server/librpc/idl/samr.idl
r745 r752 1456 1456 typedef struct { 1457 1457 samPwdChangeReason extendedFailureReason; 1458 [string,charset(UTF16)] uint16 *filterModuleName;1458 lsa_String filterModuleName; 1459 1459 } userPwdChangeFailureInformation; 1460 1460 -
trunk/server/librpc/idl/security.idl
r745 r752 571 571 572 572 /* This is not yet sent over the network, but is simply defined in IDL */ 573 typedef [public ] struct {573 typedef [public,gensize] struct { 574 574 uint32 num_sids; 575 575 [size_is(num_sids)] dom_sid sids[*]; … … 579 579 580 580 /* This is not yet sent over the network, but is simply defined in IDL */ 581 typedef [public ] struct {581 typedef [public,gensize] struct { 582 582 uid_t uid; 583 583 uid_t gid; … … 593 593 SECINFO_DACL = 0x00000004, 594 594 SECINFO_SACL = 0x00000008, 595 SECINFO_LABEL = 0x00000010, 595 596 SECINFO_UNPROTECTED_SACL = 0x10000000, 596 597 SECINFO_UNPROTECTED_DACL = 0x20000000, -
trunk/server/librpc/idl/spoolss.idl
r745 r752 679 679 680 680 typedef [public,gensize] struct { 681 [charset(UTF16) ] uint16 devicename[MAXDEVICENAME];681 [charset(UTF16),to_null] uint16 devicename[MAXDEVICENAME]; 682 682 spoolss_DeviceModeSpecVersion specversion; 683 683 uint16 driverversion; … … 698 698 spoolss_DeviceModeTTOption ttoption; 699 699 spoolss_DeviceModeCollate collate; 700 [charset(UTF16) ] uint16 formname[MAXDEVICENAME];700 [charset(UTF16),to_null] uint16 formname[MAXDEVICENAME]; 701 701 uint16 logpixels; /* reserved */ 702 702 uint32 bitsperpel; /* reserved */ -
trunk/server/librpc/ndr/libndr.h
r745 r752 137 137 #define LIBNDR_FLAG_ALIGN8 (1<<24) 138 138 139 #define LIBNDR_ALIGN_FLAGS (LIBNDR_FLAG_ALIGN2|LIBNDR_FLAG_ALIGN4|LIBNDR_FLAG_ALIGN8) 139 #define LIBNDR_ALIGN_FLAGS ( 0 | \ 140 LIBNDR_FLAG_NOALIGN | \ 141 LIBNDR_FLAG_REMAINING | \ 142 LIBNDR_FLAG_ALIGN2 | \ 143 LIBNDR_FLAG_ALIGN4 | \ 144 LIBNDR_FLAG_ALIGN8 | \ 145 0) 140 146 141 147 #define LIBNDR_PRINT_ARRAY_HEX (1<<25) … … 569 575 enum ndr_err_code ndr_check_string_terminator(struct ndr_pull *ndr, uint32_t count, uint32_t element_size); 570 576 enum ndr_err_code ndr_pull_charset(struct ndr_pull *ndr, int ndr_flags, const char **var, uint32_t length, uint8_t byte_mul, charset_t chset); 577 enum ndr_err_code ndr_pull_charset_to_null(struct ndr_pull *ndr, int ndr_flags, const char **var, uint32_t length, uint8_t byte_mul, charset_t chset); 571 578 enum ndr_err_code ndr_push_charset(struct ndr_push *ndr, int ndr_flags, const char *var, uint32_t length, uint8_t byte_mul, charset_t chset); 572 579 -
trunk/server/librpc/ndr/ndr.c
r745 r752 381 381 (*pflags) &= ~LIBNDR_FLAG_NDR64; 382 382 } 383 if (new_flags & LIBNDR_FLAG_REMAINING) { 383 if (new_flags & LIBNDR_ALIGN_FLAGS) { 384 /* Ensure we only have the passed-in 385 align flag set in the new_flags, 386 remove any old align flag. */ 384 387 (*pflags) &= ~LIBNDR_ALIGN_FLAGS; 385 }386 if (new_flags & LIBNDR_ALIGN_FLAGS) {387 (*pflags) &= ~LIBNDR_FLAG_REMAINING;388 388 } 389 389 if (new_flags & LIBNDR_FLAG_NO_RELATIVE_REVERSE) { -
trunk/server/librpc/ndr/ndr_basic.c
r745 r752 1214 1214 1215 1215 /* 1216 push a DATA_BLOB onto the wire. 1217 */ 1216 * Push a DATA_BLOB onto the wire. 1217 * 1) When called with LIBNDR_FLAG_ALIGN* alignment flags set, push padding 1218 * bytes _only_. The length is determined by the alignment required and the 1219 * current ndr offset. 1220 * 2) When called with the LIBNDR_FLAG_REMAINING flag, push the byte array to 1221 * the ndr buffer. 1222 * 3) Otherwise, push a uint32 length _and_ a corresponding byte array to the 1223 * ndr buffer. 1224 */ 1218 1225 _PUBLIC_ enum ndr_err_code ndr_push_DATA_BLOB(struct ndr_push *ndr, int ndr_flags, DATA_BLOB blob) 1219 1226 { 1220 1227 if (ndr->flags & LIBNDR_FLAG_REMAINING) { 1221 1228 /* nothing to do */ 1222 } else if (ndr->flags & LIBNDR_ALIGN_FLAGS) { 1223 if (ndr->flags & LIBNDR_FLAG_NOALIGN) { 1224 blob.length = 0; 1225 } else if (ndr->flags & LIBNDR_FLAG_ALIGN2) { 1229 } else if (ndr->flags & (LIBNDR_ALIGN_FLAGS & ~LIBNDR_FLAG_NOALIGN)) { 1230 if (ndr->flags & LIBNDR_FLAG_ALIGN2) { 1226 1231 blob.length = NDR_ALIGN(ndr, 2); 1227 1232 } else if (ndr->flags & LIBNDR_FLAG_ALIGN4) { … … 1240 1245 1241 1246 /* 1242 pull a DATA_BLOB from the wire. 1243 */ 1247 * Pull a DATA_BLOB from the wire. 1248 * 1) when called with LIBNDR_FLAG_ALIGN* alignment flags set, pull padding 1249 * bytes _only_. The length is determined by the alignment required and the 1250 * current ndr offset. 1251 * 2) When called with the LIBNDR_FLAG_REMAINING flag, pull all remaining bytes 1252 * from the ndr buffer. 1253 * 3) Otherwise, pull a uint32 length _and_ a corresponding byte array from the 1254 * ndr buffer. 1255 */ 1244 1256 _PUBLIC_ enum ndr_err_code ndr_pull_DATA_BLOB(struct ndr_pull *ndr, int ndr_flags, DATA_BLOB *blob) 1245 1257 { … … 1248 1260 if (ndr->flags & LIBNDR_FLAG_REMAINING) { 1249 1261 length = ndr->data_size - ndr->offset; 1250 } else if (ndr->flags & LIBNDR_ALIGN_FLAGS) { 1251 if (ndr->flags & LIBNDR_FLAG_NOALIGN) { 1252 length = 0; 1253 } else if (ndr->flags & LIBNDR_FLAG_ALIGN2) { 1262 } else if (ndr->flags & (LIBNDR_ALIGN_FLAGS & ~LIBNDR_FLAG_NOALIGN)) { 1263 if (ndr->flags & LIBNDR_FLAG_ALIGN2) { 1254 1264 length = NDR_ALIGN(ndr, 2); 1255 1265 } else if (ndr->flags & LIBNDR_FLAG_ALIGN4) { -
trunk/server/librpc/ndr/ndr_ntprinting.c
r745 r752 55 55 ptr = IVAL(ndr->data, ndr->offset); 56 56 if (ptr == 0) { 57 ndr->offset = ndr->offset + 4; 57 58 break; 58 59 } -
trunk/server/librpc/ndr/ndr_string.c
r745 r752 695 695 } 696 696 697 _PUBLIC_ enum ndr_err_code ndr_pull_charset_to_null(struct ndr_pull *ndr, int ndr_flags, const char **var, uint32_t length, uint8_t byte_mul, charset_t chset) 698 { 699 size_t converted_size; 700 uint32_t str_len; 701 702 if (length == 0) { 703 *var = talloc_strdup(ndr->current_mem_ctx, ""); 704 return NDR_ERR_SUCCESS; 705 } 706 707 if (NDR_BE(ndr) && chset == CH_UTF16) { 708 chset = CH_UTF16BE; 709 } 710 711 NDR_PULL_NEED_BYTES(ndr, length*byte_mul); 712 713 str_len = ndr_string_length(ndr->data+ndr->offset, byte_mul); 714 str_len = MIN(str_len, length); /* overrun protection */ 715 716 if (!convert_string_talloc(ndr->current_mem_ctx, chset, CH_UNIX, 717 ndr->data+ndr->offset, str_len*byte_mul, 718 discard_const_p(void *, var), 719 &converted_size, false)) 720 { 721 return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 722 "Bad character conversion"); 723 } 724 NDR_CHECK(ndr_pull_advance(ndr, length*byte_mul)); 725 726 return NDR_ERR_SUCCESS; 727 } 728 697 729 _PUBLIC_ enum ndr_err_code ndr_push_charset(struct ndr_push *ndr, int ndr_flags, const char *var, uint32_t length, uint8_t byte_mul, charset_t chset) 698 730 {
Note:
See TracChangeset
for help on using the changeset viewer.