On 2013-02-06 13:39, Mikolaj Izdebski wrote:
Hello,

The problem is that Fedora-Review checks for current user being in mock
group and if that's not true it fails with "No mock group". I have already
reported this issue some time ago in ticket #78 [1], but the solution
(improved message) doesn't really satisfy me.

Mock uses PAM for user authentication. It's configuration file is
/etc/pam.d/mock and users are allowed to customize it. PAM supports many
authentication schemes (password, hardware keys, group presence and much,
*much* more). PAM is much more flexible and secure that checking group
membership.

If a user is member of mock group then it's trivial to gain root access.

$ cat foo.cfg 
uidManager._becomeUser(0,0)
os.execv("/bin/bash",["bash"])
$ mock -r ../..$PWD/foo
# Here we go! We have root prompt now!

Therefore adding my user to mock group opens a local security hole.
Anyone gaining access to my account can have root access immediately.
For this reason I don't want to add my user account to mock group and
use PAM authentication instead.

Because of the above I have two choices: compromise mu system security
by adding myself to mock group or maintain private patchset for
Fedora-Review and rebase it with every upstream release. None of the
above is perfect.

Because of the above I would like you to reconsider the possibility of
disabling the check for mock group (by default or if some command-line
option is given).

Thank you.

[1] https://fedorahosted.org/FedoraReview/ticket/78

--
Mikolaj Izdebski
_______________________________________________
fedorareview mailing list
fedorareview@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/fedorareview
Hm...I still think having a check that user is able to run mock commands is needed. For many users not having correct permissions to run mock creates subtle errors. So, disabling the test isn't really an option IMHO.

That is not to say that it can't be improved. It would perhaps be better to test if user could run a simple 'mock --shell "echo foo"' to verify that mock permissions are working properly. Or something like that, not requiring a build.

I suggest that you reopen #78 and that we continue discussion there. In any way, this will not make it into 0.4.0 IMHO.

--alec