-
Notifications
You must be signed in to change notification settings - Fork 567
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
profiles: move blacklist of /etc/profile.d & blacklist /etc/profile #5167
Conversation
This amends commit b6b3f3b ("kate.profile: allow common development file access", 2022-05-28) / PR netblue30#5159. See etc/templates/profile.template.
To disable-shell.inc. Interactive shells can be executed from certain development-related programs (such as IDEs) and the shells themselves are not blocked by default, but this shell startup directory currently is. To avoid running a shell without access to potentially needed startup files, only blacklist /etc/profile.d when interactive shells are also blocked. Note that /etc/profile.d should only be of concern to interactive shells, so a profile that includes both disable-shell.inc and allow-bin-sh.inc (which likely means that it needs access to only non-interactive shells) should not be affected by the blacklisting. Relates to netblue30#3411 netblue30#5159.
Since /etc/profile.d is already being blacklisted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- Does anyone know why we blacklist them?
- Should we add more shell startup files like
/etc/bashrc
,/etc/zpfoile
, ...?
@rusty-snake left a comment:
Not exactly sure; it was added on commit 5db7520 ("profile work", 2015-09-22) Maybe it's done as an extra layer of defense, as a program overwriting these
I think that would make sense. Note that /etc/profile is listed on etc/ids.config, along with other such
|
Short attention span here, doesn't go as far back as 2015! So let's move them! |
Since /etc/profile is present, add the other shell-related paths in /etc that are listed on ids.config. Suggestion by @rusty-snake[1]. Relates to netblue30#5167 netblue30#5170. [1] netblue30#5167 (review)
disable-common.inc: move blacklist of /etc/profile.d
To disable-shell.inc.
Interactive shells can be executed from certain development-related
programs (such as IDEs) and the shells themselves are not blocked by
default, but this shell startup directory currently is. To avoid
running a shell without access to potentially needed startup files, only
blacklist /etc/profile.d when interactive shells are also blocked.
Note that /etc/profile.d should only be of concern to interactive
shells, so a profile that includes both disable-shell.inc and
allow-bin-sh.inc (which likely means that it needs access to only
non-interactive shells) should not be affected by the blacklisting.
Relates to #3411 #5159.
Cc: @hknaack (from #5159).