summaryrefslogtreecommitdiff
path: root/pidl
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-08-13 17:29:07 +0200
committerMichael Adam <obnox@samba.org>2010-08-13 23:50:41 +0200
commit045f4c96d5d9c0528661499ce0e5cc729df9713d (patch)
treede77651ee8b1afb2b396d381df586e3243dff554 /pidl
parentad871b73a26f3b48a522c8374c00aa5ff7d2eb4c (diff)
downloadsamba-045f4c96d5d9c0528661499ce0e5cc729df9713d.tar.gz
samba-045f4c96d5d9c0528661499ce0e5cc729df9713d.tar.bz2
samba-045f4c96d5d9c0528661499ce0e5cc729df9713d.zip
pidl: fix printing of server side ndr request debug messages
The macros NDR_PRINT_IN_DEBUG and NDR_PRINT_OUT_DEBUG are made for the client side. For the server side, the NDR_SET_VALUES flag needs to be added for the OUT struct and not for the IN struct, otherwise, the OUT part can print uninitialized data and the IN part may recalculate string lengths illegally.
Diffstat (limited to 'pidl')
-rw-r--r--pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
index 1f6641522c..1cbf187601 100644
--- a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
+++ b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
@@ -171,7 +171,7 @@ sub ParseFunction($$)
pidl "}";
pidl "";
pidl "if (DEBUGLEVEL >= 10) {";
- pidl "\tNDR_PRINT_IN_DEBUG($fn->{NAME}, r);";
+ pidl "\tNDR_PRINT_FUNCTION_DEBUG($fn->{NAME}, NDR_IN, r);";
pidl "}";
pidl "";
@@ -190,7 +190,7 @@ sub ParseFunction($$)
pidl "}";
pidl "";
pidl "if (DEBUGLEVEL >= 10) {";
- pidl "\tNDR_PRINT_OUT_DEBUG($fn->{NAME}, r);";
+ pidl "\nNDR_PRINT_FUNCTION_DEBUG($fn->{NAME}, NDR_OUT | NDR_SET_VALUES, r);";
pidl "}";
pidl "";
pidl "push = ndr_push_init_ctx(r);";