OS calls

I’m not new to programming but have never needed to make use of OS api. What I’m attempting to do is get user authentication before allowing the user access to a particular part of the program. In other words when they click on the access button I would like it to verify the currently logged in users password by having them authenticate with the OS. This program will only be compiled for Mac OS X. Is this doable? Any help would be appreciated.
Thanks,

There is a model somewhere online called “AuthenticatedShell” or something similar, it allows you to make authenticated shell calls. It may not be exactly what you’re after, but it’s the closest I can think of.

Start reading from here:

http://developer.apple.com/library/mac/#documentation/Security/Conceptual/AuthenticationAndAuthorizationGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40011200-CH201-TPXREF101

http://developer.apple.com/library/mac/#documentation/Security/Conceptual/authorization_concepts/02authconcepts/authconcepts.html#//apple_ref/doc/uid/TP30000995-CH205-TP9

Keep in mind, though, that for some things authenticatedShell may not be enough. Programs like Launchctl really expect to either be called from the framework or from sudo’d users. In these cases AuthenticatedShell can’t do much. You need to use AuthenticatedShell to, in turn execute a setuid helper program.

Thanks for the replies. I think this gets me on the right track.