• 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: cocoa-dev digest, Vol 2 #3128 - 15 msgs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cocoa-dev digest, Vol 2 #3128 - 15 msgs


  • Subject: Re: cocoa-dev digest, Vol 2 #3128 - 15 msgs
  • From: Ryan McGann <email@hidden>
  • Date: Fri, 31 Oct 2003 20:20:19 -0800

On Oct 31, 2003, at 7:44 PM, email@hidden wrote:

Send cocoa-dev mailing list submissions to
email@hidden

To subscribe or unsubscribe via the World Wide Web, visit
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
or, via email, send a message with subject or body 'help' to
email@hidden

You can reach the person managing the list at
email@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of cocoa-dev digest..."


Today's Topics:

1. Re: Detecting login/logout? (Wade Tregaskis)
2. Re: NSComboBoxCell ugliness (Chuck Pisula)
3. Re: Detecting login/logout? (Finlay Dobbie)
4. Re: Freelance programming (Francisco J. Bido)
5. Re: Easy(?) Cocoa Question (Wade Tregaskis)
6. Re: Detecting login/logout? (Wade Tregaskis)
7. Re: Easy(?) Cocoa Question (Public Look)
8. Re: Freelance programming (Wade Tregaskis)
9. Re: Sorting Tables in Panther (Dustin Voss)
10. Re: Freelance programming (Jeff LaMarche)
11. NSOpenPanel returns inadequate path for SMB volumes? (MacLaser Software - Michael Collins)
12. Re: Writing a freehand paint tool [Solved] (M. Uli Kusterer)
13. Re: XCodBuild Q not answered in docs or FAQ (Joseph Jones)
14. Re: Writing a freehand paint tool (John Randolph)
15. Re: XCodBuild Q not answered in docs or FAQ (Chaz McGarvey)

--__--__--

Message: 1
Date: Sat, 1 Nov 2003 10:47:42 +1100
Subject: Re: Detecting login/logout?
Cc: email@hidden
To: Steve Herman <email@hidden>
From: Wade Tregaskis <email@hidden>

I've been asked to look at the feasibility of writing a utility that
needs to run _alongside_ the login dialog on OS X.

Basically I figure this process (or processes) needs to be launched
via StartupItems and it needs to display it's window whenever the Mac
is sitting waiting for logon, and then hide it's window whenever
someone is logged on.

Can anyone point me to any hints at detecting login/logout or any
other good method of knowing when the Mac's login dialog is onscreen?

It may not work, but you could try checking the owner of the
loginwindow or WindowServer processes. When logged in they're owned by
the logged in user... presumably at the login screen they are owned by
root, or some other generic account.
Mac OS X has many security precautions to prevent the exact kind of behavior you want.
(1) No process may make a connection to the WindowServer when loginwindow is the front process. That means no AppKit framework, no windows, nada. If your StartupItem links against any framework that checks in with the WindowServer (like AppKit does) then it will be killed before the loginwindow is ever shown.
(2) Programs that are launched via the StartupItems mechanism are in a different Mach bootstrap context than normal processes. When the user logs in, your program will be killed, because it has created Mach ports (by linking and using certain CoreFoundation functions) and those ports will be stale when the new Mach context is brought forward.

These are both precautions there since NextStep to prevent people from creating programs that look like the loginwindow and simply sniff passwords.

Ryan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Best place to advertise for Cocoa / ObjC developer ?
  • Next by Date: Re: NSArrayController help
  • Previous by thread: Re: Writing a freehand paint tool
  • Index(es):
    • Date
    • Thread