Browse Source

[master] postponed changeUser() until b10-auth completes initial configuration.

Without this it cannot use privileged port (most commonly 53) while changing
the run time user (-u).  Confirmed the fix, and okayed on jabber.

I won't update changelog for this fix because it's a regression after
the previous release.
JINMEI Tatuya 14 years ago
parent
commit
b61a322c64
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/bin/auth/main.cc

+ 4 - 4
src/bin/auth/main.cc

@@ -163,10 +163,6 @@ main(int argc, char* argv[]) {
                                              my_command_handler);
         cout << "[b10-auth] Configuration channel established." << endl;
 
-        if (uid != NULL) {
-            changeUser(uid);
-        }
-
         xfrin_session = new Session(io_service.get_io_service());
         cout << "[b10-auth] Xfrin session channel created." << endl;
         xfrin_session->establish(NULL);
@@ -190,6 +186,10 @@ main(int argc, char* argv[]) {
         configureAuthServer(*auth_server, config_session->getFullConfig());
         auth_server->updateConfig(ElementPtr());
 
+        if (uid != NULL) {
+            changeUser(uid);
+        }
+
         cout << "[b10-auth] Server started." << endl;
         io_service.run();