diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-08-30 20:35:01 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-08-30 20:35:01 +0200 |
commit | a15c8f6e8a20d60d1097ede16a63b7f350af052c (patch) | |
tree | 9f2c733fae7a9e2f0bb13e4524f3ca758b39cb13 | |
parent | 6fd511dd41c8925e70c8e3c0ab2bcde8e1af06de (diff) |
Only allow 'get' to be used from local (unix) connections.
-rw-r--r-- | commands.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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"); |