Hi guys,
I discovered, by accident, that the Ports system automatically tries to elevate a users permission to root whenever they try to perform a port action while they haven't got the right privileges. I'm not much a fan of this system because of two reasons.. First it invites the user to try out passwords to gain permissions (sort off) but second: it also doesn't check if the user actually has permissions to use su at all, which results in a somewhat sloppy error:
I'd rather see that it doesn't try to switch at all but simply gives out the permission error.
I traced this behavior back to /usr/ports/Mk/bsd.port.mk but can't find anything conclusive here. I did come across INSTALL_AS_USER but that's only checked during some actions, not all. So when I have this set and try to use
But the very moment I try to run
So is there a way to turn this behavior off so that the Ports system doesn't try to use su at all?
I discovered, by accident, that the Ports system automatically tries to elevate a users permission to root whenever they try to perform a port action while they haven't got the right privileges. I'm not much a fan of this system because of two reasons.. First it invites the user to try out passwords to gain permissions (sort off) but second: it also doesn't check if the user actually has permissions to use su at all, which results in a somewhat sloppy error:
Code:
macron:/usr/ports/misc/mc $ make config
===> Switching to root credentials to create /var/db/ports/misc_mc
su: Sorry
===> Cannot create /var/db/ports/misc_mc, check permissions
*** Error code 1
Stop.
make: stopped in /usr/ports/misc/mc
I traced this behavior back to /usr/ports/Mk/bsd.port.mk but can't find anything conclusive here. I did come across INSTALL_AS_USER but that's only checked during some actions, not all. So when I have this set and try to use
make rmconfig
it stops trying to elevate my permissions and only gives me an error. So far, so good.But the very moment I try to run
make config
I'm back to square one again.So is there a way to turn this behavior off so that the Ports system doesn't try to use su at all?