Garrett D'Amore wrote: > 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.)
Correct. Historically it was related to the device tree. > This should be reevaluated, because it shouldn't be needed. The project team has reevaluated the need for root privileges. Root privileges are not needed, and user and root statgrab runs with a diff file are included in the materials directory to show this. ../materials/statgrab.root.out ../materials/statgrab.user.out ../materials/statgrab.user.root.diff This has also been noted in the proposal.txt file. Cheers, Jim