+ correct FS-flags on citadel.co* on startup
[citadel.git] / citadel / control.c
index 989e36c9f4564b54c37360a1f150387d14700ca2..03ffa7c75d09917455cd31fdf42cf427ba146414 100644 (file)
@@ -164,6 +164,8 @@ void get_control(void)
                if (control_fp != NULL) {
                        lock_control();
                        fchown(fileno(control_fp), config.c_ctdluid, -1);
+                       fchmod(fileno(control_fp), 
+                              S_IRUSR|S_IWUSR);
                }
        }
        if (control_fp == NULL) {
@@ -171,6 +173,8 @@ void get_control(void)
                if (control_fp != NULL) {
                        lock_control();
                        fchown(fileno(control_fp), config.c_ctdluid, -1);
+                       fchmod(fileno(control_fp), 
+                              S_IRUSR|S_IWUSR);
                        memset(&CitControl, 0, sizeof(struct CitControl));
                        fwrite(&CitControl, sizeof(struct CitControl),
                               1, control_fp);
@@ -188,6 +192,7 @@ void get_control(void)
        fread(&CitControl, sizeof(struct CitControl), 1, control_fp);
        already_have_control = 1;
        chown(file_citadel_control, config.c_ctdluid, (-1));
+       
 }
 
 /*
@@ -383,6 +388,7 @@ void cmd_conf(char *argbuf)
                cprintf("%d\n", config.c_xmpp_s2s_port);
                cprintf("%ld\n", config.c_pop3_fetch);
                cprintf("%ld\n", config.c_pop3_fastest);
+               cprintf("%d\n", config.c_spam_flag_only);
                cprintf("000\n");
        }
 
@@ -636,6 +642,9 @@ void cmd_conf(char *argbuf)
                        case 65:
                                config.c_pop3_fastest = atol(buf);
                                break;
+                       case 66:
+                               config.c_spam_flag_only = atoi(buf);
+                               break;
                        }
                        ++a;
                }