Browse Source

Trac Ticket #466 - entry_apply_mod - ADD: Failed to set
unhashed#user#password to extension

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

Bug Description: If changes are stuck in the chagnelog and the
server is restarted, the changes are being replicated as soon
as plugin_startall is called. At the point, the entry extension
has to be already initialized.

Fix Description: The entry extension initialization which used
to be called in pw_init. Now it is moved to just before
plugin_startall in main.

Noriko Hosoi 13 years ago
parent
commit
91d98369a2
2 changed files with 7 additions and 3 deletions
  1. 7 0
      ldap/servers/slapd/main.c
  2. 0 3
      ldap/servers/slapd/pw_mgmt.c

+ 7 - 0
ldap/servers/slapd/main.c

@@ -1169,6 +1169,13 @@ main( int argc, char **argv)
 		/* init the thread data index for bind dn's */
 		slapi_td_dn_init();
 
+		/* 
+		 * Initialize password storage in entry extension.
+		 * Need to be initialized before plugin_startall in case stucked
+		 * changes are replicated as soon as the replication plugin is started.
+		 */
+		pw_exp_init ();
+
 		plugin_print_lists();
 		plugin_startall(argc, argv, 1 /* Start Backends */, 1 /* Start Globals */); 
 		if (housekeeping_start((time_t)0, NULL) == NULL) {

+ 0 - 3
ldap/servers/slapd/pw_mgmt.c

@@ -313,9 +313,6 @@ pw_init ( void )
 	                                 * PSEUDO_ATTR_UNHASHEDUSERPASSWORD */
 	                                SLAPI_ATTR_FLAG_NOUSERMOD|
 	                                SLAPI_ATTR_FLAG_NOEXPOSE);
-
-	/* Initialize password storage in entry extension */
-	pw_exp_init ();
 }