summaryrefslogtreecommitdiffstats
path: root/src/responder/sudo
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2012-10-30 12:03:19 +0100
committerJakub Hrozek <jhrozek@redhat.com>2012-10-30 15:33:37 +0100
commitd117004902c767d46430848b6ef1c11c3ad82835 (patch)
tree695818c9658ab37e3e73eccaca2b8ad08e81331d /src/responder/sudo
parent9e2c64c6d4f5560e27207193efea6536a566865e (diff)
downloadsssd-d117004902c767d46430848b6ef1c11c3ad82835.tar.gz
sssd-d117004902c767d46430848b6ef1c11c3ad82835.tar.xz
sssd-d117004902c767d46430848b6ef1c11c3ad82835.zip
sudo: do not hardcode protocol version
Diffstat (limited to 'src/responder/sudo')
-rw-r--r--src/responder/sudo/sudosrv_cmd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/responder/sudo/sudosrv_cmd.c b/src/responder/sudo/sudosrv_cmd.c
index 13eb4991f..9a87ed7d7 100644
--- a/src/responder/sudo/sudosrv_cmd.c
+++ b/src/responder/sudo/sudosrv_cmd.c
@@ -27,6 +27,7 @@
#include "responder/common/responder_packet.h"
#include "responder/sudo/sudosrv_private.h"
#include "db/sysdb_sudo.h"
+#include "sss_client/sss_cli.h"
static errno_t sudosrv_cmd_send_reply(struct sudo_cmd_ctx *cmd_ctx,
uint8_t *response_body,
@@ -182,7 +183,7 @@ static int sudosrv_cmd(enum sss_sudo_type type, struct cli_ctx *cli_ctx)
}
/* if protocol is invalid return */
- if (cli_ctx->cli_protocol_version->version != 1) {
+ if (cli_ctx->cli_protocol_version->version != SSS_SUDO_PROTOCOL_VERSION) {
DEBUG(SSSDBG_FATAL_FAILURE, ("Invalid protocol! [%d]\n",
cli_ctx->cli_protocol_version->version));
ret = EFAULT;