Re: CGSessionCopyCurrentDictionary
Re: CGSessionCopyCurrentDictionary
- Subject: Re: CGSessionCopyCurrentDictionary
- From: Mike Paquette <email@hidden>
- Date: Thu, 10 Nov 2005 08:09:17 -0800
On Nov 10, 2005, at 6:28 AM, Jeff Schindler wrote:
There is no valid user name at that point. No user has logged in
yet.
To check the login state of the session, use the key
kCGSessionLoginDoneKey. The value will be kCFBooleanFalse if no
user has logged in yet, and kCFBooleanTrue if a user is logged in.
OK, that makes sense and I expected as such. But it seems as
though the behavior has changed in 10.4.3 and doesn't work as the
headers describe.
The headers will be corrected. The old behavior was incorrect, and
considered to be a bug.
Is kCGSessionLoginDoneKey guaranteed to be a valid key to check in
both 10.3 and 10.4?
Yes. The keys kCGSessionLoginDoneKey and kCGSSessionOnConsoleKey are
present and valid in 10.3 and 10.4.
I suspect that what is happening in 10.4.3 is that
CGSessionCopyCurrentDictionary is returning non-null prior to
login, which I believe is not the case pre-10.4.3 - is that possible?
CGSessionCopyCurrentDictionary() can return NULL if the caller is not
running within a security session associated with a graphical user
interface. You can get this result wen running a program from SSH,
for example.
_______________________________________________
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