• 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: User Installed Resouces (Admin Access)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: User Installed Resouces (Admin Access)


  • Subject: Re: User Installed Resouces (Admin Access)
  • From: "Finlay Dobbie" <email@hidden>
  • Date: Fri, 21 Sep 2007 21:20:04 +0100

On 21/09/2007, Stefan Arentz <email@hidden> wrote:
> The admin group has write permission to /Library/Application Support.
> To determine if the current user has the right permission you could
> use getgrent("admin") to discover the members of the admin group.
>
> Pseudo code:
>
> current_user = getpwent();
> group = getgrnam("admin")
> if group.gr_mem contains current_user.pw_name then we are an admin

Technically I don't think this will necessarily work any more due to
nested groups etc. You should use the mbr_* API to check group
membership as of Tiger :o)

 -- Finlay
_______________________________________________

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

References: 
 >User Installed Resouces (Admin Access) (From: Keith Duncan <email@hidden>)
 >Re: User Installed Resouces (Admin Access) (From: "Stefan Arentz" <email@hidden>)

  • Prev by Date: Re: really weird move file problem
  • Next by Date: Re: really weird move file problem - copy fails also, more datapoints
  • Previous by thread: Re: User Installed Resouces (Admin Access)
  • Next by thread: Re: User Installed Resouces (Admin Access)
  • Index(es):
    • Date
    • Thread