Re: [PATCH alternative] sulogin: fix FEATURE_SHADOWPASSWDS sematics

2013-11-20 Thread Denys Vlasenko
On Tue, Nov 19, 2013 at 1:58 PM, Tito farmat...@tiscali.it wrote: Please try attached patch. looks good for consolidation of the other loginutils but for sulogin it makes implementing the locked root account feature more difficult Why difficult? ... pwd = getpwuid(0); if

Re: [PATCH alternative] sulogin: fix FEATURE_SHADOWPASSWDS sematics

2013-11-20 Thread Tito
On Wednesday 20 November 2013 13:25:15 you wrote: On Tue, Nov 19, 2013 at 1:58 PM, Tito farmat...@tiscali.it wrote: Please try attached patch. looks good for consolidation of the other loginutils but for sulogin it makes implementing the locked root account feature more difficult Why

Re: [PATCH alternative] sulogin: fix FEATURE_SHADOWPASSWDS sematics

2013-11-20 Thread Denys Vlasenko
Add a new return value to ask_and_check_password() to signify this condition. On Wed, Nov 20, 2013 at 2:05 PM, Tito farmat...@tiscali.it wrote: On Wednesday 20 November 2013 13:25:15 you wrote: On Tue, Nov 19, 2013 at 1:58 PM, Tito farmat...@tiscali.it wrote: Please try attached patch.

Re: [PATCH alternative] sulogin: fix FEATURE_SHADOWPASSWDS sematics

2013-11-20 Thread Harald Becker
Hi Denys ! + if (pwd-pw_passwd == !) ... Do you mean if (pwd-pw_passwd[0] == !) ... ? -- Harald ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox

Re: [PATCH alternative] sulogin: fix FEATURE_SHADOWPASSWDS sematics

2013-11-19 Thread Denys Vlasenko
On Mon, Nov 18, 2013 at 3:46 AM, ChenQi qi.c...@windriver.com wrote: I think the above solution proposed by Tito is better, because if we have 'x' or '*' in /etc/passwd, and we don't have /etc/shadow, we're having an invalid user account. Tito, could you please send out the patch? Please try

Re: [PATCH alternative] sulogin: fix FEATURE_SHADOWPASSWDS sematics

2013-11-19 Thread Tito
On Tuesday 19 November 2013 13:08:34 Denys Vlasenko wrote: On Mon, Nov 18, 2013 at 3:46 AM, ChenQi qi.c...@windriver.com wrote: I think the above solution proposed by Tito is better, because if we have 'x' or '*' in /etc/passwd, and we don't have /etc/shadow, we're having an invalid user

Re: [PATCH alternative] sulogin: fix FEATURE_SHADOWPASSWDS sematics

2013-11-17 Thread Tito
On Saturday 16 November 2013 22:55:16 Harald Becker wrote: Hi Tito ! On 16-11-2013 22:03 Tito farmat...@tiscali.it wrote: usually passwd sets password field to x in /etc/passwd if password field in /etc/shadow is used so in a correctly managed system there should not be empty password

Re: [PATCH alternative] sulogin: fix FEATURE_SHADOWPASSWDS sematics

2013-11-17 Thread ChenQi
On 11/17/2013 04:31 PM, Tito wrote: On Saturday 16 November 2013 22:55:16 Harald Becker wrote: Hi Tito ! On 16-11-2013 22:03 Tito farmat...@tiscali.it wrote: usually passwd sets password field to x in /etc/passwd if password field in /etc/shadow is used so in a correctly managed system there

Re: [PATCH alternative] sulogin: fix FEATURE_SHADOWPASSWDS sematics

2013-11-17 Thread Tito
On Monday 18 November 2013 03:46:49 ChenQi wrote: On 11/17/2013 04:31 PM, Tito wrote: On Saturday 16 November 2013 22:55:16 Harald Becker wrote: Hi Tito ! On 16-11-2013 22:03 Tito farmat...@tiscali.it wrote: usually passwd sets password field to x in /etc/passwd if password field in

Re: [PATCH alternative] sulogin: fix FEATURE_SHADOWPASSWDS sematics

2013-11-16 Thread Tito
On Saturday 16 November 2013 19:52:27 Rich Felker wrote: On Thu, Nov 14, 2013 at 03:43:29PM +0800, qi.c...@windriver.com wrote: From: Chen Qi qi.c...@windriver.com In other parts of busybox such as adduser and deluser, FEATURE_SHADOWPASSWDS indicates that the command will check