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: logout and auto-login



It is a security application. If it detects an anomaly, it is to terminate
the current session and logout the user "gracefully by force". It appears
that killing either the "loginwindow" or "WindowServer" does the job. But
I can't seem to be able to get the pid of those process from within my
program without resorting to a shell scripts: getpgrp() doesn't yet exist
in OSX, and I can't walk the process table because of permission issues.
(ps is suid). Any suggestions?

as with autologin, the password is does NOT appear to be stored anywhere,
no?

jake


> > What is a preferred method to log the user out of the system
> > programmatically? I tried kill(-1, x). It did indeed log the user out.
> > However, this rendered the system to an unusable state, as now the login
> > just hangs with the progress bar spinning.
>
> You could kill the windowserver, but that's a bit evil. I'm not sure of
> the recommended way of doing it, in fact, I wouldn't be surprised if
> there was no recommended way of doing it -- why are you doing it?
>
> > Also what exactly happens behind the scene when a user modifieds the
> > "Automatically Login As" checkbox in the login preference? Is it set
> > in the NI database, the user preference or some system preference?
>
> It's /localconfig/autologin in NetInfo. (key = "username", value =
> "theusernametologinas")
>
> -- Finlay


References: 
 >Re: logout and auto-login (From: Finlay Dobbie <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.