shadow-utils/shadow-4.9-shadow-logfd.patch
Iker Pedrosa ad6228af78 Various fixes
- nss.c: shadow_logfd to stderr
- vipw: restore the original terminal pgrp after editing

Resolves: RHEL-83431
Resolves: RHEL-70844
Resolves: RHEL-72940

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2025-05-26 15:55:03 +02:00

16 lines
546 B
Diff

diff -up shadow-4.9/lib/nss.c.shadow-logfd shadow-4.9/lib/nss.c
--- shadow-4.9/lib/nss.c.shadow-logfd 2021-07-22 23:55:35.000000000 +0200
+++ shadow-4.9/lib/nss.c 2025-04-07 15:26:58.957447229 +0200
@@ -42,6 +42,10 @@ void nss_init(char *nsswitch_path) {
char *line = NULL, *p, *token, *saveptr;
size_t len = 0;
+ if (shadow_logfd == NULL) {
+ shadow_logfd = stderr;
+ }
+
if (atomic_flag_test_and_set(&nss_init_started)) {
// Another thread has started nss_init, wait for it to complete
while (!atomic_load(&nss_init_completed))