FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 06-30-2012, 01:36 PM
Roger Leigh
 
Default locking system users on package removal

On Sat, Jun 30, 2012 at 02:12:45PM +0100, Simon McVittie wrote:
> On 30/06/12 13:24, Stephan Springl wrote (on Bug #679642):
> > quake-server does neither install nor purge properly on systems
> > without shadow password because usermod gives an error for its
> > e option in this case.
>
> I took this use of usermod from the discussion on debian-devel regarding
> Policy bug #621833 (where it was originally suggested by Roger Leigh),
> so this potentially affects quite a few packages.
>
> Stephan's proposed patch (below) makes me think we really need a script
> (or dpkg-maintscript-helper subcommand) that locks and unlocks system
> users, in which we can make changes like this once and have them affect
> every relevant package, rather than individually patching every
> maintainer script.
>
> Roger: does the change below look appropriate?
>
> [in the preinst]
> > - usermod -U -e ' quake-server
> > + if [ -f /etc/shadow ]; then
> > + usermod -U -e ' quake-server
> > + else
> > + usermod -U quake-server
> > + fi
> [in the postrm]
> > # Lock account on purge
> > - usermod -L -e 1 quake-server
> > + if [ -f /etc/shadow ]; then
> > + usermod -L -e 1 quake-server
> > + else
> > + usermod -L quake-server
> > + fi

It looks sane to me. Having a dh_ command or some other dpkg
maintscript helper shell function to do this automatically would
IMO be a very nice improvement.


Regards,
Roger

--
.'`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' schroot and sbuild http://alioth.debian.org/projects/buildd-tools
`- GPG Public Key F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120630133647.GL9135@codelibre.net">http://lists.debian.org/20120630133647.GL9135@codelibre.net
 
Old 06-30-2012, 03:29 PM
Marc Haber
 
Default locking system users on package removal

On Sat, 30 Jun 2012 14:36:47 +0100, Roger Leigh <rleigh@codelibre.net>
wrote:
>On Sat, Jun 30, 2012 at 02:12:45PM +0100, Simon McVittie wrote:
>> [in the preinst]
>> > - usermod -U -e ' quake-server
>> > + if [ -f /etc/shadow ]; then
>> > + usermod -U -e ' quake-server
>> > + else
>> > + usermod -U quake-server
>> > + fi
>> [in the postrm]
>> > # Lock account on purge
>> > - usermod -L -e 1 quake-server
>> > + if [ -f /etc/shadow ]; then
>> > + usermod -L -e 1 quake-server
>> > + else
>> > + usermod -L quake-server
>> > + fi
>
>It looks sane to me. Having a dh_ command or some other dpkg
>maintscript helper shell function to do this automatically would
>IMO be a very nice improvement.

Given the amount of code lines that were spent in adduser to allow its
transparent usage in maintainer scripts, I would prefer having that
code in adduser. with adduser --lock locking an account and adduser
--system unlocking a locked user that is present but locked.

Having debhelper code for that is wrong since it means rebuilding
packages to fix bugs in that code.

Greetings
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Mannheim, Germany | Beginning of Wisdom " | http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: E1Skzbj-0002hW-KM@swivel.zugschlus.de">http://lists.debian.org/E1Skzbj-0002hW-KM@swivel.zugschlus.de
 

Thread Tools




All times are GMT. The time now is 01:24 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org