On Dec 6, 2007 11:50 AM, Darren J Moffat <[EMAIL PROTECTED]> wrote:
> Shawn Walker wrote:
> > I guess I was trying for the "ask for permission not for forgiveness"
> > approach :)
>
> AKA Look before you Leap - which is actually quite anti Python style as
> it happens.

Perhaps, but I'm a C/perl programmer, not a Python programmer ;)

> >>> In other words, if you want to ensure that a user has the privileges
> >>> equivalent to a "Software Installation Profile" how do you go about
> >>> doing that?
> >> Why do you want to do that at all ?  What is the real problem you think
> >> needs solving here ?
> >
> > I was trying to figure out a good way to determine if the user had the
> > necessary privileges to install software up front, and if they didn't
> > inform them of what they could do to get them.
>
> But just because they didn't have the profile you looked for doesn't
> mean it will fail when you try it.

...which was the purpose of the discussion / question :)

> > Telling a user "You do not have the necessary privileges to perform
> > software installation" isn't the same as "You do not have the Software
> > Installation Profile enabled for your account or your user has
> > insufficient privileges."
>
> But having the "Software Installation Profile" isn't the only way the
> user could have the ability to do this.  It just happens to be the
> currently shipped RBAC profile which includes the necessary commands.

I know. I was trying to put it in generic terms but failed.

> > I was looking for a confident way to ensure "up-front" that a user has
> > the necessary privileges without relying on the (incorrect)
> > sledgehammer approach of requiring root.
>
> There isn't one and not even checking for uid=0 is correct.

If that's the way it is, then so be it, but I do wish there was a "better way."

Thanks a lot for the feedback!

-- 
Shawn Walker, Software and Systems Analyst
http://binarycrusader.blogspot.com/

"To err is human -- and to blame it on a computer is even more so." -
Robert Orben
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to