Weird problems with getutxent_wtmp()
Weird problems with getutxent_wtmp()
- Subject: Weird problems with getutxent_wtmp()
- From: "Greg Rumple" <email@hidden>
- Date: Wed, 5 Nov 2008 09:46:41 -0800
I have been working on an application for myself that uses the getutxent() and getutxent_wtmp() API calls. I looked at both the source code for last (last.c) and the example UTXplorer. Both of these apps are showing the same weird behavior I am seeing.
I have 5 macs. 1 Macbook Pro, 1 Mac Pro (Early 2008 model), and 3 iMac's (Aluminum Models). They are all updated and running the latest version of 10.5.5 via software update.
The problem I am seeing is ONLY on the Mac Pro. When I call getutxent_wtmp on this machine, it has sporadic behavior. Sometimes it returns data, sometimes it doesn't. The other machines all return the same data every time, whether I run it as a normal user (with admin privileges) or as root. The Mac Pro gets the correct data (most of the time, not 100% of the time) when I run it as root, and fails almost 100% of the time when I run it as a normal user (but not 100% of the time, almost 100% of the time (if I run it as root, and it works and I immediately run it as a normal user it works is the scenario)).
I didn't see anything in the man pages that indicated that this call was restricted based on user access, and as I said it has weird behaviors (working on 4 out of my 5 macs, and sometimes as a normal user on my Mac Pro).
Has anyone else seen similar behavior, or have any idea how I can get more information (note when this fails, the call to getutxent_wtmp() takes quite a bit of time to return, and it doesn't appear to set any kind of error)?
Thanks for any ideas/help.
Greg
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden