The branch, master has been updated via 7c0277c librpc: Fix blank line endings via 816e68f libndr: Fix ndr_print_bitmap_flag for value=0 via 9ac3286 librpc: return a ndr_pull_error instead of just NDR_ERR_NDR64 when upper bits of 64 bit value are not 0 from 280f21a net: allow "net idmap get ranges" to list all ranges
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 7c0277c923443402b8a292fd3b3b1faba1da6dd5 Author: Volker Lendecke <v...@samba.org> Date: Sat Sep 14 13:44:54 2013 +0200 librpc: Fix blank line endings Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> Autobuild-User(master): Stefan Metzmacher <me...@samba.org> Autobuild-Date(master): Wed Oct 2 15:02:07 CEST 2013 on sn-devel-104 commit 816e68f94fe500b9d68fd29021d432b84d3139b7 Author: Volker Lendecke <v...@samba.org> Date: Sat Sep 14 13:43:03 2013 +0200 libndr: Fix ndr_print_bitmap_flag for value=0 Don't endlessly loop Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 9ac32866db2c4244d867093e2594347f4707313f Author: Matthieu Patou <m...@matws.net> Date: Sun Sep 22 17:17:16 2013 -0700 librpc: return a ndr_pull_error instead of just NDR_ERR_NDR64 when upper bits of 64 bit value are not 0 Signed-off-by: Matthieu Patou <m...@matws.net> Signed-off-by: Stefan Metzmacher <me...@samba.org> ----------------------------------------------------------------------- Summary of changes: librpc/ndr/ndr_basic.c | 23 ++++++++++++++--------- 1 files changed, 14 insertions(+), 9 deletions(-) Changeset truncated at 500 lines: diff --git a/librpc/ndr/ndr_basic.c b/librpc/ndr/ndr_basic.c index 5c653c8..ae5af7a 100644 --- a/librpc/ndr/ndr_basic.c +++ b/librpc/ndr/ndr_basic.c @@ -1,20 +1,20 @@ -/* +/* Unix SMB/CIFS implementation. routines for marshalling/unmarshalling basic types Copyright (C) Andrew Tridgell 2003 - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ @@ -169,7 +169,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_uint3264(struct ndr_pull *ndr, int ndr_flags if (unlikely(v64 != *v)) { DEBUG(0,(__location__ ": non-zero upper 32 bits 0x%016llx\n", (unsigned long long)v64)); - return NDR_ERR_NDR64; + return ndr_pull_error(ndr, NDR_ERR_NDR64, __location__ ": non-zero upper 32 bits 0x%016llx\n", + (unsigned long long)v64); } return err; } @@ -1004,7 +1005,7 @@ _PUBLIC_ void ndr_print_null(struct ndr_print *ndr) ndr->print(ndr, "UNEXPECTED NULL POINTER"); } -_PUBLIC_ void ndr_print_enum(struct ndr_print *ndr, const char *name, const char *type, +_PUBLIC_ void ndr_print_enum(struct ndr_print *ndr, const char *name, const char *type, const char *val, uint32_t value) { if (ndr->flags & LIBNDR_PRINT_ARRAY_HEX) { @@ -1019,10 +1020,14 @@ _PUBLIC_ void ndr_print_bitmap_flag(struct ndr_print *ndr, size_t size, const ch /* this is an attempt to support multi-bit bitmap masks */ value &= flag; + if (value == 0) { + return; + } + while (!(flag & 1)) { flag >>= 1; value >>= 1; - } + } if (flag == 1) { ndr->print(ndr, " %d: %-25s", value, flag_name); } else { @@ -1160,7 +1165,7 @@ _PUBLIC_ void ndr_print_bad_level(struct ndr_print *ndr, const char *name, uint1 ndr->print(ndr, "UNKNOWN LEVEL %u", level); } -_PUBLIC_ void ndr_print_array_uint8(struct ndr_print *ndr, const char *name, +_PUBLIC_ void ndr_print_array_uint8(struct ndr_print *ndr, const char *name, const uint8_t *data, uint32_t count) { int i; @@ -1195,7 +1200,7 @@ _PUBLIC_ void ndr_print_array_uint8(struct ndr_print *ndr, const char *name, free(idx); } } - ndr->depth--; + ndr->depth--; #undef _ONELINE_LIMIT } -- Samba Shared Repository