Skip to content

Commit

Permalink
disable-common.inc: move blacklist of /etc/profile.d
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kmk3 committed May 30, 2022
1 parent c7fde57 commit 66dc264
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion etc/inc/disable-common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ blacklist /etc/grub*
blacklist /etc/kernel*
blacklist /etc/logrotate*
blacklist /etc/modules*
blacklist /etc/profile.d
blacklist /etc/rc.local
# rc1.d, rc2.d, ...
blacklist /etc/rc?.d
Expand Down
1 change: 1 addition & 0 deletions etc/inc/disable-shell.inc
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ blacklist ${PATH}/sh
blacklist ${PATH}/tclsh
blacklist ${PATH}/tcsh
blacklist ${PATH}/zsh
blacklist /etc/profile.d
1 change: 0 additions & 1 deletion etc/profile-a-l/kate.profile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ noblacklist ${HOME}/.local/share/kxmlgui5/kateopenheaderplugin
noblacklist ${HOME}/.local/share/kxmlgui5/katepart
noblacklist ${HOME}/.local/share/kxmlgui5/kateproject
noblacklist ${HOME}/.local/share/kxmlgui5/katesearch
noblacklist /etc/profile.d

# Allows files commonly used by IDEs
include allow-common-devel.inc
Expand Down

0 comments on commit 66dc264

Please sign in to comment.