From patchwork Sat Sep 12 00:34:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 7165761 Return-Path: X-Original-To: patchwork-cifs-client@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CBCF5BEEC1 for ; Sat, 12 Sep 2015 00:34:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 87B6620749 for ; Sat, 12 Sep 2015 00:34:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7A12E2073B for ; Sat, 12 Sep 2015 00:34:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752853AbbILAen (ORCPT ); Fri, 11 Sep 2015 20:34:43 -0400 Received: from mail-oi0-f43.google.com ([209.85.218.43]:35643 "EHLO mail-oi0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752691AbbILAen (ORCPT ); Fri, 11 Sep 2015 20:34:43 -0400 Received: by oiww128 with SMTP id w128so51722375oiw.2 for ; Fri, 11 Sep 2015 17:34:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=W7lDMIdcjzFOfpa/TvUHgzd+R3TrNFMxNNGG41sb/0o=; b=VsEP1QsfG2mJ9hQxM9A6riWSZLdVZBFVyMedmc+fcZ3I0Qbv9iOqIMl8c6G9LhJafe 5aQQQHV1aIgn+v332VOtXFd2aIuUmgBpE4v+UfE7mfb2045Hh71M/x5aGFKWSRj8OYKO 2M2Jyvae78TAoUgK3qRWhdFPxAL+o00T11ViVeICms5gWgCfPBXccVqv5ZVbpLEYhn0i lHfRdir392ZWSrVTjCykNJcFjp4SdaMEiVMOPeIQwA9ihq5n36ZfYtUD3BYGv3teFkdd t1omCYmwCLCbTTDAxm/YcZKyrqIFnVAIO4OtDr95Hf2+K5pS/K0jo9jqN5nlE8BaVDt3 a6yA== X-Received: by 10.202.190.87 with SMTP id o84mr1261227oif.111.1442018082685; Fri, 11 Sep 2015 17:34:42 -0700 (PDT) Received: from ubuntu.localdomain (cpe-68-203-16-26.austin.res.rr.com. [68.203.16.26]) by smtp.gmail.com with ESMTPSA id yw8sm1375301obb.29.2015.09.11.17.34.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Sep 2015 17:34:42 -0700 (PDT) From: Steve French To: linux-cifs@vger.kernel.org Cc: Steve French , Steve French Subject: [PATCH] [CIFS] mount option sec=none not displayed properly in /proc/mounts Date: Fri, 11 Sep 2015 19:34:39 -0500 Message-Id: <1442018079-14549-1-git-send-email-smfrench@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 When the user specifies "sec=none" in a cifs mount, we set sec_type as unspecified (and set a flag and the username will be null) rather than setting sectype as "none" so cifs_show_security was not properly displaying it in cifs /proc/mounts entries. Signed-off-by: Steve French --- fs/cifs/cifsfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 6a1119e..e739950 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -325,8 +325,11 @@ cifs_show_address(struct seq_file *s, struct TCP_Server_Info *server) static void cifs_show_security(struct seq_file *s, struct cifs_ses *ses) { - if (ses->sectype == Unspecified) + if (ses->sectype == Unspecified) { + if (ses->user_name == NULL) + seq_puts(s, ",sec=none"); return; + } seq_puts(s, ",sec=");