• 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: sudoing into root
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sudoing into root


  • Subject: Re: sudoing into root
  • From: Axel Luttgens <email@hidden>
  • Date: Mon, 24 May 2004 11:53:48 +0200

(sorry, forgot to change the recipient field :-( )


Thanks for the quick reply!
Yes, this helps to explain the behavior observed by Gnarlie.

Axel


Christopher Nebel wrote:

On May 23, 2004, at 3:00 AM, Axel Luttgens wrote:

Would be interesting to know how exactly the 'do shell script ... with administrator privileges' is implemented, and what are its relationships with authorization services and sudo.


Currently, 'do shell script "x" with administrator privileges' gets turned into this [1]:

sh -c 'echo password | sudo -S x'

If you don't supply the password in the command itself, you get a dialog asking for it.

However, this is bogus in at least three ways that I can think of off the top of my head, and it's all being rewritten to use the Security APIs instead of sudo(8)

Would indeed be more consistent with the behavior of MacOS apps.

-- coming to a Future Release near you.


Aaaah...




--Chris Nebel
AppleScript Engineering

[1] Technically, it calls execve("/bin/sh", { "sh", "-c", "echo password | sudo -p \"\" -S x" }, *(_NSGetEnviron())).
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: sudoing into root
      • From: Gnarlodious <email@hidden>
References: 
 >sudoing into root (From: Gnarlodious <email@hidden>)
 >Re: sudoing into root (From: Axel Luttgens <email@hidden>)
 >Re: sudoing into root (From: Christopher Nebel <email@hidden>)

  • Prev by Date: Mail Delivery (failure email@hidden)
  • Next by Date: AppleScript / Perl comparison
  • Previous by thread: Re: sudoing into root
  • Next by thread: Re: sudoing into root
  • Index(es):
    • Date
    • Thread