]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/copydir.c: error_acl(): Use vfprintec() instead of its pattern
authorAlejandro Colomar <alx@kernel.org>
Wed, 24 Dec 2025 10:20:53 +0000 (11:20 +0100)
committerSerge Hallyn <serge@hallyn.com>
Fri, 17 Jul 2026 13:48:04 +0000 (08:48 -0500)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/copydir.c

index 47ea9f2810de7a49a05f2db1b29c61f4d33ff684..42e9e7332dd031b5c516a34d9747b796b8f705a7 100644 (file)
@@ -19,6 +19,7 @@
 #include "alloc/malloc.h"
 #include "attr.h"
 #include "fs/readlink/areadlink.h"
+#include "io/fprintf.h"
 #include "prototypes.h"
 #include "defines.h"
 #ifdef WITH_SELINUX
@@ -106,10 +107,7 @@ error_acl(MAYBE_UNUSED struct error_context *_1, const char *fmt, ...)
 
        va_start (ap, fmt);
        (void) fprintf (log_get_logfd(), _("%s: "), log_get_progname());
-       if (vfprintf (log_get_logfd(), fmt, ap) != 0) {
-               (void) fputs (_(": "), log_get_logfd());
-       }
-       (void) fprintf(log_get_logfd(), "%s\n", strerror(e));
+       vfprintec(log_get_logfd(), e, fmt, ap);
        va_end (ap);
 
        errno = e;