Re: feature request for portmaster: check for permissions on --check-depends and friends

2010-04-26 Thread Doug Barton
On 04/26/10 14:13, Alberto Villa wrote:
> On Monday 26 April 2010 21:50:39 Doug Barton wrote:
>>> ...the "-n" flag would be more appropriate.
>>
>> It only applies to builds/upgrades.
> 
> and my suggestion would have been: "extend it to other parts of the program" 

The features other than building already include confirmation steps, so
there is actually no harm in running them as root to start with.

> but this was just in theory, personally i would do nothing

Thanks, that's the answer I was hoping for. :)

>>> what if i, as a regular
>>> user, have write access to /var/db/(ports|pkg)?
>>
>> That would be silly. :)
> 
> definitely, but ain't we all a bit silly? ;)

My point is that it is actually possible to over-engineer things in an
effort to try to prevent every possible mistake. While I definitely try
to be cautious with my programming (some say too cautious) if you make
something idiot-PROOF the universe will simply make better idiots.

I don't want to sound flippant, but the code in portmaster is already
WAY too complex. I am resistant to adding more complexity without a
clear need.


Doug

-- 

... and that's just a little bit of history repeating.
-- Propellerheads

Improve the effectiveness of your Internet presence with
a domain name makeover!http://SupersetSolutions.com/

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: feature request for portmaster: check for permissions on --check-depends and friends

2010-04-26 Thread Alberto Villa
On Monday 26 April 2010 21:50:39 Doug Barton wrote:
> > ...the "-n" flag would be more appropriate.
> 
> It only applies to builds/upgrades.

and my suggestion would have been: "extend it to other parts of the program" 
(i wrote a portmaster/tinderbox like script on freefall which uses "-n" to 
simulate anything, and it's nice)
but this was just in theory, personally i would do nothing

> > what if i, as a regular
> > user, have write access to /var/db/(ports|pkg)?
> 
> That would be silly. :)

definitely, but ain't we all a bit silly? ;)
-- 
Alberto Villa, FreeBSD committer 
http://people.FreeBSD.org/~avilla

QOTD:
"I've got one last thing to say before I go; give me back
all of my stuff."


signature.asc
Description: This is a digitally signed message part.


Re: feature request for portmaster: check for permissions on --check-depends and friends

2010-04-26 Thread Doug Barton
On 04/26/10 01:13, Alberto Villa wrote:
> On 4/26/10, Doug Barton  wrote:
>> This is the first time this issue has come up, what do others think?
> 
> i don't mind very much, but imho...
> 
>> OTOH, I could imagine users might want to do things like
>> this that require root access to actually change things as a regular
>> user first as a painless way to see what would happen if they ran the
>> command as root.
> 
> ...the "-n" flag would be more appropriate.

It only applies to builds/upgrades.

> what if i, as a regular
> user, have write access to /var/db/(ports|pkg)?

That would be silly. :)  It would also solve the problem mentioned in
the OP.


Doug

-- 

... and that's just a little bit of history repeating.
-- Propellerheads

Improve the effectiveness of your Internet presence with
a domain name makeover!http://SupersetSolutions.com/

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: feature request for portmaster: check for permissions on --check-depends and friends

2010-04-26 Thread Alberto Villa
On 4/26/10, Doug Barton  wrote:
> This is the first time this issue has come up, what do others think?

i don't mind very much, but imho...

> OTOH, I could imagine users might want to do things like
> this that require root access to actually change things as a regular
> user first as a painless way to see what would happen if they ran the
> command as root.

...the "-n" flag would be more appropriate. what if i, as a regular
user, have write access to /var/db/(ports|pkg)? that wouldn't be
"painless" :)
-- 
Alberto Villa, FreeBSD committer 
http://people.FreeBSD.org/~avilla
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: feature request for portmaster: check for permissions on --check-depends and friends

2010-04-25 Thread Doug Barton
On 04/25/10 12:03, Eitan Adler wrote:
> When I run portmaster with --check-depends or --check-port-dbdir  as a
> non-root user portmaster will continue to attempt to write to the db
> dir.
> For example
> ===>>> Checking jpeg-8_1
>   ===>>> Updating +REQUIRED_BY
> install: /var/db/pkg/jpeg-8_1/+REQUIRED_BY: Permission denied
> 
> portmaster should check before it goes through the whole process and
> see if it has write access to /var/db/ports.

I'm sort of ambivalent about this. For the most part I would imagine
that users would either anticipate this issue and run it as root or set
up PM_SU_CMD. OTOH, I could imagine users might want to do things like
this that require root access to actually change things as a regular
user first as a painless way to see what would happen if they ran the
command as root.

This is the first time this issue has come up, what do others think?


Doug

-- 

... and that's just a little bit of history repeating.
-- Propellerheads

Improve the effectiveness of your Internet presence with
a domain name makeover!http://SupersetSolutions.com/

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"