diff options
author | Gordon Ross <gwr@nexenta.com> | 2012-01-02 13:46:50 -0500 |
---|---|---|
committer | Gordon Ross <gwr@nexenta.com> | 2018-03-03 20:50:01 -0500 |
commit | 9005860cd203e6b775305e7c8ffea67e92898374 (patch) | |
tree | 550278ec659eed4e252e87da0d8aec88454aeca6 | |
parent | 29a35cb6dd6f3244ff40d8d19cde21277d9bac08 (diff) | |
download | illumos-joyent-9005860cd203e6b775305e7c8ffea67e92898374.tar.gz |
1586 mount_smbfs doesn't document noacl
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: C Fraire <cfraire@me.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
-rw-r--r-- | usr/src/man/man1m/mount_smbfs.1m | 26 | ||||
-rw-r--r-- | usr/src/uts/common/fs/smbclnt/smbfs/smbfs_vfsops.c | 22 |
2 files changed, 43 insertions, 5 deletions
diff --git a/usr/src/man/man1m/mount_smbfs.1m b/usr/src/man/man1m/mount_smbfs.1m index 7ac4852284..f47587ba67 100644 --- a/usr/src/man/man1m/mount_smbfs.1m +++ b/usr/src/man/man1m/mount_smbfs.1m @@ -6,7 +6,8 @@ .\" BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.TH MOUNT_SMBFS 1M "Mar 31, 2009" +.\" Copyright 2012 Nexenta Systems, Inc. All rights reserved. +.TH MOUNT_SMBFS 1M "Jan 2, 2012" .SH NAME mount_smbfs, umount_smbfs \- mount and unmount a shared resource from a CIFS file server @@ -165,6 +166,26 @@ See the \fBmount\fR(1M) man page for the list of supported Sets the file system-specific properties. You can specify more than one name-value pair as a list of comma-separated pairs. No spaces are permitted in the list. The properties are as follows: + +.sp +.ne 2 +.na +\fB\fBacl\fR|\fBnoacl\fR\fR +.ad +.sp .6 +.RS 4n +Enable (or disable) presentation of Access Control Lists (ACLs) +on files and directories under this \fBsmbfs\fR(7FS) mount. +The default behavior is \fBnoacl\fR, which presents files and +directories as owned by the owner of the mount point and having +permissions based on \fBfileperms\fR or \fBdirperms\fR. +With the \fBacl\fR mount option, files are presented with ACLs +obtained from the SMB server. +Setting the \fBacl\fR mount option is not advised unless the system +is joined to an Active Directory domain and using \fBldap\fR(1) +so it can correctly present ACL identities from the SMB server. +.RE + .sp .ne 2 .na @@ -479,7 +500,8 @@ Interface Stability Committed .SH SEE ALSO .sp .LP -\fBsmbutil\fR(1), \fBmount\fR(1M), \fBmountall\fR(1M), \fBsvcadm\fR(1M), +\fBldap\fR(1), \fBsmbutil\fR(1), +\fBmount\fR(1M), \fBmountall\fR(1M), \fBsvcadm\fR(1M), \fBacl\fR(2), \fBfcntl\fR(2), \fBlink\fR(2), \fBmknod\fR(2), \fBmount\fR(2), \fBsymlink\fR(2), \fBumount\fR(2), \fBmnttab\fR(4), \fBnsmbrc\fR(4), \fBvfstab\fR(4), \fBattributes\fR(5), \fBpcfs\fR(7FS), \fBsmbfs\fR(7FS) diff --git a/usr/src/uts/common/fs/smbclnt/smbfs/smbfs_vfsops.c b/usr/src/uts/common/fs/smbclnt/smbfs/smbfs_vfsops.c index 49dd820a97..c59abed1b6 100644 --- a/usr/src/uts/common/fs/smbclnt/smbfs/smbfs_vfsops.c +++ b/usr/src/uts/common/fs/smbclnt/smbfs/smbfs_vfsops.c @@ -34,6 +34,7 @@ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2012 Nexenta Systems, Inc. All rights reserved. * Copyright 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2016 by Delphix. All rights reserved. */ @@ -74,6 +75,17 @@ #include <smbfs/smbfs_subr.h> /* + * Should smbfs mount enable "-o acl" by default? There are good + * arguments for both. The most common use case is individual users + * accessing files on some SMB server, for which "noacl" is the more + * convenient default. A less common use case is data migration, + * where the "acl" option might be a desirable default. We'll make + * the common use case the default. This default can be changed via + * /etc/system, and/or set per-mount via the "acl" mount option. + */ +int smbfs_default_opt_acl = 0; + +/* * Local functions definitions. */ int smbfsinit(int fstyp, char *name); @@ -100,7 +112,7 @@ static mntopt_t mntopts[] = { */ { MNTOPT_INTR, intr_cancel, NULL, MO_DEFAULT, 0 }, { MNTOPT_NOINTR, nointr_cancel, NULL, 0, 0 }, - { MNTOPT_ACL, acl_cancel, NULL, MO_DEFAULT, 0 }, + { MNTOPT_ACL, acl_cancel, NULL, 0, 0 }, { MNTOPT_NOACL, noacl_cancel, NULL, 0, 0 }, { MNTOPT_XATTR, xattr_cancel, NULL, MO_DEFAULT, 0 }, { MNTOPT_NOXATTR, noxattr_cancel, NULL, 0, 0 } @@ -506,11 +518,15 @@ smbfs_mount(vfs_t *vfsp, vnode_t *mvp, struct mounta *uap, cred_t *cr) * All "generic" mount options have already been * handled in vfs.c:domount() - see mntopts stuff. * Query generic options using vfs_optionisset(). + * Give ACL an adjustable system-wide default. */ + if (smbfs_default_opt_acl || + vfs_optionisset(vfsp, MNTOPT_ACL, NULL)) + smi->smi_flags |= SMI_ACL; + if (vfs_optionisset(vfsp, MNTOPT_NOACL, NULL)) + smi->smi_flags &= ~SMI_ACL; if (vfs_optionisset(vfsp, MNTOPT_INTR, NULL)) smi->smi_flags |= SMI_INT; - if (vfs_optionisset(vfsp, MNTOPT_ACL, NULL)) - smi->smi_flags |= SMI_ACL; /* * Get the mount options that come in as smbfs_args, |