Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 392685 - app-misc/livecd-tools-2.0.2 -- /bin/bashlogin should use login and go to /sbin/.
Summary: app-misc/livecd-tools-2.0.2 -- /bin/bashlogin should use login and go to /sbin/.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: All ISO (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo LiveCD Package Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-30 21:20 UTC by Marin Hannache
Modified: 2012-10-11 03:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marin Hannache 2011-11-30 21:20:57 UTC
Hello,

/bin/bashlogin is actually trying to do what `/bin/login -f root` would do, in a bash-specific way and without honoring home and shell values in /etc/passwd.

As this script is not intended to be executed by regular users, it should go to /sbin.

Cordially

Reproducible: Always

Steps to Reproduce:
1. cat /bin/bashlogin
Actual Results:  
#!/bin/bash

export HOME=/root
cat /etc/motd 2>/dev/null
cd /root
[[ -e .bash_profile ]] && source .bash_profile
exec -l /bin/bash -i


Expected Results:  
#!/bin/sh

exec login -f root
Comment 1 William Hubbs gentoo-dev 2011-12-01 17:56:13 UTC
Is there any reason we use bashlogin instead of using "login -f root"
directly?
Comment 2 William Hubbs gentoo-dev 2012-10-11 03:10:39 UTC
I modified the livecd-tools to use the -a option of agetty to
automatically log in root. The commit is 89e2c85.
This is included in livecd-tools-2.0.3.