Print this page
11083 support NFS server in zone
Portions contributed by: Dan Kruchinin <dan.kruchinin@nexenta.com>
Portions contributed by: Stepan Zastupov <stepan.zastupov@gmail.com>
Portions contributed by: Joyce McIntosh <joyce.mcintosh@nexenta.com>
Portions contributed by: Mike Zeller <mike@mikezeller.net>
Portions contributed by: Dan McDonald <danmcd@joyent.com>
Portions contributed by: Gordon Ross <gordon.w.ross@gmail.com>
Portions contributed by: Vitaliy Gusev <gusev.vitaliy@gmail.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Rob Gittins <rob.gittins@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Jason King <jbk@joyent.com>
Reviewed by: C Fraire <cfraire@me.com>
Change-Id: I22f289d357503f9b48a0bc2482cc4328a6d43d16

@@ -19,18 +19,21 @@
  * CDDL HEADER END
  */
 
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2019 Joyent, Inc.
+ */
+
+/*
+ * Copyright (c) 2013, Joyent, Inc. All rights reserved.
  * Copyright (c) 2011, 2016 by Delphix. All rights reserved.
  * Copyright (c) 2012 DEY Storage Systems, Inc.  All rights reserved.
  * Copyright (c) 2011-2012 Pawel Jakub Dawidek. All rights reserved.
  * Copyright (c) 2013 Martin Matuska. All rights reserved.
  * Copyright (c) 2013 Steven Hartland. All rights reserved.
  * Copyright (c) 2014 Integros [integros.com]
- * Copyright 2017 Nexenta Systems, Inc.
+ * Copyright 2018 Nexenta Systems, Inc.
  * Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com>
  * Copyright 2017-2018 RackTop Systems.
  */
 
 #include <ctype.h>

@@ -1309,12 +1312,12 @@
                          * the zoned property value:
                          *
                          *              global zone         non-global zone
                          * --------------------------------------------------
                          * zoned=on     mountpoint (no)     mountpoint (yes)
-                         *              sharenfs (no)       sharenfs (no)
-                         *              sharesmb (no)       sharesmb (no)
+                         *              sharenfs (no)       sharenfs (yes)
+                         *              sharesmb (no)       sharesmb (yes)
                          *
                          * zoned=off    mountpoint (yes)        N/A
                          *              sharenfs (yes)
                          *              sharesmb (yes)
                          */

@@ -1324,18 +1327,10 @@
                                             "'%s' cannot be set on "
                                             "dataset in a non-global zone"),
                                             propname);
                                         (void) zfs_error(hdl, EZFS_ZONED,
                                             errbuf);
-                                        goto error;
-                                } else if (prop == ZFS_PROP_SHARENFS ||
-                                    prop == ZFS_PROP_SHARESMB) {
-                                        zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
-                                            "'%s' cannot be set in "
-                                            "a non-global zone"), propname);
-                                        (void) zfs_error(hdl, EZFS_ZONED,
-                                            errbuf);
                                         goto error;
                                 }
                         } else if (getzoneid() != GLOBAL_ZONEID) {
                                 /*
                                  * If zoned property is 'off', this must be in