Commit graph

59 commits

Author SHA1 Message Date
Ashod Nakashian
c980ece8bc loolwsd: preparing for wopi storage
Change-Id: Iae1bd042d84603cf81115789df40f50e8dc20d16
Reviewed-on: https://gerrit.libreoffice.org/22884
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-04 03:04:43 +00:00
Tor Lillqvist
9d655cbcc0 Don't pretend this will work on anything except Linux 2016-02-29 14:25:12 +02:00
Henry Castro
ba47e28581 loolwsd: re-work UriToDocumentURIMap
This is not in synchronization with lokit process because
it is normal that lokit dies now.
2016-02-21 08:26:29 -04:00
Ashod Nakashian
d8df19d064 loolwsd: Authentication and Authorization support
An abstract class to request an access token, given
an authorization grant. The class should be
specialized for each authentication/authorization
type we support.

Currently it's not enabled in the code as it's
an early stage in developing an general API.

Change-Id: I4f2efd376d575640bd3e17c7257994020b11bbe8
Reviewed-on: https://gerrit.libreoffice.org/22512
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-19 21:44:55 +00:00
Henry Castro
75b552bf71 loolwsd: create named pipes workspace 2016-02-13 13:22:15 -04:00
Henry Castro
9e3d5c0337 loolwsd: ensure chroot jail every lokit process 2016-02-13 10:15:28 -04:00
Miklos Vajna
4b3c5ea8ff loolwsd: doxygenize class comments 2016-01-28 19:16:32 +01:00
Henry Castro
35fbb27cfd loolwsd: remove unused private methods 2016-01-25 22:43:03 -04:00
Henry Castro
2baae1b324 loolwsd: simplify one loolbroker 2016-01-25 21:07:10 -04:00
Henry Castro
e3fd07ad0e loolwsd: remove unnecessary inter process mutex
It is no longer needed becuase loolbroker handle connections
2016-01-25 12:26:22 -04:00
Pranav Kant
f429001ff9 loolwsd: Display version information on command line
Change-Id: Ie65c30574ca4cef619a224ec6df3501d6bda086a
Reviewed-on: https://gerrit.libreoffice.org/20847
Reviewed-by: jan iversen <jani@documentfoundation.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-01-19 16:36:00 +00:00
Miklos Vajna
de7823744e loolwsd: fix naming style of LOOLWSD static members 2016-01-15 09:44:07 +01:00
Ashod Nakashian
3d803dd9b0 loolwsd: Document -> DocumentURI
Change-Id: I7e5989dbee368314a4db7c723439060f1064e844
Reviewed-on: https://gerrit.libreoffice.org/21469
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-14 13:39:43 +00:00
Ashod Nakashian
5bf75f56ca loolwsd: centralized signal handling and eased debugging
Change-Id: Ifdb3e2bca540bec3c6dea1ab24173c8ea0267706
Reviewed-on: https://gerrit.libreoffice.org/21325
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-11 04:06:56 +00:00
Ashod Nakashian
cb772746d8 loolwsd: multiple documents load correctly now
Change-Id: I86adda24d5ea576aa17829f27b78cb02d0350a4b
Reviewed-on: https://gerrit.libreoffice.org/21323
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-11 04:05:36 +00:00
Henry Castro
49fbf1126b loolwsd: fix search document. 2016-01-07 12:14:52 -04:00
Ashod Nakashian
06c20923c5 loolwsd: Kit is given the jailed path
Change-Id: I5b475798c7f654aaa3e0032332d5aa97a103a4c8
Reviewed-on: https://gerrit.libreoffice.org/21185
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-07 05:58:08 +00:00
Ashod Nakashian
a7556a7c1e loolwsd: new Document class to manage the lifetime of a document
Change-Id: I8596d0f2514106e384bc6519ce05028753026678
Reviewed-on: https://gerrit.libreoffice.org/21184
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-07 05:57:25 +00:00
Ashod Nakashian
7f9485e318 loolwsd: jailId now static member
Change-Id: I7142038d421d642a3e9dfd3e1069c7401ec7db5c
Reviewed-on: https://gerrit.libreoffice.org/21183
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-07 05:56:25 +00:00
Ashod Nakashian
0b5bc5f244 loolwsd: random jailId dir created by WSD and renamed childId -> jailId
Change-Id: Ib5ce65c578c0c7fd3dbf81628906cd17728fb3ff
Reviewed-on: https://gerrit.libreoffice.org/21182
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-07 05:56:01 +00:00
Ashod Nakashian
b0cd3e5a46 loolwsd: spawn one broker and one only
Change-Id: I9ec23e7e9e9672e5e4e6d55b7a79e6db1f617e45
Reviewed-on: https://gerrit.libreoffice.org/21181
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-07 05:54:44 +00:00
Ashod Nakashian
82c455ef94 loolwsd: dropCapability now works with --enable-debug
Change-Id: I1a852b0cb4fe0b08fcc00f2f7ab15eea3d36801b
Reviewed-on: https://gerrit.libreoffice.org/21133
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-05 19:30:02 +00:00
Ashod Nakashian
0869cace37 loolwsd: consolidated TerminationFlag
Change-Id: Ic06b940f3b48888e4f398816e5ee45c0f49046e3
Reviewed-on: https://gerrit.libreoffice.org/21059
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-03 15:15:46 +00:00
Ashod Nakashian
88b76fe9d4 loolwsd: removed dead code
Variables and options lingering from previous iterations removed.
Standardizing static member names.
Header inclusion cleanups.

Change-Id: I65182ad4d100e0077f1b450be50cf95d7b8f0fc7
Reviewed-on: https://gerrit.libreoffice.org/20997
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-28 23:36:55 +00:00
Ashod Nakashian
3811abb40a loolwsd: replaced threadId with globally unique sessionId
Change-Id: I55b16d4baa1753bc67dcd72de13e7a516da27abe
Reviewed-on: https://gerrit.libreoffice.org/20981
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-28 04:14:15 +00:00
Ashod Nakashian
b2d124af93 loolwsd: proper handling of non-default client port number
Change-Id: I388f0ce0252c5f7889e77c4d85b4cf21d4a222b6
Reviewed-on: https://gerrit.libreoffice.org/20979
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-28 04:12:15 +00:00
Ashod Nakashian
d273057488 loolwsd: moved config values into common header
Change-Id: Ib88379e453f207a6a5e6223045a393c769082be4
Reviewed-on: https://gerrit.libreoffice.org/20978
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-28 04:09:50 +00:00
Henry Castro
9d7fbec138 loolwsd: Merged improved lifecycle prototype
Enabled the broker and kit processes.

Change-Id: I9afedbccac35732ffe846494cae8135d306e6311
Reviewed-on: https://gerrit.libreoffice.org/20907
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-23 17:23:40 +00:00
Henry Castro
ef9313e3a9 loolwsd: deligating to loolbroker and loolkit
Change-Id: I8499540630373a1bee12a5f58fca3ed701ff6404
Reviewed-on: https://gerrit.libreoffice.org/20904
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-23 17:22:22 +00:00
Ashod Nakashian
ab5253ba1e loolwsd: Refactored the PRNG
Moved the PRNG into utility namespace and interface
that internally manages seeding (once per process)
and thread-safety.

Change-Id: I78f0ef2c3a01aa6c6aefc8e4b07f3802f2421c68
Reviewed-on: https://gerrit.libreoffice.org/20901
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-23 17:18:16 +00:00
Henry Castro
2d375f3eba loolwsd: FIFO
Change-Id: I4694e45ab8006e8287011000bc5e2797bc9ecd48
Reviewed-on: https://gerrit.libreoffice.org/20898
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-23 17:05:37 +00:00
Henry Castro
d70280fff8 loolwsd: when no available child sessions, pre spawns more children 2015-12-18 16:51:08 -04:00
Henry Castro
c0fbf5ebf9 loolwsd: remove child root folder when it is a gracefull shut down 2015-11-25 23:17:08 -04:00
Henry Castro
964d95f04b loolwsd: handle a graceful shutdown 2015-11-25 22:49:34 -04:00
Henry Castro
0417b90eeb loolwsd: add signal handler 2015-11-25 22:37:08 -04:00
Henry Castro
e2e0e3a962 loolwsd: call poll, to check the status of the websocket 2015-11-25 22:23:08 -04:00
Mihai Varga
676c6d60d1 tdf#94607 downloadAs command that generates an URL for the doc
When requested, the document is exported under
/jail_path/CHILD_ID/user/thedocument/RANDOMDIR/filename
and CHILD_ID, RANDOMDIR and the filename are communicated to the client.

When the client requests
http://server:port/CHILD_ID/RANDOMDIR/filename, the exported document
is served and then RANDOMDIR is removed
2015-10-09 16:11:38 +03:00
Henry Castro
ee928f9af1 loolwsd: create lokit process id logs
Also, when used with --test option, create lokit PID log
so it is attached to the debugger.

gdb loolwsd $(cat /tmp/lokit.pid)
2015-08-05 20:20:05 -04:00
Henry Castro
1c0153d5e0 loolwsd: ensure one child when debugging
when used with --test option:
./loolwsd --test --systemplate=${SYSTEMPLATE} --lotemplate=${MASTER}/instdir
--childroot=${ROOTFORJAILS}

ensure that one child is created and attach to it easily to debug lokit
messages
2015-08-05 20:05:30 -04:00
Henry Castro
0ec12fe11e loolwsd: fix child fork when debugging one child 2015-08-05 18:19:51 -04:00
Henry Castro
ec094f1601 loolwsd: remove _pendingPreSpawnedChildren.
_pendingPreSpawnedChildren is no longer need it, because
fork() is used.
Also adjusted time sleep to 1 second.
2015-07-24 15:17:46 -04:00
Henry Castro
6dafcc753f loolwsd: process sleep for amount of time ...
specified by MAINTENANCE_INTERVAL
2015-07-24 14:10:24 -04:00
Henry Castro
de3d97d5a4 loolwsd: create PID log file.
The PID log file is used by external utilities
to report processes, threads, etc.
2015-07-19 16:49:11 -04:00
Henry Castro
66756a77a9 loolwsd: change named mutex to private static. 2015-07-18 12:35:16 -04:00
Henry Castro
63a33b39f6 loolwsd: moved server socket to main function. 2015-07-17 17:55:57 -04:00
Henry Castro
99ca81a944 loolwsd: move server socket to parent process 2015-07-17 14:04:40 -04:00
Henry Castro
bb3611399b loolwsd: Use fork but no execve 2015-07-13 10:13:06 -04:00
Tor Lillqvist
ea2141ffe7 Take the tile cache directory as an option, too 2015-06-04 17:09:19 +03:00
Tor Lillqvist
180f8fcba0 Pass the --uid option to the child too 2015-05-22 17:42:36 +01:00
Tor Lillqvist
9af39d189a Add some fairly hackish things to make this run better on OS X 2015-05-22 14:34:21 +01:00