Darren J Moffat wrote:
>> libstatgrab works with root and non-root privileges. If root privileges
>> are given, then libstatgrab returns more information. The sg_init()
>> function performs all the one-time initialization including operations
>> that use setuid/setgid privileges if root privilege is used.  
>> Afterwards,
>> sg_drop_privileges() is used to discard setuid/setgid privileges. The 
>> following code is common in commands using libstatgrab:
>
> How does this fit with OpenSolaris given we don't actually use a 
> uid==0 is all powerful model anymore ?  setuid root does still work 
> they way it used to but we try not to document things that away any 
> more; instead say which privileges are required.
>
> What operations that libstatgrab does, on OpenSolaris, require 
> privilege and what privileges are they ? [ not that root is NOT a 
> privilege it is a userid that by default happens to have all 
> privileges ].
>
> kstats don't need privileges to view them anyway, so I'm not sure what 
> operations that libstatgrab provides would need any privilege.
>
I think it was using root privilege to access some portions of the 
device tree.  (Accessing the information from the prom requires root, IIRC.)

This should be reevaluated, because it shouldn't be needed.

    - Garrett

Reply via email to