[openssh-commits] [openssh] branch master updated: Fix fix to !HAVE_OPENAT fallback path.

git+noreply at mindrot.org git+noreply at mindrot.org
Thu Oct 15 23:18:19 AEDT 2026


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

The following commit(s) were added to refs/heads/master by this push:
     new 6d489a0d8 Fix fix to !HAVE_OPENAT fallback path.
6d489a0d8 is described below

commit 6d489a0d8000e2019722c24f4172449f73185441
Author: Darren Tucker <dtucker at dtucker.net>
AuthorDate: Thu Oct 15 23:15:23 2026 +1100

    Fix fix to !HAVE_OPENAT fallback path.
    
    The previous fix uncovered another bug where the leading "/" in the
    path (or double "//") would cause earlier termination, leaving the
    directory un-created.  Fixes agent test on such plaforms.
---
 misc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/misc.c b/misc.c
index 1f4e73d64..d49c7100a 100644
--- a/misc.c
+++ b/misc.c
@@ -3330,7 +3330,9 @@ mkdir_path(const char *target, mode_t mode)
 	}
 
 	/* Work through the path, component-wise */
-	while ((p = strsep(&dir, "/")) && *p != '\0') {
+	while ((p = strsep(&dir, "/"))) {
+		if (*p == '\0')
+			continue;
 		if (strlcat(path, "/", plen) >= plen ||
 		    strlcat(path, p, plen) >= plen)
 			goto out;

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list