Blame SOURCES/shadow-4.6-libsubid_init_not_print_error_messages.patch

9ed61c
From b0e86b959fe5c086ffb5e7eaf3c1b1e9219411e9 Mon Sep 17 00:00:00 2001
9ed61c
From: Serge Hallyn <serge@hallyn.com>
9ed61c
Date: Sun, 23 May 2021 08:03:10 -0500
9ed61c
Subject: [PATCH] libsubid_init: don't print messages on error
9ed61c
9ed61c
Signed-off-by: Serge Hallyn <serge@hallyn.com>
9ed61c
---
9ed61c
 libsubid/api.c | 7 ++-----
9ed61c
 1 file changed, 2 insertions(+), 5 deletions(-)
9ed61c
9ed61c
diff --git a/libsubid/api.c b/libsubid/api.c
9ed61c
index c4848142..b477b271 100644
9ed61c
--- a/libsubid/api.c
9ed61c
+++ b/libsubid/api.c
9ed61c
@@ -46,12 +46,10 @@ bool libsubid_init(const char *progname, FILE * logfd)
9ed61c
 {
9ed61c
 	if (progname) {
9ed61c
 		progname = strdup(progname);
9ed61c
-		if (progname) {
9ed61c
+		if (progname)
9ed61c
 			Prog = progname;
9ed61c
-		} else {
9ed61c
-			fprintf(stderr, "Out of memory");
9ed61c
+		else
9ed61c
 			return false;
9ed61c
-		}
9ed61c
 	}
9ed61c
 
9ed61c
 	if (logfd) {
9ed61c
@@ -60,7 +58,6 @@ bool libsubid_init(const char *progname, FILE * logfd)
9ed61c
 	}
9ed61c
 	shadow_logfd = fopen("/dev/null", "w");
9ed61c
 	if (!shadow_logfd) {
9ed61c
-		fprintf(stderr, "ERROR opening /dev/null for error messages.  Using stderr.");
9ed61c
 		shadow_logfd = stderr;
9ed61c
 		return false;
9ed61c
 	}
9ed61c
-- 
9ed61c
2.30.2
9ed61c