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
        
*** 389,401 ****
  {
          char *path;
          smb_share_t si;
          sa_resource_t resource;
          boolean_t iszfs;
-         boolean_t privileged;
          int err = SA_OK;
-         priv_set_t *priv_effective;
          boolean_t online;
  
          /*
           * Don't support Trusted Extensions.
           */
--- 389,399 ----
*** 403,417 ****
                  (void) printf(dgettext(TEXT_DOMAIN,
                      "SMB: service not supported with Trusted Extensions\n"));
                  return (SA_NOT_SUPPORTED);
          }
  
-         priv_effective = priv_allocset();
-         (void) getppriv(PRIV_EFFECTIVE, priv_effective);
-         privileged = (priv_isfullset(priv_effective) == B_TRUE);
-         priv_freeset(priv_effective);
- 
          /* get the path since it is important in several places */
          path = sa_get_share_attr(share, "path");
          if (path == NULL)
                  return (SA_NO_SUCH_PATH);
  
--- 401,410 ----
*** 422,454 ****
          if (!online && !smb_isautoenable() && smb_isdisabled())
                  goto done;
  
          iszfs = sa_path_is_zfs(path);
  
-         if (iszfs) {
- 
-                 if (privileged == B_FALSE && !online) {
- 
                          if (!online) {
-                                 (void) printf(dgettext(TEXT_DOMAIN,
-                                     "SMB: Cannot share remove "
-                                     "file system: %s\n"), path);
-                                 (void) printf(dgettext(TEXT_DOMAIN,
-                                     "SMB: Service needs to be enabled "
-                                     "by a privileged user\n"));
-                                 err = SA_NO_PERMISSION;
-                                 errno = EPERM;
-                         }
-                         if (err) {
-                                 sa_free_attr_string(path);
-                                 return (err);
-                         }
- 
-                 }
-         }
- 
-         if (privileged == B_TRUE && !online) {
                  err = smb_enable_service();
                  if (err != SA_OK) {
                          (void) printf(dgettext(TEXT_DOMAIN,
                              "SMB: Unable to enable service\n"));
                  } else {
--- 415,425 ----