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 */
}
}
}
+ if (*use_sideband == false) { /* sideband is mandatory */
+ PARA_ERROR_LOG("client did not request sideband\n");
+ ret = -E_BAD_FEATURE;
+ goto out;
+ }
PARA_DEBUG_LOG("received auth request for user %s (sideband = %s)\n",
username, *use_sideband? "true" : "false");
*u = lookup_user(username);
PARA_ERROR(SERVER_EOF, "connection closed by para_server"), \
PARA_ERROR(SERVER_CMD_SUCCESS, "command terminated successfully"), \
PARA_ERROR(SERVER_CMD_FAILURE, "command failed"), \
+ PARA_ERROR(INCOMPAT_FEAT, "client/server incompatibility"), \
#define SCHED_ERRORS \
PARA_ERROR(SENDER_CMD, "command not supported by this sender"), \
PARA_ERROR(SERVER_CRASH, "para_server crashed -- can not live without it"), \
PARA_ERROR(BAD_USER, "auth request for invalid user"), \
- PARA_ERROR(BAD_FEATURE, "request for unknown or invalid feature"), \
+ PARA_ERROR(BAD_FEATURE, "invalid feature request"), \
PARA_ERROR(BAD_AUTH, "authentication failure"), \