Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 460892 - SELinux prohibits www-client/chromium from copying nacl-toolchain-newlib
Summary: SELinux prohibits www-client/chromium from copying nacl-toolchain-newlib
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-09 10:48 UTC by Sven Vermeulen (RETIRED)
Modified: 2013-03-13 23:28 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
chromium ebuild fix to use "cp -dRp" (chromium-fix-copy-command.patch,5.19 KB, patch)
2013-03-09 10:50 UTC, Sven Vermeulen (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Vermeulen (RETIRED) gentoo-dev 2013-03-09 10:48:38 UTC
In the www-client/chromium ebuilds, the src_prepare() phase tries to copy nacl-toolchain-newlib from /usr/lib into the build location (${S}). This copying uses the "-a" argument for cp.

However, this implies that the SELinux contexts of the source (nacl-toolchain-newlib) are copied as well. Sadly, this is not allowed by SELinux policy since the build location has to remain portage_tmp_t as context (the portage_sandbox_t domain, which is used while building software, should not get any rights on other contexts).

Changing the command from "cp -a" to "cp -dRp" works as it uses the portage_tmp_t context for newly created files and directories while retaining mode and ownership.

Reproducible: Always
Comment 1 Sven Vermeulen (RETIRED) gentoo-dev 2013-03-09 10:50:35 UTC
Created attachment 341392 [details, diff]
chromium ebuild fix to use "cp -dRp"

Suggested fix on the ebuilds to use "cp -dRp" instead of "cp -a"
Comment 2 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2013-03-11 23:29:49 UTC
Instead of effectively expanding "-a" which doesn't seem very future-proof, could you confirm whether using cp -a --no-preserve=context works?
Comment 3 Sven Vermeulen (RETIRED) gentoo-dev 2013-03-12 06:55:32 UTC
Yes that works as well!
Comment 4 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2013-03-13 23:28:22 UTC
Thanks for reporting, fixed in CVS.

  13 Mar 2013; Pawel Hajdan jr
  chromium-26.0.1410.28.ebuild, chromium-27.0.1438.7.ebuild,
  chromium-9999-r1.ebuild:
  Fix build with SELinux, bug #460892 by swift.