Description of problem: The command: # { useradd stafftest; semanage user -l | grep staff_u; semanage login -a -s staff_u stafftest; semanage login -l | grep stafftest; userdel -Z stafftest; } 2>/dev/null On Fedora adds stafftest with range SystemLow, instead of expected SystemLow-SystemHigh staff_u user SystemLow SystemLow-SystemHigh auditadm_r secadm_r staff_r sysadm_r system_r lspp_test_r stafftest staff_u SystemLow * On RHEL7 this works nicely: staff_u user SystemLow SystemLow-SystemHigh auditadm_r staff_r lspp_test_r secadm_r sysadm_r system_r stafftest staff_u SystemLow-SystemHigh * Version-Release number of selected component (if applicable): policycoreutils-2.4-18.fc23 How reproducible: 100% Steps to Reproduce: 1. Install Fedora in MLS 2. { useradd stafftest; semanage user -l | grep staff_u; semanage login -a -s staff_u stafftest; semanage login -l | grep stafftest; userdel -Z stafftest; } 2>/dev/null Actual results: stafftest staff_u SystemLow * Expected results: stafftest staff_u SystemLow-SystemHigh *
You need to use "-r RANGE" if you don't want to use a default value which is "s0", see man semanage-login: -r RANGE, --range RANGE MLS/MCS Security Range (MLS/MCS Systems only) SELinux Range for SELinux login mapping defaults to the SELinux user record range. SELinux Range for SELinux user defaults to s0. # semanage login -a -s staff_u -r s0-s0:c0.c1023 stafftest # semanage login -l | grep stafftest stafftest staff_u s0-s0:c0.c1023 *
It looks like semanage is inconsistent with useradd tool now. While semanage login uses s0 as default, useradd uses seuser's mls range. semanage was change to use seuser's mls default in rhel-6 and rhel-7 but it seems to me that it has never been changed in Fedora/upstream.
This message is a reminder that Fedora 23 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 23. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '23'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 23 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
The "incosistency" between 'semanage login -a' and 'useradd -Z' still seems to be present on F25 at least. First, the "MLS/MCS Level" of 'semanage user' is completely ignored when adding new 'semanage login' entries via semanage/useradd. Not sure what is the intended use case as the documentation in semanage-user(8) is rather brief. Second, 'semanage login' seems to always add new entries with s0 and 'useradd -Z' always with the range copied from 'semanage user'.
This message is a reminder that Fedora 25 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '25'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 25 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
This message is a reminder that Fedora 28 is nearing its end of life. On 2019-May-28 Fedora will stop maintaining and issuing updates for Fedora 28. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '28'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 28 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.