[committee] Dispense as root (was Re: Restrictions on group applications for freshers)
Daniel Axtens
danielax at gmail.com
Fri May 20 01:25:55 WST 2011
This is now irredeemably off topic.
> There is no gain or loss for wheel members adding/subtracting credit as
> root - it still has to be applied to a non-root account and the safe still
> has to balance at the end of the week. I would point out that only 51
FWIW, these unattributed transactions add up to $217.65 [1]
Who would we chase if the safe _didn't_ balance? I realise full well that having a username attached to an operation is no guarantee of truthfulness, and that wheel are by definition highly trusted.[2] Nonetheless, I feel dispense add as root is completely unnecessary and I am yet to see a compelling use-case for it.
So, lest I be accused of ceaseless complaining, I have written and attached patches to prevent it.
Also, leafing through the code reinforced my moderate disappointment with the cabal nature of the admin group created by the new system (USER_FLAG_ADMIN) but that's a discussion for another time.
[DJA]
Footnotes:
[1] grep "by root" ~coke/cokelog|grep "money in safe"|grep -v BOB|awk 'BEGIN {sum=0}; {sum += $7}; END {print sum}'
This is included to demonstrate the power of awk. Come to whatever l2linux it is that [BOB] is arranging for me to speak at to learn this sort of stuff.</shameless plug>
[2] Although, interestingly, not to the point of having a safe key in the MR.
Technical Notes for the patches:
- I'm slightly hamstrung by the fact that CokeBank doesn't have a USER_FLAG_ROOT: I've added a direct test against the username instead. I notice this is already done in server/dispense.c (although it is labeled an evil hack).
- I noticed USER/PASS authentication sets Client->Username, but AUTOAUTH doesn't. I fixed this.
- I haven't updated the client to understand the error returned: it will tell root that [s]he isn't in coke. This is, aiui, a one line fix if done hackily, and ~5 lines to do better.
- The patched code compiles cleanly, but is untested. This is left as an exercise for the maintainer. :P
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Save-username-in-Client-struct-in-Server_Cmd_AUTOAUT.patch
Type: application/octet-stream
Size: 709 bytes
Desc: not available
Url : http://lists.ucc.gu.uwa.edu.au/mailman/private/committee/attachments/20110520/673bf681/attachment-0002.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Prevent-root-from-using-dispense-add.patch
Type: application/octet-stream
Size: 758 bytes
Desc: not available
Url : http://lists.ucc.gu.uwa.edu.au/mailman/private/committee/attachments/20110520/673bf681/attachment-0003.obj
More information about the committee
mailing list