Summary: | portage .47-r6 allows users to search via emerge | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Will Reid <rlreid13> |
Component: | [OLD] Core system | Assignee: | Nicholas Jones (RETIRED) <carpaski> |
Status: | RESOLVED WORKSFORME | ||
Severity: | major | CC: | cardoe, fernand8, seemant |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Will Reid
2003-02-26 17:27:05 UTC
What are you reporting? This doesn't make any sense. What are you failing 'su -' repeatedly? I think Will doesn't like the fact that user without special permissions can use emerge. So It doesn't look like a "real bug", but more like a feature request. He wants to restric who can run the command. Will, why don't you set permission on the emerge binary ? I think that's the UNIX way to achieve what you want (if I understand correctly). (added self to CC) To Poster #2: To Poster #2: He's not asking for a feature. He's clearly stating that Portage 2.0.46-r12 had the correct security permissions and that Portage 2.0.47-r6 does not have the correct security permissions. How is that a feature request? To Poster #1: He's just showing that he's not logged in as root or a root privledged user by running the su command. Not that it's failing. Read above my comment to poster #2 about what he's reporting. the issue isnt really permissions ... with 2.0.47, non root users are allowed to use certain features of portage (like search) ... the reason being /usr/portage is world readable so why restrict access to the tool when they could in theory view the stuff themselves ? the question should be 'are non root users allowed to use emerge if user is not in the group portage' ? God damnit, Nick. Can you not fucking read? I specifically said what my problem was on the first line. A normal user is able to use emerge's search and pretend features. They're not supposed to be able to according to your own documentation. This didn't happen until I upgraded to a version that uses the new portage group instead of wheel. Should I refresh your memory on that? einfo "NOTICE: The wheel group requirement for non-root users has been changed to" einfo "group portage. Group portage must be a valid group for user to use portage." and einfo "The 2.0.47 line of portages contains an optional userpriv mode that" einfo "enables portage to drop root privleges and run as a normal user. It is" einfo "enabled via FEATURES by adding userpriv." No, I do not have "userpriv" in my FEATURES. I don't want users to be able to use portage. And to Fernand Albarracin, no it's not a feature request. Why not read what I actually reported as the bug instead of assuming shit? It is a bug. And it's a security bug. Changing the bin's perms every time a new portage comes out is not a fix. It's a pain in the ass workaround to something that used to work and Nick has broken like he has many times before while trying to add fancy shit to portage when he gets bored or something instead of maybe fixing the bugs he has open already. And I thought this was interesting. copied from the Gentoo weekly newsletter http://www.gentoo.org/news/en/gwn/20030224-newsletter.xml The following stable packages were added to portage this week Note: Because of the pending release of 1.4_final, the Portage tree is currently frozen. As such, no new stable packages were introduced to Portage this week Updates to notable packages sys-apps/portage - portage-2.0.47-r2.ebuild; If the "arch" tree is frozen why did this broken portage that couldn't `emerge rsync` hit the x86 and ~x86 tree at the same time? Same with 2.0.47-r6 that I'm complaining about. If the tree is frozen, why are new ebuilds hitting it everyday without ANY testing other than that which the dev does himself/herself? No, the newest version in my tree, portage 2.0.47-r7 doesn't fix my problem. Thanks, Will Aliz added because this is a security problem that is Gentoo specific and created by portage itself. According to portage's own docs things shouldn't happen this way. (1) calm down (2) it's not a security issue because search doesnt allow access to information the user doesnt already have access to (3) this portage can `emerge rsync` Well, obiously there is some confusion going one here. The purpose of my message wasn't some king of public bashing. Sorry if it's the way you saw it. When I said it's a feature request, I assumed that allowing non-privileged users to run "emerge -p" or "emerge -s" was itself a response to some feature requests. I think I remember reading those both on mailing lists and bugzilla some time ago. So I thought you wanted access control on top of that. I wasn't aware of any security implications related to the use of "-p" and "-s". If there is a problem here, you might want to tell why then. Please Will, Bugzilla is not the place for rant. I'm also frustrated when things break, but the only way we can help here is by being productive and by avoiding to waste developer time. Hint: use mailing list and/or private mail. Again, sorry for the confusion. I'll shut up now. SpanKY, 1. I tried calm. All it did was get me told I didn't know what the hell I was talking about. 2. It is a security issue because users shouldn't have this kind of access to portage (`emerge info`, etc.). It says so right in the portage docs and the ebuild itself that this access should require the group `portage` in the users access rights. 3. I realize it can sync. I wasn't complaining about that. I was complaining about the fact a version that couldn't ever hit the x86 (ie, stable) tree. That should be another bug in itself though, but I can't remember at this second if there's a place to report buggy devs. It'd probably be better if such a thing wasn't implemented. There would be plenty of bugs about you lately as well. Fernand Albarracin, I snapped at you as well, because you didn't seem to read the bug fully yourself. This wasn't the first place I've been brushed off on this. It is a feature request. One that was supported correctly in <.47 for as long as I've been using gentoo. The new feature was the moving of this type access from the `wheel` group to the `portage` group. During this move ALL users got access. I tried to show that by `su -` failure and `id`, but I guess I screwed up by providing too much info and making Nick not even want to read about the problem. I suppose in my attempts to give an accurate example of the situation here (by pasting things that could be skimmed/glanced at for the most part) I wasted the dev's time. He would've asked for everything I'd pasted in his initial reply if I hadn't given it in my original bug post. I was trying to save time. SpanKY, 1. I tried calm. All it did was get me told I didn't know what the hell I was talking about. 2. It is a security issue because users shouldn't have this kind of access to portage (`emerge info`, etc.). It says so right in the portage docs and the ebuild itself that this access should require the group `portage` in the users access rights. 3. I realize it can sync. I wasn't complaining about that. I was complaining about the fact a version that couldn't ever hit the x86 (ie, stable) tree. That should be another bug in itself though, but I can't remember at this second if there's a place to report buggy devs. It'd probably be better if such a thing wasn't implemented. There would be plenty of bugs about you lately as well. Fernand Albarracin, I snapped at you as well, because you didn't seem to read the bug fully yourself. This wasn't the first place I've been brushed off on this. It is a feature request. One that was supported correctly in <.47 for as long as I've been using gentoo. The new feature was the moving of this type access from the `wheel` group to the `portage` group. During this move ALL users got access. I tried to show that by `su -` failure and `id`, but I guess I screwed up by providing too much info and making Nick not even want to read about the problem. I suppose in my attempts to give an accurate example of the situation here (by pasting things that could be skimmed/glanced at for the most part) I wasted the dev's time. He would've asked for everything I'd pasted in his initial reply if I hadn't given it in my original bug post. I was trying to save time. yes, by your definition, it is a 'security' issue, but it is not the kind of issue that aliz need be concerned with ... this is a portage bug, and a bug that 'reveals' a information in an easier to access format ... so lets just drop the flame fest, everyone make nice nices, and wait till nick fixes it ... as for whether this should have hit stable, noone's perfect, we just try to be ... again, lets all hug The reason you need to be in group portage is for dep generation. Non-portage/root users do not have permissions to the trees required to create the files necessary to complete the process. It doesn't say you can't try. The security purpose of wheel/portage is so that users can't modify files that portage/wheel/root will use later for compilation. 'userpriv' is compilation mode, not a user-rights option. Portage is not setuid/setgid so it can't access anything that the running user can't access. _Anyone_ can rsync a portage tree and get the exact information it would be allowing them to look at anyway. Security-wise, /var/db/pkg is the only tree which would contain anything you could consider a security-risk, but anyone with a shell could access all that information in a slightly more tedious form using 'ls' and '--verbose' in various commands. If you really insist on being that restrictive, a simple chmod on a few dirs and bins will prevent any reasonable access. chmod 0700 /var/tmp/portage /var/db/pkg /usr/portage chmod 0700 /usr/lib/portage/bin chmod 0700 /usr/lib/python2.2/site-packages/portage.py chmod 0700 /etc/make.globals /etc/make.conf /etc/make.profile rsync will revert make.profile back to 755, so you'll have to maintain that one after every rsync. Works for me and haven't gotten any further argument otherwise. |