• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: easy uninstaller solution
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >easy uninstaller solution (From: "Adam Fisk" <email@hidden>)
 >Re: easy uninstaller solution (From: Iceberg-Dev <email@hidden>)

  • Prev by Date: Re: how to change folder attributes from postinstall (missing SetFile?)
  • Next by Date: Re: how to change folder attributes from postinstall (missing SetFile?)
  • Previous by thread: Re: easy uninstaller solution
  • Next by thread: Re: easy uninstaller solution
  • Index(es):
    • Date
    • Thread