51 Commits

Author SHA1 Message Date
James Valleroy
2751a8e848 Convert xmpp-register action to python. 2014-11-30 15:24:32 +05:30
James Valleroy
39e441e2b9 Add action to check if ejabberd is installed.
If not installed, show instructions on how to install it.
2014-11-30 15:23:25 +05:30
James Valleroy
ac0f0c9eba Show error messages from xmpp-setup and xmpp-register.
Avoid causing plinth to show error page.
2014-11-30 15:23:25 +05:30
Sunil Mohan Adapa
5b969d9d30 Explicitly write license headers for each source file
The package license (AGPL3+) implicitly indicates the license of each
file.  However, it is desirable to have license headers in each file.
This is the case for many prominent projects like GNU project, Mozilla
etc.
2014-11-30 14:49:49 +05:30
James Valleroy
28cc7f14c7 Handle errors with Tor HS configuration. 2014-11-10 21:42:40 -05:00
James Valleroy
e5de76401d Check if tor is installed before running some commands. 2014-11-10 21:22:21 -05:00
Sunil Mohan Adapa
84640560b5 Update actions/tor to Python3 and minor other updates
- Update to use Python3

- Use os.path.join to combine parts of path

- Fix documentation strings

- Use single quotes for regular strings merely for consistency

- Minor refactorings
2014-10-20 00:22:09 +05:30
James Valleroy
500cfd11e3 Add comment to mark end of Plinth Hidden Service configuration block. 2014-10-20 00:20:51 +05:30
James Valleroy
4e493c1ac5 Add Tor form to enable/disable hidden service. 2014-10-20 00:20:32 +05:30
James Valleroy
50797f9a92 Enable/disable Tor hidden service.
Currently only supports a single hidden service for HTTP/HTTPS.
2014-10-20 00:20:18 +05:30
James Valleroy
cf52bf5029 Display Tor hidden service configuration on Tor page.
Currently assumes that there is no more than 1 hidden service.
2014-10-20 00:19:42 +05:30
fonfon
7794893947 added tor actions: is-running, start, stop; display tor status at tor app page (enabling/disabling will be integrated later) 2014-10-20 00:14:35 +05:30
Sunil Mohan Adapa
c9d8bb9d00 Require and use Python3 2014-10-01 11:31:51 +05:30
James Valleroy
ee80507ee1 Update xmpp-hostname-change for new ejabberd package. 2014-09-12 22:15:21 -04:00
James Valleroy
cd1b4a2371 Update xmpp-setup to work with ejabberd >= 14.07 2014-09-12 22:09:24 -04:00
Sunil Mohan Adapa
2bbaa11c96 Update module manager action to handle invalid actions
- Also untabify the file
2014-09-08 18:21:24 +05:30
James Valleroy
fd01cc84fe Update module-manager to use enabled folder with regular files. 2014-09-07 16:06:19 +00:00
Nick Daly
bf3286b736 Merge: Sunil's firewall branch (follow up commits). 2014-04-28 19:59:06 -05:00
Sunil Mohan Adapa
3ef1ed83ce Add support for zones in firewall service 2014-04-27 18:16:32 +05:30
Nick Daly
9350052e59 Merge: Sunil's firewall branch. 2014-04-23 19:26:57 -05:00
Nick Daly
66d0114d8f Merge pull request #72 from petterreinholdtsen/owncloud-autoconfig
Merged: Pere's add code to enable owncloud by default using PostgreSQL.
2014-04-20 20:38:44 +00:00
Sunil Mohan Adapa
32144e96ef Basic firewall sevice based on FirewallD
- Ports are allowed in default zone as soon as a service is enabled
- Ports are disabled when all services depending on the port are disabled
- Shows current enabled state of services and their each of thier ports
2014-04-18 12:53:27 +05:30
Nick Daly
bd5f5c390a Merge pull request #66 from jvalleroy/xmpp-hostname
Update XMPP and mDNS when changing hostname
2014-04-18 01:28:21 +00:00
James Valleroy
fe6803eb98 Don't need 2nd restart. 2014-04-12 17:26:43 -04:00
James Valleroy
415e89c02a When changing XMPP hostname, make sure user accounts get copied to new database. We are back to 2 ejabberd restarts though. 2014-04-12 15:47:15 -04:00
Petter Reinholdtsen
d71d94f2d7 Add code to enable owncloud by default using PostgreSQL. Only need to specify the admin username and password to get going. 2014-04-05 21:39:05 +02:00
James Valleroy
dadfb2220a Rearrange xmpp hostname change scripts so we can only restart ejabberd once. 2014-04-01 21:17:38 -05:00
James Valleroy
186f610708 Add tor information page. 2014-03-26 23:27:59 -04:00
James Valleroy
2c41e63889 Restart avahi-daemon after changing hostname to update mdns. 2014-03-26 18:58:36 -04:00
James Valleroy
974a0146f2 When changing hostname, also update ejabberd and jwchat. 2014-03-26 18:50:55 -04:00
Nick Daly
be052c9969 Merge pull request #65 from jvalleroy/diagnostic-test
Merge: James's Diagnostics branch.
2014-03-25 00:48:54 +00:00
Nick Daly
6d6b5148cc Merge pull request #62 from SunilMohanAdapa/master
Merge: Sunil's PageKite UI module.
2014-03-25 00:27:22 +00:00
James Valleroy
c349d875a6 Add diagnostic test which runs the freedombox testsuite and displays its result. 2014-03-24 20:17:28 -04:00
Sunil Mohan Adapa
8db3217f16 Implement module for configuring PageKite 2014-03-23 19:09:24 +05:30
James Valleroy
1b6208d0b8 Install owncloud without recommends. 2014-03-21 07:35:39 -04:00
Nick Daly
434a2a5833 Merge pull request #59 from jvalleroy/module-manager
Merge: James Valleroy's Plinth Module Manager
2014-03-02 23:24:22 +00:00
Nick Daly
2b4e17e425 Fix Lintian error: unsafe symlinks exist only while testing.
We only need these actions during test time, so create symlinks to
them before running the tests and remove them after testing:

- actions/echo: /bin/echo

- actions/id: /usr/bin/id
2014-03-02 16:20:46 -06:00
James Valleroy
c9d58ee73d Combined module management actions into a single file, so it should be easier to add new optional modules. 2014-01-31 21:44:32 -05:00
James Valleroy
7c6f1e72fa simple form for enabling/disabling owncloud module 2014-01-27 22:42:06 -05:00
James Valleroy
6a6185a744 Added actions to manage modules (manually adding/removing symlinks for now). 2014-01-26 21:59:58 -05:00
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