]> code.citadel.org Git - citadel.git/blobdiff - citadel/server_main.c
New versions of Berkeley DB (I tested with 4.5.20) seem to
[citadel.git] / citadel / server_main.c
index f5ee8dc7d9e12d1ebbc05cf4c60df54bb3a866df..7f9551ebc8bec39dfbbc10a4b409291fcb24c1b7 100644 (file)
@@ -191,7 +191,7 @@ int main(int argc, char **argv)
        /* on some dists rundir gets purged on startup. so we need to recreate it. */
 
        if (stat(ctdl_run_dir, &filestats)==-1){
-#ifdef BSD_GETPWUID
+#ifdef SOLARIS_GETPWUID
                pwp = getpwuid_r(config.c_ctdluid, &pw, pwbuf, sizeof(pwbuf));
 #else
                getpwuid_r(config.c_ctdluid, &pw, pwbuf, sizeof(pwbuf), &pwp);
@@ -241,7 +241,9 @@ int main(int argc, char **argv)
         * corresponding group ids
         */
        if (drop_root_perms) {
-#ifdef BSD_GETPWUID
+               cdb_chmod_data();       /* make sure we own our data files */
+
+#ifdef SOLARIS_GETPWUID
                pwp = getpwuid_r(config.c_ctdluid, &pw, pwbuf, sizeof(pwbuf));
 #else
                getpwuid_r(config.c_ctdluid, &pw, pwbuf, sizeof(pwbuf), &pwp);