forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Umer Saleem <[email protected]>
- Loading branch information
1 parent
57292a3
commit a9e0b58
Showing
13 changed files
with
1,084 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
usr/lib/python3/dist-packages/libzfsacl-*.egg-info | ||
usr/lib/python3/dist-packages/libzfsacl.cpython-*.so | ||
usr/lib/python3/dist-packages/zfsacltests/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,11 @@ from setuptools import setup, Extension, find_packages | |
import os | ||
import sys | ||
|
||
srcdir = '@abs_top_srcdir@/lib/libzfsacl' | ||
|
||
topsrcdir = '@abs_top_srcdir@' | ||
relpath_topsrcdir = os.path.relpath(topsrcdir) | ||
srcdir = '@abs_top_srcdir@/lib/libzfsacl' | ||
relpath_srcdir = os.path.relpath(srcdir) | ||
relpath_testdir = relpath_srcdir + '/zfsacltests' | ||
if sys.platform.startswith('linux'): | ||
src = ['libzfsacl_impl_linux.c', 'libpyzfsacl.c', 'libsunacl.c'] | ||
else: | ||
|
@@ -22,8 +23,8 @@ setup( | |
author_email='[email protected]', | ||
url='https://docs.python.org/extending/building', | ||
ext_modules=[libzfsacl_mod], | ||
packages=find_packages(where=srcdir), | ||
package_dir={"": os.path.relpath(srcdir)}, | ||
packages=find_packages(where=srcdir) + ['zfsacltests'], | ||
package_dir={"": relpath_srcdir, "zfsacltests": relpath_testdir}, | ||
include_package_data=True, | ||
python_requires='>=3.6,<4', | ||
zip_safe=False, | ||
|
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nfsacl_001.ksh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/ksh -p | ||
# | ||
# CDDL HEADER START | ||
# | ||
# The contents of this file are subject to the terms of the | ||
# Common Development and Distribution License (the "License"). | ||
# You may not use this file except in compliance with the License. | ||
# | ||
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE | ||
# or https://opensource.org/licenses/CDDL-1.0. | ||
# See the License for the specific language governing permissions | ||
# and limitations under the License. | ||
# | ||
# When distributing Covered Code, include this CDDL HEADER in each | ||
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. | ||
# If applicable, add the following below this CDDL HEADER, with the | ||
# fields enclosed by brackets "[]" replaced with your own identifying | ||
# information: Portions Copyright [yyyy] [name of copyright owner] | ||
# | ||
# CDDL HEADER END | ||
# | ||
|
||
# | ||
# Copyright 2023 iXsystems, Inc. All rights reserved. | ||
# Use is subject to license terms. | ||
# | ||
|
||
. $STF_SUITE/include/libtest.shlib | ||
. $STF_SUITE/tests/functional/acl/acl_common.kshlib | ||
|
||
cleanup_user_group | ||
|
||
default_cleanup | ||
|
||
if is_freebsd; then | ||
mv /usr/bin/fortune_bak /usr/bin/fortune | ||
fi |
39 changes: 39 additions & 0 deletions
39
tests/zfs-tests/tests/functional/acl/nfsv4/nfsacl_001.ksh.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/ksh -p | ||
# | ||
# CDDL HEADER START | ||
# | ||
# The contents of this file are subject to the terms of the | ||
# Common Development and Distribution License (the "License"). | ||
# You may not use this file except in compliance with the License. | ||
# | ||
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE | ||
# or https://opensource.org/licenses/CDDL-1.0. | ||
# See the License for the specific language governing permissions | ||
# and limitations under the License. | ||
# | ||
# When distributing Covered Code, include this CDDL HEADER in each | ||
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. | ||
# If applicable, add the following below this CDDL HEADER, with the | ||
# fields enclosed by brackets "[]" replaced with your own identifying | ||
# information: Portions Copyright [yyyy] [name of copyright owner] | ||
# | ||
# CDDL HEADER END | ||
# | ||
|
||
# | ||
# Copyright 2023 iXsystems, Inc. All rights reserved. | ||
# Use is subject to license terms. | ||
# | ||
|
||
. $STF_SUITE/include/libtest.shlib | ||
. $STF_SUITE/tests/functional/acl/acl_common.kshlib | ||
|
||
verify_runnable "global" | ||
log_assert "Verify NFSv4 ACLs behave correctly" | ||
|
||
@PYTHON@ -m unittest --verbose zfsacltests.test_nfsv4acl | ||
if [ $? -ne 0 ]; then | ||
log_fail "Python unittest completed with errors" | ||
fi | ||
|
||
log_pass "Python unittest completed without errors" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/ksh -p | ||
# | ||
# CDDL HEADER START | ||
# | ||
# The contents of this file are subject to the terms of the | ||
# Common Development and Distribution License (the "License"). | ||
# You may not use this file except in compliance with the License. | ||
# | ||
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE | ||
# or https://opensource.org/licenses/CDDL-1.0. | ||
# See the License for the specific language governing permissions | ||
# and limitations under the License. | ||
# | ||
# When distributing Covered Code, include this CDDL HEADER in each | ||
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. | ||
# If applicable, add the following below this CDDL HEADER, with the | ||
# fields enclosed by brackets "[]" replaced with your own identifying | ||
# information: Portions Copyright [yyyy] [name of copyright owner] | ||
# | ||
# CDDL HEADER END | ||
# | ||
|
||
# | ||
# Copyright 2023 iXsystems, Inc. All rights reserved. | ||
# Use is subject to license terms. | ||
# | ||
|
||
. $STF_SUITE/include/libtest.shlib | ||
. $STF_SUITE/tests/functional/acl/acl_common.kshlib | ||
|
||
cleanup_user_group | ||
|
||
# Create staff group and add user to it | ||
log_must add_group $ZFS_ACL_STAFF_GROUP | ||
log_must add_user $ZFS_ACL_STAFF_GROUP $ZFS_ACL_STAFF1 | ||
log_must add_user $ZFS_ACL_STAFF_GROUP $ZFS_ACL_STAFF2 | ||
|
||
if is_freebsd; then | ||
mv /usr/bin/fortune /usr/bin/fortune_bak | ||
cp /usr/bin/true /usr/bin/fortune | ||
fi | ||
|
||
DISK=${DISKS%% *} | ||
default_setup_noexit $DISK | ||
log_must chmod 777 $TESTDIR | ||
|
||
# Use NFSv4 ACLs on filesystem | ||
log_must zfs set acltype=nfsv4 $TESTPOOL/$TESTFS | ||
|
||
log_pass |