- Disable nscd. Resolves: RHEL-56355
- useradd: fix write_full() return value Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
This commit is contained in:
parent
b397976c6c
commit
aa026f4313
34
shadow-4.15.0-useradd-fix-write-full-return.patch
Normal file
34
shadow-4.15.0-useradd-fix-write-full-return.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
From 8903b94c86c978e8abef623358fd3e4629c06967 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Iker Pedrosa <ipedrosa@redhat.com>
|
||||||
|
Date: Mon, 9 Sep 2024 10:36:17 +0200
|
||||||
|
Subject: [PATCH] useradd: fix write_full() return value
|
||||||
|
|
||||||
|
write_full() returns -1 on error and useradd was checking another value.
|
||||||
|
|
||||||
|
Closes: https://github.com/shadow-maint/shadow/issues/1072
|
||||||
|
Fixes: f45498a6c286 ("libmisc/write_full.c: Improve write_full()")
|
||||||
|
|
||||||
|
Reported-by: <https://github.com/brown-midas>
|
||||||
|
Suggested-by: <https://github.com/brown-midas>
|
||||||
|
Reviewed-by: Alejandro Colomar <alx@kernel.org>
|
||||||
|
Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com>
|
||||||
|
---
|
||||||
|
src/useradd.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/useradd.c b/src/useradd.c
|
||||||
|
index 02c500d0..d64fd892 100644
|
||||||
|
--- a/src/useradd.c
|
||||||
|
+++ b/src/useradd.c
|
||||||
|
@@ -2042,7 +2042,7 @@ static void lastlog_reset (uid_t uid)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ( (lseek (fd, offset_uid, SEEK_SET) != offset_uid)
|
||||||
|
- || (write_full (fd, &ll, sizeof (ll)) != (ssize_t) sizeof (ll))
|
||||||
|
+ || (write_full (fd, &ll, sizeof (ll)) == -1)
|
||||||
|
|| (fsync (fd) != 0)) {
|
||||||
|
fprintf (stderr,
|
||||||
|
_("%s: failed to reset the lastlog entry of UID %lu: %s\n"),
|
||||||
|
--
|
||||||
|
2.46.0
|
||||||
|
|
@ -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.15.0
|
Version: 4.15.0
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Epoch: 2
|
Epoch: 2
|
||||||
License: BSD-3-Clause AND GPL-2.0-or-later
|
License: BSD-3-Clause AND GPL-2.0-or-later
|
||||||
URL: https://github.com/shadow-maint/shadow
|
URL: https://github.com/shadow-maint/shadow
|
||||||
@ -30,6 +30,8 @@ Patch3: shadow-4.15.0-audit-update.patch
|
|||||||
Patch4: shadow-4.15.0-account-tools-setuid.patch
|
Patch4: shadow-4.15.0-account-tools-setuid.patch
|
||||||
# https://github.com/shadow-maint/shadow/commit/ead55e9ba8958504e23e29545f90c4dd925c7462
|
# https://github.com/shadow-maint/shadow/commit/ead55e9ba8958504e23e29545f90c4dd925c7462
|
||||||
Patch5: shadow-4.15.0-getdef-spurious-error.patch
|
Patch5: shadow-4.15.0-getdef-spurious-error.patch
|
||||||
|
# https://github.com/shadow-maint/shadow/commit/903593249630054ab5df327481f7386f718088cc
|
||||||
|
Patch6: shadow-4.15.0-useradd-fix-write-full-return.patch
|
||||||
|
|
||||||
### Dependencies ###
|
### Dependencies ###
|
||||||
Requires: audit-libs >= 1.6.5
|
Requires: audit-libs >= 1.6.5
|
||||||
@ -128,6 +130,7 @@ autoreconf
|
|||||||
--with-selinux \
|
--with-selinux \
|
||||||
--without-libbsd \
|
--without-libbsd \
|
||||||
--without-libcrack \
|
--without-libcrack \
|
||||||
|
--without-nscd \
|
||||||
--without-sssd \
|
--without-sssd \
|
||||||
--enable-shared \
|
--enable-shared \
|
||||||
--with-group-name-max-length=32 \
|
--with-group-name-max-length=32 \
|
||||||
@ -277,6 +280,10 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libsubid.a
|
|||||||
%{_libdir}/libsubid.so
|
%{_libdir}/libsubid.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 4 2024 Iker Pedrosa <ipedrosa@redhat.com> - 2:4.15.0-5
|
||||||
|
- Disable nscd. Resolves: RHEL-56355
|
||||||
|
- useradd: fix write_full() return value
|
||||||
|
|
||||||
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 2:4.15.0-4
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 2:4.15.0-4
|
||||||
- Bump release for October 2024 mass rebuild:
|
- Bump release for October 2024 mass rebuild:
|
||||||
Resolves: RHEL-64018
|
Resolves: RHEL-64018
|
||||||
|
Loading…
Reference in New Issue
Block a user