Mageia Bugzilla – Attachment 7640 Details for
Bug 18164
Perl getlogin () returns undef where it should provide the name of the login user (corresponding c-procedure fails)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Short c-procedure to reproduce the problem
c.c (text/x-csrc), 208 bytes, created by
Juergen Harms
on 2016-04-09 11:54:47 CEST
(
hide
)
Description:
Short c-procedure to reproduce the problem
Filename:
MIME Type:
Creator:
Juergen Harms
Created:
2016-04-09 11:54:47 CEST
Size:
208 bytes
patch
obsolete
>#include <stdio.h> >#include <unistd.h> > >int main () >{ > char *login_name; > > login_name = getlogin (); > if ( login_name == 0 ) { > printf ( "failed\n" ); > } else { > printf ( "success %s\n", login_name ); > } >}
#include <stdio.h> #include <unistd.h> int main () { char *login_name; login_name = getlogin (); if ( login_name == 0 ) { printf ( "failed\n" ); } else { printf ( "success %s\n", login_name ); } }
View Attachment As Raw
Actions:
View
Attachments on
bug 18164
: 7640