[pacman-dev] -Sp is broken?

Nagy Gabor ngaba at bibl.u-szeged.hu
Thu Oct 4 14:14:39 EDT 2007

> Unfortunately, no one is going to do it.
> I'm not sure I could do it (I suck, I have no experience in C, no experience
> in pacman, and understanding some part of the pacman code takes me ages).
You are too humble again ;-)

> > I don't really understand where the difficulty is. We can loop in the
> operation
> > options, and do the requested operations.
> > Permission handling: Do we really need this?
> > libalpm will return with an error, if the user hasn't got enough
> privileges; and
> > pacman can quit (any may ignore -y). libalpm could also inform the caller
> > funtion about "Operation not permitted" with an error-type.
> > 
> That's probably a good idea, but is it really that easy?
> What happens if you have enough privileges to do some stuff, but not enough
> for completing the transaction, and pacman fails in the middle of it?
First of all, pacman should be prepared to even a readdir() failure.
Secondly, if the user doesn't have root rights, he cannot touch the local db, so 
he cannot do anything dangerous (in the worst case he may get a segfault...).
You may say, that user can set a+w attributes for some parts of the db, and
root-only attributes for some other parts, and this can lead to problems; but I
say, that pacman needn't be idiot-proof ;-)

Bye, ngaba

SZTE Egyetemi Könyvtár - http://www.bibl.u-szeged.hu
This mail sent through IMP: http://horde.org/imp/

More information about the pacman-dev mailing list