• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting current user short name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting current user short name


  • Subject: Re: Getting current user short name
  • From: "Adam R. Maxwell" <email@hidden>
  • Date: Tue, 7 Nov 2006 19:53:00 -0800


On Nov 7, 2006, at 16:34, Erik Buck wrote:

NSUserName()
NSFullUserName()

It is not safe to assume that the name returned by NSUserName() identifies the user
logged into the Mac OS X console. The user that started an application could be
remotely logged in or logged in via a Unix shell.

We're using NSUserName/NSFullUserName/NSHomeDirectory functions in an app. Is it safe to assume these return the console user for a Cocoa GUI application since a connection to the window server is required to run the app? If there's good reason to switch to SC, we could use NSHomeDirectoryForUser() with SCDynamicStoreCopyConsoleUser, but I don't see a SystemConfiguration framework equivalent for NSFullUserName().


thanks,
Adam



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Getting current user short name
      • From: "Finlay Dobbie" <email@hidden>
References: 
 >Re: Getting current user short name (From: Erik Buck <email@hidden>)

  • Prev by Date: Re: compiling JNI library for PPC and Intel hardware?
  • Next by Date: Re: Mixing Objective-C and C++
  • Previous by thread: Re: Getting current user short name
  • Next by thread: Re: Getting current user short name
  • Index(es):
    • Date
    • Thread