diff options
author | Samuel Cabrero <scabrero@suse.de> | 2019-01-24 12:03:45 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-10-18 16:07:36 +0000 |
commit | 63b78894618a9badac595fbc59cea0f097feeded (patch) | |
tree | a5012f759be5839542dfbcd0bd91fd26de81175b /source4 | |
parent | ae9956a65e6913a73dfa68e2b5deebfeaf52c0e5 (diff) | |
download | samba-63b78894618a9badac595fbc59cea0f097feeded.tar.gz |
librpc: Move dcerpc_log_packet from s4 librpc to common librpc
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/librpc/rpc/dcerpc_util.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c index b856ebe5620..bd79a072bc8 100644 --- a/source4/librpc/rpc/dcerpc_util.c +++ b/source4/librpc/rpc/dcerpc_util.c @@ -743,45 +743,6 @@ _PUBLIC_ NTSTATUS dcerpc_fetch_session_key(struct dcerpc_pipe *p, return NT_STATUS_OK; } - -/* - log a rpc packet in a format suitable for ndrdump. This is especially useful - for sealed packets, where ethereal cannot easily see the contents - - this triggers on a debug level of >= 10 -*/ -_PUBLIC_ void dcerpc_log_packet(const char *lockdir, - const struct ndr_interface_table *ndr, - uint32_t opnum, uint32_t flags, - const DATA_BLOB *pkt) -{ - const int num_examples = 20; - int i; - - if (lockdir == NULL) return; - - for (i=0;i<num_examples;i++) { - char *name=NULL; - int ret; - ret = asprintf(&name, "%s/rpclog/%s-%u.%d.%s", - lockdir, ndr->name, opnum, i, - (flags&NDR_IN)?"in":"out"); - if (ret == -1) { - return; - } - if (!file_exist(name)) { - if (file_save(name, pkt->data, pkt->length)) { - DEBUG(10,("Logged rpc packet to %s\n", name)); - } - free(name); - break; - } - free(name); - } -} - - - /* create a secondary context from a primary connection |