/*
- * 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.
*/
return send_sb(scc, msg, ret, band, false);
}
+/**
+ * Send an error message to a client.
+ *
+ * \param cc Client info.
+ * \param err The (positive) error code.
+ *
+ * \return The return value of the underlying call to send_sb_va().
+ */
int send_strerror(struct command_context *cc, int err)
{
return cc->use_sideband?
}
}
}
+ 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);