X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fserver_main.c;h=ff216ba769fb9f07a2c7ddf01174279a5e4e6eb7;hb=57b37d4ed168b176d594bc149e5d16a1b9f0517a;hp=d1b2a4cd3cb4c9edb8f5915adb2bc1d50e08f9c4;hpb=4f38cc33214eb2c4aefdf35cbf3d4e3e121e9daf;p=citadel.git diff --git a/citadel/server_main.c b/citadel/server_main.c index d1b2a4cd3..ff216ba76 100644 --- a/citadel/server_main.c +++ b/citadel/server_main.c @@ -1,21 +1,15 @@ /* * citserver's main() function lives here. * - * Copyright (c) 1987-2011 by the citadel.org team + * Copyright (c) 1987-2012 by the citadel.org team * * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * it under the terms of the GNU General Public License version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "sysdep.h" @@ -208,7 +202,7 @@ int main(int argc, char **argv) syslog(LOG_NOTICE, "*** Citadel server engine v%d.%02d (build %s) ***", (REV_LEVEL/100), (REV_LEVEL%100), svn_revision()); - syslog(LOG_NOTICE, "Copyright (C) 1987-2011 by the Citadel development team."); + syslog(LOG_NOTICE, "Copyright (C) 1987-2012 by the Citadel development team."); syslog(LOG_NOTICE, "This program is distributed under the terms of the GNU " "General Public License."); syslog(LOG_NOTICE, " "); @@ -285,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, @@ -294,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). */