Tor Lillqvist
a219819ebf
Avoid defining constant strings in multiple places
...
It is not a good idea to have the same string somewhat arbitrarily
both as a static const members of the LOOLWSD class and then as a
file-local static const in another file. Or defined as a separate
local const static in each compilation unit that includes
Common.hpp. Use constexpr instead, in Common.hpp.
2016-03-28 14:17:30 +03:00
Tor Lillqvist
45fc60d428
No need to have PIDLOG as a static const class member
...
This is C++, not Java. Or is there a school of thought for C++ style
that says one should avoid plain "C-style" file-local static
variables, and instead put everything always in a class, even as
static members? Do we want to follow that?
2016-03-28 13:43:18 +03:00
Tor Lillqvist
af1973eea8
No need to have Config as a static member in the class
...
Its value is already available as a macro from config.h even.
2016-03-28 13:38:36 +03:00
Andras Timar
f9cc0237b3
loolwsd: put config file and cert/key files to /etc
2016-03-24 10:37:17 +01:00
Ashod Nakashian
b4e4ccb666
loolwsd: configuration support
...
Configuration XML is added with SSL as sample use-case.
A 'desc' attribute can be used to describe the fields,
and another 'type' to help define the corresponding data
type in the code.
Since Poco allows accessing group nodes (that have the
same name) by index, order can be preserved.
SSL initialization refactored and cert/key file
paths moved to the config file.
Change-Id: I259826a19697bd851587bebcc4f0cd233ab6848b
Reviewed-on: https://gerrit.libreoffice.org/23464
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-23 11:28:14 +00:00
Tor Lillqvist
0677c4abc9
No need for the DocumentBroker map to be in the LOOLWSD class
...
It can be a simple static variable in LOOLWSD.cpp. It is not used
anywhere else.
2016-03-22 18:47:05 +02:00
Pranav Kant
7b763f0aff
loolwsd: Allow specifying custom file server root
...
By default, use git directory root.
Change-Id: I4ee1173c43f313de3abb1732e6a7401169896189
2016-03-22 00:05:29 +05:30
Tor Lillqvist
09d3c5f230
Revert "loolwsd: Allow specifying custom file server root"
...
This reverts commit a5f8ba44a2
.
2016-03-21 16:52:46 +02:00
Pranav Kant
a5f8ba44a2
loolwsd: Allow specifying custom file server root
...
By default, use git directory root.
Change-Id: I4ee1173c43f313de3abb1732e6a7401169896189
2016-03-21 16:33:47 +02:00
Ashod Nakashian
bb16272e11
loolwsd: DocumentStoreManager -> DocumentBroker
...
Renamed DocumentStoreManager to DocumentBroker and
restructured the handshake process.
Currently, at first client connection to a given doc
a DocumentBroker is created to serve as the clearing house
of all client-side activities on the document.
Prime goals is loading and saving of the document, but
also to guarantee race-free management of the doc.
Each doc has a unique DocKey based on the URL (the path,
without queries). This DocKey is used as key into a map
of all DocumentBrokers. The latter is shared among
MasterProcessSession instances.
Change-Id: I569f2d235676e88ddc690147f3cb89faa60388c2
Reviewed-on: https://gerrit.libreoffice.org/23216
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-14 03:10:08 +00:00
Ashod Nakashian
1268507bf0
loolwsd: child WS URL format changed
...
The current format is more flexible and standard.
/loolwsd/child?sessionId=xxx&jailId=yyy
The sessionId is the client-specific connection ID (which
is originally passed to the child via the Broker.
The jailId is the PID of the child.
Change-Id: I69c88e84114f9678addf795896ca2da15ca1221b
Reviewed-on: https://gerrit.libreoffice.org/23211
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-14 03:05:38 +00:00
Ashod Nakashian
f1007266e1
loolwsd: DocumentStoreManager shared by MasterProcessSession instances
...
Change-Id: Id7ada60387cafdf742690dbf345bb1e703b2ca76
Reviewed-on: https://gerrit.libreoffice.org/23206
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-14 03:01:48 +00:00
Ashod Nakashian
73bde2b5d2
loolwsd: moved DocumentURI into own file and renamed to DocumentStoreManager
...
Change-Id: I5948ae532f0fd5917b99369733ec5ea36da2e437
Reviewed-on: https://gerrit.libreoffice.org/23204
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-14 03:00:35 +00:00
Ashod Nakashian
0ee9119bc7
loolwsd: refactored DocumentURI creation
...
Change-Id: Icc1043fdc717f057c97d2b00a5cfc399ee15aa79
Reviewed-on: https://gerrit.libreoffice.org/23203
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-14 02:59:49 +00:00
Ashod Nakashian
e8214c1d2a
loolwsd: refactored Storage classes
...
Change-Id: I3cc3aa2c1ddf70b8d2f3489aa4047f6470c93eb2
Reviewed-on: https://gerrit.libreoffice.org/23108
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-10 04:23:16 +00:00
Ashod Nakashian
e5fcdb890e
loolwsd: corrections to file and wopi URI handling
...
Change-Id: I7389a30931be01a40714167039055a758187bd82
Reviewed-on: https://gerrit.libreoffice.org/23053
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-09 02:34:10 +00:00
Ashod Nakashian
6c69519562
Storage is used to manage files locally
...
Change-Id: Id50eca8fe1136777ca99c60d78c15e1a47397993
Reviewed-on: https://gerrit.libreoffice.org/23049
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-09 02:31:47 +00:00
Tor Lillqvist
e7e1ef58ae
Cosmetics: Sort and prune #include and 'using' lines
2016-03-08 09:44:04 +02:00
Ashod Nakashian
743311af21
loolwsd: added wopi storage manager
...
Change-Id: Ia28fb3d42c43387432e0b183a1bcf6b0924da820
Reviewed-on: https://gerrit.libreoffice.org/22885
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-04 03:06:28 +00:00
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