Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package pappl for openSUSE:Factory checked 
in at 2024-11-17 16:41:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pappl (Old)
 and      /work/SRC/openSUSE:Factory/.pappl.new.2017 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pappl"

Sun Nov 17 16:41:36 2024 rev:10 rq:1224521 version:1.4.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/pappl/pappl.changes      2024-10-20 
10:04:40.732487412 +0200
+++ /work/SRC/openSUSE:Factory/.pappl.new.2017/pappl.changes    2024-11-17 
16:41:42.096485875 +0100
@@ -1,0 +2,8 @@
+Fri Nov 15 18:30:28 UTC 2024 - Jan Engelhardt <jeng...@inai.de>
+
+- Update to release 1.4.8
+  * Security fix: The web interface password didn't work properly
+  * Now use the ``listen-hostname`` hostname as system hostname if
+    a name is specified
+
+-------------------------------------------------------------------

Old:
----
  pappl-1.4.7.tar.gz
  pappl-1.4.7.tar.gz.sig

New:
----
  pappl-1.4.8.tar.gz
  pappl-1.4.8.tar.gz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ pappl.spec ++++++
--- /var/tmp/diff_new_pack.5JB9vz/_old  2024-11-17 16:41:42.676509968 +0100
+++ /var/tmp/diff_new_pack.5JB9vz/_new  2024-11-17 16:41:42.676509968 +0100
@@ -18,7 +18,7 @@
 
 Name:           pappl
 %define lname   libpappl1
-Version:        1.4.7
+Version:        1.4.8
 Release:        0
 Summary:        A printer application framework
 License:        Apache-2.0
@@ -90,8 +90,7 @@
 %make_install RPM_BUILD_ROOT=""
 rm -f "%buildroot/%_libdir"/*.a
 
-%post   -n %lname -p /sbin/ldconfig
-%postun -n %lname -p /sbin/ldconfig
+%ldconfig_scriptlets -n %lname
 
 %files
 %_bindir/pappl-*

++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.5JB9vz/_old  2024-11-17 16:41:42.720511796 +0100
+++ /var/tmp/diff_new_pack.5JB9vz/_new  2024-11-17 16:41:42.732512294 +0100
@@ -1,5 +1,5 @@
-mtime: 1729097180
-commit: c238a2778c5a259bed327d326138da978467e20858452e9a8f09755d9b07685e
+mtime: 1731697747
+commit: 06418571f333425788d103101f4d51389a13850f9763e792f099340d3ae78485
 url: https://src.opensuse.org/jengelh/pappl
 revision: master
 

++++++ build.specials.obscpio ++++++
diff: old/*: No such file or directory
diff: new/*: No such file or directory

++++++ pappl-1.4.7.tar.gz -> pappl-1.4.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pappl-1.4.7/CHANGES.md new/pappl-1.4.8/CHANGES.md
--- old/pappl-1.4.7/CHANGES.md  2024-10-16 00:16:17.000000000 +0200
+++ new/pappl-1.4.8/CHANGES.md  2024-11-14 20:49:14.000000000 +0100
@@ -2,8 +2,16 @@
 ================
 
 
-Changes in v1.4.7
------------------
+Changes in v1.4.8 (2024-11-14)
+------------------------------
+
+- SECURITY: The web interface password didn't work properly (Issue #373)
+- Now use the "listen-hostname" hostname as system hostname if a name is
+  specified (Issue #369)
+
+
+Changes in v1.4.7 (2024-08-15)
+------------------------------
 
 - PAM-based authentication did not work on Linux due to a glibc incompatibility
   (Issue #343)
@@ -18,8 +26,8 @@
 - Fixed the "no-tls" server option.
 
 
-Changes in v1.4.6
------------------
+Changes in v1.4.6 (2024-02-09)
+------------------------------
 
 - Fixed reporting of "printer-strings-languages-supported" attribute
   (Issue #328)
@@ -31,8 +39,8 @@
 - Fixed localization of command-line (main loop) interface.
 
 
-Changes in v1.4.5
------------------
+Changes in v1.4.5 (2024-01-26)
+------------------------------
 
 - Fixed `--disable-libpam` configure option.
 - Fixed support for "finishings", "output-bin", and "sides" options.
@@ -41,8 +49,8 @@
 - Fixed some Coverity-detected threading issues.
 
 
-Changes in v1.4.4
------------------
+Changes in v1.4.4 (2023-12-21)
+------------------------------
 
 - Fixed "printer-settable-attributes-supported" value (Issue #311)
 - Fixed `-n` support for setting number of copies (Issue #312)
@@ -52,8 +60,8 @@
 - Fixed builds against current libcups3.
 
 
-Changes in v1.4.3
------------------
+Changes in v1.4.3 (2023-11-15)
+------------------------------
 
 - Added "smi55357-device-uri" and "smi55357-driver" Printer Status attributes
   to Get-Printer-Attributes responses.
@@ -65,23 +73,23 @@
 - Fixed default "copies" value with `papplJobCreateWithFile`.
 
 
-Changes in v1.4.2
------------------
+Changes in v1.4.2 (2024-10-16)
+------------------------------
 
 - Fixed potential crash while listing devices (Issue #296)
 - Fixed potential deadlock issue (Issue #297)
 - Fixed loading of previous state (Issue #298)
 
 
-Changes in v1.4.1
------------------
+Changes in v1.4.1 (2024-10-10)
+------------------------------
 
 - Fixed typos in the names of the `papplJobResume` and `papplJobSuspend`
   functions (Issue #295)
 
 
-Changes in v1.4.0
------------------
+Changes in v1.4.0 (2024-09-28)
+------------------------------
 
 - Added support for "job-retain-until" (Issue #14)
 - Added new PAPPL-Create-Printers operation, and the PAPPL mainloop API now
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pappl-1.4.7/configure new/pappl-1.4.8/configure
--- old/pappl-1.4.7/configure   2024-10-16 00:16:17.000000000 +0200
+++ new/pappl-1.4.8/configure   2024-11-14 20:49:14.000000000 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for pappl 1.4.7.
+# Generated by GNU Autoconf 2.71 for pappl 1.4.8.
 #
 # Report bugs to <https://github.com/michaelrsweet/pappl/issues>.
 #
@@ -610,8 +610,8 @@
 # Identity of this package.
 PACKAGE_NAME='pappl'
 PACKAGE_TARNAME='pappl'
-PACKAGE_VERSION='1.4.7'
-PACKAGE_STRING='pappl 1.4.7'
+PACKAGE_VERSION='1.4.8'
+PACKAGE_STRING='pappl 1.4.8'
 PACKAGE_BUGREPORT='https://github.com/michaelrsweet/pappl/issues'
 PACKAGE_URL='https://www.msweet.org/pappl'
 
@@ -1310,7 +1310,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures pappl 1.4.7 to adapt to many kinds of systems.
+\`configure' configures pappl 1.4.8 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1376,7 +1376,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of pappl 1.4.7:";;
+     short | recursive ) echo "Configuration of pappl 1.4.8:";;
    esac
   cat <<\_ACEOF
 
@@ -1485,7 +1485,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-pappl configure 1.4.7
+pappl configure 1.4.8
 generated by GNU Autoconf 2.71
 
 Copyright (C) 2021 Free Software Foundation, Inc.
@@ -1703,7 +1703,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by pappl $as_me 1.4.7, which was
+It was created by pappl $as_me 1.4.8, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -2461,9 +2461,9 @@
 ac_config_headers="$ac_config_headers config.h"
 
 
-PAPPL_VERSION="1.4.7"
-PAPPL_VERSION_MAJOR="`echo 1.4.7 | awk -F. '{print $1}'`"
-PAPPL_VERSION_MINOR="`echo 1.4.7 | awk -F. '{printf("%d\n",$2);}'`"
+PAPPL_VERSION="1.4.8"
+PAPPL_VERSION_MAJOR="`echo 1.4.8 | awk -F. '{print $1}'`"
+PAPPL_VERSION_MINOR="`echo 1.4.8 | awk -F. '{printf("%d\n",$2);}'`"
 
 
 
@@ -5962,7 +5962,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by pappl $as_me 1.4.7, which was
+This file was extended by pappl $as_me 1.4.8, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -6027,7 +6027,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-pappl config.status 1.4.7
+pappl config.status 1.4.8
 configured by $0, generated by GNU Autoconf 2.71,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pappl-1.4.7/configure.ac new/pappl-1.4.8/configure.ac
--- old/pappl-1.4.7/configure.ac        2024-10-16 00:16:17.000000000 +0200
+++ new/pappl-1.4.8/configure.ac        2024-11-14 20:49:14.000000000 +0100
@@ -21,7 +21,7 @@
 
 
 dnl Package name and version...
-AC_INIT([pappl], [1.4.7], [https://github.com/michaelrsweet/pappl/issues], 
[pappl], [https://www.msweet.org/pappl])
+AC_INIT([pappl], [1.4.8], [https://github.com/michaelrsweet/pappl/issues], 
[pappl], [https://www.msweet.org/pappl])
 AC_CONFIG_HEADERS([config.h])
 
 PAPPL_VERSION="AC_PACKAGE_VERSION"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pappl-1.4.7/pappl/client-webif.c 
new/pappl-1.4.8/pappl/client-webif.c
--- old/pappl-1.4.7/pappl/client-webif.c        2024-10-16 00:16:17.000000000 
+0200
+++ new/pappl-1.4.8/pappl/client-webif.c        2024-11-14 20:49:14.000000000 
+0100
@@ -1,7 +1,7 @@
 //
 // Core client web interface functions for the Printer Application Framework
 //
-// Copyright © 2019-2023 by Michael R Sweet.
+// Copyright © 2019-2024 by Michael R Sweet.
 // Copyright © 2010-2019 by Apple Inc.
 //
 // Licensed under Apache License v2.0.  See the file "LICENSE" for more
@@ -451,34 +451,49 @@
 
   // Don't authorize if we have no auth service or we don't have a password 
set.
   if (!client || (!client->system->auth_service && !client->system->auth_cb && 
!client->system->password_hash[0]))
+  {
+    _PAPPL_DEBUG("papplClientHTMLAuthorize: auth_service='%s', auth_cb=%s, 
password_hash=%s\n", client->system->auth_service, client->system->auth_cb != 
NULL ? "set" : "unset", client->system->password_hash[0] ? "set" : "unset");
+    _PAPPL_DEBUG("papplClientHTMLAuthorize: Returning true.");
     return (true);
+  }
 
   // When using an auth service, use HTTP Basic authentication...
   if (client->system->auth_service || client->system->auth_cb)
   {
     http_status_t code = papplClientIsAuthorized(client);
+                                       // Authorization status code
+
+    _PAPPL_DEBUG("papplClientHTMLAuthorize: code=%d.\n", code);
 
     if (code != HTTP_STATUS_CONTINUE)
     {
+      _PAPPL_DEBUG("papplClientHTMLAuthorize: Returning false.\n");
       papplClientRespond(client, code, NULL, NULL, 0, 0);
       return (false);
     }
     else
+    {
+      _PAPPL_DEBUG("papplClientHTMLAuthorize: Returning true.\n");
       return (true);
+    }
   }
 
   // Otherwise look for the authorization cookie...
   if (papplClientGetCookie(client, "auth", auth_cookie, sizeof(auth_cookie)))
   {
+    _PAPPL_DEBUG("papplClientHTMLAuthorize: Got auth cookie '%s'.\n", 
auth_cookie);
     snprintf(auth_text, sizeof(auth_text), "%s:%s", 
papplSystemGetSessionKey(client->system, session_key, sizeof(session_key)), 
papplSystemGetPassword(client->system, password_hash, sizeof(password_hash)));
     cupsHashData("sha2-256", (unsigned char *)auth_text, strlen(auth_text), 
auth_hash, sizeof(auth_hash));
     cupsHashString(auth_hash, sizeof(auth_hash), auth_text, sizeof(auth_text));
 
+    _PAPPL_DEBUG("papplClientHTMLAuthorize: Expect auth cookie '%s'.\n", 
auth_text);
+
     if (_papplIsEqual(auth_cookie, auth_text))
     {
       // Hashes match so we are authorized.  Use "web-admin" as the username.
       papplCopyString(client->username, "web-admin", sizeof(client->username));
 
+      _PAPPL_DEBUG("papplClientHTMLAuthorize: Returning true.\n");
       return (true);
     }
   }
@@ -491,6 +506,8 @@
     cups_option_t      *form = NULL;   // Form variables
     const char         *password;      // Password from user
 
+    _PAPPL_DEBUG("papplClientHTMLAuthorize: POST.\n");
+
     if ((num_form = (cups_len_t)papplClientGetForm(client, &form)) == 0)
     {
       status = "Invalid form data.";
@@ -509,7 +526,10 @@
       papplSystemGetPassword(client->system, password_hash, 
sizeof(password_hash));
       papplSystemHashPassword(client->system, password_hash, password, 
auth_text, sizeof(auth_text));
 
-      if (!strncmp(password_hash, auth_text, strlen(password_hash)))
+      _PAPPL_DEBUG("papplClientHTMLAuthorize: Saved password_hash is '%s'.\n", 
password_hash);
+      _PAPPL_DEBUG("papplClientHTMLAuthorize: Hashed form password is 
'%s'.\n", auth_text);
+
+      if (_papplIsEqual(password_hash, auth_text))
       {
         // Password hashes match, generate the cookie from the session key and
         // password hash...
@@ -518,7 +538,8 @@
        cupsHashData("sha2-256", (unsigned char *)auth_text, strlen(auth_text), 
auth_hash, sizeof(auth_hash));
        cupsHashString(auth_hash, sizeof(auth_hash), auth_text, 
sizeof(auth_text));
 
-        papplClientSetCookie(client, "auth", auth_text, 3600);
+       papplClientSetCookie(client, "auth", auth_text, 3600);
+        _PAPPL_DEBUG("papplClientHTMLAuthorize: Setting 'auth' cookie to 
'%s'.\n", auth_text);
       }
       else
       {
@@ -531,16 +552,21 @@
     // Make the caller think this is a GET request...
     client->operation = HTTP_STATE_GET;
 
+    _PAPPL_DEBUG("papplClientHTMLAuthorize: Status message is '%s'.\n", 
status);
+
     if (!status)
     {
       // Hashes match so we are authorized.  Use "web-admin" as the username.
       papplCopyString(client->username, "web-admin", sizeof(client->username));
 
+      _PAPPL_DEBUG("papplClientHTMLAuthorize: Returning true.\n");
       return (true);
     }
   }
 
   // If we get this far, show the standard login form...
+  _PAPPL_DEBUG("papplClientHTMLAuthorize: Showing login form.\n");
+
   papplClientRespond(client, HTTP_STATUS_OK, NULL, "text/html", 0, 0);
   papplClientHTMLHeader(client, "Login", 0);
   papplClientHTMLPuts(client,
@@ -560,6 +586,7 @@
                       "      </div>\n");
   papplClientHTMLFooter(client);
 
+  _PAPPL_DEBUG("papplClientHTMLAuthorize: Returning false.\n");
   return (false);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pappl-1.4.7/pappl/dnssd.c 
new/pappl-1.4.8/pappl/dnssd.c
--- old/pappl-1.4.7/pappl/dnssd.c       2024-10-16 00:16:17.000000000 +0200
+++ new/pappl-1.4.8/pappl/dnssd.c       2024-11-14 20:49:14.000000000 +0100
@@ -389,7 +389,7 @@
   if (!printer->dns_sd_name || !printer->system->is_running)
     return (false);
 
-  papplLogPrinter(printer, PAPPL_LOGLEVEL_DEBUG, "Registering DNS-SD name '%s' 
on '%s'", printer->dns_sd_name, printer->system->hostname);
+  papplLogPrinter(printer, PAPPL_LOGLEVEL_DEBUG, "Registering DNS-SD name 
'%s'.", printer->dns_sd_name);
 
 #  ifdef HAVE_MDNSRESPONDER
   if_index = !strcmp(system->hostname, "localhost") ? 
kDNSServiceInterfaceIndexLocalOnly : kDNSServiceInterfaceIndexAny;
@@ -566,7 +566,7 @@
 
   printer->dns_sd_printer_ref = master;
 
-  if ((error = DNSServiceRegister(&printer->dns_sd_printer_ref, 
kDNSServiceFlagsShareConnection | kDNSServiceFlagsNoAutoRename, if_index, 
printer->dns_sd_name, "_printer._tcp", NULL /* domain */, system->hostname, 0 
/* port */, 0 /* txtLen */, NULL /* txtRecord */, 
(DNSServiceRegisterReply)dns_sd_printer_callback, printer)) != 
kDNSServiceErr_NoError)
+  if ((error = DNSServiceRegister(&printer->dns_sd_printer_ref, 
kDNSServiceFlagsShareConnection | kDNSServiceFlagsNoAutoRename, if_index, 
printer->dns_sd_name, "_printer._tcp", NULL /* domain */, /*hostname*/NULL, 0 
/* port */, 0 /* txtLen */, NULL /* txtRecord */, 
(DNSServiceRegisterReply)dns_sd_printer_callback, printer)) != 
kDNSServiceErr_NoError)
   {
     papplLogPrinter(printer, PAPPL_LOGLEVEL_ERROR, "Unable to register 
'%s._printer._tcp': %s", printer->dns_sd_name, _papplDNSSDStrError(error));
     ret = false;
@@ -584,7 +584,7 @@
   else
     papplCopyString(regtype, "_ipp._tcp", sizeof(regtype));
 
-  if ((error = DNSServiceRegister(&printer->dns_sd_ipp_ref, 
kDNSServiceFlagsShareConnection | kDNSServiceFlagsNoAutoRename, if_index, 
printer->dns_sd_name, regtype, NULL /* domain */, system->hostname, 
htons(system->port), TXTRecordGetLength(&txt), TXTRecordGetBytesPtr(&txt), 
(DNSServiceRegisterReply)dns_sd_printer_callback, printer)) != 
kDNSServiceErr_NoError)
+  if ((error = DNSServiceRegister(&printer->dns_sd_ipp_ref, 
kDNSServiceFlagsShareConnection | kDNSServiceFlagsNoAutoRename, if_index, 
printer->dns_sd_name, regtype, NULL /* domain */, /*hostname*/NULL, 
htons(system->port), TXTRecordGetLength(&txt), TXTRecordGetBytesPtr(&txt), 
(DNSServiceRegisterReply)dns_sd_printer_callback, printer)) != 
kDNSServiceErr_NoError)
   {
     papplLogPrinter(printer, PAPPL_LOGLEVEL_ERROR, "Unable to register 
'%s.%s': %s", printer->dns_sd_name, regtype, _papplDNSSDStrError(error));
     ret = false;
@@ -611,7 +611,7 @@
     else
       papplCopyString(regtype, "_ipps._tcp", sizeof(regtype));
 
-    if ((error = DNSServiceRegister(&printer->dns_sd_ipps_ref, 
kDNSServiceFlagsShareConnection | kDNSServiceFlagsNoAutoRename, if_index, 
printer->dns_sd_name, regtype, NULL /* domain */, system->hostname, 
htons(system->port), TXTRecordGetLength(&txt), TXTRecordGetBytesPtr(&txt), 
(DNSServiceRegisterReply)dns_sd_printer_callback, printer)) != 
kDNSServiceErr_NoError)
+    if ((error = DNSServiceRegister(&printer->dns_sd_ipps_ref, 
kDNSServiceFlagsShareConnection | kDNSServiceFlagsNoAutoRename, if_index, 
printer->dns_sd_name, regtype, NULL /* domain */, /*hostname*/NULL, 
htons(system->port), TXTRecordGetLength(&txt), TXTRecordGetBytesPtr(&txt), 
(DNSServiceRegisterReply)dns_sd_printer_callback, printer)) != 
kDNSServiceErr_NoError)
     {
       papplLogPrinter(printer, PAPPL_LOGLEVEL_ERROR, "Unable to register 
'%s.%s': %s", printer->dns_sd_name, regtype, _papplDNSSDStrError(error));
       ret = false;
@@ -662,7 +662,7 @@
 
     printer->dns_sd_pdl_ref = master;
 
-    if ((error = DNSServiceRegister(&printer->dns_sd_pdl_ref, 
kDNSServiceFlagsShareConnection | kDNSServiceFlagsNoAutoRename, if_index, 
printer->dns_sd_name, "_pdl-datastream._tcp", NULL /* domain */, 
system->hostname, htons(9099 + printer->printer_id), TXTRecordGetLength(&txt), 
TXTRecordGetBytesPtr(&txt), (DNSServiceRegisterReply)dns_sd_printer_callback, 
printer)) != kDNSServiceErr_NoError)
+    if ((error = DNSServiceRegister(&printer->dns_sd_pdl_ref, 
kDNSServiceFlagsShareConnection | kDNSServiceFlagsNoAutoRename, if_index, 
printer->dns_sd_name, "_pdl-datastream._tcp", NULL /* domain */, 
/*hostname*/NULL, htons(9099 + printer->printer_id), TXTRecordGetLength(&txt), 
TXTRecordGetBytesPtr(&txt), (DNSServiceRegisterReply)dns_sd_printer_callback, 
printer)) != kDNSServiceErr_NoError)
     {
       papplLogPrinter(printer, PAPPL_LOGLEVEL_ERROR, "Unable to register 
'%s.%s': %s", printer->dns_sd_name, "_pdl-datastream._tcp", 
_papplDNSSDStrError(error));
       ret = false;
@@ -683,7 +683,7 @@
 
   printer->dns_sd_http_ref = master;
 
-  if ((error = DNSServiceRegister(&printer->dns_sd_http_ref, 
kDNSServiceFlagsShareConnection | kDNSServiceFlagsNoAutoRename, if_index, 
printer->dns_sd_name, "_http._tcp,_printer", NULL /* domain */, 
system->hostname, htons(system->port), TXTRecordGetLength(&txt), 
TXTRecordGetBytesPtr(&txt), (DNSServiceRegisterReply)dns_sd_printer_callback, 
printer)) != kDNSServiceErr_NoError)
+  if ((error = DNSServiceRegister(&printer->dns_sd_http_ref, 
kDNSServiceFlagsShareConnection | kDNSServiceFlagsNoAutoRename, if_index, 
printer->dns_sd_name, "_http._tcp,_printer", NULL /* domain */, 
/*hostname*/NULL, htons(system->port), TXTRecordGetLength(&txt), 
TXTRecordGetBytesPtr(&txt), (DNSServiceRegisterReply)dns_sd_printer_callback, 
printer)) != kDNSServiceErr_NoError)
   {
     papplLogPrinter(printer, PAPPL_LOGLEVEL_ERROR, "Unable to register 
'%s.%s': %s", printer->dns_sd_name, "_http._tcp,_printer", 
_papplDNSSDStrError(error));
     ret = false;
@@ -741,7 +741,7 @@
   }
 
   // Then register the IPP/IPPS services...
-  if ((error = avahi_entry_group_add_service_strlst(printer->dns_sd_ref, 
if_index, AVAHI_PROTO_UNSPEC, 0, printer->dns_sd_name, "_ipp._tcp", NULL, 
system->hostname, system->port, txt)) < 0)
+  if ((error = avahi_entry_group_add_service_strlst(printer->dns_sd_ref, 
if_index, AVAHI_PROTO_UNSPEC, 0, printer->dns_sd_name, "_ipp._tcp", NULL, 
/*hostname*/NULL, system->port, txt)) < 0)
   {
     papplLogPrinter(printer, PAPPL_LOGLEVEL_ERROR, "Unable to register 
'%s._ipp._tcp': %s", printer->dns_sd_name, _papplDNSSDStrError(error));
     ret = false;
@@ -772,7 +772,7 @@
 
   if (!(printer->system->options & PAPPL_SOPTIONS_NO_TLS))
   {
-    if ((error = avahi_entry_group_add_service_strlst(printer->dns_sd_ref, 
if_index, AVAHI_PROTO_UNSPEC, 0, printer->dns_sd_name, "_ipps._tcp", NULL, 
system->hostname, system->port, txt)) < 0)
+    if ((error = avahi_entry_group_add_service_strlst(printer->dns_sd_ref, 
if_index, AVAHI_PROTO_UNSPEC, 0, printer->dns_sd_name, "_ipps._tcp", NULL, 
/*hostname*/NULL, system->port, txt)) < 0)
     {
       papplLogPrinter(printer, PAPPL_LOGLEVEL_ERROR, "Unable to register 
'%s._ipps._tcp': %s", printer->dns_sd_name, _papplDNSSDStrError(error));
       ret = false;
@@ -827,7 +827,7 @@
     txt = avahi_string_list_add_printf(txt, "PaperMax=%s", papermax);
     txt = avahi_string_list_add_printf(txt, "Scan=F");
 
-    if ((error = avahi_entry_group_add_service_strlst(printer->dns_sd_ref, 
if_index, AVAHI_PROTO_UNSPEC, 0, printer->dns_sd_name, "_pdl-datastream._tcp", 
NULL, system->hostname, 9099 + printer->printer_id, txt)) < 0)
+    if ((error = avahi_entry_group_add_service_strlst(printer->dns_sd_ref, 
if_index, AVAHI_PROTO_UNSPEC, 0, printer->dns_sd_name, "_pdl-datastream._tcp", 
NULL, /*hostname*/NULL, 9099 + printer->printer_id, txt)) < 0)
     {
       papplLogPrinter(printer, PAPPL_LOGLEVEL_ERROR, "Unable to register 
'%s._pdl-datastream._tcp': %s", printer->dns_sd_name, 
_papplDNSSDStrError(error));
       ret = false;
@@ -860,7 +860,7 @@
   txt = NULL;
   txt = avahi_string_list_add_printf(txt, "path=%s/", printer->uriname);
 
-  avahi_entry_group_add_service_strlst(printer->dns_sd_ref, if_index, 
AVAHI_PROTO_UNSPEC, 0, printer->dns_sd_name, "_http._tcp", NULL, 
system->hostname, system->port, txt);
+  avahi_entry_group_add_service_strlst(printer->dns_sd_ref, if_index, 
AVAHI_PROTO_UNSPEC, 0, printer->dns_sd_name, "_http._tcp", NULL, 
/*hostname*/NULL, system->port, txt);
   avahi_entry_group_add_service_subtype(printer->dns_sd_ref, if_index, 
AVAHI_PROTO_UNSPEC, 0, printer->dns_sd_name, "_http._tcp", NULL, 
"_printer._sub._http._tcp");
 
   avahi_string_list_free(txt);
@@ -948,7 +948,7 @@
   if (!system->dns_sd_name || !system->hostname || !system->uuid || 
!system->is_running)
     return (false);
 
-  papplLog(system, PAPPL_LOGLEVEL_DEBUG, "Registering DNS-SD name '%s' on 
'%s'", system->dns_sd_name, system->hostname);
+  papplLog(system, PAPPL_LOGLEVEL_DEBUG, "Registering DNS-SD name '%s'.", 
system->dns_sd_name);
 
 #  ifdef HAVE_MDNSRESPONDER
   if_index = !strcmp(system->hostname, "localhost") ? 
kDNSServiceInterfaceIndexLocalOnly : kDNSServiceInterfaceIndexAny;
@@ -1019,7 +1019,7 @@
   {
     system->dns_sd_ipps_ref = master;
 
-    if ((error = DNSServiceRegister(&system->dns_sd_ipps_ref, 
kDNSServiceFlagsShareConnection | kDNSServiceFlagsNoAutoRename, if_index, 
system->dns_sd_name, "_ipps-system._tcp", NULL /* domain */, system->hostname, 
htons(system->port), TXTRecordGetLength(&txt), TXTRecordGetBytesPtr(&txt), 
(DNSServiceRegisterReply)dns_sd_system_callback, system)) != 
kDNSServiceErr_NoError)
+    if ((error = DNSServiceRegister(&system->dns_sd_ipps_ref, 
kDNSServiceFlagsShareConnection | kDNSServiceFlagsNoAutoRename, if_index, 
system->dns_sd_name, "_ipps-system._tcp", NULL /* domain */, /*hostname*/NULL, 
htons(system->port), TXTRecordGetLength(&txt), TXTRecordGetBytesPtr(&txt), 
(DNSServiceRegisterReply)dns_sd_system_callback, system)) != 
kDNSServiceErr_NoError)
     {
       papplLog(system, PAPPL_LOGLEVEL_ERROR, "Unable to register 
'%s._ipps-system._tcp': %s", system->dns_sd_name, _papplDNSSDStrError(error));
       ret = false;
@@ -1050,7 +1050,7 @@
 
     system->dns_sd_http_ref = master;
 
-    if ((error = DNSServiceRegister(&system->dns_sd_http_ref, 
kDNSServiceFlagsShareConnection | kDNSServiceFlagsNoAutoRename, if_index, 
system->dns_sd_name, "_http._tcp,_printer", NULL /* domain */, 
system->hostname, htons(system->port), 0 /* txtlen */, NULL /* txt */, 
(DNSServiceRegisterReply)dns_sd_system_callback, system)) != 
kDNSServiceErr_NoError)
+    if ((error = DNSServiceRegister(&system->dns_sd_http_ref, 
kDNSServiceFlagsShareConnection | kDNSServiceFlagsNoAutoRename, if_index, 
system->dns_sd_name, "_http._tcp,_printer", NULL /* domain */, 
/*hostname*/NULL, htons(system->port), 0 /* txtlen */, NULL /* txt */, 
(DNSServiceRegisterReply)dns_sd_system_callback, system)) != 
kDNSServiceErr_NoError)
     {
       papplLog(system, PAPPL_LOGLEVEL_ERROR, "Unable to register '%s.%s': %s", 
system->dns_sd_name, "_http._tcp,_printer", _papplDNSSDStrError(error));
       ret = false;
@@ -1080,7 +1080,7 @@
 
   if (!(system->options & PAPPL_SOPTIONS_NO_TLS))
   {
-    if ((error = avahi_entry_group_add_service_strlst(system->dns_sd_ref, 
if_index, AVAHI_PROTO_UNSPEC, 0, system->dns_sd_name, "_ipps-system._tcp", 
NULL, system->hostname, system->port, txt)) < 0)
+    if ((error = avahi_entry_group_add_service_strlst(system->dns_sd_ref, 
if_index, AVAHI_PROTO_UNSPEC, 0, system->dns_sd_name, "_ipps-system._tcp", 
NULL, /*hostname*/NULL, system->port, txt)) < 0)
     {
       papplLog(system, PAPPL_LOGLEVEL_ERROR, "Unable to register 
'%s._ipps-system._tcp': %s", system->dns_sd_name, _papplDNSSDStrError(error));
       ret = false;
@@ -1104,7 +1104,7 @@
   // Finally _http.tcp (HTTP) for the web interface...
   if (system->options & PAPPL_SOPTIONS_MULTI_QUEUE)
   {
-    avahi_entry_group_add_service_strlst(system->dns_sd_ref, if_index, 
AVAHI_PROTO_UNSPEC, 0, system->dns_sd_name, "_http._tcp", NULL, 
system->hostname, system->port, NULL);
+    avahi_entry_group_add_service_strlst(system->dns_sd_ref, if_index, 
AVAHI_PROTO_UNSPEC, 0, system->dns_sd_name, "_http._tcp", NULL, 
/*hostname*/NULL, system->port, NULL);
     avahi_entry_group_add_service_subtype(system->dns_sd_ref, if_index, 
AVAHI_PROTO_UNSPEC, 0, system->dns_sd_name, "_http._tcp", NULL, 
"_printer._sub._http._tcp");
   }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pappl-1.4.7/pappl/system-accessors.c 
new/pappl-1.4.8/pappl/system-accessors.c
--- old/pappl-1.4.7/pappl/system-accessors.c    2024-10-16 00:16:17.000000000 
+0200
+++ new/pappl-1.4.8/pappl/system-accessors.c    2024-11-14 20:49:14.000000000 
+0100
@@ -132,6 +132,18 @@
   else
   {
     // Add named listeners on both IPv4 and IPv6...
+    if (name && strcasecmp(name, "*"))
+    {
+      // Listening on a specific hostname...
+      _papplRWLockWrite(system);
+
+      free(system->hostname);
+      system->hostname      = strdup(name);
+      system->is_listenhost = true;
+
+      _papplRWUnlock(system);
+    }
+
     if (system->port)
     {
       ret = add_listeners(system, name, system->port, AF_INET) ||
@@ -1277,7 +1289,7 @@
     {
       // Copy existing nonce from the salt string...
       papplCopyString(nonce, salt, sizeof(nonce));
-      if ((ptr = strchr(nonce, ':')) != NULL)
+      if ((ptr = strchr(nonce, '~')) != NULL)
         *ptr = '\0';
     }
     else
@@ -1816,6 +1828,9 @@
        *ptr;                           // Pointer in temporary hostname
 
 
+  if (system->is_listenhost)
+    return;
+
   if (value)
   {
 #if !defined(__APPLE__) && !_WIN32
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pappl-1.4.7/pappl/system-private.h 
new/pappl-1.4.8/pappl/system-private.h
--- old/pappl-1.4.7/pappl/system-private.h      2024-10-16 00:16:17.000000000 
+0200
+++ new/pappl-1.4.8/pappl/system-private.h      2024-11-14 20:49:14.000000000 
+0100
@@ -68,6 +68,7 @@
   pappl_contact_t      contact;                // "system-contact-col" value
   char                 *hostname;              // Published hostname
   int                  port;                   // Port number, if any
+  bool                 is_listenhost;          // Hostname is listen host
   char                 *domain_path;           // Domain socket path, if any
   cups_len_t           num_versions;           // Number of "xxx-firmware-yyy" 
values
   pappl_version_t      versions[10];           // "xxx-firmware-yyy" values
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pappl-1.4.7/pappl/system-webif.c 
new/pappl-1.4.8/pappl/system-webif.c
--- old/pappl-1.4.7/pappl/system-webif.c        2024-10-16 00:16:17.000000000 
+0200
+++ new/pappl-1.4.8/pappl/system-webif.c        2024-11-14 20:49:14.000000000 
+0100
@@ -973,6 +973,7 @@
 {
   const char   *status = NULL;         // Status message, if any
   pappl_loc_t  *loc;                   // Localization
+  char         hostname[256];          // Hostname
   size_t       i,                      // Looping var
                num_networks;           // Number of network interfaces
   pappl_network_t networks[_PAPPL_MAX_NETWORKS],
@@ -1193,7 +1194,13 @@
     }
   }
 
-  papplClientHTMLPrintf(client, "              <tr><th><label 
for=\"hostname\">%s:</label></th><td><input type=\"text\" name=\"hostname\" 
value=\"%s\" placeholder=\"name.domain\" 
pattern=\"^(|[-_a-zA-Z0-9][-._a-zA-Z0-9]*)$\"> <input type=\"submit\" 
value=\"%s\"></td></tr>\n", papplClientGetLocString(client, 
_PAPPL_LOC("Hostname")), system->hostname, papplClientGetLocString(client, 
_PAPPL_LOC("Change Hostname")));
+  papplSystemGetHostName(system, hostname, sizeof(hostname));
+
+  papplClientHTMLPrintf(client, "              <tr><th><label 
for=\"hostname\">%s:</label></th><td>", papplClientGetLocString(client, 
_PAPPL_LOC("Hostname")));
+  if (system->is_listenhost)
+    papplClientHTMLPrintf(client, "<input type=\"hidden\" name=\"hostname\" 
value=\"%s\">%s</td></tr>\n", hostname, hostname);
+  else
+    papplClientHTMLPrintf(client, "<input type=\"text\" name=\"hostname\" 
value=\"%s\" placeholder=\"name.domain\" 
pattern=\"^(|[-_a-zA-Z0-9][-._a-zA-Z0-9]*)$\"> <input type=\"submit\" 
value=\"%s\"></td></tr>\n", hostname, papplClientGetLocString(client, 
_PAPPL_LOC("Change Hostname")));
 
   loc = papplClientGetLoc(client);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pappl-1.4.7/pappl.spec new/pappl-1.4.8/pappl.spec
--- old/pappl-1.4.7/pappl.spec  2024-10-16 00:16:17.000000000 +0200
+++ new/pappl-1.4.8/pappl.spec  2024-11-14 20:49:14.000000000 +0100
@@ -9,7 +9,7 @@
 
 Summary: Printer Application Framework (PAPPL)
 Name: pappl
-Version: 1.4.7
+Version: 1.4.8
 Release: 1
 License: Apache 2.0
 Group: Development/Libraries
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pappl-1.4.7/vcnet/config.h 
new/pappl-1.4.8/vcnet/config.h
--- old/pappl-1.4.7/vcnet/config.h      2024-10-16 00:16:17.000000000 +0200
+++ new/pappl-1.4.8/vcnet/config.h      2024-11-14 20:49:14.000000000 +0100
@@ -107,7 +107,7 @@
 
 
 // Version numbers
-#define PAPPL_VERSION "1.4.7"
+#define PAPPL_VERSION "1.4.8"
 #define PAPPL_VERSION_MAJOR 1
 #define PAPPL_VERSION_MINOR 4
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pappl-1.4.7/vcnet/libpappl1_native.nuspec 
new/pappl-1.4.8/vcnet/libpappl1_native.nuspec
--- old/pappl-1.4.7/vcnet/libpappl1_native.nuspec       2024-10-16 
00:16:17.000000000 +0200
+++ new/pappl-1.4.8/vcnet/libpappl1_native.nuspec       2024-11-14 
20:49:14.000000000 +0100
@@ -3,7 +3,7 @@
     <metadata>
         <id>libpappl1_native</id>
         <title>Printer Application Framework (PAPPL) for VS2019+</title>
-        <version>1.4.7.0</version>
+        <version>1.4.8.0</version>
         <authors>Michael R Sweet</authors>
         <owners>michaelrsweet</owners>
         <projectUrl>https://github.com/michaelrsweet/pappl</projectUrl>
@@ -18,7 +18,7 @@
         <tags>airprint everywhere http ipp mopria native</tags>
        <dependencies>
            <dependency id="libcups2_native" version="2.4.11.1" />
-           <dependency id="libpappl1_native.redist" version="1.4.7.0" />
+           <dependency id="libpappl1_native.redist" version="1.4.8.0" />
        </dependencies>
     </metadata>
     <files>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pappl-1.4.7/vcnet/libpappl1_native.redist.nuspec 
new/pappl-1.4.8/vcnet/libpappl1_native.redist.nuspec
--- old/pappl-1.4.7/vcnet/libpappl1_native.redist.nuspec        2024-10-16 
00:16:17.000000000 +0200
+++ new/pappl-1.4.8/vcnet/libpappl1_native.redist.nuspec        2024-11-14 
20:49:14.000000000 +0100
@@ -3,7 +3,7 @@
     <metadata>
         <id>libpappl1_native.redist</id>
         <title>Printer Application Framework (PAPPL) for VS2019+ Redist</title>
-        <version>1.4.7.0</version>
+        <version>1.4.8.0</version>
         <authors>Michael R Sweet</authors>
         <owners>michaelrsweet</owners>
         <projectUrl>https://github.com/michaelrsweet/pappl</projectUrl>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pappl-1.4.7/xcode/config.h 
new/pappl-1.4.8/xcode/config.h
--- old/pappl-1.4.7/xcode/config.h      2024-10-16 00:16:17.000000000 +0200
+++ new/pappl-1.4.8/xcode/config.h      2024-11-14 20:49:14.000000000 +0100
@@ -8,7 +8,7 @@
 //
 
 // Version numbers
-#define PAPPL_VERSION          "1.4.7"
+#define PAPPL_VERSION          "1.4.8"
 #define PAPPL_VERSION_MAJOR    1
 #define PAPPL_VERSION_MINOR    4
 

Reply via email to