setup_chroot.sh overwrites passwd

Bug #740656 reported by Srdan Dukic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
scponly (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: scponly

The setup_chroot.sh script copies the relevant lines from /etc/passwd to the $fakeroot/etc/passwd file. In the case where you have already set up another user with the same fake root this will overwrite the file, breaking the login for the previously added user.

The bug is at line #258 of the script:
/bin/grep $targetuser /etc/passwd > $targetdir/etc/passwd

The fix should be to append to this file instead of overwriting it in the case that it already exists:
/bin/grep $targetuser /etc/passwd >> $targetdir/etc/passwd

Ubuntu version: 10.04.2
scponly version: 4.8-4

Revision history for this message
Phillip Susi (psusi) wrote :

This package has been removed from Ubuntu. Closing all related bugs.

Changed in scponly (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.