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-131445 / 25.04 / Add tests for SMB protocol NULL and empty DACL behavior #14597

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anodos325
Copy link
Contributor

No description provided.

@bugclerk bugclerk changed the title Add tests for SMB protocol NULL and empty DACL behavior NAS-131445 / 25.04 / Add tests for SMB protocol NULL and empty DACL behavior Sep 30, 2024
@bugclerk
Copy link
Contributor

username=unprivileged_user_fixture.username,
password=unprivileged_user_fixture.password,
) as c:
fh = c.create_file('test_null_dacl', 'w')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the filename here be test_empty_dacl ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'll change the name.

Comment on lines 111 to 112
new_sd = c.get_sd(fh, security.SECINFO_OWNER | security.SECINFO_GROUP)
assert new_sd.dacl.num_aces == 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is an empty DACL test, then how would we have permissions to read this thru SMB?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can access by virtue of being the file owner (trump card).

A NULL DACL should grant all users full control of the file.
An empty DACL should grant no rights to the file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants