• 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: "Andrew James" <email@hidden>
  • Date: Mon, 29 Oct 2007 19:17:49 +1030

Hi,
So it seems the newer version of Leopard is whats dropping the privs,
however what is the best way to retrieve the return value of the commands if
i use fork/exec


On 10/29/07, Nick Zitzmann <email@hidden> wrote:
>
>
> 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: "Finlay Dobbie" <email@hidden>
    • Re: AuthSample
      • From: "David Symonds" <email@hidden>
References: 
 >AuthSample (From: "Andrew James" <email@hidden>)
 >Re: AuthSample (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: FYI - Resolution Independence
  • Next by Date: Determine if App is launched thru alias?
  • Previous by thread: Re: AuthSample
  • Next by thread: Re: AuthSample
  • Index(es):
    • Date
    • Thread