site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Iceberg-Dev <dev.iceberg@gmail.com> wrote:
- Since the script will be executed with administration privileges, there's always the issue that someone can change the script to do bad things.
Yes, I don't like setuid scripts in the first place. Apple has an entire Authorization framework mapped out, which is probably the right thing to use, but I just added a sudo function in my Python script: def sudo (command, password): p = subprocess.Popen("sudo -S " + command, stdin=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) try: p.stdin.write(password + "\n") p.stdin.close() finally: p.wait() return p.returncode Bill _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com