Commit graph

63 commits

Author SHA1 Message Date
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
Ashod Nakashian
b25fe9d88a loolwsd: moved SocketProcessor to IoUtil and generalized more
Change-Id: I527e57d2430e21249cf8cd4867f22fdbbd092b09
Reviewed-on: https://gerrit.libreoffice.org/23637
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-30 01:45:20 +00:00
Ashod Nakashian
ce2fabb733 loolwsd: moved IO utilities into IoUtil file
Change-Id: I1e8d5562787134cbb490c38b19d83b7514ec9baa
Reviewed-on: https://gerrit.libreoffice.org/23586
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-29 14:09:04 +00:00
Jan Holesovsky
22914aacd1 loolwsd: Install the certificates during the build. 2016-03-29 13:29:07 +02:00
Michael Meeks
b499743932 Print what is done for capabilities. 2016-03-29 12:19:18 +01:00
Andras Timar
f94cdbd36c loolwsd: add FileServer.hpp to dist 2016-03-23 19:46:32 +01:00
Pranav Kant
cfac07e3a1 loolwsd: Split DocumentBroker to its header and impl file
Change-Id: I8219300e271892f9f8fdecd8b38d9ea445cb7199
2016-03-23 22:16:35 +05:30
Pranav Kant
844ff4c571 loolwsd: Use automake generated tag rules to create tags file
Automake already have rules, make tags and make ctags, for emacs
and vim style tags respectively. We can pass our custom flags to
them using the AM_ macros.

https://www.gnu.org/software/automake/manual/html_node/Tags.html

This commit also adds support to create emacs style tags using
automake's pre-generated tag rules.

Change-Id: I4f6ed997fab6964b3c1f6637e3fd0365f8d4c8b8
Reviewed-on: https://gerrit.libreoffice.org/23442
Reviewed-by: pranavk <pranavk@collabora.com>
Tested-by: pranavk <pranavk@collabora.com>
2016-03-22 18:53:36 +00:00
Andras Timar
638460381e package and deploy discovery.xml 2016-03-17 15:24:09 +01:00
Andras Timar
213e678193 loolwsd: add DocumentBroker.hpp to dist 2016-03-15 13:25:00 +01:00
Tor Lillqvist
80c6a91d5d Don't call setcap on loolkit before we have built it
On the other hand, loolwsd does not need capabilities any more.

Also update the comment to match reality, and explain in more detail
what is going on.
2016-03-07 13:10:45 +02:00
Pranav Kant
85c6467344 loolwsd: Move Admin class to separate header
As a test, add command to fetch documents from AdminModel.

Change-Id: I3cb7097ba7dde049f3b2478fe7b6b6c309da1d92
Reviewed-on: https://gerrit.libreoffice.org/22781
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-03-03 18:26:55 +00:00
Pranav Kant
c5aa122fcb loolwsd: Create notification pipe
... and Admin and AdminModel containing all the required data
that we need to expose to Admin panel.

Admin processor will keep listening to any data on this
notification pipe and update AdminModel accordingly.

Change-Id: I0dd6f07ae60158733c34d17f53a35def70600513
Reviewed-on: https://gerrit.libreoffice.org/22780
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-03 03:34:47 +00:00
Tor Lillqvist
78579b3e57 Don't pretend to support non-Linux here either 2016-03-01 18:30:07 +02:00
Tor Lillqvist
d5292541bd Revert "Also chown the random devices to root:root and chmod to 666"
Not needed after all. It was a red herring. The device files work fine
even if not owned by root:root and with mode 664. The actual problem
was that I used a file system mounted with nodev when testing loolwsd.

This reverts commit 509314d559
2016-03-01 18:24:55 +02:00
Tor Lillqvist
29a3f58f1a The loolwsd program does not need any capabilities
So don't give it any then.

Remove the --uid option and related attempts to handle running loolwsd
under sudo, to be able to debug it. Now with loolwsd not having
capabilities, it should work fine to just run it under a debugger
normally. (For the loolbroker and loolkit processes, attaching to an
already started process is the way to debug.)
2016-02-29 14:13:19 +02:00
Tor Lillqvist
509314d559 Also chown the random devices to root:root and chmod to 666
Otherwise they won't work. Not that I know whether this helps
anything, really. At least the NSS crypto initialization still takes a
long time.
2016-02-29 12:15:22 +02:00
Andras Timar
33f66d4686 loolwsd: add new headers to distribution tarball 2016-02-22 11:16:05 +01:00
Henry Castro
9e3d5c0337 loolwsd: ensure chroot jail every lokit process 2016-02-13 10:15:28 -04:00
Andras Timar
7cf9cdd4c8 loolwsd: add QueueHandler.hpp to dist tarball 2016-01-14 13:43:54 +01:00
Andras Timar
207925266c loolwsd: add Rectangle.hpp to dist tarball
(cherry picked from commit 69222ace7a67ca8adc9a21a988436aad92883b51)
2016-01-14 13:19:48 +01:00
Ashod Nakashian
5b3c9bff2e loolwsd: tabs -> spaces
Change-Id: I93619e2d5f93d104d34af9bda60f87e300e39963
Reviewed-on: https://gerrit.libreoffice.org/21164
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-06 14:31:02 +00:00
Ashod Nakashian
c3826587e1 loolwsd: moved QueueHandler into own file
Change-Id: I281a9bd12731340673cb66f1f2ac6a133cbe71d0
Reviewed-on: https://gerrit.libreoffice.org/21159
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-06 14:23:39 +00:00
Miklos Vajna
024d498c10 loolwsd: fix missing loolbroker dependency
Change-Id: Ia47eb8c055cbab68f42e847d4ab9cd86f1fa3691
2016-01-05 09:10:28 +01:00
Ashod Nakashian
f48d61d25d loolwsd: dropCapability moved to Capabilities.hpp
Change-Id: Id84d485b446040df1d5398341af2b0e8f300ed63
Reviewed-on: https://gerrit.libreoffice.org/21060
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-03 15:17:05 +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
1bd85bc641 loolwsd: merged loolmap
Change-Id: I43845ce5f45c01a67db32ab136ad96b70bc31217
Reviewed-on: https://gerrit.libreoffice.org/20908
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-23 17:11:44 +00:00
Henry Castro
2c1e44d218 loolwsd: LOOLBroker process added
Change-Id: Ia7332761766026599b8ef415652874371938d311
Reviewed-on: https://gerrit.libreoffice.org/20903
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-23 17:11:23 +00:00
Henry Castro
4af013e87e loolwsd: LOOLKit process added
Change-Id: I91e8a131b4959a78e43b29faede477d39150c97c
Reviewed-on: https://gerrit.libreoffice.org/20902
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-23 17:10:50 +00:00
Henry Castro
1f43e99ac7 loolwsd: Refactored ChildProcessSession
ChildProcessSession class now moved to own files.

Change-Id: Ic67c8563ada51f23c83e06631ad913af610d395c
Reviewed-on: https://gerrit.libreoffice.org/20895
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Henry Castro <hcastro@collabora.com>
2015-12-23 17:03:43 +00:00
Henry Castro
894ab66d8c loolwsd: Refactored MasterProcessSession
MasterProcessSession class now moved to own files.

Change-Id: Ic1a980295b9bb4b28ec9e205de1544fb98ad98f8
Reviewed-on: https://gerrit.libreoffice.org/20893
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Henry Castro <hcastro@collabora.com>
2015-12-23 17:02:57 +00:00
Jan Holesovsky
1fb94f0abb loolwsd: We want to build and link with -pthread. 2015-12-17 18:50:00 +01:00
Andras Timar
5fdef755db loolwsd: add Png.hpp to tarball 2015-11-30 10:06:40 +01:00
Jan Holesovsky
6a1477d8a9 loolwsd: Specialize the MessageQueue a bit.
Introduce a bit of hierarchy there, at some stage we'll want to re-order the
tile requests a bit so that it works better for collaborative editing; for the
moment, removing the duplicate entries is enough.
2015-11-09 11:54:09 +01:00
Miklos Vajna
443486117a loolwsd: cppunit skeleton 2015-10-21 12:06:02 +02:00
Miklos Vajna
dc56637e11 loolwsd: don't try to exclude jails from tags
Don't pretend that we know where jails will be, the may be elsewhere. If
indexing jails/systemplate is problem, configure them outside the build
tree instead.
2015-10-20 14:18:02 +02:00
Miklos Vajna
1feac82b21 loolwsd: implement a 'make tags' 2015-09-29 12:51:19 +02:00
Tor Lillqvist
e29c773879 Include loolwsd.service and sysconfig.loolwsd in the tarball
(Instead of having them as separate SOURCEn in the loolwsd.spec.)

Both are related to systemd. The latter probably is relevant only for
openSUSE. (And I actually couldn't get what I tried doing in it to work, see
739edf9dcf464f407dfe663fb2f497b866e73333.)
(cherry picked from commit f8b29d666d52a3f18b0125aaed309fa3e4d719fb)
2015-07-07 10:11:34 +03:00
Jan Holesovsky
767d6a0a32 Create /dev/*random in the chroot so that ssl works.
Also add the missing library to the systemplate.
2015-07-06 19:35:50 +02:00
Tor Lillqvist
f09991e6c8 Don't use TABs for variable assignment lines 2015-06-09 19:34:32 +03:00
Tor Lillqvist
692b971a55 Add tsqueue.h 2015-06-09 19:34:24 +03:00
Tor Lillqvist
775603a736 Don't use sudo to run setcap when building from rpmbuild
Not a good idea to run an interactive command during a non-interactive
make. We do the setcap in the %post step in the spec file anyway.
2015-05-29 10:05:37 +03:00
Tor Lillqvist
92d7256b5d Use dist_bin_SCRIPTS, not bin_SCRIPTS
Otherwise we won't get loolwsd-systemplate-setup in the tarball.
2015-05-19 13:58:53 +03:00
Tor Lillqvist
65ab397d34 We need CAP_FOWNER, too, on newer Linuxes to be able to hardlink the LO files
At least when not running as the owner of those files. Refactor the capability
dropping so that we can separately drop the CAP_FOWNER and CAP_SYS_CHROOT
capabilities. The child process never needs CAP_FOWNER and the parent process
never needs CAP_SYS_CHROOT.
2015-05-19 13:48:20 +03:00
Tor Lillqvist
0857397352 Rename the systemplate setup script to better name and install it
It was a bit misleading to have "chroot" in the name of the script as it isn't
a chroot jail as such that the script is setting up, but a *template* that
will be copied (hardlinked) into each chroot jail.

The script should be installed, so that a loolwsd package can include it. We
don't want to loolwsd use to depend on having the sources available,
obviously.
2015-05-19 13:20:16 +03:00
Tor Lillqvist
f4eccc714a Include also headers in the tarball 2015-05-15 13:39:10 +03:00
Tor Lillqvist
9bce431eea We have setcap only on Linux
Use setuid root otherwise. (But note that the portablity to other
Unixes is a work in progress, and for instance it is known that this
doesn't work on OS X yet.)
2015-05-04 21:00:02 +03:00
Miklos Vajna
4a7265ae76 Makefile: fix autoreconf warning
Makefile.am:18: warning: deprecated feature: target 'SETCAP' overrides 'SETCAP$(EXEEXT)'
Makefile.am:18: change your target to read 'SETCAP$(EXEEXT)'
/usr/share/automake-1.13/am/program.am: target 'SETCAP$(EXEEXT)' was defined here
Makefile.am:1:   while processing program 'SETCAP'
2015-04-24 17:27:21 +02:00