platform_external_selinux/libsemanage
Vit Mojzis c79d38ff0c libsemanage: allow spaces in user/group names
"semanage login -a" accepts whitespaces in user/group name
(e.g. users/groups from Active Directory), which may lead to issues down
the line since libsemanage doesn't expect whitespaces in
/var/lib/selinux/targeted/active/seusers and other config files.

Fixes:
  Artificial but simple reproducer
  # groupadd server_admins
  # sed -i "s/^server_admins/server admins/" /etc/group
  # semanage login -a -s staff_u %server\ admins
  # semanage login -l  (or "semodule -B")
  libsemanage.parse_assert_ch: expected character ':', but found 'a' (/var/lib/selinux/targeted/active/seusers: 6):
  %server admins:staff_u:s0-s0:c0.c1023 (No such file or directory).
  libsemanage.seuser_parse: could not parse seuser record (No such file or directory).
  libsemanage.dbase_file_cache: could not cache file database (No such file or directory).
  libsemanage.enter_ro: could not enter read-only section (No such file or directory).
  FileNotFoundError: [Errno 2] No such file or directory

Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
2022-03-03 12:10:03 -05:00
..
example Author: Daniel J Walsh 2008-09-15 09:25:33 -04:00
include libsemanage: optionally rebuild policy when modules are changed externally 2022-02-18 11:08:39 -05:00
man Use IANA-managed domain example.com in examples 2021-11-15 10:53:27 +01:00
src libsemanage: allow spaces in user/group names 2022-03-03 12:10:03 -05:00
tests libsemanage/tests: free memory 2021-11-11 22:40:30 +01:00
utils Always use /usr/bin/python3 in Python scripts 2019-02-20 16:43:27 +01:00
.gitignore Add subdirectory .gitignore files. 2009-10-20 21:25:55 -04:00
COPYING initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
Makefile libsemanage: semanage store migration script 2014-08-26 08:03:31 -04:00
VERSION Update VERSIONs to 3.3 for release. 2021-10-21 16:31:23 +02:00