Bug 116086 - extension xlsm not in apparmor libreoffice profile
Summary: extension xlsm not in apparmor libreoffice profile
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.4.5.1 release
Hardware: All All
: medium normal
Assignee: Olivier Tilloy
URL:
Whiteboard: target:6.1.0
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-28 12:58 UTC by magowiz
Modified: 2018-04-03 11:10 UTC (History)
2 users (show)

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 magowiz 2018-02-28 12:58:50 UTC
Description:
Since the upgrade of libreoffice to 5.4.5-0ubuntu0.17.10.1 new apparmor profile was enabled, there are two bugs :

one is that it was not possible to open files outside home directory tree ( see https://bugs.launchpad.net/bugs/1751005 )

the other is that due to apparmor profile it was not possible to open xlsm (xls with macros) files while apparmor libreoffice profile is enabled.

Steps to Reproduce:
1. ensure that apparmor is enabled for libreoffice
2. open in ubuntu a xlsm file in home directory tree
2. see the splash screeen
3. see the splash screen vanishing and document not loading

Actual Results:  
xlsm file not opened if apparmor libreoffice profile is enabled

Expected Results:
xlsm file should open


Reproducible: Always


User Profile Reset: Yes



Additional Info:
xlsm file should open as well as odt files in same directory with apparmor libreoffice profile enabled


User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0
Comment 1 Olivier Tilloy 2018-02-28 15:04:36 UTC
Patch up for review: https://gerrit.libreoffice.org/#/c/50514/
Comment 2 Christian Boltz 2018-02-28 19:22:23 UTC
Your patch description says

> This allows opening files with the xlsm and xltm extensions

Your patch adds m and M so that you end up with
@{libreoffice_ext} += [xX][lL][sSwWtT]{,x,X,m,M}

This also allows *.xlwm files which is not mentioned in your patch description. Is this intentional?

Please either fix the patch description or the patch ;-)


BTW, even if it's unrelated:

type=AVC msg=audit(1519679434.725:5003): apparmor="DENIED" operation="open" profile="libreoffice-soffice" name="/etc/ssl/openssl.cnf" pid=12585 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

so please add abstractions/openssl to the profile to make it more compatible to openSUSE ;-)
Comment 3 Olivier Tilloy 2018-02-28 20:33:22 UTC
The current profile (without my patch also allows the *.xlwx extension, which I don't think exists (not according to https://en.wikipedia.org/wiki/List_of_Microsoft_Office_filename_extensions anyway).

So maybe we simply need to explode that into several regexes instead of trying to condense to the point that it's hard to read and incorrect?
Comment 4 Olivier Tilloy 2018-03-01 11:16:01 UTC
Updated patch.
Comment 5 Christian Boltz 2018-03-01 13:07:18 UTC
Looks good :-)

Do you want/need a separate bugreport for the "BTW" in comment #2?
Comment 6 Olivier Tilloy 2018-03-01 15:52:45 UTC
(In reply to Christian Boltz from comment #5)
> Do you want/need a separate bugreport for the "BTW" in comment #2?

Yes please, a separate bug report would be welcome.
Comment 7 Christian Boltz 2018-03-01 17:25:31 UTC
Done, bug 116125.
Comment 8 Commit Notification 2018-03-01 21:35:53 UTC
Olivier Tilloy committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=75a289c81880d11982b64f5fecfc5021c8716260

tdf#116086 Apparmor profiles fixes for xslm file extension

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Xisco Faulí 2018-04-03 11:01:16 UTC
A polite ping to Olivier Tilloy: is this bug fixed? if so, could you
please close it as RESOLVED FIXED ? Thanks
Comment 10 Olivier Tilloy 2018-04-03 11:10:48 UTC
This is fixed indeed.