diff options
Diffstat (limited to 'main/openrc/0016-checkpath-fix-code-to-walk-the-directory-path.patch')
-rw-r--r-- | main/openrc/0016-checkpath-fix-code-to-walk-the-directory-path.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/main/openrc/0016-checkpath-fix-code-to-walk-the-directory-path.patch b/main/openrc/0016-checkpath-fix-code-to-walk-the-directory-path.patch new file mode 100644 index 00000000000..4cfd18bee92 --- /dev/null +++ b/main/openrc/0016-checkpath-fix-code-to-walk-the-directory-path.patch @@ -0,0 +1,32 @@ +From 55ceac775c388191090fe37aef489d721ee9299d Mon Sep 17 00:00:00 2001 +From: William Hubbs <w.d.hubbs@gmail.com> +Date: Thu, 15 Apr 2021 17:39:51 -0500 +Subject: [PATCH] checkpath: fix code to walk the directory path + +X-Gentoo-Bug: 782808 +X-Gentoo-Bug-URL: https://bugs.gentoo.org/782808 +--- + src/rc/checkpath.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/rc/checkpath.c b/src/rc/checkpath.c +index 48275ca9..6856d034 100644 +--- a/src/rc/checkpath.c ++++ b/src/rc/checkpath.c +@@ -131,13 +131,14 @@ static int get_dirfd(char *path, bool symlinks) { + */ + close(new_dirfd); + } else { ++ /* now walk down the directory path */ + close(dirfd); + dirfd = new_dirfd; + free(linkpath); + linkpath = NULL; ++ item = strtok(NULL, "/"); ++ components--; + } +- item = strtok(NULL, "/"); +- components--; + } + free(path_dupe); + free(linkpath); |