platform_external_selinux/libsemanage/src
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
..
.gitignore libselinux,libsemanage: check in python_exception.i files 2019-11-13 08:34:46 +01:00
boolean_internal.h libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
boolean_record.c libsemanage: add missing include to boolean_record.c 2022-02-18 11:08:27 -05:00
booleans_active.c initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
booleans_activedb.c initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
booleans_file.c libsemanage: allow spaces in user/group names 2022-03-03 12:10:03 -05:00
booleans_local.c initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
booleans_policy.c initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
booleans_policydb.c Fix many misspellings 2019-09-18 22:47:35 +02:00
compressed_file.c libsemanage: move compressed file handling into a separate object 2022-02-18 11:08:34 -05:00
compressed_file.h libsemanage: move compressed file handling into a separate object 2022-02-18 11:08:34 -05:00
conf-parse.y libsemanage: fix use-after-free in parse_module_store() 2021-06-18 16:48:57 +02:00
conf-scan.l libsemanage: optionally optimize policy on rebuild 2019-06-25 10:11:00 -04:00
context_record.c libsemanage: include paired header for prototypes 2021-11-15 16:00:54 -05:00
database.c libsemanage: drop the -no-unused-parameter build flag 2011-08-01 13:40:20 -04:00
database.h Fix many misspellings 2019-09-18 22:47:35 +02:00
database_activedb.c initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
database_activedb.h initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
database_file.c libsemanage: Use umask(0077) for fopen() write operations 2017-12-01 08:56:10 -05:00
database_file.h libsemanage: split final files into /var/lib/selinux/tmp 2014-08-26 08:02:16 -04:00
database_join.c libsemanage: do not sort empty records 2021-11-11 22:40:26 +01:00
database_join.h initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
database_llist.c libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
database_llist.h initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
database_policydb.c libsemanage: no longer use variables with unused attribute 2016-02-11 08:34:51 -05:00
database_policydb.h libsemanage: split final files into /var/lib/selinux/tmp 2014-08-26 08:02:16 -04:00
debug.c libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
debug.h libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
direct_api.c libsemanage: optionally rebuild policy when modules are changed externally 2022-02-18 11:08:39 -05:00
direct_api.h libsemanage: move compressed file handling into a separate object 2022-02-18 11:08:34 -05:00
exception.sh libselinux,libsemanage: remove double blank lines 2020-04-22 16:40:34 -05:00
fcontext_internal.h libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
fcontext_record.c libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
fcontexts_file.c libsemanage: allow spaces in user/group names 2022-03-03 12:10:03 -05:00
fcontexts_local.c libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
fcontexts_policy.c libsemanage: Add support for listing fcontext.homedirs file 2017-10-04 14:18:58 -04:00
genhomedircon.c libsemanage: silence -Wextra-semi-stmt warning 2021-07-06 11:08:11 -04:00
genhomedircon.h libsemanage: add ignoredirs config for genhomedircon 2011-12-21 12:25:28 -05:00
handle.c libsemanage: optionally rebuild policy when modules are changed externally 2022-02-18 11:08:39 -05:00
handle.h libsemanage: optionally rebuild policy when modules are changed externally 2022-02-18 11:08:39 -05:00
ibendport_internal.h libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
ibendport_record.c libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
ibendports_file.c libsemanage: allow spaces in user/group names 2022-03-03 12:10:03 -05:00
ibendports_local.c libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
ibendports_policy.c semanage: Update semanage to allow runtime labeling of ibendports 2017-05-23 16:20:55 -04:00
ibendports_policydb.c semanage: Update semanage to allow runtime labeling of ibendports 2017-05-23 16:20:55 -04:00
ibpkey_internal.h libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
ibpkey_record.c libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
ibpkeys_file.c libsemanage: allow spaces in user/group names 2022-03-03 12:10:03 -05:00
ibpkeys_local.c libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
ibpkeys_policy.c semanage: Update semanage to allow runtime labeling of Infiniband Pkeys 2017-05-23 16:20:55 -04:00
ibpkeys_policydb.c semanage: Update semanage to allow runtime labeling of Infiniband Pkeys 2017-05-23 16:20:55 -04:00
iface_internal.h libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
iface_record.c libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
interfaces_file.c libsemanage: allow spaces in user/group names 2022-03-03 12:10:03 -05:00
interfaces_local.c initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
interfaces_policy.c initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
interfaces_policydb.c libsemanage: Add policy binary and file_contexts.local to the store 2015-07-06 11:05:22 -04:00
libsemanage.map libsemanage: optionally rebuild policy when modules are changed externally 2022-02-18 11:08:39 -05:00
libsemanage.pc.in libsemanage: build: follow standard semantics for DESTDIR and PREFIX 2018-02-14 15:59:37 +01:00
Makefile libsemanage: Bump libsemanage.so version 2020-10-19 22:11:42 +02:00
modules.c libsemanage: optionally rebuild policy when modules are changed externally 2022-02-18 11:08:39 -05:00
modules.h libsemanage: optionally rebuild policy when modules are changed externally 2022-02-18 11:08:39 -05:00
node_internal.h libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
node_record.c libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
nodes_file.c libsemanage: allow spaces in user/group names 2022-03-03 12:10:03 -05:00
nodes_local.c libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
nodes_policy.c initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
nodes_policydb.c libsemanage: Add policy binary and file_contexts.local to the store 2015-07-06 11:05:22 -04:00
parse_utils.c libsemanage: allow spaces in user/group names 2022-03-03 12:10:03 -05:00
parse_utils.h libsemanage: allow spaces in user/group names 2022-03-03 12:10:03 -05:00
policy.h Fix many misspellings 2019-09-18 22:47:35 +02:00
policy_components.c semanage: Update semanage to allow runtime labeling of ibendports 2017-05-23 16:20:55 -04:00
port_internal.h libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
port_record.c libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
ports_file.c libsemanage: allow spaces in user/group names 2022-03-03 12:10:03 -05:00
ports_local.c libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
ports_policy.c initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
ports_policydb.c libsemanage: Add policy binary and file_contexts.local to the store 2015-07-06 11:05:22 -04:00
pywrap-test.py Switch last 2 files using /usr/bin/env to /usr/bin/python3 2019-09-26 08:32:18 -04:00
semanage.conf Use IANA-managed domain example.com in examples 2021-11-15 10:53:27 +01:00
semanage_conf.h libsemanage: optionally optimize policy on rebuild 2019-06-25 10:11:00 -04:00
semanage_store.c libsemanage: optionally rebuild policy when modules are changed externally 2022-02-18 11:08:39 -05:00
semanage_store.h libsemanage: optionally rebuild policy when modules are changed externally 2022-02-18 11:08:39 -05:00
semanageswig.i semanage: Update semanage to allow runtime labeling of ibendports 2017-05-23 16:20:55 -04:00
semanageswig_python.i libsemanage: Remove legacy and duplicate symbols 2020-10-19 22:11:40 +02:00
semanageswig_python_exception.i semodule,libsemanage: move module hashing into libsemanage 2022-02-18 11:08:30 -05:00
semanageswig_ruby.i libsemanage: Add Ruby Bindings 2009-05-28 10:53:11 -04:00
seuser_internal.h libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
seuser_record.c libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
seusers_file.c libsemanage: allow spaces in user/group names 2022-03-03 12:10:03 -05:00
seusers_local.c libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
seusers_policy.c libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
sha256.c semodule,libsemanage: move module hashing into libsemanage 2022-02-18 11:08:30 -05:00
sha256.h semodule,libsemanage: move module hashing into libsemanage 2022-02-18 11:08:30 -05:00
user_base_record.c libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
user_extra_record.c libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
user_internal.h libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
user_record.c libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
users_base_file.c libsemanage: allow spaces in user/group names 2022-03-03 12:10:03 -05:00
users_base_policydb.c libsemanage: Add policy binary and file_contexts.local to the store 2015-07-06 11:05:22 -04:00
users_extra_file.c libsemanage: allow spaces in user/group names 2022-03-03 12:10:03 -05:00
users_join.c initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
users_local.c Trivial style fixes 2019-05-28 07:51:43 -04:00
users_policy.c libsemanage: drop hidden 2020-03-25 09:53:39 -05:00
utilities.c libsemanage: mark local functions static 2021-11-15 16:00:54 -05:00
utilities.h Fix many misspellings 2019-09-18 22:47:35 +02:00