Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Oct 1999 23:53:19 -0700 (PDT)
From:      Ken Lui <klui@kl65364.intercon.hp.com>
To:        genec@mindspring.com, freebsd-bugs@freebsd.org
Subject:   wdm breaks getlogin()?
Message-ID:  <199910120653.XAA02592@kl65364.intercon.hp.com>

index | next in thread | raw e-mail

I discovered that on two different installations of wdm under
FreeBSD 3.2 RELEASE, the getlogin() call returns "root" rather
than my login. I tried to isolate the cause of this whether if
it's due to Window Maker, aterm, or my machine in general. If I
don't use wdm but just the console with startx, getlogin()
works. If I telnet into my FreeBSD box from another machine, it
works. If I replace wdm with xdm it works.

Anyone who's more familiar with the code than I know the problem
off hand? There is a setlogin() but I'm unsure about how the
architecture works. My feel is from browsing through the code,
things should work. [wdm runs upon launch (I have it set up via
/etc/ttys) and invokes an instance of wdmLogin which displays
the login panel. When login and password are entered, wdmLogin
invokes another instance of wdm which then calls setlogin()
before actually logging in.] I'm obviously missing something
since things aren't working.

My sample program:

#include <stdio.h>
#include <unistd.h>

main()
{
	printf("%s\n",getlogin());
}


Ken
-- 
Ken Lui                                3495 Deer Creek Road
klui@cup.hp.com                        Palo Alto, CA  94304           USA
Information Solutions & Services       1.650.236.5364  FAX 1.650.857.2085
Views within this message may not be those of the Hewlett-Packard Company


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910120653.XAA02592>