X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fserver_main.c;h=ece0e3cb85e2db1df6e249ed514f1b3b73d9adb2;hb=f614f64351a5df98ebc837c973772cebb8171bd4;hp=b08d070f32cf3836e56832db7edbc561a23ca03a;hpb=c6dc46af563125cbab57cf24af180125c01f72d4;p=citadel.git diff --git a/citadel/server_main.c b/citadel/server_main.c index b08d070f3..ece0e3cb8 100644 --- a/citadel/server_main.c +++ b/citadel/server_main.c @@ -236,29 +236,13 @@ int main(int argc, char **argv) syslog(LOG_INFO, " "); syslog(LOG_INFO, "%s", libcitadel_version_string()); -#ifdef HAVE_RUN_DIR - /* on some dists rundir gets purged on startup. so we need to recreate it. */ - - if (stat(ctdl_run_dir, &filestats) == -1) { -#ifdef HAVE_GETPWUID_R -#ifdef SOLARIS_GETPWUID - pwp = getpwuid_r(ctdluid, &pw, pwbuf, sizeof(pwbuf)); -#else // SOLARIS_GETPWUID - getpwuid_r(ctdluid, &pw, pwbuf, sizeof(pwbuf), &pwp); -#endif // SOLARIS_GETPWUID -#else // HAVE_GETPWUID_R - pwp = NULL; -#endif // HAVE_GETPWUID_R - - if ((mkdir(ctdl_run_dir, 0755) != 0) && (errno != EEXIST)) { - syslog(LOG_ERR, "main: unable to create run directory [%s]: %m", ctdl_run_dir); - } + if ((mkdir(ctdl_run_dir, 0755) != 0) && (errno != EEXIST)) { + syslog(LOG_ERR, "main: unable to create run directory [%s]: %m", ctdl_run_dir); + } - if (chown(ctdl_run_dir, ctdluid, (pwp==NULL)?-1:pw.pw_gid) != 0) { - syslog(LOG_ERR, "main: unable to set the access rights for [%s]: %m", ctdl_run_dir); - } + if (chown(ctdl_run_dir, ctdluid, (pwp==NULL)?-1:pw.pw_gid) != 0) { + syslog(LOG_ERR, "main: unable to set the access rights for [%s]: %m", ctdl_run_dir); } -#endif ctdl_lockfile(1); init_sysdep(); // Initialize...