diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-02-13 10:14:04 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2008-02-13 10:14:04 +1100 |
commit | 7714a91f6762bb8d6578d89a49bfd5672aca054c (patch) | |
tree | 60b4d72b94ecb96f95e4d8e7041bf8abe58e8fa8 /source4/librpc/ndr/ndr_string.c | |
parent | e94d710b0b959d8e69eb02ef0704ebcff56485fb (diff) | |
parent | 3cfac63d165f072464e93a12f7ad48450c66477b (diff) | |
download | samba-7714a91f6762bb8d6578d89a49bfd5672aca054c.tar.gz samba-7714a91f6762bb8d6578d89a49bfd5672aca054c.tar.bz2 samba-7714a91f6762bb8d6578d89a49bfd5672aca054c.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-test
(This used to be commit 11102681bcd70b0abb2df38bcdc7fdec51e71600)
Diffstat (limited to 'source4/librpc/ndr/ndr_string.c')
-rw-r--r-- | source4/librpc/ndr/ndr_string.c | 45 |
1 files changed, 1 insertions, 44 deletions
diff --git a/source4/librpc/ndr/ndr_string.c b/source4/librpc/ndr/ndr_string.c index 69a7eca1a8..79548f81bc 100644 --- a/source4/librpc/ndr/ndr_string.c +++ b/source4/librpc/ndr/ndr_string.c @@ -259,24 +259,6 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags, *s = as; break; - case LIBNDR_FLAG_STR_FIXLEN15: - case LIBNDR_FLAG_STR_FIXLEN32: - len1 = (flags & LIBNDR_FLAG_STR_FIXLEN32)?32:15; - NDR_PULL_NEED_BYTES(ndr, len1*byte_mul); - ret = convert_string_talloc(ndr->current_mem_ctx, - ndr->iconv_convenience, - chset, CH_UNIX, - ndr->data+ndr->offset, - len1*byte_mul, - (void **)&as); - if (ret == -1) { - return ndr_pull_error(ndr, NDR_ERR_CHARCNV, - "Bad character conversion"); - } - NDR_CHECK(ndr_pull_advance(ndr, len1*byte_mul)); - *s = as; - break; - case LIBNDR_FLAG_STR_NOTERM: if (!(ndr->flags & LIBNDR_FLAG_REMAINING)) { return ndr_pull_error(ndr, NDR_ERR_STRING, "Bad string flags 0x%x (missing NDR_REMAINING)\n", @@ -349,10 +331,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_string(struct ndr_push *ndr, int ndr_flags, flags &= ~LIBNDR_FLAG_STR_CONFORMANT; - if (!(flags & - (LIBNDR_FLAG_STR_NOTERM | - LIBNDR_FLAG_STR_FIXLEN15 | - LIBNDR_FLAG_STR_FIXLEN32))) { + if (!(flags & LIBNDR_FLAG_STR_NOTERM)) { s_len++; } d_len = convert_string_talloc(ndr, ndr->iconv_convenience, CH_UNIX, chset, s, s_len, (void **)&dest); @@ -399,21 +378,6 @@ _PUBLIC_ enum ndr_err_code ndr_push_string(struct ndr_push *ndr, int ndr_flags, NDR_CHECK(ndr_push_bytes(ndr, dest, d_len)); break; - case LIBNDR_FLAG_STR_FIXLEN15: - case LIBNDR_FLAG_STR_FIXLEN32: { - ssize_t fix_len = (flags & LIBNDR_FLAG_STR_FIXLEN32)?32:15; - uint32_t pad_len = fix_len - d_len; - if (d_len > fix_len) { - return ndr_push_error(ndr, NDR_ERR_CHARCNV, - "Bad character conversion"); - } - NDR_CHECK(ndr_push_bytes(ndr, dest, d_len)); - if (pad_len != 0) { - NDR_CHECK(ndr_push_zero(ndr, pad_len)); - } - break; - } - default: if (ndr->flags & LIBNDR_FLAG_REMAINING) { NDR_CHECK(ndr_push_bytes(ndr, dest, d_len)); @@ -439,13 +403,6 @@ _PUBLIC_ size_t ndr_string_array_size(struct ndr_push *ndr, const char *s) unsigned byte_mul = 2; unsigned c_len_term = 1; - if (flags & LIBNDR_FLAG_STR_FIXLEN32) { - return 32; - } - if (flags & LIBNDR_FLAG_STR_FIXLEN15) { - return 15; - } - c_len = s?strlen_m(s):0; if (flags & (LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_UTF8)) { |