• 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: setuid to root App cannot compile NSAppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setuid to root App cannot compile NSAppleScript


  • Subject: Re: setuid to root App cannot compile NSAppleScript
  • From: Phillip Hutchings <email@hidden>
  • Date: Fri, 12 Dec 2003 09:53:54 +1300

On 12/12/2003, at 6:12 AM, Lorenzo wrote:

Hi,
thank you for the prompt reply.
I don't have to use the AS to copy the file. I have to use the AS to close
all the open applications.

Then it doesn't need to be root. All applescript does is send a message to another app telling it to quit.

Then my tool will copy the file, and restore the
ownership and privileges.

The problem is that my tool is so big and complex that is has to run as root
at all. It cannot launch a smaller sub-process.

I don't believe that. There will only be a few bits where it actually does things requiring root privileges. Separate these out into their own methods and authenticate them when needed.

So the user authenticate himself as root then I set seteuid = 0 to the tool,
and quit and relaunch the tool. So starting from the next time the tool
works as root all the time.

So my problem is the opposite. How to launch a no-root sub-process from a
root process?

man setuid
man setgid

I can't remember the function to get a user's uid/gid off hand.

--
Phillip Hutchings
email@hidden
http://www.sitharus.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: setuid to root App cannot compile NSAppleScript (From: Lorenzo <email@hidden>)

  • Prev by Date: Communication between a NSTabView and an NSTextField...
  • Next by Date: Re: Textual syntax colorizing
  • Previous by thread: Re: setuid to root App cannot compile NSAppleScript
  • Next by thread: Re: setuid to root App cannot compile NSAppleScript
  • Index(es):
    • Date
    • Thread