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

Re: AuthSample


  • Subject: Re: AuthSample
  • From: Nick Zitzmann <email@hidden>
  • Date: Sun, 28 Oct 2007 16:36:13 -0600


On Oct 28, 2007, at 5:38 AM, Andrew James wrote:

I use a loader in my program to achieve root powers, however for some reason
in leopard it has become broken. The code is based off authsample and works
if i use a fork to execute the commands
(chown/chmod/kextload/kextunload/pmset) however if i place a simple system()
call it fails to achieve the root powers. Now to my understanding a fork
should have the exact same powers as the parent.


So does anyone know why the fork is needed?


I bet it failed for security reasons. system() invokes a command using a shell, and running a shell as root (or with root privileges) is generally a bad idea. Try using fork/exec instead of system().

Nick Zitzmann
<http://www.chronosnet.com/>




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: AuthSample
      • From: "Andrew James" <email@hidden>
References: 
 >AuthSample (From: "Andrew James" <email@hidden>)

  • Prev by Date: Anand is your Yaar! :)
  • Next by Date: Re: NSManagedObjectContext - Key Value compliant
  • Previous by thread: AuthSample
  • Next by thread: Re: AuthSample
  • Index(es):
    • Date
    • Thread