Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Authenticating for sudo

Authenticating for sudo
Thread Tools
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status: Offline
Reply With Quote
May 28, 2001, 11:12 PM
 
Hello,

I am trying to write an open-source program that will automate the disk image creation process. The only real problem I am having now is that I don't know if there is any easy way to authenticate a user password for running the sudo program. Since it always looks the same whenever it is used by any applications I have seen I am guessing that their is an API for it. I have figured out a shunt (haven't tried it yet) for catching the password stderr and then replying with stdin password yet that seems kind of messy if there is a better solution. I was looking into the security framework but it seems to be part of the carbon framework and I want this to be pure cocoa.

Any ideas?
Jeff.
Spectral Class
"Shedding Light on Innovation"
     
Dedicated MacNNer
Join Date: Apr 2001
Location: San Francisco, USA
Status: Offline
Reply With Quote
May 29, 2001, 12:21 AM
 
I would go with Apple's security framework. I think it provides the common authentication dialog that you see in System Preferences and other apps.

I was looking into the security framework but it seems to be part of the carbon framework and I want this to be pure cocoa.

AFAIK the security framework is not Carbon. It is a "foundation" API written in C for the convenience of both Carbon and Cocoa developers. You might be interested in the Objective-C wrapper of the security framework written by Brian R. Hill at Stepwise. Check out his sample Cocoa project.

[This message has been edited by honeydew (edited 05-29-2001).]
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:16 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2