Why not peruse the sources of the who utility and see how it finds the data you want?

http://www.opensource.apple.com/darwinsource/10.5/shell_cmds-116/who/

yes, I have done checking both of the leopard and tiger's darwin sources, before I ask to the mailinglists.

The main difference between tiger and leopard's who source is the use of utmp and utmpx. utmp has been deprecated on leopard. leopard uses utmpx to retrieve currently logging in users. utmp uses at tiger is buggy?

as a test you may create a user with username more than 8 characters. Login by using FUS to the user, and check the output of the who from the terminal, and compare the result from tiger and leopard.


this is what I got from Tiger's who:
---
alz                     console  Mar 14 09:59
develope        ttyp1    Mar 14 13:20                   <- Tiger cuts out the 
9th character
alz                     ttyp2    Mar 14 10:00


and this is from Leopard:
---
alz                     console   3 14 10:48
alz                     ttys000   3 14 11:26
developer       console   3 14 13:24                    <- Leopard give me the 
correct data


Regards,
Ardian



On 2008/03/14, at 13:02, Michael Watson wrote:

Why not peruse the sources of the who utility and see how it finds the data you want?

http://www.opensource.apple.com/darwinsource/10.5/shell_cmds-116/who/


--
m-s

On 13 Mar, 2008, at 22:27, lazuardi 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?


Regards,
Ardian


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/mikey-san%40bungie.org

This email sent to [EMAIL PROTECTED]



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to