From patchwork Fri Dec 12 22:33:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Adamson X-Patchwork-Id: 5485961 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 87F949F1CD for ; Fri, 12 Dec 2014 22:33:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AAA33201F2 for ; Fri, 12 Dec 2014 22:33:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1BE472017D for ; Fri, 12 Dec 2014 22:33:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752353AbaLLWdH (ORCPT ); Fri, 12 Dec 2014 17:33:07 -0500 Received: from mx12.netapp.com ([216.240.18.77]:21906 "EHLO mx12.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751541AbaLLWdH (ORCPT ); Fri, 12 Dec 2014 17:33:07 -0500 X-IronPort-AV: E=Sophos;i="5.07,567,1413270000"; d="scan'208";a="217259500" Received: from vmwexchts04-prd.hq.netapp.com ([10.122.105.32]) by mx12-out.netapp.com with ESMTP; 12 Dec 2014 14:33:06 -0800 Received: from smtp2.corp.netapp.com (10.57.159.114) by VMWEXCHTS04-PRD.hq.netapp.com (10.122.105.32) with Microsoft SMTP Server id 15.0.995.29; Fri, 12 Dec 2014 14:33:04 -0800 Received: from vpn2ntap-420359.vpn.netapp.com (vpn2ntap-420359.vpn.netapp.com [10.55.67.58]) by smtp2.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id sBCMX43t014931; Fri, 12 Dec 2014 14:33:04 -0800 (PST) From: To: CC: , Andy Adamson Subject: [PATCH 1/1] SUNRPC add rpc_gss_svc_t to gssd upcall Date: Fri, 12 Dec 2014 17:33:00 -0500 Message-ID: <1418423580-1212-1-git-send-email-andros@netapp.com> X-Mailer: git-send-email 1.9.3 (Apple Git-50) MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Andy Adamson Otherwise rpc.gssd will send a V4 NULL RPCSEC_GSS_INIT call with an RPCSEC_GSS service of rpc_gss_svc_none for rpc_sec_gss_svc_integrity/privacy requests from the kernel. This change does not break current versions of rpc.gssd, and there is a companion rpc.gssd patch: GSSD add rpc_gss_svc_t to the gssd upcall Signed-off-by: Andy Adamson --- net/sunrpc/auth_gss/auth_gss.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 53ed8d3..48054dc 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c @@ -449,8 +449,9 @@ static int gss_encode_v1_msg(struct gss_upcall_msg *gss_msg, size_t buflen = sizeof(gss_msg->databuf); int len; - len = scnprintf(p, buflen, "mech=%s uid=%d ", mech->gm_name, - from_kuid(&init_user_ns, gss_msg->uid)); + len = scnprintf(p, buflen, "mech=%s uid=%d svc=%d ", mech->gm_name, + from_kuid(&init_user_ns, gss_msg->uid), + gss_msg->auth->service); buflen -= len; p += len; gss_msg->msg.len = len;