Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAS-130475 / 24.10 / Change field name for bypassing ACL validation #14156

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/middlewared/middlewared/plugins/filesystem_/acl.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ def setacl_nfs4(self, job, data):
self._strip_acl_nfs4(path)

else:
if not options['skip_execute_check']:
if options['validate_effective_acl']:
uid_to_check = current_acl['uid'] if uid == -1 else uid
gid_to_check = current_acl['gid'] if gid == -1 else gid

Expand Down Expand Up @@ -746,7 +746,7 @@ def setacl_posix1e(self, job, data):
)

if not do_strip:
if not options['skip_execute_check']:
if options['validate_effective_acl']:
try:
# check execute on parent paths
uid_to_check = current_acl['uid'] if uid == -1 else uid
Expand Down Expand Up @@ -869,7 +869,7 @@ def setacl_posix1e(self, job, data):
Bool('recursive', default=False),
Bool('traverse', default=False),
Bool('canonicalize', default=True),
Bool('skip_execute_check', default=False)
Bool('validate_effective_acl', default=True)
)
), roles=['FILESYSTEM_ATTRS_WRITE'], audit='Filesystem set ACL', audit_extended=lambda data: data['path']
)
Expand Down
4 changes: 3 additions & 1 deletion src/middlewared/middlewared/plugins/pool_/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -793,10 +793,12 @@ async def do_create(self, app, data):
created_ds = await self.get_instance(data['id'])

if acl_to_set:
# We're potentially auto-inheriting an ACL containing nested
# security groups and so we need to skip the ACL validation
acl_job = await self.middleware.call('filesystem.setacl', {
'path': mountpoint,
'dacl': acl_to_set,
'options': {'skip_execute_check': True}
'options': {'validate_effective_acl': False}
})
await acl_job.wait(raise_error=True)

Expand Down
Loading