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

Defensive improvements to ACL instructions for inattentive users. #246

Merged
merged 1 commit into from
Jun 22, 2024

Conversation

obilaniu
Copy link
Contributor

@obilaniu obilaniu commented Jun 21, 2024

Prevent copy-pasting with undefined ${USER2} variable by using POSIX shell parameter expansion feature "${parameter:?word}", which prints an error "word" if $parameter is empty or undefined.

In the context of setfacl [-args] user:${USER2}:x, an empty string is legal and indicates "the owner, whoever that is". More than one user has removed their own permissions by setfacl'ing themselves out of them accidentally. It's time to put a safety on this foot-gun.

Also move a note from Step 3 to below Step 4 in order to make Step 4 more prominent and less easily-skipped by those in a hurry.

Prevent copy-pasting with undefined ${USER2} variable by using
POSIX shell parameter expansion feature "${parameter:?word}", which
prints an error "word" if $parameter is empty or undefined.

In the context of setfacl user:${USER2}:x, an empty string is
legal and indicates "the owner, whoever that is". More than one
user has removed their own permissions by setfacl'ing themselves
out of them accidentally. It's time to put a safety on this
foot-gun.

Also move a note from Step 3 to below Step 4 in order to make
Step 4 more prominent and less easily-skipped by those in a
hurry.
Copy link
Collaborator

@btravouillon btravouillon left a comment

Choose a reason for hiding this comment

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

Looks good to me. 👍

@btravouillon btravouillon merged commit 22bf469 into mila-iqia:master Jun 22, 2024
4 checks passed
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.

3 participants