Renamed HAVE_SHARE ifdefs to HAVE_SMB_SHARE.

The remaining code that is guarded by HAVE_SHARE ifdefs is related to the
.zfs/shares functionality which is currently not available on Linux.

On Solaris the .zfs/shares directory can be used to set permissions for
SMB shares.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Gunnar Beutner 2011-07-02 21:34:12 +02:00 committed by Brian Behlendorf
parent 52e7c3a2e5
commit 3c9609b322
2 changed files with 12 additions and 12 deletions

View File

@ -591,7 +591,7 @@ zfs_secpolicy_send(zfs_cmd_t *zc, cred_t *cr)
return (error); return (error);
} }
#ifdef HAVE_SHARE #ifdef HAVE_SMB_SHARE
static int static int
zfs_secpolicy_deleg_share(zfs_cmd_t *zc, cred_t *cr) zfs_secpolicy_deleg_share(zfs_cmd_t *zc, cred_t *cr)
{ {
@ -615,12 +615,12 @@ zfs_secpolicy_deleg_share(zfs_cmd_t *zc, cred_t *cr)
return (dsl_deleg_access(zc->zc_name, return (dsl_deleg_access(zc->zc_name,
ZFS_DELEG_PERM_SHARE, cr)); ZFS_DELEG_PERM_SHARE, cr));
} }
#endif /* HAVE_SHARE */ #endif /* HAVE_SMB_SHARE */
int int
zfs_secpolicy_share(zfs_cmd_t *zc, cred_t *cr) zfs_secpolicy_share(zfs_cmd_t *zc, cred_t *cr)
{ {
#ifdef HAVE_SHARE #ifdef HAVE_SMB_SHARE
if (!INGLOBALZONE(curproc)) if (!INGLOBALZONE(curproc))
return (EPERM); return (EPERM);
@ -631,13 +631,13 @@ zfs_secpolicy_share(zfs_cmd_t *zc, cred_t *cr)
} }
#else #else
return (ENOTSUP); return (ENOTSUP);
#endif /* HAVE_SHARE */ #endif /* HAVE_SMB_SHARE */
} }
int int
zfs_secpolicy_smb_acl(zfs_cmd_t *zc, cred_t *cr) zfs_secpolicy_smb_acl(zfs_cmd_t *zc, cred_t *cr)
{ {
#ifdef HAVE_SHARE #ifdef HAVE_SMB_SHARE
if (!INGLOBALZONE(curproc)) if (!INGLOBALZONE(curproc))
return (EPERM); return (EPERM);
@ -648,7 +648,7 @@ zfs_secpolicy_smb_acl(zfs_cmd_t *zc, cred_t *cr)
} }
#else #else
return (ENOTSUP); return (ENOTSUP);
#endif /* HAVE_SHARE */ #endif /* HAVE_SMB_SHARE */
} }
static int static int
@ -4272,7 +4272,7 @@ zfs_ioc_diff(zfs_cmd_t *zc)
/* /*
* Remove all ACL files in shares dir * Remove all ACL files in shares dir
*/ */
#ifdef HAVE_SHARE #ifdef HAVE_SMB_SHARE
static int static int
zfs_smb_acl_purge(znode_t *dzp) zfs_smb_acl_purge(znode_t *dzp)
{ {
@ -4291,12 +4291,12 @@ zfs_smb_acl_purge(znode_t *dzp)
zap_cursor_fini(&zc); zap_cursor_fini(&zc);
return (error); return (error);
} }
#endif /* HAVE SHARE */ #endif /* HAVE_SMB_SHARE */
static int static int
zfs_ioc_smb_acl(zfs_cmd_t *zc) zfs_ioc_smb_acl(zfs_cmd_t *zc)
{ {
#ifdef HAVE_SHARE #ifdef HAVE_SMB_SHARE
vnode_t *vp; vnode_t *vp;
znode_t *dzp; znode_t *dzp;
vnode_t *resourcevp = NULL; vnode_t *resourcevp = NULL;
@ -4420,7 +4420,7 @@ zfs_ioc_smb_acl(zfs_cmd_t *zc)
return (error); return (error);
#else #else
return (ENOTSUP); return (ENOTSUP);
#endif /* HAVE_SHARE */ #endif /* HAVE_SMB_SHARE */
} }
/* /*

View File

@ -161,7 +161,7 @@ zfs_znode_fini(void)
int int
zfs_create_share_dir(zfs_sb_t *zsb, dmu_tx_t *tx) zfs_create_share_dir(zfs_sb_t *zsb, dmu_tx_t *tx)
{ {
#ifdef HAVE_SHARE #ifdef HAVE_SMB_SHARE
zfs_acl_ids_t acl_ids; zfs_acl_ids_t acl_ids;
vattr_t vattr; vattr_t vattr;
znode_t *sharezp; znode_t *sharezp;
@ -203,7 +203,7 @@ zfs_create_share_dir(zfs_sb_t *zsb, dmu_tx_t *tx)
return (error); return (error);
#else #else
return (0); return (0);
#endif /* HAVE_SHARE */ #endif /* HAVE_SMB_SHARE */
} }
static void static void