Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: get currently logging in users



On 14/03/2008, lazuardi <email@hidden> wrote:
>
>  On 2008/03/14, at 10:51, Kyle Sluder wrote:
>  >
>  > who (and last) use wtmp and utmp.  man utmp(5) for info on how you can
>  > access this information in your own programs.
>  >
>
>
> Yes, I did use utmp as the darwin did at who command, referenced from
>  shell_cmds-811 from darwin source.
>
>  but, as I said at my mail before, It didn't give me the full name of
>  the user that has username more than 8 characters.
>  Is there any way to solve this?
>

Do you see the same issue if you use getutxent(3), grab the user ID
and then use getpwuid(3) to get the passwd entry, and read the
username from that?

(As mentioned though, these functions are off-topic for this list)

-Phil
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >get currently logging in users (From: lazuardi <email@hidden>)
 >Re: get currently logging in users (From: Andrew Farmer <email@hidden>)
 >Re: get currently logging in users (From: lazuardi <email@hidden>)
 >Re: get currently logging in users (From: "Kyle Sluder" <email@hidden>)
 >Re: get currently logging in users (From: lazuardi <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.