make dissect_nt_sid() return a sid string that also contains the proper name for...
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 22 May 2003 11:32:06 +0000 (11:32 +0000)
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 22 May 2003 11:32:06 +0000 (11:32 +0000)
this prettifies some dcerpc interfaces

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7712 f5534014-38df-0310-8fa8-9805f1628bb7

packet-dcerpc-samr.c
packet-smb.c

index d1b8fe2e3abb989afb72193cb88f3e9c7d5f3434..d6ee8081557f220d4c6890426bb29a29249c6c03 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2001,2003 Tim Potter <tpot@samba.org>
  *   2002 Added all command dissectors  Ronnie Sahlberg
  *
- * $Id: packet-dcerpc-samr.c,v 1.90 2003/05/21 10:39:19 sahlberg Exp $
+ * $Id: packet-dcerpc-samr.c,v 1.91 2003/05/22 11:32:06 sahlberg Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -40,6 +40,7 @@
 #include "packet-smb-common.h"
 #include "crypt-md4.h"
 #include "crypt-rc4.h"
+#include "packet-smb-sidsnooping.h"
 
 #ifdef NEED_SNPRINTF_H
 # include "snprintf.h"
@@ -1418,10 +1419,11 @@ samr_dissect_open_domain_reply(tvbuff_t *tvb, int offset,
         offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
                                       hf_samr_hnd, &policy_hnd, TRUE, FALSE);
 
-       if (sid_str)
+       if (sid_str) {
                pol_name = g_strdup_printf("OpenDomain(%s)", sid_str);
-       else
+       } else {
                pol_name = g_strdup("OpenDomain handle");
+       }
 
        dcerpc_smb_store_pol_name(&policy_hnd, pol_name);
 
index 3c93b67ba7c141f6771d11512ffcf388084e864a..601919b9d4cb2b23c6b6336fbc8250951e6ddd29 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
  * 2001  Rewrite by Ronnie Sahlberg and Guy Harris
  *
- * $Id: packet-smb.c,v 1.341 2003/05/21 10:16:10 sahlberg Exp $
+ * $Id: packet-smb.c,v 1.342 2003/05/22 11:32:06 sahlberg Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -7109,7 +7109,11 @@ dissect_nt_sid(tvbuff_t *tvb, int offset, proto_tree *parent_tree, char *name,
           }
 
           if(sid_str){
-            *sid_str = g_strdup(sid_string);
+            if(sid_name){
+              *sid_str = g_strdup_printf("%s (%s)", sid_string, sid_name);
+            } else {
+              *sid_str = g_strdup(sid_string);
+            }
           }
 
          CLEANUP_CALL_AND_POP;