]> code.citadel.org Git - citadel.git/blobdiff - citadel/citserver.c
* Allow connect on unix domain sockets to Citadels in other directories
[citadel.git] / citadel / citserver.c
index 876c2d5c8fc58205b9639b5e514f9fd656130590..04c37ef63165bcc0bf3965e2659156a4a70d03b5 100644 (file)
@@ -761,6 +761,15 @@ void cmd_ipgm(char *argbuf)
 {
        int secret;
 
+       /* For security reasons, we do NOT allow this command to run
+        * over the network.  Local sockets only.
+        */
+       if (!CC->is_local_socket) {
+               sleep(5);
+               cprintf("%d Authentication failed.\n",ERROR);
+               return;
+       }
+
        secret = extract_int(argbuf, 0);
        if (secret == config.c_ipgm_secret) {
                CC->internal_pgm = 1;