From: "Steve French" <smfrench@gmail.com>
To: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
linux-cifs-client@lists.samba.org
Cc: "Jeff Layton" <jlayton@redhat.com>,
shaggy@austin.ibm.com, "Cyrill Gorcunov" <gorcunov@gmail.com>
Subject: No longer set S_ISVTX when mounted to Windows
Date: Thu, 1 Nov 2007 11:08:33 -0500 [thread overview]
Message-ID: <524f69650711010908r2f08fa35t9be074e3c92b01ec@mail.gmail.com> (raw)
Not sure why the cifs code sets the S_ISVTX bit when mounted to
Windows servers. I think the intent was to turn off all of the high
bits except that (S_ISGID) needed to indicate mandatory locking
(mandatory locking is set by having S_ISGID on and group execute,
S_IXGRP, off). When reviewing the cifsacl code (to map
CIFS/Windows/NTFS ACLs to mode bits I noticed that we were setting the
sticky bit (S_ISVTX) on files (this does not happen when a user
specifies a default mode on mount) and probably shouldn't. Does
anyone see any problem with turning this bit off in the default file
mode when mounted to Windows?
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 19ee11f..380ee99 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -793,7 +793,7 @@ cifs_parse_mount_options(char *options, const char *devname,
vol->linux_gid = current->gid;
vol->dir_mode = S_IRWXUGO;
/* 2767 perms indicate mandatory locking support */
- vol->file_mode = S_IALLUGO & ~(S_ISUID | S_IXGRP);
+ vol->file_mode = (S_IRWXUGO | S_ISGID) & (~S_IXGRP);
/* vol->retry default is 0 (i.e. "soft" limited retry not hard retry) */
vol->rw = TRUE;
--
Thanks,
Steve
next reply other threads:[~2007-11-01 16:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-01 16:08 Steve French [this message]
2007-11-01 20:00 ` No longer set S_ISVTX when mounted to Windows Jeff Layton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=524f69650711010908r2f08fa35t9be074e3c92b01ec@mail.gmail.com \
--to=smfrench@gmail.com \
--cc=gorcunov@gmail.com \
--cc=jlayton@redhat.com \
--cc=linux-cifs-client@lists.samba.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=shaggy@austin.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).