FS#65649 - [bash][git] Directoy aliases missing from /etc/shells

Attached to Project: Arch Linux
Opened by Gianluca Recchia (brainplot) - Friday, 28 February 2020, 01:02 GMT
Last edited by Doug Newgard (Scimmia) - Friday, 28 February 2020, 13:46 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Looking at PKGBUILDs of shells such as fish and zsh, their post_install step appends /bin/$SHELL and /usr/bin/$SHELL to the end of the /etc/shells file.
This is to allow `chsh -s` to work with both /bin/$SHELL and /usr/bin/$SHELL.

However, neither bash nor its sh symlink are placed in the /etc/shells file in the same fashion. Neither is git-shell, the restricted shell that comes with git.
On my system, this is what /etc/shells looks like (minor the comment on the shells(5) man page at the top):

/bin/sh
/bin/bash
/usr/bin/git-shell
/usr/bin/fish
/bin/fish

With that /etc/shells file as is, I'm able to select my shell by issuing, for example, either `chsh -s /bin/fish` or `chsh -s /usr/bin/fish` but I'm not able to do the same thing with bash.
In fact, I can only use `chsh -s /bin/bash`. This makes for an inconsistency in the /etc/shells file; inconsistency which is repeated by the /usr/bin/git-shell entry since it's missing the /bin/git-shell alternative. In order to make a comparison, I asked my friend on Ubuntu to cat out his /etc/shells file and here's what his looks like:

/bin/sh
/bin/bash
/usr/bin/bash
/bin/rbash
/usr/bin/rbash
/bin/dash
/usr/bin/dash

It's clearly a more consistent file in how it's laid out.

In my opinion, /etc/shell should either only contain entries under /usr/* (or equivalently /usr/bin/*) OR it should contain both paths for ALL shells.
This task depends upon

Closed by  Doug Newgard (Scimmia)
Friday, 28 February 2020, 13:46 GMT
Reason for closing:  Not a bug
Comment by nl6720 (nl6720) - Friday, 28 February 2020, 06:28 GMT
Previous bug report about /usr/bin/bash:  FS#33677  .
Comment by Gianluca Recchia (brainplot) - Friday, 28 February 2020, 11:06 GMT
I also reported git (specifically git-shell) in my bug report. Also I feel like this issue isn't really tied to any package in particular.
Shells on Arch Linux should just have a defined and consistent way to add themselves to the /etc/shells file.

Loading...