Here is the updated patch, it changes the error message as well.

-Chris


Error instead of warn on address truncation.

Author: Chris Taylor <ctay...@debian.org>
--- a/xio-unix.c
+++ b/xio-unix.c
@@ -79,7 +79,7 @@ xiosetunix(int pf,
 #ifdef WITH_ABSTRACT_UNIXSOCKET
    if (abstract) {
       if ((pathlen = strlen(path)) >= sizeof(saun->sun_path)) {
-        Warn2("socket address "F_Zu" characters long, truncating to "F_Zu"",
+        Error2("socket address "F_Zu" characters long, max length is "F_Zu"",
               pathlen+1, sizeof(saun->sun_path));
       }
       saun->sun_path[0] = '\0';        /* so it's abstract */
@@ -98,7 +98,7 @@ xiosetunix(int pf,
 #endif /* WITH_ABSTRACT_UNIXSOCKET */

    if ((pathlen = strlen(path)) > sizeof(saun->sun_path)) {
-      Warn2("unix socket address "F_Zu" characters long, truncating to
"F_Zu"",
+      Error2("unix socket address "F_Zu" characters long, max length is
"F_Zu"",
            pathlen, sizeof(saun->sun_path));
    }
    strncpy(saun->sun_path, path, sizeof(saun->sun_path));




Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to