Began setting up a second server socket that will be used exclusively for admin utilities
[citadel.git] / citadel / server_main.c
index 592ea7708bbc620f518e10eb21af59406b86642d..ff216ba769fb9f07a2c7ddf01174279a5e4e6eb7 100644 (file)
@@ -279,7 +279,7 @@ int main(int argc, char **argv)
        }
        
        /*
-        * Bind the server to a Unix-domain socket.
+        * Bind the server to a Unix-domain socket (user client access)
         */
        CtdlRegisterServiceHook(0,
                                file_citadel_socket,
@@ -288,6 +288,17 @@ int main(int argc, char **argv)
                                do_async_loop,
                                CitadelServiceUDS);
 
+       /*
+        * Bind the server to a Unix-domain socket (admin client access)
+        */
+       CtdlRegisterServiceHook(0,
+                               file_citadel_admin_socket,
+                               citproto_begin_session,
+                               do_command_loop,
+                               do_async_loop,
+                               CitadelServiceUDS);
+       chmod(file_citadel_admin_socket, S_IRWXU);      /* for your eyes only */
+
        /*
         * Bind the server to our favorite TCP port (usually 504).
         */