Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package entr for openSUSE:Factory checked in 
at 2026-10-02 23:05:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/entr (Old)
 and      /work/SRC/openSUSE:Factory/.entr.new.1631729 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "entr"

Fri Oct  2 23:05:03 2026 rev:20 rq:1382065 version:5.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/entr/entr.changes        2026-03-06 
18:19:16.013833701 +0100
+++ /work/SRC/openSUSE:Factory/.entr.new.1631729/entr.changes   2026-10-02 
23:06:21.324853023 +0200
@@ -1,0 +2,9 @@
+Fri Oct  2 08:25:09 UTC 2026 - Martin Hauke <[email protected]>
+
+- Update to version 5.9
+  * Sleep for 1ms after utility is terminated in restart mode.
+  * Abort if path length exceed boundaries, no longer rely on
+    strlcpy(3).
+  * Check argument length before copying.
+
+-------------------------------------------------------------------

Old:
----
  entr-5.8.tar.gz
  entr-5.8.tar.gz.sig

New:
----
  entr-5.9.tar.gz
  entr-5.9.tar.gz.sig

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

Other differences:
------------------
++++++ entr.spec ++++++
--- /var/tmp/diff_new_pack.EZijNX/_old  2026-10-02 23:06:22.455900446 +0200
+++ /var/tmp/diff_new_pack.EZijNX/_new  2026-10-02 23:06:22.457900530 +0200
@@ -18,7 +18,7 @@
 
 
 Name:           entr
-Version:        5.8
+Version:        5.9
 Release:        0
 Summary:        A utility for running arbitrary commands when files change
 License:        ISC
@@ -34,7 +34,7 @@
 inotify(7) to avoid polling.
 
 %prep
-%setup -q
+%autosetup
 
 %build
 export CFLAGS="%{optflags}"

++++++ entr-5.8.tar.gz -> entr-5.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.8/LICENSE new/entr-5.9/LICENSE
--- old/entr-5.8/LICENSE        2026-03-02 22:01:02.000000000 +0100
+++ new/entr-5.9/LICENSE        2026-10-01 21:26:16.000000000 +0200
@@ -1,65 +1,16 @@
-1) Project Source
+Source code for `entr` is licensed under an ISC-style license, to the
+following copyright holders:
 
-    Source code for `entr` is licensed under an ISC-style license, to the
-    following copyright holders:
+Eric Radman, 2012
 
-    Eric Radman
-
-    * Permission to use, copy, modify, and distribute this software for any
-    * purpose with or without fee is hereby granted, provided that the above
-    * copyright notice and this permission notice appear in all copies.
-    *
-    * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-    * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-    * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-    * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-    * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-    * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-    * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-2) Compatibility Libraries (MacOS and Linux only)
-
-    Some code under the /missing subdirectory is licensed under a 2-term BSD
-    license, to the following copyright holders:
-
-    Jonathan Lemon
-
-    * Redistribution and use in source and binary forms, with or without
-    * modification, are permitted provided that the following conditions
-    * are met:
-    * 1. Redistributions of source code must retain the above copyright
-    *    notice, this list of conditions and the following disclaimer.
-    * 2. Redistributions in binary form must reproduce the above copyright
-    *    notice, this list of conditions and the following disclaimer in the
-    *    documentation and/or other materials provided with the distribution.
-    *
-    * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-    * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-    * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
PURPOSE
-    * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-    * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
CONSEQUENTIAL
-    * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-    * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-    * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
STRICT
-    * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-    * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-    * SUCH DAMAGE.
-
-    Some code under the /missing subdirectory is licensed under an ISC-style
-    license, to the following copyright holders:
-
-    Todd C. Miller
-    Martin Pieuchot
-    Ted Unangst
-
-    * Permission to use, copy, modify, and distribute this software for any
-    * purpose with or without fee is hereby granted, provided that the above
-    * copyright notice and this permission notice appear in all copies.
-    *
-    * THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL
-    * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
-    * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE 
LIABLE
-    * FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY 
DAMAGES
-    * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 
ACTION
-    * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-    * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+* Permission to use, copy, modify, and distribute this software for any
+* purpose with or without fee is hereby granted, provided that the above
+* copyright notice and this permission notice appear in all copies.
+*
+* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.8/Makefile.bsd new/entr-5.9/Makefile.bsd
--- old/entr-5.8/Makefile.bsd   2026-03-02 22:01:02.000000000 +0100
+++ new/entr-5.9/Makefile.bsd   2026-10-01 21:26:16.000000000 +0200
@@ -1,7 +1,7 @@
 CLANG_FORMAT ?= clang-format
 PREFIX ?= /usr/local
 MANPREFIX ?= ${PREFIX}/man
-RELEASE = 5.7
+RELEASE = 5.9
 COMPONENTS = compat.o status.o entr.o
 
 all: entr
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.8/Makefile.linux-compat 
new/entr-5.9/Makefile.linux-compat
--- old/entr-5.8/Makefile.linux-compat  2026-03-02 22:01:02.000000000 +0100
+++ new/entr-5.9/Makefile.linux-compat  1970-01-01 01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-CPPFLAGS += -D_GNU_SOURCE -D_LINUX_PORT -Imissing
-MANPREFIX ?= ${PREFIX}/share/man
-EXTRA_SRC = missing/strlcpy.c missing/kqueue_inotify.c
-
-include Makefile.bsd
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.8/NEWS new/entr-5.9/NEWS
--- old/entr-5.8/NEWS   2026-03-02 22:01:02.000000000 +0100
+++ new/entr-5.9/NEWS   2026-10-01 21:26:16.000000000 +0200
@@ -1,5 +1,11 @@
 = Release History
 
+== 5.9: October 1, 2026
+
+ - Sleep for 1ms after utility is terminated in restart mode
+ - Abort if path length exceed boundaries, no longer rely on strlcpy(3)
+ - Check argument length before copying
+
 == 5.8: March 2, 2026
 
  - MacOS: set open_max limit using MAXFILESPERPROC
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.8/configure new/entr-5.9/configure
--- old/entr-5.8/configure      2026-03-02 22:01:02.000000000 +0100
+++ new/entr-5.9/configure      2026-10-01 21:26:16.000000000 +0200
@@ -1,18 +1,5 @@
 #!/bin/sh
 
-test_libc_features() {
-       CFLAGS="-D_GNU_SOURCE"
-       : ${CC:=cc}
-       2>/dev/null $CC -xc $CFLAGS -o /dev/null - <<-EOF
-       #include <string.h>
-       int main(void) {
-               char dst[4];
-               strlcpy(dst, "1234", sizeof dst);
-               return 0;
-       }
-       EOF
-}
-
 copy_mk() {
        cmd="cp Makefile.$1 Makefile"
        echo "+ $cmd"; $cmd
@@ -46,7 +33,7 @@
                copy_mk freebsd
                ;;
        Linux)
-               test_libc_features && copy_mk linux || copy_mk linux-compat
+               copy_mk linux
                ;;
        *)
                copy_mk bsd
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.8/data.h new/entr-5.9/data.h
--- old/entr-5.8/data.h 2026-03-02 22:01:02.000000000 +0100
+++ new/entr-5.9/data.h 2026-10-01 21:26:16.000000000 +0200
@@ -1,17 +1,6 @@
 /*
- * Copyright (c) 2012 Eric Radman <[email protected]>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ * data.h
+ * common data structures
  */
 
 #include <sys/stat.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.8/entr.1 new/entr-5.9/entr.1
--- old/entr-5.8/entr.1 2026-03-02 22:01:02.000000000 +0100
+++ new/entr-5.9/entr.1 2026-10-01 21:26:16.000000000 +0200
@@ -1,19 +1,4 @@
-.\"
-.\" Copyright (c) 2012 Eric Radman <[email protected]>
-.\"
-.\" Permission to use, copy, modify, and distribute this software for any
-.\" purpose with or without fee is hereby granted, provided that the above
-.\" copyright notice and this permission notice appear in all copies.
-.\"
-.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.\"
-.Dd March 2, 2026
+.Dd October 1, 2026
 .Dt ENTR 1
 .Os
 .Sh NAME
@@ -207,3 +192,5 @@
 Auto-reload a web server, or terminate if the server exits
 .Pp
 .Dl $ ls * | entr -rz ./httpd
+.Sh AUTHORS
+.An Eric Radman Aq Mt [email protected]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.8/entr.c new/entr-5.9/entr.c
--- old/entr-5.8/entr.c 2026-03-02 22:01:02.000000000 +0100
+++ new/entr-5.9/entr.c 2026-10-01 21:26:16.000000000 +0200
@@ -1,17 +1,6 @@
 /*
- * Copyright (c) 2012 Eric Radman <[email protected]>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ * entr.c
+ * A utility for running arbitrary commands when files change
  */
 
 #include <sys/param.h>
@@ -47,11 +36,6 @@
 
 #define NOTE_ALL NOTE_DELETE | NOTE_WRITE | NOTE_RENAME | NOTE_TRUNCATE | 
NOTE_ATTRIB
 
-/* shortcuts */
-
-#define min(a, b) (((a) < (b)) ? (a) : (b))
-#define MEMBER_SIZE(S, M) sizeof(((S *) 0)->M)
-
 /* shared state */
 
 extern int optind;
@@ -395,11 +379,12 @@
  */
 int
 process_input(FILE *file, WatchFile *files[], int max_files) {
-       char buf[PATH_MAX];
+       char buf[PATH_MAX + 1];
        char *p, *path, *parent_path;
        int n_files = 0;
        struct stat sb;
        int i, matches;
+       size_t len;
 
        while (fgets(buf, sizeof(buf), file) != NULL) {
                if ((p = strchr(buf, '\n')) != NULL)
@@ -408,6 +393,12 @@
                        continue;
                path = &buf[0];
 
+               len = strlen(path);
+               if ((len + 1) > PATH_MAX) {
+                       path[100] = '\0';
+                       errx(1, "path too long: %s..", path);
+               }
+
                if (xstat(path, &sb) == -1) {
                        warnx("unable to stat '%s'", path);
                        continue;
@@ -417,7 +408,7 @@
                        files[n_files] = malloc(sizeof(WatchFile));
                        if (files[n_files] == NULL)
                                err(1, "malloc");
-                       strlcpy(files[n_files]->fn, path, 
MEMBER_SIZE(WatchFile, fn));
+                       memcpy(files[n_files]->fn, path, len + 1);
                        files[n_files]->is_dir = 0;
                        files[n_files]->is_symlink = (S_ISLNK(sb.st_mode) != 0) 
? 1 : 0;
                        files[n_files]->file_count = 0;
@@ -444,7 +435,7 @@
                        files[n_files] = malloc(sizeof(WatchFile));
                        if (files[n_files] == NULL)
                                err(1, "malloc");
-                       strlcpy(files[n_files]->fn, path, 
MEMBER_SIZE(WatchFile, fn));
+                       memcpy(files[n_files]->fn, path, len + 1);
                        files[n_files]->is_dir = 1;
                        files[n_files]->is_symlink = 0;
                        files[n_files]->file_count = list_dir(path);
@@ -543,14 +534,18 @@
        int ret, status;
        struct timespec delay = { 0, 1000000 };
        char **new_argv;
-       char *p, *arg_buf;
+       char *p, *arg_buf, *src;
        int argc;
-       size_t remaining;
+       size_t len, rem;
 
-       if (restart_opt == 1)
+       if (restart_opt == 1) {
                terminate_utility();
+               nanosleep(&delay, NULL);
+       }
 
-       arg_buf = malloc(ARG_MAX);
+       arg_buf = malloc(rem = ARG_MAX);
+       if (arg_buf == NULL)
+               err(1, "malloc");
 
        if (shell_opt == 1) {
                /* run argv[1] with a shell using the leading edge as $0 */
@@ -563,9 +558,7 @@
                new_argv[2] = argv[0];
                new_argv[3] = leading_edge->fn;
        } else {
-               /* clone argv on each invocation to make the implementation of 
more
-                * complex substitution rules possible and easy
-                */
+               /* clone argv on each invocation to allow for substitution 
rules */
                for (argc = 0; argv[argc]; argc++)
                        ;
                new_argv = calloc(argc + 1, sizeof(char *));
@@ -573,14 +566,20 @@
                        err(1, "calloc");
                new_argv[0] = "/bin/false";
                for (m = 0, i = 0, p = arg_buf; i < argc; i++) {
-                       remaining = ARG_MAX - (p - arg_buf);
                        new_argv[i] = p;
                        if ((m < 1) && (strcmp(argv[i], "/_")) == 0) {
-                               p += strlcpy(p, leading_edge->fn, remaining);
+                               src = leading_edge->fn;
                                m++;
                        } else
-                               p += strlcpy(p, argv[i], remaining);
-                       p++;
+                               src = argv[i];
+
+                       len = strlen(src);
+                       if (len + 1 > rem)
+                               errx(1, "argument list too long");
+
+                       memcpy(p, src, len + 1);
+                       p += len + 1;
+                       rem -= len + 1;
                }
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.8/missing/compat.h 
new/entr-5.9/missing/compat.h
--- old/entr-5.8/missing/compat.h       2026-03-02 22:01:02.000000000 +0100
+++ new/entr-5.9/missing/compat.h       2026-10-01 21:26:16.000000000 +0200
@@ -6,7 +6,6 @@
 
 #if defined(_LINUX_PORT)
 #define INOTIFY_MAX_USER_WATCHES 2
-size_t strlcpy(char *dst, const char *src, size_t dsize);
 int fs_sysctl(const int name);
 #endif
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.8/missing/kqueue_inotify.c 
new/entr-5.9/missing/kqueue_inotify.c
--- old/entr-5.8/missing/kqueue_inotify.c       2026-03-02 22:01:02.000000000 
+0100
+++ new/entr-5.9/missing/kqueue_inotify.c       2026-10-01 21:26:16.000000000 
+0200
@@ -1,16 +1,6 @@
-/* * Copyright (c) 2013 Eric Radman <[email protected]>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+/*
+ * kqueue_inotify.c
+ * emulate kqueue(2) interface on Linux
  */
 
 #include <sys/event.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.8/missing/strlcpy.c 
new/entr-5.9/missing/strlcpy.c
--- old/entr-5.8/missing/strlcpy.c      2026-03-02 22:01:02.000000000 +0100
+++ new/entr-5.9/missing/strlcpy.c      1970-01-01 01:00:00.000000000 +0100
@@ -1,49 +0,0 @@
-/*     $OpenBSD: strlcpy.c,v 1.16 2019/01/25 00:19:25 millert Exp $    */
-
-/*
- * Copyright (c) 1998, 2015 Todd C. Miller <[email protected]>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include <string.h>
-#include <sys/types.h>
-
-/*
- * Copy string src to buffer dst of size dsize.  At most dsize-1
- * chars will be copied.  Always NUL terminates (unless dsize == 0).
- * Returns strlen(src); if retval >= dsize, truncation occurred.
- */
-size_t
-strlcpy(char *dst, const char *src, size_t dsize) {
-       const char *osrc = src;
-       size_t nleft = dsize;
-
-       /* Copy as many bytes as will fit. */
-       if (nleft != 0) {
-               while (--nleft != 0) {
-                       if ((*dst++ = *src++) == '\0')
-                               break;
-               }
-       }
-
-       /* Not enough room in dst, add NUL and traverse rest of src. */
-       if (nleft == 0) {
-               if (dsize != 0)
-                       *dst = '\0'; /* NUL-terminate dst */
-               while (*src++)
-                       ;
-       }
-
-       return (src - osrc - 1); /* count does not include NUL */
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.8/missing/sys/event.h 
new/entr-5.9/missing/sys/event.h
--- old/entr-5.8/missing/sys/event.h    2026-03-02 22:01:02.000000000 +0100
+++ new/entr-5.9/missing/sys/event.h    2026-10-01 21:26:16.000000000 +0200
@@ -1,27 +1,6 @@
 /*
- * Copyright (c) 1999,2000,2001 Jonathan Lemon <[email protected]>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * event.h
+ * emulate kqueue(2) interface on Linux
  */
 
 #include <sys/types.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.8/missing/sys/sysctl.h 
new/entr-5.9/missing/sys/sysctl.h
--- old/entr-5.8/missing/sys/sysctl.h   2026-03-02 22:01:02.000000000 +0100
+++ new/entr-5.9/missing/sys/sysctl.h   2026-10-01 21:26:16.000000000 +0200
@@ -1 +1,4 @@
-/* empty unit: sysctl(2) not called on Linux */
+/*
+ * sysctl.h
+ * empty unit: sysctl(2) not called on Linux
+ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.8/status.c new/entr-5.9/status.c
--- old/entr-5.8/status.c       2026-03-02 22:01:02.000000000 +0100
+++ new/entr-5.9/status.c       2026-10-01 21:26:16.000000000 +0200
@@ -1,17 +1,6 @@
 /*
- * Copyright (c) 2024 Eric Radman <[email protected]>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ * status.c
+ * run external status scripts
  */
 
 #include <err.h>
@@ -27,8 +16,6 @@
 
 #include <sys/stat.h>
 
-#include "missing/compat.h"
-
 #include "status.h"
 
 /* globals */
@@ -37,7 +24,7 @@
 void
 start_log_filter(int safe) {
        char *argv[8];
-       char *awk_script;
+       char *awk_script, *awk_script_path;
        struct passwd *pw;
 
        awk_script = getenv("ENTR_STATUS_SCRIPT");
@@ -48,7 +35,8 @@
                asprintf(&awk_script, "%s/.entr/status.awk", pw->pw_dir);
        }
 
-       create_dir(xdirname(awk_script));
+       awk_script_path = strdup(awk_script);
+       create_dir(dirname(awk_script_path));
        install_file(awk_script,
            "# http://eradman.com/entrproject/status-filters.html\n";
            "/^signal/ { print $3, \"terminated by signal\", $2; }\n"
@@ -83,6 +71,7 @@
                err(1, "could not exec %s", argv[0]);
        }
        close(status_stdin_pipe[0]);
+       free(awk_script_path);
 }
 
 void
@@ -98,19 +87,10 @@
 }
 
 /*
- * xdirname - mimic dirname(3) on OpenBSD which does not modify input
  * create_dir - ensure a directory exists
  * install_file - create file is it does not exist
  */
 
-char *
-xdirname(const char *path) {
-       static char dname[PATH_MAX];
-
-       strlcpy(dname, path, sizeof(dname));
-       return dirname(dname);
-}
-
 void
 create_dir(const char *dir) {
        struct stat dst_sb;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.8/status.h new/entr-5.9/status.h
--- old/entr-5.8/status.h       2026-03-02 22:01:02.000000000 +0100
+++ new/entr-5.9/status.h       2026-10-01 21:26:16.000000000 +0200
@@ -1,23 +1,11 @@
 /*
- * Copyright (c) 2024 Eric Radman <[email protected]>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ * status.h
+ * run external status scripts
  */
 
 void start_log_filter(int safe);
 void write_log_filter(char *input, size_t len);
 void end_log_filter();
-char *xdirname(const char *path);
 void create_dir(const char *dir);
 void install_file(const char *dst, const char *content);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.8/system_test.sh new/entr-5.9/system_test.sh
--- old/entr-5.8/system_test.sh 2026-03-02 22:01:02.000000000 +0100
+++ new/entr-5.9/system_test.sh 2026-10-01 21:26:16.000000000 +0200
@@ -101,6 +101,13 @@
        ls $tmp | ENTR_RESTART_SIGNAL="KILL" entr echo 2> /dev/null || code=$?
        assert $code 1
 
+try "reject path overflow"
+       path_max=$(getconf PATH_MAX $tmp)
+       printf "%0${path_max}s\n" | entr echo > $tmp/exec.out 2>$tmp/exec.err
+       assert $? 1
+       grep -q "path too long:" $tmp/exec.err
+       assert $? 0
+
 # status message tests
 
 try "install default status script"
@@ -523,7 +530,6 @@
        cp -f /bin/sleep $tmp/ ; zz
        kill -INT $bgpid
        wait $bgpid; assert "$?" "0"
-       rm -f $tmp/sleep
        assert "$(cat $tmp/exec.out)" "$(printf 'vroom\nvroom\n')"
 
 try "exec a command using the first file to change"

Reply via email to