site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Thread-index: AccIGVGgkBpzZ3QMEduvUQAWy6NyrA== Thread-topic: Administrator password User-agent: Microsoft-Entourage/11.2.5.060620 on 06/11/14 9:51, Quinn at eskimo1@apple.com wrote:
At 7:09 -0500 14/11/06, Jerry Krinock wrote:
But chkpasswd seems to work fine in my program. Is there a reason to not "just" call chkpasswd()?
I'm not a great fan of fork/exec'ing command line tools to do work that can be done with a real API
Yes, I agree with that, having had users run into process limits a few times.
One thing to be careful of...
The getpass() function displays a prompt to, and reads in a password from, /dev/tty. If this file is not accessible, getpass() displays the prompt on the standard error output and reads from the standard input.
If you call it from a GUI program, /dev/tty won't work and so the stdin trick will.
Yes, I have been piping the password into stdin from a GUI program, but I didn't realize until now that it was a trick. OK, you've convinced me. I'm downloading CryptNoMore, although it looks like I may dump this whole idea. Thanks, Quinn. Jerry Krinock _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com