Re: test-getlogin false failure in non login shells

2014-05-22 Thread Pádraig Brady
On 05/22/2014 05:40 PM, Eric Blake wrote: >>/* getlogin_r() fails when stdin is not connected to a tty. */ >> - ASSERT (err == ENOTTY >> + ASSERT (errno == ENOTTY >>|| errno == EINVAL /* seen on Linux/SPARC */ >>|| errno == ENXIO > > So this shoul

Re: test-getlogin false failure in non login shells

2014-05-22 Thread Eric Blake
On 05/22/2014 10:25 AM, Pádraig Brady wrote: > Drats sorry. This shows up when the ttyname_r module is also used, > thus setting HAVE_TTYNAME (which I forgot to do), thus triggering > the invalid test code. > > I've fixed this up in the attached and pushed. > > sorry for the trouble. > > Pádraig

Re: test-getlogin false failure in non login shells

2014-05-22 Thread Pádraig Brady
On 05/22/2014 04:39 PM, Tom G. Christensen wrote: > On 19/05/14 14:37, Pádraig Brady wrote: >> FYI I just pushed the attached to sync test-getlogin_r.c >> with the recent changes in test-getlogin.c >> > > This broke the build on CentOS 6. > > depbase=`echo test-getlogin_r.o | sed 's|[^/]*$|.deps/

Re: test-getlogin false failure in non login shells

2014-05-22 Thread Tom G. Christensen
On 19/05/14 14:37, Pádraig Brady wrote: FYI I just pushed the attached to sync test-getlogin_r.c with the recent changes in test-getlogin.c This broke the build on CentOS 6. depbase=`echo test-getlogin_r.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ gcc -std=gnu99 -DHAVE_CONFIG_H -I. -DGNU

Re: test-getlogin false failure in non login shells

2014-05-19 Thread Guilherme de Almeida Suckevicz
Hi Pádraig, Pefect! ;D Thanks! Guilherme Almeida. 2014-05-19 9:37 GMT-03:00 Pádraig Brady : > FYI I just pushed the attached to sync test-getlogin_r.c > with the recent changes in test-getlogin.c > > thanks, > Pádraig. >

Re: test-getlogin false failure in non login shells

2014-05-19 Thread Pádraig Brady
FYI I just pushed the attached to sync test-getlogin_r.c with the recent changes in test-getlogin.c thanks, Pádraig. >From eec20b4e10a8f59a1880c2e05c2ed978ed3c5d3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Mon, 19 May 2014 13:04:23 +0100 Subject: [PATCH] getlogin_r-tes

Re: test-getlogin false failure in non login shells

2014-05-17 Thread Pádraig Brady
On 05/17/2014 06:09 PM, Tom G. Christensen wrote: > On 14/05/14 23:16, Pádraig Brady wrote: > >> So you went the route of adding rather than deleting code. Fair enough. >> I tweaked a bit in the attached which I;ll apply soon if you're OK with it. > > This broke my daily gnulib bootstrap which ru

Re: test-getlogin false failure in non login shells

2014-05-17 Thread Tom G. Christensen
On 14/05/14 23:16, Pádraig Brady wrote: So you went the route of adding rather than deleting code. Fair enough. I tweaked a bit in the attached which I;ll apply soon if you're OK with it. This broke my daily gnulib bootstrap which runs as a cronjob on a CentOS 6 host. test-getlogin.c:78: as

Re: test-getlogin false failure in non login shells

2014-05-15 Thread Guilherme de Almeida Suckevicz
Hi Pádraig, I completely OK with it, my doubt was with the assert calls! Thank you for the help! ;D Thanks, Guilherme Almeida. 2014-05-14 18:16 GMT-03:00 Pádraig Brady : > On 05/14/2014 03:03 PM, Guilherme de Almeida Suckevicz wrote: > > Hi Pádraig, > > > > Thanks for the help! So, Adjusting j

Re: test-getlogin false failure in non login shells

2014-05-14 Thread Pádraig Brady
On 05/14/2014 03:03 PM, Guilherme de Almeida Suckevicz wrote: > Hi Pádraig, > > Thanks for the help! So, Adjusting just the part on non windows platforms, I > arrive here. > I'm just with doubt in the ASSERT calls. > > Please, if you can, take a look: > > diff --git a/tests/test-getlogin.c b/te

Re: test-getlogin false failure in non login shells

2014-05-14 Thread Guilherme de Almeida Suckevicz
Hi Pádraig, Thanks for the help! So, Adjusting just the part on non windows platforms, I arrive here. I'm just with doubt in the ASSERT calls. Please, if you can, take a look: diff --git a/tests/test-getlogin.c b/tests/test-getlogin.c index 197aed8..0a46267 100644 --- a/tests/test-getlogin.c +++

Re: test-getlogin false failure in non login shells

2014-05-13 Thread Pádraig Brady
On 05/13/2014 08:39 PM, Guilherme de Almeida Suckevicz wrote: > Hi Pádraig, > > Thanks for the answer! I will work on a patch for that. > > I think the better way to fix this is check the getlogin(3) against the > owner of the controlling terminal, this is, using the ttyname(3), stat(2) > and the

Re: test-getlogin false failure in non login shells

2014-05-13 Thread Guilherme de Almeida Suckevicz
Hi Pádraig, Thanks for the answer! I will work on a patch for that. I think the better way to fix this is check the getlogin(3) against the owner of the controlling terminal, this is, using the ttyname(3), stat(2) and the field pw_name of getpwuid(3). Is it right!? Thanks! Guilherme Almeida.

test-getlogin false failure in non login shells

2014-05-13 Thread Pádraig Brady
On 05/13/2014 07:27 PM, Guilherme de Almeida Suckevicz wrote: > Hello! > > I would like to ask if this gnulib test is right. > I will reproduce some steps to arrive there and explain what is happening! > > I have a virtual machine with Fedora 20 installed, so logging with ssh as > root. > > [roo