Commit graph

2038 commits

Author SHA1 Message Date
Ashod Nakashian
ae8ce06162 loolwsd: removed unnecessary from pipe messages
Change-Id: I5fc310f98764b31fc50f877c28d6076bbb14866f
Reviewed-on: https://gerrit.libreoffice.org/23784
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:05:46 +00:00
Ashod Nakashian
aacd162673 loolwsd: FIFO_NOTIFY -> FIFO_ADMIN_NOTIFY
Change-Id: Ia42983010b3962ca9228032817c6f9024a74c59f
Reviewed-on: https://gerrit.libreoffice.org/23783
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:05:31 +00:00
Ashod Nakashian
bcf6ab75b8 loolwsd: statics are PascalCased and other cleanups
Change-Id: I1c7c62eb812d2e727b7256152c0c774350d24b52
Reviewed-on: https://gerrit.libreoffice.org/23782
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:05:10 +00:00
Ashod Nakashian
8a318c879a loolwsd: merged child command dispatching into a single class and renamed
Change-Id: I894849ea7a6c69c084e922c76468c5e9eb621406
Reviewed-on: https://gerrit.libreoffice.org/23781
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:04:55 +00:00
Ashod Nakashian
504ffec648 loolwsd: request new child from Broker for convert-to requests
Change-Id: I29ff2a416c04393a2b2875e9ffff429f4e25e4c5
Reviewed-on: https://gerrit.libreoffice.org/23780
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:04:36 +00:00
Ashod Nakashian
21cdf9d503 loolwsd: removed unused authentication function for now
Change-Id: I8c57adecab03eb186aeacea365f092a71e2e097d
Reviewed-on: https://gerrit.libreoffice.org/23779
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:04:18 +00:00
Michael Meeks
0a42ab7b81 Remove bogus 10 second sleep.
Change-Id: If44f28fdca37997eca09679bb9865944909ef4f2
Reviewed-on: https://gerrit.libreoffice.org/23778
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:03:58 +00:00
Michael Meeks
1b25179b25 Use bind mounting to accelerate jail creation.
of the 10k files still linked into the jail; 5700 are from usr/
so bind mount just that directory, also set noatime, ro, and
some other helpful looking options.

Change-Id: I28d2d5cbbdf33fb57ea0f0c0915cb267603ee16d
Reviewed-on: https://gerrit.libreoffice.org/23777
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:03:37 +00:00
Ashod Nakashian
285026b6f6 loolwsd: removed PipeRunnable thread from Broker and merged it with main
Change-Id: Ie10f046ed230d891eb0647e409756a34a4b146b8
Reviewed-on: https://gerrit.libreoffice.org/23776
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:03:21 +00:00
Ashod Nakashian
ba7db55353 loolwsd: cosmetics
Change-Id: I6c0c2e088e1e428d45cc56a31e7c1f3b8966dc2b
Reviewed-on: https://gerrit.libreoffice.org/23775
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:03:07 +00:00
Ashod Nakashian
265210741e loolwsd: removed unused read pipe from ChildProcess
Change-Id: I8307488227bf65a6f6fdd829728cd74722a24f58
Reviewed-on: https://gerrit.libreoffice.org/23774
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:02:51 +00:00
Michael Meeks
7f13face52 Attempt at loolbroker benchmark mode.
Change-Id: Ia1d7450b1e99686e3c654f427c231fd7e0cf8254
Reviewed-on: https://gerrit.libreoffice.org/23773
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:02:24 +00:00
Michael Meeks
4d2cd2fff3 More helpful exception debug.
Change-Id: Ibc76f20ba0ff9e015632bff2b7f049d40d49064b
Reviewed-on: https://gerrit.libreoffice.org/23772
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:01:59 +00:00
Michael Meeks
9266ffc09f Remove apparently un-necessary thread local variable template.
Change-Id: Ia220aff972827a0e49a8dadcdb8f32dcd3eed8c9
Reviewed-on: https://gerrit.libreoffice.org/23771
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:01:42 +00:00
Michael Meeks
23672ac362 Build jails more sparingly eliding un-necessary directories.
Create directories top-down and not bottom up for more efficiency too.
Skip the sdk (if we have it) - ~20k files, and misc. other
pieces that we don't need; still more to go there.

Change-Id: Iccd9ebac495fba414d268b339ef82a161d98a9ca
Reviewed-on: https://gerrit.libreoffice.org/23770
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:01:05 +00:00
Ashod Nakashian
ceaefabc91 Revert "loolwsd: replace fifo for socket WSD -> Broker"
This reverts commit 97c8f35ddf.

Since the Broker design has been extremely simplified,
all communication between Broker <-> Kit are gone.
Only a pipe between WSD and Broker remain.

Temporarily reverting this to apply the Broker redesign,
after which this patch can be reviewed and merged.
This will be easier than trying to merge the redesigned
Broker on top of this.

Change-Id: Ia901fad604008654c01841df62e88918adad45e1
Reviewed-on: https://gerrit.libreoffice.org/23769
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:00:45 +00:00
Henry Castro
97c8f35ddf loolwsd: replace fifo for socket WSD -> Broker 2016-04-03 08:12:10 -04:00
Pranav Kant
2220c9d0d0 loleaflet: Rename filename -> title
Change-Id: Ic65b8e819979e35d684807371c76abca55bd5928
Reviewed-on: https://gerrit.libreoffice.org/23734
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2016-04-01 17:22:16 +00:00
Tor Lillqvist
7a80ca8aa1 Make use of 'using' consistent in this file 2016-04-01 18:57:07 +03:00
Tor Lillqvist
9a874e7cda Catch and ignore FileExceptions when persisting editing tiles
There is nothing that says a client has even requested any tiles, so
there might be none to persist. Don't let an exception thrown by the
DirectoryIterator propagate upwards and cause potential
issues.

Noticed the issue when testing using the 'connect' test program,
giving it input that did not request any tiles.
2016-04-01 18:57:07 +03:00
Tor Lillqvist
593d5d7e08 Actually propagate idle/auto save requests to the kit processes
Had to add a shared pointer to the BasicTileQueue for the session to
the MasterProcessSession object, and restructure the coe a a bit to
allocate BasicTileQueue objects dynamically. Possibly just passing a
reference to a BasicTileQueue in the stack would have worked, but why
risk it?

The actual logic when to do auto / idle save is not quite right still,
did not change that in this commit.
2016-04-01 18:57:07 +03:00
Tor Lillqvist
d379ed2113 Improve logging and orderly shutdown 2016-04-01 18:57:07 +03:00
Tor Lillqvist
9e0a8cc43f These are not overridden in derived classes, no need to be virtual 2016-04-01 18:57:07 +03:00
Tor Lillqvist
e3f8fc41a1 Add 'override' 2016-04-01 18:57:06 +03:00
Tor Lillqvist
6c78a8f633 Typo 2016-04-01 18:57:06 +03:00
Tor Lillqvist
14be412f8f It was PipeRunnable::syncChildren() that wrote "query url" messages to the pipe 2016-04-01 18:57:06 +03:00
Tor Lillqvist
a20344b520 Bin PipeRunnable::syncChildren() which died in cbabd6177d 2016-04-01 18:57:06 +03:00
Andras Timar
324f72d844 Revert "serve loleaflet from apache2, until we solve access control problem"
This reverts commit 21cd9167c4.
2016-04-01 16:31:33 +02:00
Pranav Kant
fcc48022fa Allow leaflet to be served from loolwsd
Change-Id: I0179f07d83e9d640ab82ad2a866ef493fdf9e655
Reviewed-on: https://gerrit.libreoffice.org/23721
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-04-01 13:31:53 +00:00
Andras Timar
5452daa169 loleaflet: remove 'product' reference 2016-04-01 12:50:17 +02:00
Andras Timar
7cd8e2a152 loleaflet: licence header of po files 2016-04-01 12:19:22 +02:00
Pranav Kant
28cf20b091 bccu#1640: Add elapsed time field to admin console
Time increment is handled on client-side, server only sends the
elapsed time during first page-load.

Change-Id: I73e98fd95ca9f391b625a8dcfc7e3490878c6a40
2016-04-01 13:33:45 +05:30
Henry Castro
a1e3c30d6e loleaflet: bccu#1622, add a marker progress bar 2016-03-31 21:33:48 -04:00
Pranav Kant
d186e05a0d loolwsd: Use filename in admin console
... instead of long URIs.

Change-Id: I9d13285ce81967a4ff9eb518086743540d7a2a90
2016-03-31 22:47:26 +05:30
Pranav Kant
b81abc4079 loleaflet: Edit lock implemention on front-end
Change-Id: I97c2b2e0a4ef51c6335cefe3e9ec8f5904deb9f4
2016-03-31 19:24:17 +05:30
Pranav Kant
b8e9075f23 bccu#1621: Introduce an edit lock
... which can be taken only one at a time. Others can only view,
not edit. When a session with edit lock exits, the edit lock is
handed over to the next alive session.

Change-Id: I712a4e70369f1d07c1d83af416a0f5c288b05c7d
2016-03-31 19:24:14 +05:30
Pranav Kant
26dd4e0b4b loolwsd: Verify JWT token's expiry time
Change-Id: I6e6913e7918ac4c36ab98457054e5660cce3a854
2016-03-31 17:25:29 +05:30
Tor Lillqvist
422834ebef Improve logging
Don't embed newlines in "lines" written to the log. When logging stuff
read from or written to the fifos, translate newlines to " / " for
clarity.

(If we would want complete, exact verbose logging, we should be really
pedantic and log all non-printable bytes in hex anyway, etc, so
displaying newlines as space-separated slashes should be OK. It isn't
as if there would be totally arbitary data passed through the fifos
anyway.)
2016-03-31 11:01:52 +03:00
Pranav Kant
4ae077200c loolwsd: Separate AdminModel header and implementation
Change-Id: Iddf107aa7985988deba800030e75243a831a7532
2016-03-31 13:00:30 +05:30
Pranav Kant
939388c6e6 loolwsd: Arrange sources/header in makefile alphabetically
Change-Id: I0bc70b34a590d84ac9c15f0d9d0000d02cadba74
2016-03-31 12:57:44 +05:30
Pranav Kant
f1ede0c4ba loolwsd: Split Storage, Auth classes into header/impl files
Change-Id: I5d8990db8f8f4aa7a88bbb0cc84b97149cf4f8c0
2016-03-31 12:57:44 +05:30
Andras Timar
e328d5f590 loleaflet: remove empty po files 2016-03-31 09:15:54 +02:00
Andras Timar
905ce5744b loleaflet: s/kill child/terminate session/ 2016-03-30 21:38:49 +02:00
Pranav Kant
d26246dab0 loolwsd: Temporarily use hard-coded path to key file
We will switch to reading all these values as soon as wip
configuration file object is accessible globally.

Change-Id: I16eff339349683050be1985eefabc34854cccba3
2016-03-31 00:56:57 +05:30
Andras Timar
21cd9167c4 serve loleaflet from apache2, until we solve access control problem 2016-03-30 20:13:38 +02:00
Andras Timar
198c266f8d loleaflet: updated po files 2016-03-30 20:13:08 +02:00
Pranav Kant
ba96b95954 loolwsd: Setup client SSL
We act as a client when we communicate with owncloud server.

For time being, just accept whatever certificates owncloud server
gives us. We might want to get more strict here in future.

Change-Id: I4813d19412b66ecf57d6cdef9c3ac94fbbaa521f
2016-03-30 21:41:00 +05:30
Pranav Kant
27a42affd0 loolwsd: This is a server, not client
Change-Id: I8db0a73048998566b4b60a7f39fe57617b9dca8d
2016-03-30 21:41:00 +05:30
Miklos Vajna
f30e22d0a3 loolwsd: fix -Werror,-Wshadow 2016-03-30 09:39:48 +02:00
Ashod Nakashian
494b90e541 loolwsd: new unittests
Change-Id: I935dbc79df638a7481f851b3e7b42703b97b93ec
Reviewed-on: https://gerrit.libreoffice.org/23648
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-30 02:06:32 +00:00