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: Cocoa/run sudo



On Tuesday, September 2, 2003, at 02:24 pm, Michael Mulligan wrote:

[writeHandle writeData:[adminPass
dataUsingEncoding:NSUTF8StringEncoding]];

I wonder if there is a line-feed at the end of your password string? You need one, otherwise sudo will never finish reading the password, which seems to be the symptom you're experiencing.

as if the password was entered from the first run and I still have like a 5
minute ticket

sudo is designed so that you don't necessarily need to re-authenticate (because typically you use it from the shell, and you're very likely to type more than one command with "sudo" on the front, so typing the password over and over is going to annoy you). See "man sudo" for more information.

You really should consider using the security framework rather than doing this.

Kind regards,

Alastair.
_______________________________________________
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.

References: 
 >Cocoa/run sudo (From: Michael Mulligan <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.