From owner-freebsd-bugs Thu Oct 14 1:19:29 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from atlrel2.hp.com (atlrel2.hp.com [156.153.255.202]) by hub.freebsd.org (Postfix) with ESMTP id 34ABE14CE1 for ; Thu, 14 Oct 1999 01:19:26 -0700 (PDT) (envelope-from klui@kl65364.intercon.hp.com) Received: from cup44ux.cup.hp.com (root@cup44ux.cup.hp.com [15.13.168.124]) by atlrel2.hp.com (8.8.6 (PHNE_17135)/8.8.5tis) with ESMTP id EAA24523; Thu, 14 Oct 1999 04:18:39 -0400 (EDT) Received: from kl65364.intercon.hp.com (kl65364.intercon.hp.com [15.14.9.24]) by cup44ux.cup.hp.com with ESMTP (8.8.6 (PHNE_14041)/8.7.3 TIS Messaging 5.0) id BAA09679; Thu, 14 Oct 1999 01:12:51 -0700 (PDT) Received: (from klui@localhost) by kl65364.intercon.hp.com (8.9.3/8.9.3) id XAA02592; Mon, 11 Oct 1999 23:53:19 -0700 (PDT) (envelope-from klui) Date: Mon, 11 Oct 1999 23:53:19 -0700 (PDT) From: Ken Lui Message-Id: <199910120653.XAA02592@kl65364.intercon.hp.com> To: genec@mindspring.com, freebsd-bugs@freebsd.org X-Also-Posted-To: comp.unix.bsd.freebsd.misc Subject: wdm breaks getlogin()? Organization: Hewlett-Packard Company X-Newsreader: trn 4.0-test72 (19 April 1999) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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 #include 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