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

Root privileges again


  • Subject: Root privileges again
  • From: Yann Bizeul <email@hidden>
  • Date: Thu, 7 Nov 2002 11:56:13 +0100

Hi there,

I post this help because I could no find an issue in the archives !

Here is my problem:

I'm writing a too to manager SSHTunnel via a GUI (SSHTunnelManager on VT).
The current version in only able to open tunnels with local ports beyond 1024 and that's my problem

I first tried to use sudo to launch my ssh process, but I think what happenned, is that ssh goes background, run by root, and impossible to SIGTERM by my main process owned by the current user. By the way, If i launch the same command in a terminal, it stuck in the console, and I'm able to Ctrl-C it to stop the tunnel.

I tried to play with suid bits and setuid() and/or seteuid() without a real success.
Actually all works fine, with the whole application taking root privileges, and I don't want this for security reasons.

I saw some examples and documentations about the Authorization framework, which could be fine to run the "ssh" binary with root privileges, but I use isRunning: and terminate: methods of NSTask to manage running tunnels, that does no seem possible with the security framework, that just returns a status (auth failed or not)

Actually, I launch an NSTask inside a thread, and store it in a global dictionary to access it afterwards.

Is there any way to use the security framework with the functionality provided by NSTask ?
Is there any way to use sudo, and keep the "terminal" behavior (be able to Ctrl-C to kill the tunnel) ?
Is there another issue ?

Thanks
--
Yann Bizeul
TYNSOE.ORG - http://www.tynsoe.org/
Site technique consacri ` MacOS X
_______________________________________________
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: NSDrawer contentView update problem
  • Previous by thread: Re: How to encode STL vector
  • Next by thread: Re: Root privileges again
  • Index(es):
    • Date
    • Thread