summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-08-30 20:35:01 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2010-08-30 20:35:01 +0200
commita15c8f6e8a20d60d1097ede16a63b7f350af052c (patch)
tree9f2c733fae7a9e2f0bb13e4524f3ca758b39cb13
parent6fd511dd41c8925e70c8e3c0ab2bcde8e1af06de (diff)
Only allow 'get' to be used from local (unix) connections.
-rw-r--r--commands.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/commands.c b/commands.c
index bde61cd..21b482a 100644
--- a/commands.c
+++ b/commands.c
@@ -3,6 +3,7 @@
#include "servers.h"
#include "server_communication.h"
+#include <gio/gunixconnection.h>
#include <string.h>
GQuark commands_quark() {
@@ -210,7 +211,7 @@ void commands_handle(GSocketConnection *connection, const gchar *cmd, GError **e
commands_find(connection, cmd, error);
} else if(g_strncasecmp(cmd, "exit", 4) == 0) {
commands_exit(connection, cmd, error);
- } else if(g_strncasecmp(cmd, "get", 3) == 0) {
+ } else if(G_IS_UNIX_CONNECTION(connection) && g_strncasecmp(cmd, "get", 3) == 0) {
commands_get(connection, cmd, error);
} else {
g_debug("unknown command");