11 Commits

Author SHA1 Message Date
Nick Daly
daca06a9b3 Moved actions/privilegedactions_test.py to tests/.
Added new "--pause" option in test.sh to pause after each test.
2013-11-02 10:34:51 -05:00
Nick Daly
3a30660c25 Revert 4d529b75857597dedd181045ba1bf97b99c66b3e.
Turns out, that was a terrible idea.

Putting privilegedactions in actions/ meant that we tried to interpret
it during startup (along with other similarly silly bugs).  The
fastest way to fix this issue is to merely revert it.
2013-10-30 21:45:43 -05:00
Nick Daly
065c25039a Rewrote actions/privilegedactions.py to be less exploitable.
I'm sure there are still some exploits in the code, but there are
certainly fewer now.  Instead of just executing whatever arguments are
passed into privilegedactions.privilegedaction_run, we now limit the
actions that can be run in the following ways:

- Only actions that exist in the actions directory can be executed.
  Attempting to run the action "echo; rm -rf /" will look for a file
  named "actions/echo; rm -rf /", of which there are none.

- Shell literals are escaped: attempting to run the "echo" action with
  options like "'hi'; rm -rf /") will echo "'hi'; rm -rf /".

- It is difficult to interact with the spawned process through this
  interface.  We can't control whether the spawned process allows
  interaction.

The details of the contract are included in privilegedactions.py, and
this contract is tested in privilegedactions_test.py.
2013-10-27 10:46:06 -05:00
Nick Daly
4d529b7585 Moved privilegedactions to the actions directory. 2013-10-27 10:26:06 -05:00
James Valleroy
41d57cc5fc Put quotes around variables in action scripts. 2013-10-05 18:16:55 -04:00
James Valleroy
17f3965db8 Added XMPP settings form with control of in-band registration. 2013-10-03 19:48:57 -04:00
James Valleroy
2fd1d6e7b2 Added action to register xmpp account. 2013-09-29 23:00:54 -04:00
Petter Reinholdtsen
7b9f6e09d3 Make sure apt do not ask questions when installing owncloud. 2013-09-26 13:26:21 +02:00
Petter Reinholdtsen
829e40198d Get owncloud enabling limping along. 2013-09-26 11:34:04 +02:00
Petter Reinholdtsen
fe33c348b4 First draft to add owncloud support. 2013-09-23 15:18:53 +02:00
Petter Reinholdtsen
444365ec78 Rewrite plinth to use sudo and action scripts instead of exmachina for privileged accesss. 2013-09-23 09:37:24 +02:00