glibc 2.3.6 and setlogin

Dan Osterrath Dan.Osterrath at gmx.de
Fri Nov 25 03:15:01 PST 2005


Hi,

I've tried to compile the current rc1 for kde 3.5.0. Everything build
fine and even seems tu run fine except for kdm. Everytime I try to login
it fails with the error message "setlogin for <username> failed:
Function not implemented".

I investigated a little bit and found out that setlogin from glibc
always fails. So I wrote a little test program:
---------------------------------------
#include <stdio.h>

int main(int argc, char **argv) {
        if (argc < 2) {
                printf("no login given: %s <loginname>\n", argv[0]);
                exit(2);
        }
        if (setlogin(argv[1]) < 0) {
                printf("could not setlogin to %s\n", argv[1]);
                exit(1);
        } else {
                printf("setlogin successful\n");
                exit(0);
        }
}
---------------------------------------

When compiling the gcc already shows the problem:

-bash-3.00# gcc setlogintest.c -o setlogintest
/tmp/cc2G2SBZ.o(.text+0x4f): In function `main':
: warning: warning: setlogin is not implemented and will always fail

And indeed in the glibc 2.3.6 source there were only two implementations
for setlogin. One for hurd and one for generic, which always returns
"not implemented".

So what's wrong here? Is my glibc faulty? Is there anything missing? Or
is kdm (whose source code is derived from xdm) buggy and uses a not yet
implemented function?

Could anyone test the upper test program?

thanx for your help, Dan

PS: I've tested this with glibc-2.3.4-20040701 which also fails.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20051125/edba9031/attachment.sig>


More information about the lfs-support mailing list