X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fserver_main.c;h=37c77ddcd4fa8068ba0b16436d089f3d5d21900d;hb=4784ca02b8038d20477d02e059e753588b3d28a7;hp=4bf86ee85868610646b1871687344da29dd8b67c;hpb=0c8789fa5ddd0c5ed59468db47a681ae15440b68;p=citadel.git diff --git a/citadel/server_main.c b/citadel/server_main.c index 4bf86ee85..37c77ddcd 100644 --- a/citadel/server_main.c +++ b/citadel/server_main.c @@ -71,6 +71,9 @@ const char *CitadelServiceUDS="citadel-UDS"; const char *CitadelServiceTCP="citadel-TCP"; +extern struct CitContext masterCC; + + void go_threading(void); /* @@ -244,6 +247,20 @@ int main(int argc, char **argv) CtdlLogPrintf(CTDL_INFO, "Acquiring control record\n"); get_control(); + +/** + * Initialise the user 0 to have a name. It would be nice to do it in InitializeMasterCC + * since it is contained within the MasterCC but we can't because the DB isn't available + * at that time so we do it seperate. + */ + /** Give user 0 a name and create them if necessary */ + if (getuser(&masterCC.user, "Citadel")) + { + getuserbynumber(&masterCC.user, 0); + strcpy (masterCC.user.fullname, "Citadel"); + putuser(&masterCC.user); + } + /* * Bind the server to a Unix-domain socket. */