]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
backend/ipp.c: Raise alert if there is issue with cert
authorZdenek Dohnal <zdohnal@redhat.com>
Wed, 12 Mar 2025 15:26:55 +0000 (16:26 +0100)
committerZdenek Dohnal <zdohnal@redhat.com>
Wed, 12 Mar 2025 15:26:55 +0000 (16:26 +0100)
Currently we show more detailed info about this error in debug logs, but
since there are not many desktops to pick up our dBUS notification, it
would be great to report it in CUPS log too.

backend/ipp.c

index c1fe334e1f3ee499055f8cdd593464aa9d5c8de7..6888eff5c5d6b684c0d854e7759525482b91ca75 100644 (file)
@@ -817,12 +817,12 @@ main(int  argc,                           /* I - Number of command-line args */
                                        /* Trust keywords */
     static const char  * const trust_msgs[] =
     {
-      "Credentials are OK/trusted",
-      "Credentials are invalid",
-      "Credentials have changed",
-      "Credentials are expired",
-      "Credentials have been renewed",
-      "Credentials are unknown/new"
+      _("Credentials are OK/trusted"),
+      _("Credentials are invalid"),
+      _("Credentials have changed"),
+      _("Credentials are expired"),
+      _("Credentials have been renewed"),
+      _("Credentials are unknown/new")
     };
 
     fputs("DEBUG: Connection is encrypted.\n", stderr);
@@ -847,6 +847,7 @@ main(int  argc,                             /* I - Number of command-line args */
       if (trusts[trust])
       {
         update_reasons(NULL, trusts[trust]);
+       _cupsLangPrintFilter(stderr, "ALERT", "%s", trust_msgs[trust]);
         return (CUPS_BACKEND_STOP);
       }