* Site-configurable option "Allow system Aides to gain access to mailboxes"
authorArt Cancro <ajc@citadel.org>
Wed, 13 Mar 2002 03:58:29 +0000 (03:58 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 13 Mar 2002 03:58:29 +0000 (03:58 +0000)
citadel/ChangeLog
citadel/citadel.h
citadel/control.c
citadel/room_ops.c
citadel/routines2.c

index 68a68579ead66d6268dd59a7931fc61ce87156d7..adedc4f6c5fce1d3c2d0ac4a93784622373e5279 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 590.151  2002/03/13 03:58:29  ajc
+ * Site-configurable option "Allow system Aides to gain access to mailboxes"
+
  Revision 590.150  2002/03/13 03:34:38  nbryant
  /* when running in curses mode, the scroll bar in most
     xterm-style programs becomes useless, so it makes sense to
@@ -3496,4 +3499,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import 
-
index 2880926b6dc4c68a5690ab9bec598c4eee6fa820..dbc155ea15b6d9966fddc82a6c6435ddb904037e 100644 (file)
@@ -119,6 +119,7 @@ struct config {
        int c_imap_port;                /* IMAP listener port (usually 143) */
        time_t c_net_freq;              /* how often to run the networker   */
        char c_disable_newu;            /* disable NEWU command             */
+       char c_aide_mailboxes;          /* give Aides access to mailboxes   */
 };
 
 #define NODENAME               config.c_nodename
index 470b788ba1976922381b11260db6079c13f330cb..84dd97b682c2008376a817a0b8bfc303bddcac6d 100644 (file)
@@ -188,6 +188,7 @@ void cmd_conf(char *argbuf) {
                cprintf("%d\n", config.c_imap_port);
                cprintf("%ld\n", config.c_net_freq);
                cprintf("%d\n", config.c_disable_newu);
+               cprintf("%d\n", config.c_aide_mailboxes);
                cprintf("000\n");
                }
 
@@ -285,6 +286,10 @@ void cmd_conf(char *argbuf) {
                                if (config.c_disable_newu != 0)
                                        config.c_disable_newu = 1;
                                break;
+                       case 30: config.c_aide_mailboxes = atoi(buf);
+                               if (config.c_aide_mailboxes != 0)
+                                       config.c_aide_mailboxes = 1;
+                               break;
                        }
                    ++a;
                    }
index 990134f28435050f78fcf25c5740d54387d11b3d..af8f6c982fede01655817058f30fb78eecf9ad28 100644 (file)
@@ -128,12 +128,22 @@ int CtdlRoomAccess(struct quickroom *roombuf, struct usersupp *userbuf)
                retval = retval & ~UA_KNOWN & ~UA_GOTOALLOWED;
        }
 
-       /* Aides get access to everything */
+       /* Aides get access to all private rooms */
        if ( (userbuf->axlevel >= 6)
           && ((roombuf->QRflags & QR_MAILBOX) == 0) ) {
                if (vbuf.v_flags & V_FORGET) {
                        retval = retval | UA_GOTOALLOWED;
                }
+               else {
+                       retval = retval | UA_KNOWN | UA_GOTOALLOWED;
+               }
+       }
+
+       /* On some systems, Aides can gain access to mailboxes as well */
+       if ( (config.c_aide_mailboxes)
+          && (userbuf->axlevel >= 6)
+          && (roombuf->QRflags & QR_MAILBOX) ) {
+               retval = retval | UA_GOTOALLOWED;
        }
 
 NEWMSG:        /* By the way, we also check for the presence of new messages */
index e66ac3ce0deb2a7256fb6e01e883083ee41a8083..c38531e4260b3377d9b45612683f8e2635c87d1c 100644 (file)
@@ -690,7 +690,7 @@ void read_bio(void)
 void do_system_configuration(void)
 {
        char buf[SIZ];
-       char sc[30][SIZ];
+       char sc[31][SIZ];
        int expire_mode = 0;
        int expire_value = 0;
        int a;
@@ -705,7 +705,7 @@ void do_system_configuration(void)
        if (buf[0] == '1') {
                a = 0;
                while (serv_gets(buf), strcmp(buf, "000")) {
-                       if (a < 30) {
+                       if (a < 31) {
                                strcpy(&sc[a][0], buf);
                        }
                        ++a;
@@ -761,6 +761,9 @@ void do_system_configuration(void)
        snprintf(sc[26], sizeof sc[26], "%d", (boolprompt(
              "Allow Aides to Zap (forget) rooms",
                                                     atoi(&sc[26][0]))));
+       snprintf(sc[30], sizeof sc[29], "%d", (boolprompt(
+             "Allow system Aides access to user mailboxes",
+                                                    atoi(&sc[30][0]))));
 
        if (strlen(&sc[18][0]) > 0) logpages = 1;
        else logpages = 0;
@@ -825,7 +828,7 @@ void do_system_configuration(void)
                serv_puts("CONF set");
                serv_gets(buf);
                if (buf[0] == '4') {
-                       for (a = 0; a < 30; ++a)
+                       for (a = 0; a < 31; ++a)
                                serv_puts(&sc[a][0]);
                        serv_puts("000");
                }