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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/zfs_ioctl.c
          +++ new/usr/src/uts/common/fs/zfs/zfs_ioctl.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
       24 + */
       25 +
       26 +/*
  24   27   * Copyright (c) 2011-2012 Pawel Jakub Dawidek. All rights reserved.
  25   28   * Portions Copyright 2011 Martin Matuska
  26   29   * Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
  27      - * Copyright 2016 Nexenta Systems, Inc.  All rights reserved.
       30 + * Copyright 2018 Nexenta Systems, Inc.  All rights reserved.
  28   31   * Copyright 2019 Joyent, Inc.
  29   32   * Copyright (c) 2011, 2017 by Delphix. All rights reserved.
  30   33   * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
  31   34   * Copyright (c) 2013 Steven Hartland. All rights reserved.
  32   35   * Copyright (c) 2014 Integros [integros.com]
  33   36   * Copyright 2016 Toomas Soome <tsoome@me.com>
  34   37   * Copyright (c) 2017, loli10K <ezomori.nozomu@gmail.com>. All rights reserved.
  35   38   * Copyright 2017 RackTop Systems.
  36   39   * Copyright (c) 2017, Datto, Inc. All rights reserved.
  37   40   */
↓ open down ↓ 742 lines elided ↑ open up ↑
 780  783          }
 781  784  
 782  785          VN_RELE(vp);
 783  786          return (dsl_deleg_access(zc->zc_name,
 784  787              ZFS_DELEG_PERM_SHARE, cr));
 785  788  }
 786  789  
 787  790  int
 788  791  zfs_secpolicy_share(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
 789  792  {
 790      -        if (!INGLOBALZONE(curproc))
 791      -                return (SET_ERROR(EPERM));
 792      -
 793  793          if (secpolicy_nfs(cr) == 0) {
 794  794                  return (0);
 795  795          } else {
 796  796                  return (zfs_secpolicy_deleg_share(zc, innvl, cr));
 797  797          }
 798  798  }
 799  799  
 800  800  int
 801  801  zfs_secpolicy_smb_acl(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
 802  802  {
 803      -        if (!INGLOBALZONE(curproc))
 804      -                return (SET_ERROR(EPERM));
 805      -
 806  803          if (secpolicy_smb(cr) == 0) {
 807  804                  return (0);
 808  805          } else {
 809  806                  return (zfs_secpolicy_deleg_share(zc, innvl, cr));
 810  807          }
 811  808  }
 812  809  
 813  810  static int
 814  811  zfs_get_parent(const char *datasetname, char *parent, int parentsize)
 815  812  {
↓ open down ↓ 6389 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX