opendoas: set permissions during do_install. #27958
Open
+3
−12
Conversation
- setting permissions in a INSTALL script makes the program unusable between it being unpacked and the INSTALL script actually being run; for users with other long running post-install steps, e.g. DKMS modules, this can be a long time where an administrative tool can't be used. - furthermore, any interruption of the post-install steps or a power failure will have a much higher probability of leaving the user with a non suid executable than if it had been set at install time. - making the binary permissions 4111 isn't necessary; the binary can be retrieved in multiple manners, so this doesn't offer any protection (and the binary would be "unprotected" anyway while INSTALL hasn't run yet). opendoas's makefile can chmod the executable, so we just stop removing the chmod line from its makefile.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
ericonr commentedJan 15, 2021
setting permissions in a INSTALL script makes the program unusable
between it being unpacked and the INSTALL script actually being run; for
users with other long running post-install steps, e.g. DKMS modules,
this can be a long time where an administrative tool can't be used.
furthermore, any interruption of the post-install steps or a power
failure will have a much higher probability of leaving the user with a
non suid executable than if it had been set at install time.
making the binary permissions 4111 isn't necessary; the binary can be
retrieved in multiple manners, so this doesn't offer any protection (and
the binary would be "unprotected" anyway while INSTALL hasn't run yet).
opendoas's makefile can chmod the executable, so we just stop removing the
chmod line from its makefile.
@Duncaen