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

opendoas: set permissions during do_install. #27958

Open
wants to merge 1 commit into
base: master
from

Conversation

@ericonr
Copy link
Member

@ericonr ericonr commented Jan 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

- 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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.