Re: easy uninstaller solution
Re: easy uninstaller solution
- Subject: Re: easy uninstaller solution
- From: Bill Janssen <email@hidden>
- Date: Thu, 23 Oct 2008 10:30:01 PDT
- Comments: In-reply-to Iceberg-Dev <email@hidden> message dated "Thu, 23 Oct 2008 10:15:48 -0700."
Iceberg-Dev <email@hidden> 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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden