Browse Source

Ticket 49009 - args debug logging must be more restrictive

Bug Description: turning on args debugging logs all attribute value, including #unhashed#

Fix Description: filter unhashed attrs

https://fedorahosted.org/389/ticket/49009

Reviewed by: MarkR, thanks
Ludwig Krispenz 9 years ago
parent
commit
6eb1a45641
2 changed files with 2 additions and 0 deletions
  1. 1 0
      ldap/servers/slapd/entry.c
  2. 1 0
      ldap/servers/slapd/entrywsi.c

+ 1 - 0
ldap/servers/slapd/entry.c

@@ -3661,6 +3661,7 @@ entry_apply_mod( Slapi_Entry *e, const LDAPMod *mod )
 		if((strcasecmp(mod->mod_type,"objectclass") == 0)  
 		   && (strncasecmp((const char *)mod->mod_bvalues[i]->bv_val,"ldapsubentry",mod->mod_bvalues[i]->bv_len) == 0)) 
 			sawsubentry=PR_TRUE;
+		if (0==strcasecmp(PSEUDO_ATTR_UNHASHEDUSERPASSWORD,mod->mod_type)) continue;
 		slapi_log_err(SLAPI_LOG_ARGS, "entry_apply_mod", "%s: %s\n", mod->mod_type, mod->mod_bvalues[i]->bv_val);
 	}
 	bvcnt = i;

+ 1 - 0
ldap/servers/slapd/entrywsi.c

@@ -957,6 +957,7 @@ entry_apply_mod_wsi(Slapi_Entry *e, const LDAPMod *mod, const CSN *csn, int urp)
 		for ( i = 0;
 		      mod->mod_bvalues != NULL && mod->mod_bvalues[i] != NULL;
 		      i++ ) {
+			if (0==strcasecmp(PSEUDO_ATTR_UNHASHEDUSERPASSWORD,mod->mod_type)) continue;
 			slapi_log_err(SLAPI_LOG_ARGS, "entry_apply_mod_wsi", "%s: %s\n",
 			           mod->mod_type, mod->mod_bvalues[i]->bv_val);
 		}