selinux/libsemanage
Petr Lautrbach ffc59f6015 libsemanage: genhomedircon - improve handling large groups
getgrnam_r() uses a preallocated buffer to store a structure containing
the broken-out fields of the record in the group database. The size of
this buffer is usually sysconf(_SC_GETGR_R_SIZE_MAX) == 1024 and it is
not enough for groups with a large number of users.  In these cases,
getgrnam_r() returns -1 and sets errno to ERANGE and the caller can
retry with a larger buffer.

Fixes:
$ semanage login -a -s user_u -r s0-s0:c1.c2 '%largegroup'
libsemanage.semanage_direct_commit: semanage_genhomedircon returned error code -1. (Numerical result out of range).
OSError: Numerical result out of range

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
2019-02-13 13:49:05 +01:00
..
example
include libsemanage: build: follow standard semantics for DESTDIR and PREFIX 2018-02-14 15:59:37 +01:00
man Allow installing translated man pages 2019-01-28 12:03:57 +01:00
src libsemanage: genhomedircon - improve handling large groups 2019-02-13 13:49:05 +01:00
tests libsemanage: build: follow standard semantics for DESTDIR and PREFIX 2018-02-14 15:59:37 +01:00
utils semanage_migrate_store: switch to space indentation 2019-01-04 12:19:39 +01:00
.gitignore
COPYING
Makefile
VERSION Update VERSIONs to 2.9-rc1 for release. 2019-01-25 11:48:54 +01:00