Re: What's the official way to detect a user has administration privileges?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=cBEYxpUz1sZYVdGDIx+GBqYmm+5rJXS2BoE1wEK0s+o=; b=r9rrLLV7ctpXAM3l30jEhkVGQ9Wg4XvDhiA6PVs7y9GOO96YLR84z8e2j9T+c8CvOT CLFuLKoXH5IJWM/R7QCg7MTMPMd82CakuaObgcFZ+4W70KCk4Dto1RuZVM0V2QXlpvM0 QwcP3FN7yo2pisNL+6+DoqIQ0DSsiiLzDwd+I= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=f/FdG9bvWjeiCQaT/X6Sad4zQLcEtBcouhIrZ5c5NAkElIwI04MbFOVq33xgICqxGy ITbGJ7kg/pNASebxu3rLC80gGUxBgOaxoq+LGA+V8kYCgybH9+vWFeG/2xRuXUMXKqNi 9DWSRjxlPkQTgdQybuDEHnBP4Zlq9LlnsQW00= On Tue, Jun 24, 2008 at 5:32 AM, Stéphane <ssudre@intego.com> wrote:
What's the official way to detect a user has administration privileges (from a Mac OS X point of view)?
OpenDirectory (how?) or does the fact that the user belongs to group admin is enough (with the exception of root)?
The best way to do what you want is to use the Authorization Services AuthorizationCopyRights: <http://developer.apple.com/documentation/Security/Reference/authorization_ref/Reference/reference.html#//apple_ref/doc/uid/TP30000826-CH1g-F17549> Check for the "system.privilege.admin" right. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Stephen J. Butler