From 9a27d5d673dc89cc8b99268ebbc5534b96343d69 Mon Sep 17 00:00:00 2001 From: Pavel Březina Date: Tue, 13 Nov 2012 15:42:48 +0100 Subject: sudo: do not send domain name with username This caused troubles with subdomain users and it is not really necessary. This patch does not change the protocol itself, that should be done on the earliest possible occasion. Part of https://fedorahosted.org/sssd/ticket/1616 --- src/sss_client/sudo/sss_sudo.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/sss_client/sudo/sss_sudo.c') diff --git a/src/sss_client/sudo/sss_sudo.c b/src/sss_client/sudo/sss_sudo.c index e2bb3e00d..92f575411 100644 --- a/src/sss_client/sudo/sss_sudo.c +++ b/src/sss_client/sudo/sss_sudo.c @@ -100,23 +100,10 @@ int sss_sudo_send_recv(uid_t uid, return EINVAL; } - if (domainname != NULL) { - ret = asprintf(&fullname, "%s@%s", username, domainname); - if (ret == -1) { - return ENOMEM; - } - } else { - fullname = strdup(username); - if (fullname == NULL) { - return ENOMEM; - } - } - /* send query and receive response */ - ret = sss_sudo_send_recv_generic(SSS_SUDO_GET_SUDORULES, uid, fullname, + ret = sss_sudo_send_recv_generic(SSS_SUDO_GET_SUDORULES, uid, username, _error, NULL, _result); - free(fullname); return ret; } -- cgit