https://bugs.documentfoundation.org/show_bug.cgi?id=167631
Bug ID: 167631
Summary: Pipe location is hardcoded, cannot be overridden with
TMPDIR
Product: LibreOffice
Version: 7.6.4.1 release
Hardware: All
OS: Linux (All)
Status: UNCONFIRMED
Severity: enhancement
Priority: medium
Component: LibreOffice
Assignee: [email protected]
Reporter: [email protected]
Description:
Background: I am trying to run libreoffice headless in a server environment
with limited permissions. This server environment is trying to ensure isolation
between processes by granting write access to each process in a different
folder (and only in that folder).
The idea is to use soffice to convert between different file formats, for
example convert between ods and xlsx.
Starting with something even simpler such as: soffice --headless
--terminate_after_init
That command is failing (exit code 1), and I have run it with strace to narrow
things down. Here are the last few lines which are relevant:
37 access("/tmp", W_OK) = -1 EACCES (Permission denied)
37 access("/var/tmp", W_OK) = -1 EACCES (Permission denied)
37 write(2, "ERROR: no valid pipe path found.\n", 33) = 33
37 exit_group(1) = ?
37 +++ exited with 1 +++
Which looks like we are hitting this condition:
https://github.com/LibreOffice/core/blob/master/desktop/unx/source/start.c#L302
Instead of having these 2 hardcoded paths ("/tmp" and "/var/tmp") where we
create pipes, what do you think about making it configurable via an environment
variable (TMPDIR)?
Steps to Reproduce:
1. With a user that doesn't have access to /tmp or /var/tmp
2. run soffice --headless --terminate_after_init
Actual Results:
Process fails (exit code 1)
Expected Results:
Process succeeds (exit code 0)
Reproducible: Always
User Profile Reset: No
Additional Info:
Based on this documentation
(https://wiki.documentfoundation.org/Development/Environment_variables),
libreoffice should already support TMPDIR environment variable (and TMP + TEMP
variants).
But these are not used everywhere, as /tmp and /var/tmp are still hardcoded for
pipe. I think ideally all writes should happen in a configurable folder.
--
You are receiving this mail because:
You are the assignee for the bug.