Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 499036 - sys-apps/shadow-4.1.5.1-r1 - groupadd/groupdel don't work, -9999 policies
Summary: sys-apps/shadow-4.1.5.1-r1 - groupadd/groupdel don't work, -9999 policies
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: SELinux (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sven Vermeulen (RETIRED)
URL:
Whiteboard: sec-policy r1
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-23 13:01 UTC by Amadeusz Sławiński
Modified: 2014-04-19 19:09 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Amadeusz Sławiński 2014-01-23 13:01:12 UTC
Portage:

Enforcing:

 * Adding group 'aspnet' to your system ...
 *  - Groupid: next available
groupadd: avc.c:74: avc_context_to_sid_raw: Assertion `avc_running' failed.
/var/tmp/portage/dev-dotnet/xsp-2.10.2-r2/temp/environment: line 761:  7757 Aborted                 groupadd -r ${opts} "${egroup}"
 * ERROR: dev-dotnet/xsp-2.10.2-r2::gentoo failed (preinst phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called pkg_preinst
 *   environment, line 2342:  Called enewgroup 'aspnet'
 *   environment, line  782:  Called die
 * The specific snippet of code:
 *               groupadd -r ${opts} "${egroup}" || die
 * 
 * If you need support, post the output of `emerge --info '=dev-dotnet/xsp-2.10.2-r2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-dotnet/xsp-2.10.2-r2::gentoo'`.
 * The complete build log is located at '/var/log/portage/dev-dotnet:xsp-2.10.2-r2:20140123-115909.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-dotnet/xsp-2.10.2-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-dotnet/xsp-2.10.2-r2/temp/environment'.
 * Working directory: '/usr/lib64/portage/pym'
 * S: '/var/tmp/portage/dev-dotnet/xsp-2.10.2-r2/work/xsp-2.10.2'
!!! FAILED preinst: 1


[ 8012.766733] type=1400 audit(1390478456.008:648): avc:  denied  { create } for  pid=7757 comm="groupadd" scontext=staff_u:sysadm_r:groupadd_t tcontext=staff_u:sysadm_r:groupadd_t tclass=netlink_selinux_socket

Permissive:
 * Adding group 'aspnet' to your system ...
 *  - Groupid: next available
 * Adding user 'aspnet' to your system ...
 *  - Userid: 114
 *  - Shell: /sbin/nologin
 *  - Home: /tmp
 *  - Groups: aspnet
 *  - GECOS: added by portage for xsp

Jan 23 13:55:57 maelstrom kernel: [11315.337644] type=1400 audit(1390481757.835:984): avc:  denied  { create } for  pid=13841 comm="groupadd" scontext=staff_u:sysadm_r:groupadd_t tcontext=staff_u:sysadm_r:groupadd_t tclass=netlink_selinux_socket
Jan 23 13:55:57 maelstrom kernel: [11315.337698] type=1400 audit(1390481757.835:985): avc:  denied  { bind } for  pid=13841 comm="groupadd" scontext=staff_u:sysadm_r:groupadd_t tcontext=staff_u:sysadm_r:groupadd_t tclass=netlink_selinux_socket
Jan 23 13:55:58 maelstrom kernel: [11316.044997] type=1400 audit(1390481758.543:986): avc:  denied  { create } for  pid=13918 comm="useradd" scontext=staff_u:sysadm_r:useradd_t tcontext=staff_u:sysadm_r:useradd_t tclass=netlink_selinux_socket
Jan 23 13:55:58 maelstrom kernel: [11316.046077] type=1400 audit(1390481758.544:987): avc:  denied  { bind } for  pid=13918 comm="useradd" scontext=staff_u:sysadm_r:useradd_t tcontext=staff_u:sysadm_r:useradd_t tclass=netlink_selinux_socket

Manually:
Enforcing:
# groupadd test  
groupadd: avc.c:74: avc_context_to_sid_raw: Assertion `avc_running' failed.
zsh: abort      groupadd test

Jan 23 13:57:17 maelstrom kernel: [11395.396588] type=1400 audit(1390481837.876:989): avc:  denied  { create } for  pid=14296 comm="groupadd" scontext=staff_u:sysadm_r:groupadd_t tcontext=staff_u:sysadm_r:groupadd_t tclass=netlink_selinux_socket

Permissive:
Jan 23 13:59:30 maelstrom kernel: [11528.169008] type=1400 audit(1390481970.619:991): avc:  denied  { create } for  pid=14694 comm="groupadd" scontext=staff_u:sysadm_r:groupadd_t tcontext=staff_u:sysadm_r:groupadd_t tclass=netlink_selinux_socket
Jan 23 13:59:30 maelstrom kernel: [11528.170517] type=1400 audit(1390481970.620:992): avc:  denied  { bind } for  pid=14694 comm="groupadd" scontext=staff_u:sysadm_r:groupadd_t tcontext=staff_u:sysadm_r:groupadd_t tclass=netlink_selinux_socket


Enforcing:
# groupdel test
groupdel: avc.c:74: avc_context_to_sid_raw: Assertion `avc_running' failed.
zsh: abort      groupdel test
Jan 23 13:59:45 maelstrom kernel: [11542.711620] type=1400 audit(1390481985.158:994): avc:  denied  { create } for  pid=14733 comm="groupdel" scontext=staff_u:sysadm_r:groupadd_t tcontext=staff_u:sysadm_r:groupadd_t tclass=netlink_selinux_socket

Permissive:
Jan 23 14:00:34 maelstrom kernel: [11592.001435] type=1400 audit(1390482034.437:996): avc:  denied  { create } for  pid=14880 comm="groupdel" scontext=staff_u:sysadm_r:groupadd_t tcontext=staff_u:sysadm_r:groupadd_t tclass=netlink_selinux_socket
Jan 23 14:00:34 maelstrom kernel: [11592.001497] type=1400 audit(1390482034.437:997): avc:  denied  { bind } for  pid=14880 comm="groupdel" scontext=staff_u:sysadm_r:groupadd_t tcontext=staff_u:sysadm_r:groupadd_t tclass=netlink_selinux_socket


Reproducible: Always
Comment 1 Sven Vermeulen (RETIRED) gentoo-dev 2014-02-02 12:19:57 UTC
Added it in our repo (9999 builds), will be part of rev 5
Comment 2 Mira Ressel 2014-02-14 20:16:35 UTC
I'm unable to reproduce this. Amadeusz, which version of sys-libs/libselinux are you using?
Comment 3 Sven Vermeulen (RETIRED) gentoo-dev 2014-03-24 19:36:13 UTC
It's in 20140311-r1
Comment 4 Sven Vermeulen (RETIRED) gentoo-dev 2014-04-19 19:09:13 UTC
Stable