diff --git a/debian/patches/Partially-revert-lib-src-Use-strsep-3-instead-of-its-patt.patch b/debian/patches/Partially-revert-lib-src-Use-strsep-3-instead-of-its-patt.patch new file mode 100644 index 00000000..2fc8b7c6 --- /dev/null +++ b/debian/patches/Partially-revert-lib-src-Use-strsep-3-instead-of-its-patt.patch @@ -0,0 +1,52 @@ +From: Chris Hofstaedtler +Date: Mon, 17 Feb 2025 12:26:07 +0100 +Subject: Partially revert "lib/, src/: Use strsep(3) instead of its pattern" + +This reverts src/chfn.c from commit 16cb664865541162c504a6f5ef5ca4b38b5e0c9a. +--- + src/chfn.c | 17 +++++++++++------ + 1 file changed, 11 insertions(+), 6 deletions(-) + +diff --git a/src/chfn.c b/src/chfn.c +index 4c96fba..f06cb44 100644 +--- a/src/chfn.c ++++ b/src/chfn.c +@@ -216,27 +216,32 @@ static void new_fields (void) + */ + static char *copy_field (char *in, char *out, char *extra) + { +- while (NULL != in) { +- char *f; ++ char *cp = NULL; + +- f = strsep(&in, ","); ++ while (NULL != in) { ++ cp = strchr (in, ','); ++ if (NULL != cp) { ++ *cp++ = '\0'; ++ } + +- if (strchr(f, '=') == NULL) ++ if (strchr (in, '=') == NULL) { + break; ++ } + + if (NULL != extra) { + if (!streq(extra, "")) { + strcat (extra, ","); + } + +- strcat(extra, f); ++ strcat (extra, in); + } ++ in = cp; + } + if ((NULL != in) && (NULL != out)) { + strcpy (out, in); + } + +- return in; ++ return cp; + } + + /* diff --git a/debian/patches/series b/debian/patches/series index 94212c93..3b3e9765 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -10,3 +10,4 @@ upstream/a015e919834c90b99947829c6c823f7fe93a8097-E_BAD_NAME.patch upstream/man-useradd.8.xml-Document-new-exit-code-19-E_BAD_NAME.patch upstream/Revert-lib-src-Use-local-time-for-human-readable-dates.patch Revert-lib-strtoday.c-strtoday-Fix-calculation.patch +Partially-revert-lib-src-Use-strsep-3-instead-of-its-patt.patch