• 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: Root privileges again
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Root privileges again


  • Subject: Re: Root privileges again
  • From: Eric Cole <email@hidden>
  • Date: Thu, 7 Nov 2002 13:18:20 -0800

Is there any way to use sudo, and keep the "terminal" behavior (be able
to Ctrl-C to kill the tunnel) ?

There are a few ways to use sudo. The easiest, if you do not need full communication with the tool, is with popen. popen can only open a pipe in one direction, and with sudo you have to have a write pipe (all output to console) so that you can send the password. Security wise, you are better off with authorization services, because otherwise you have to manually request the root password to pass on to sudo.

The easiest solution in your case, other than giving your application su, might be to write a bridge tool with suid set and execute it. Then you do not have to worry about authorization (unless you want to be able to repair the suid bit) and you do not have a big security hole. communicate with this interim tool through pipes or apple events or mach ports or whatever.

Hope this helps
Eric
_______________________________________________
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.

  • Prev by Date: Re: How to encode STL vector
  • Next by Date: Problems with the SpellChecker Sample code and more...
  • Previous by thread: Root privileges again
  • Next by thread: NSDrawer contentView update problem
  • Index(es):
    • Date
    • Thread