AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20090511090713.5455a8a3@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:mail.onstor.net
NSV:
SSH:
R:<ed.kwan@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/andys@onstor.net@exch1.onstor.net/INBOX	0	2779531E7C760D4491C96305019FEEB52AC91E54E6@exch1.onstor.net
X-Sylpheed-End-Special-Headers: 1
Date: Mon, 11 May 2009 09:07:29 -0700
From: Andrew Sharp <andy.sharp@onstor.com>
To: Ed Kwan <ed.kwan@onstor.com>
Subject: Re: please review code change for TED00026478 admin password
 command changes root's password when logged in as admin.
Message-ID: <20090511090729.7cee3b5b@ripper.onstor.net>
In-Reply-To: <2779531E7C760D4491C96305019FEEB52AC91E54E6@exch1.onstor.net>
References: <2779531E7C760D4491C96305019FEEB52AC91E54C2@exch1.onstor.net>
	<20090508162727.55df8f16@ripper.onstor.net>
	<2779531E7C760D4491C96305019FEEB52AC91E54E6@exch1.onstor.net>
Organization: Onstor
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

OK, but it's then confusing to the next maintainer that comes along,
no?  Better to just test it.

On Fri, 8 May 2009 16:43:16 -0700 Ed Kwan <ed.kwan@onstor.com> wrote:

> Current code works on Bobcat (openBSD behavior).
> New code should also work on Bobcat, but to cut down on testing time,
> I #ifdef Cougar.
> 
> -----Original Message-----
> From: Andy Sharp 
> Sent: Friday, May 08, 2009 4:27 PM
> To: Ed Kwan
> Subject: Re: please review code change for TED00026478 admin password
> command changes root's password when logged in as admin.
> 
> On Fri, 8 May 2009 14:43:51 -0700 Ed Kwan <ed.kwan@onstor.com> wrote:
> 
> > [edk@edk-linux ssc-nfxsh]$ p4 describe 32387
> > Change 32387 by edk@edk-dev on 2009/05/08 14:42:42 *pending*
> > 
> >         For TED 26478 "admin password" command changes root's
> > password when logged in as admin. Explicitly specific the current
> > user in the "passwd" command. Reviewed by
> > 
> > Affected files ...
> > 
> > ... //depot/dev/nfx-tree/code/ssc-nfxsh/cmd_admin.c#7 edit
> > 
> > [edk@edk-linux ssc-nfxsh]$ p4 info
> > User name: edk
> > Client name: edk-dev
> > Client host: edk-linux.onstor.net
> > Client root: /homes/edk/p4/dev
> > Current directory: /homes/edk/p4/dev/nfx-tree/code/ssc-nfxsh
> > Client address: 10.0.0.137:49773
> > Server address: liszt.onstor.net:1717
> > Server root: /p4data/p4root
> > Server date: 2009/05/08 14:43:25 -0700 PDT
> > Server version: P4D/LINUX26X86_64/2007.2/122958 (2007/05/23)
> > Server license: ONStor 40 users (support ends 2009/05/20)
> > 
> > [edk@edk-linux ssc-nfxsh]$ p4 diff -dc ...
> > ==== //depot/dev/nfx-tree/code/ssc-nfxsh/cmd_admin.c#7
> > - /homes/edk/p4/dev/nfx-tree/code/ssc-nfxsh/cmd_admin.c ====
> > *************** *** 124,130 ****
> > --- 124,134 ----
> >       system("stty -isig");
> >       if (ensure_fs_writable("/etc/") == 0) {
> >           unbecome_root();
> > + #ifdef COUGAR
> > +         execute_command ("/usr/bin/passwd", 1,
> > nfxsh_get_userName()->name, NULL);
> > + #else
> >           execute_command ("/usr/bin/passwd", 0, NULL, NULL);
> > + #endif
> >           become_root();
> >           restore_fs_permissions("/etc/");
> >       }
> 
> 
> Why only for cougar?
