Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 389066 Details for
Bug 525726
Feature request: A more verbose warning when emerging from the wrong role
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Describe to the user that the SELinux execution context change failed
portage-fix-selinux-context-message.patch (text/plain), 931 bytes, created by
Sven Vermeulen (RETIRED)
on 2014-11-11 10:33:15 UTC
(
hide
)
Description:
Describe to the user that the SELinux execution context change failed
Filename:
MIME Type:
Creator:
Sven Vermeulen (RETIRED)
Created:
2014-11-11 10:33:15 UTC
Size:
931 bytes
patch
obsolete
>diff --git a/pym/portage/_selinux.py b/pym/portage/_selinux.py >index 2a7194c..1541da3 100644 >--- a/pym/portage/_selinux.py >+++ b/pym/portage/_selinux.py >@@ -77,7 +77,20 @@ def settype(newtype): > > def setexec(ctx="\n"): > ctx = _native_string(ctx, encoding=_encodings['content'], errors='strict') >- if selinux.setexeccon(ctx) < 0: >+ rc = 0 >+ try: >+ rc = selinux.setexeccon(ctx) >+ except: >+ if selinux.security_getenforce() == 1: >+ raise OSError(_("Failed to set new SELinux execution context. " + \ >+ "Is your current SELinux context allowed to run Portage?\n")) >+ else: >+ portage.writemsg("!!! " + \ >+ _("Failed to set new SELinux execution context. " + \ >+ "Is your current SELinux context allowed to run Portage?\n"), \ >+ noiselevel=-1) >+ >+ if rc < 0: > if sys.hexversion < 0x3000000: > ctx = _unicode_decode(ctx, encoding=_encodings['content'], errors='replace') > if selinux.security_getenforce() == 1:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 525726
: 389066