[lsb-bugs] [Bug 3035] New: /tset/PTHR.os/procenv/getlogin_r/T.getlogin_r test expects wrong username
bugzilla-daemon at linux-foundation.org
bugzilla-daemon at linux-foundation.org
Fri Sep 3 12:54:40 PDT 2010
http://bugs.linuxbase.org/show_bug.cgi?id=3035
Summary: /tset/PTHR.os/procenv/getlogin_r/T.getlogin_r test
expects wrong username
Product: Distribution Tests
Version: 4.0
Platform: AMD64
OS/Version: other
Status: NEW
Severity: normal
Priority: P2
Component: lsb-test-core
AssignedTo: stewb at linux-foundation.org
ReportedBy: brett.pub at gmail.com
QAContact: lsb-bugs at freestandards.org
Test failure:
10|8 /tset/PTHR.os/procenv/getlogin_r/T.getlogin_r 18:01:42|TC Start, scenario
ref 9-0
15|8 3.6-lite 2|TCM Start
400|8 1 1 18:01:42|IC Start
200|8 1 18:01:42|TP Start
520|8 1 00003666 1 1|If the feature test macro _POSIX_THREAD_SAFE_FUNCTIONS is
defined:
520|8 1 00003666 1 2|concurrent calls by multiple threads to getlogin_r(name,
namesize)
520|8 1 00003666 1 3|store the name associated by the login activity with the
520|8 1 00003666 1 4|controlling terminal of the current process in the
character
520|8 1 00003666 1 5|array referenced by name and return 0 if successful.
520|8 1 00003666 1 6|Posix Ref: Component GETLOGIN_R
520|8 1 00003666 1 7|Assertion 9945-1:1996 4.2.4.2-1(C)
520|8 1 00003666 1 8|The system does not support the PTHREAD_SCOPE_PROCESS
scope, using PTHREAD_SCOPE_SYSTEM
520|8 1 00003666 2 1|The system does not support the PTHREAD_SCOPE_PROCESS
scope, using PTHREAD_SCOPE_SYSTEM
520|8 1 00003666 3 1|The system does not support the PTHREAD_SCOPE_PROCESS
scope, using PTHREAD_SCOPE_SYSTEM
520|8 1 00003666 5 1|The system does not support the PTHREAD_SCOPE_PROCESS
scope, using PTHREAD_SCOPE_SYSTEM
520|8 1 00003666 6 1|The system does not support the PTHREAD_SCOPE_PROCESS
scope, using PTHREAD_SCOPE_SYSTEM
520|8 1 00003666 9 1|The system does not support the PTHREAD_SCOPE_PROCESS
scope, using PTHREAD_SCOPE_SYSTEM
520|8 1 00003666 12 1|The system does not support the PTHREAD_SCOPE_PROCESS
scope, using PTHREAD_SCOPE_SYSTEM
520|8 1 00003666 14 1|The system does not support the PTHREAD_SCOPE_PROCESS
scope, using PTHREAD_SCOPE_SYSTEM
520|8 1 00003666 17 1|Unexpected login name root, should be vsx0
520|8 1 00003666 4 1|Unexpected login name root, should be vsx0
520|8 1 00003666 7 1|Unexpected login name root, should be vsx0
520|8 1 00003666 11 1|Unexpected login name root, should be vsx0
520|8 1 00003666 10 1|Unexpected login name root, should be vsx0
520|8 1 00003666 13 1|Unexpected login name root, should be vsx0
520|8 1 00003666 15 1|Unexpected login name root, should be vsx0
520|8 1 00003666 8 1|Unexpected login name root, should be vsx0
220|8 1 1 18:01:42|FAIL
410|8 1 1 18:01:42|IC End
glibc source says: Note that a lot of documentation says that getlogin() is
based on the controlling terminal---what they really mean is "the terminal
connected to standard input". The getlogin() implementation of DEC Unix,
SunOS, Solaris, HP-UX all return NULL if fd 0 has been closed, so this is the
compatible thing to do.
brett at localhost$ cat getlogin_r.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main()
{
char *i;
i = (char *)malloc(20 * sizeof(char));
getlogin_r(i, 20);
printf("getlogin_r returns: %s\n", i);
return 0;
}
brett at localhost$
brett at localhost:~$ su - poo
Password:
poo at localhost:~$ ./getlogin_r
getlogin_r returns: brett
poo at localhost:~$ cat /etc/issue
Ubuntu 10.04.1 LTS \n \l
poo at localhost:~$
--
Configure bugmail: http://bugs.linuxbase.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the lsb-bugs
mailing list