krb5pac: no need for a noprint PAC_BUFFER.
authorGünther Deschner <gd@samba.org>
Mon, 18 Mar 2013 15:25:06 +0000 (16:25 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 20 Jul 2016 19:27:18 +0000 (21:27 +0200)
commit4f5dde6730a7074ce36be59889cd181ddc79193f
tree22edd0d138c112aea95c51e83b118a5e825c5c38
parent7eab12fa637041660d442999f3dc5374bbddf627
krb5pac: no need for a noprint PAC_BUFFER.

Guenther

@@ -1,6 +1,7 @@
 _PUBLIC_ void ndr_print_PAC_BUFFER(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER *r)
 {
        ndr_print_struct(ndr, name, "PAC_BUFFER");
+       if (r == NULL) { ndr_print_null(ndr); return; }
        ndr->depth++;
        ndr_print_PAC_TYPE(ndr, "type", r->type);
        ndr_print_uint32(ndr, "_ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?_ndr_size_PAC_INFO(r->info,r->type,0):r->_ndr_size);
@@ -11,7 +12,7 @@
                ndr_print_PAC_INFO(ndr, "info", r->info);
        }
        ndr->depth--;
-       ndr_print_uint32(ndr, "_pad", r->_pad);
+       ndr_print_uint32(ndr, "_pad", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->_pad);
        ndr->depth--;
 }

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
librpc/idl/krb5pac.idl
librpc/ndr/ndr_krb5pac.c
librpc/ndr/ndr_krb5pac.h [new file with mode: 0644]
librpc/wscript_build