libsemanage-2.8-7
- genhomedircon - improve handling large groups
This commit is contained in:
parent
e4348e485a
commit
89f6442710
@ -51,6 +51,34 @@ index c58961b..8e4d116 100644
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
diff --git libsemanage-2.8/src/genhomedircon.c libsemanage-2.8/src/genhomedircon.c
|
||||||
|
index 3e61b51..c35f878 100644
|
||||||
|
--- libsemanage-2.8/src/genhomedircon.c
|
||||||
|
+++ libsemanage-2.8/src/genhomedircon.c
|
||||||
|
@@ -1074,10 +1074,20 @@ static int get_group_users(genhomedircon_settings_t * s,
|
||||||
|
|
||||||
|
const char *grname = selogin + 1;
|
||||||
|
|
||||||
|
- if (getgrnam_r(grname, &grstorage, grbuf,
|
||||||
|
- (size_t) grbuflen, &group) != 0) {
|
||||||
|
- goto cleanup;
|
||||||
|
+ errno = 0;
|
||||||
|
+ while (
|
||||||
|
+ (retval = getgrnam_r(grname, &grstorage, grbuf, (size_t) grbuflen, &group)) != 0 &&
|
||||||
|
+ errno == ERANGE
|
||||||
|
+ ) {
|
||||||
|
+ char *new_grbuf;
|
||||||
|
+ grbuflen *= 2;
|
||||||
|
+ new_grbuf = realloc(grbuf, grbuflen);
|
||||||
|
+ if (new_grbuf == NULL)
|
||||||
|
+ goto cleanup;
|
||||||
|
+ grbuf = new_grbuf;
|
||||||
|
}
|
||||||
|
+ if (retval == -1)
|
||||||
|
+ goto cleanup;
|
||||||
|
|
||||||
|
if (group == NULL) {
|
||||||
|
ERR(s->h_semanage, "Can't find group named %s\n", grname);
|
||||||
diff --git libsemanage-2.8/src/semanage_store.c libsemanage-2.8/src/semanage_store.c
|
diff --git libsemanage-2.8/src/semanage_store.c libsemanage-2.8/src/semanage_store.c
|
||||||
index f1984c5..58dded6 100644
|
index f1984c5..58dded6 100644
|
||||||
--- libsemanage-2.8/src/semanage_store.c
|
--- libsemanage-2.8/src/semanage_store.c
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
Summary: SELinux binary policy manipulation library
|
Summary: SELinux binary policy manipulation library
|
||||||
Name: libsemanage
|
Name: libsemanage
|
||||||
Version: 2.8
|
Version: 2.8
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Source: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524/libsemanage-2.8.tar.gz
|
Source: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524/libsemanage-2.8.tar.gz
|
||||||
# download https://raw.githubusercontent.com/fedora-selinux/scripts/master/selinux/make-fedora-selinux-patch.sh
|
# download https://raw.githubusercontent.com/fedora-selinux/scripts/master/selinux/make-fedora-selinux-patch.sh
|
||||||
# run:
|
# run:
|
||||||
# $ VERSION=2.8 ./make-fedora-selinux-patch.sh libsemanage
|
# $ VERSION=2.8 ./make-fedora-selinux-patch.sh libsemanage
|
||||||
# HEAD https://github.com/fedora-selinux/selinux/commit/decd49caec76a87817686f84716503151cf2be5d
|
# HEAD https://github.com/fedora-selinux/selinux/commit/2fee0bccb66a6cafcf0d178b8c75c23ebd3f9924
|
||||||
Patch1: libsemanage-fedora.patch
|
Patch1: libsemanage-fedora.patch
|
||||||
URL: https://github.com/SELinuxProject/selinux/wiki
|
URL: https://github.com/SELinuxProject/selinux/wiki
|
||||||
Source1: semanage.conf
|
Source1: semanage.conf
|
||||||
@ -179,6 +179,9 @@ sed -i '1s%\(#! */usr/bin/python\)\([^3].*\|\)$%\13\2%' %{buildroot}%{_libexecdi
|
|||||||
%{_libexecdir}/selinux/semanage_migrate_store
|
%{_libexecdir}/selinux/semanage_migrate_store
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Dec 10 2018 Petr Lautrbach <plautrba@redhat.com> - 2.8-7
|
||||||
|
- genhomedircon - improve handling large groups
|
||||||
|
|
||||||
* Tue Nov 13 2018 Petr Lautrbach <plautrba@redhat.com> - 2.8-6
|
* Tue Nov 13 2018 Petr Lautrbach <plautrba@redhat.com> - 2.8-6
|
||||||
- Fix RESOURCE_LEAK and USE_AFTER_FREE coverity scan defects
|
- Fix RESOURCE_LEAK and USE_AFTER_FREE coverity scan defects
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user