]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - client_common.c
Reject non-sideband connections.
[paraslash.git] / client_common.c
index d9ed11f437b0e03c2d167865571a69e2c9955e33..a3a471aedaab1f79a3f3091bf61572a716248598 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1997-2012 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 1997-2013 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -345,6 +345,11 @@ static void client_post_select(struct sched *s, struct task *t)
                if (ret < 0 || n == 0)
                        goto out;
                ct->features = parse_features(buf);
+               if (!has_feature("sideband", ct)) {
+                       PARA_ERROR_LOG("server has no sideband support\n");
+                       ret = -E_INCOMPAT_FEAT;
+                       goto out;
+               }
                ct->status = CL_RECEIVED_WELCOME;
                return;
        case CL_RECEIVED_WELCOME: /* send auth command */