Send Linux-ha-cvs mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."


Today's Topics:

   1. Linux-HA CVS: lib by andrew from 
      ([email protected])


----------------------------------------------------------------------

Message: 1
Date: Sun,  7 May 2006 02:30:58 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : andrew
Host    : 
Project : linux-ha
Module  : lib

Dir     : linux-ha/lib/crm/common


Modified Files:
        xml.c 


Log Message:
When logging XML, allow admin-defined sensitive information to be hidden

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/common/xml.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -3 -r1.76 -r1.77
--- xml.c       5 May 2006 12:54:33 -0000       1.76
+++ xml.c       7 May 2006 08:30:58 -0000       1.77
@@ -1,4 +1,4 @@
-/* $Id: xml.c,v 1.76 2006/05/05 12:54:33 andrew Exp $ */
+/* $Id: xml.c,v 1.77 2006/05/07 08:30:58 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -788,6 +788,7 @@
        char print_buffer[1000];
        char *buffer = print_buffer;
        const char *name = crm_element_name(data);
+       const char *hidden = NULL;      
 
        crm_debug_5("Dumping %s...", name);
        crm_validate_data(data);
@@ -819,13 +820,21 @@
        printed = sprintf(buffer, "<%s", name);
        update_buffer_head(buffer, printed);
 
+       hidden = crm_element_value(data, "hidden");
        xml_prop_iter(
                data, prop_name, prop_value,
 
                if(safe_str_eq(F_XML_TAGNAME, prop_name)) {
                        continue;
+
                } else if(safe_str_eq(F_XML_PARENT, prop_name)) {
                        continue;
+
+               } else if(hidden != NULL
+                         && prop_name != NULL
+                         && strlen(prop_name) > 0
+                         && strcasestr(hidden, prop_name) != NULL) {
+                       prop_value = "*****";
                }
                
                crm_debug_5("Dumping <%s %s=\"%s\"...",




------------------------------

_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


End of Linux-ha-cvs Digest, Vol 30, Issue 13
********************************************

Reply via email to