diff options
author | Günther Deschner <gd@samba.org> | 2021-02-10 11:23:13 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2021-07-14 16:49:29 +0000 |
commit | 9cc62b562c978f664d0ccd91079975c264dd1573 (patch) | |
tree | 4fe350fc9e5c32da4729be0470d64562de29d315 | |
parent | e168a95c1bb1928cf206baf6d2db851c85f65fa9 (diff) | |
download | samba-9cc62b562c978f664d0ccd91079975c264dd1573.tar.gz |
librpc/ndr: do not print strings when NDR_SECRET is used
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
-rw-r--r-- | librpc/ndr/ndr_string.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/librpc/ndr/ndr_string.c b/librpc/ndr/ndr_string.c index 77efb3e9848..b5421e99ff5 100644 --- a/librpc/ndr/ndr_string.c +++ b/librpc/ndr/ndr_string.c @@ -334,6 +334,10 @@ _PUBLIC_ size_t ndr_string_array_size(struct ndr_push *ndr, const char *s) _PUBLIC_ void ndr_print_string(struct ndr_print *ndr, const char *name, const char *s) { + if (NDR_HIDE_SECRET(ndr)) { + ndr->print(ndr, "%-25s: <REDACTED SECRET VALUE>", name); + return; + } if (s) { ndr->print(ndr, "%-25s: '%s'", name, s); } else { |