Bug 101903 - [RFE] Libreoffice Online - ignore Linux capabilities on BSD OSes
Summary: [RFE] Libreoffice Online - ignore Linux capabilities on BSD OSes
Status: NEW
Alias: None
Product: LibreOffice Online
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All BSD (Others)
: low enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-05 11:38 UTC by jirib
Modified: 2018-03-14 14:37 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jirib 2016-09-05 11:38:12 UTC
BSD OSes do not have compatibility for Linux capabilities - capabilities(7) thus loolwsd cannot be build there.

Using Linux caps in loolwsd is only (though important) security enhancement. Let BSD OSes have ability to at least build easy loolwsd.

(OpenBSD has pledge - http://man.openbsd.org/OpenBSD-current/man2/pledge.2 - which restricts system operations, not sure if it can fully replace dropCapabilities in loolwsd but let BSD OSes to take care about this themselves.)

Thus, the code should have conditions which won't force Linux caps if not running on Linux.
Comment 1 jirib 2016-09-05 12:04:14 UTC
IIUC loolwsd should be run as 'lool' user and thus Linux caps are used to grant this unprivileged process superuser permissions/capabilities. Am I right?

If so, then BSD OSes would need to either run loolwsd as root (stupid) or modity loolwsd code to mimic granted superuser permissions/capabilities provide via Linux caps (eg. sudo/doas). Am I right?
Comment 2 Andras Timar 2016-11-04 10:32:24 UTC
It is not interesting for me, to run loolwsd on BSD OSes. Of course patches are welcome.
Comment 3 Michael Meeks 2017-01-07 21:25:03 UTC
The reason we have capabilities is to be able to implement our container system; while the loolwsd process doesn't need privileges - it just handles socket data - then loolforkit process - has to be able to fork, and chroot to isolate its children. That requires various capabilities - which are of course dropped after their use.

It would be possible to make loolforkit a suid binary - and to ensure that that is dropped after forking. However - the forked process links and pre-initializes a big chunk of LibreOffice code - which is perhaps not ideal in a 'root' process either: up to you really.

Patches most welcome as always from BSD-ers =)