useradd: free correct pointer (#1976809)
This commit is contained in:
parent
bace2f8c6b
commit
2b6f713524
@ -0,0 +1,24 @@
|
|||||||
|
diff -up shadow-4.8.1/src/useradd.c.useradd_create_relative_home_path_correctly shadow-4.8.1/src/useradd.c
|
||||||
|
--- shadow-4.8.1/src/useradd.c.useradd_create_relative_home_path_correctly 2021-06-28 16:10:23.928435372 +0200
|
||||||
|
+++ shadow-4.8.1/src/useradd.c 2021-06-28 16:11:30.784495046 +0200
|
||||||
|
@@ -2140,7 +2140,6 @@ static void create_home (void)
|
||||||
|
Prog, user_home);
|
||||||
|
fail_exit (E_HOMEDIR);
|
||||||
|
}
|
||||||
|
- ++bhome;
|
||||||
|
|
||||||
|
#ifdef WITH_SELINUX
|
||||||
|
if (set_selinux_file_context (prefix_user_home, NULL) != 0) {
|
||||||
|
@@ -2157,7 +2156,11 @@ static void create_home (void)
|
||||||
|
*/
|
||||||
|
cp = strtok (bhome, "/");
|
||||||
|
while (cp) {
|
||||||
|
- strcat (path, "/");
|
||||||
|
+ /* Avoid turning a relative path into an absolute path.
|
||||||
|
+ */
|
||||||
|
+ if (bhome[0] == '/' || strlen (path) != 0) {
|
||||||
|
+ strcat (path, "/");
|
||||||
|
+ }
|
||||||
|
strcat (path, cp);
|
||||||
|
if (access (path, F_OK) != 0) {
|
||||||
|
/* Check if parent directory is BTRFS, fail if requesting
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Utilities for managing accounts and shadow password files
|
Summary: Utilities for managing accounts and shadow password files
|
||||||
Name: shadow-utils
|
Name: shadow-utils
|
||||||
Version: 4.8.1
|
Version: 4.8.1
|
||||||
Release: 14%{?dist}
|
Release: 15%{?dist}
|
||||||
Epoch: 2
|
Epoch: 2
|
||||||
URL: https://github.com/shadow-maint/shadow
|
URL: https://github.com/shadow-maint/shadow
|
||||||
Source0: https://github.com/shadow-maint/shadow/releases/download/%{version}/shadow-%{version}.tar.xz
|
Source0: https://github.com/shadow-maint/shadow/releases/download/%{version}/shadow-%{version}.tar.xz
|
||||||
@ -114,6 +114,8 @@ Patch62: shadow-4.8.1-salt_c_sanitize_code.patch
|
|||||||
Patch63: shadow-4.8.1-salt_c_comments.patch
|
Patch63: shadow-4.8.1-salt_c_comments.patch
|
||||||
# https://github.com/shadow-maint/shadow/commit/bc8257cf73328e450511b13cbd35e1994feccb30
|
# https://github.com/shadow-maint/shadow/commit/bc8257cf73328e450511b13cbd35e1994feccb30
|
||||||
Patch64: shadow-4.8.1-salt_c_use_dev_urandom.patch
|
Patch64: shadow-4.8.1-salt_c_use_dev_urandom.patch
|
||||||
|
# https://github.com/shadow-maint/shadow/commit/2c542f6c65f858b3dba20f58db4da56572f67a54
|
||||||
|
Patch65: shadow-4.8.1-useradd_create_relative_home_path_correctly.patch
|
||||||
|
|
||||||
License: BSD and GPLv2+
|
License: BSD and GPLv2+
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
@ -203,6 +205,7 @@ Development files for shadow-utils-subid.
|
|||||||
%patch62 -p1 -b .sanitize_code
|
%patch62 -p1 -b .sanitize_code
|
||||||
%patch63 -p1 -b .comments
|
%patch63 -p1 -b .comments
|
||||||
%patch64 -p1 -b .use_dev_urandom
|
%patch64 -p1 -b .use_dev_urandom
|
||||||
|
%patch65 -p1 -b .useradd_create_relative_home_path_correctly
|
||||||
|
|
||||||
iconv -f ISO88591 -t utf-8 doc/HOWTO > doc/HOWTO.utf8
|
iconv -f ISO88591 -t utf-8 doc/HOWTO > doc/HOWTO.utf8
|
||||||
cp -f doc/HOWTO.utf8 doc/HOWTO
|
cp -f doc/HOWTO.utf8 doc/HOWTO
|
||||||
@ -372,6 +375,9 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libsubid.la
|
|||||||
%{_libdir}/libsubid.so
|
%{_libdir}/libsubid.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 29 2021 Iker Pedrosa <ipedrosa@redhat.com> - 2:4.8.1-15
|
||||||
|
- useradd: free correct pointer (#1976809)
|
||||||
|
|
||||||
* Mon Jun 28 2021 Björn Esser <besser82@fedoraproject.org> - 2:4.8.1-14
|
* Mon Jun 28 2021 Björn Esser <besser82@fedoraproject.org> - 2:4.8.1-14
|
||||||
- Add a patch to fix the used prefix for the bcrypt hash method
|
- Add a patch to fix the used prefix for the bcrypt hash method
|
||||||
- Add a patch to cleanup the code in libmisc/salt.c
|
- Add a patch to cleanup the code in libmisc/salt.c
|
||||||
|
Loading…
Reference in New Issue
Block a user