diff options
author | Ben Harris <bjh21@cam.ac.uk> | 2018-12-12 22:32:47 +0000 |
---|---|---|
committer | Dmitry Bogatov <KAction@debian.org> | 2018-12-12 22:32:47 +0000 |
commit | 74bfe3f09ce9241fd729ab1240d9e7d14683bd0d (patch) | |
tree | bd1f0a56df20a14550dcf202c67a6a10eac1b506 | |
parent | e9bbe70da7a8cd31abefa6544d30b5263a1a60c7 (diff) |
improve detection of old style core dumps
The proposed patch is wrong: as written it arranges to reject filenames
that begin with ".core", rather than those that end with ".core". Files
whose names end ".core" are already rejected by cfgfile_filter(), and
files whose names begin ".core" are rejected by the general rejection of
filenames beginning with ".".
I think the original test is intended to trap old-style core dumps, which
are always called simply "core". This could be correctly achieved by:
Bug-Debian: bugs.debian.org/611292
Gbp-Pq: Name 150_core_string_test.patch
-rw-r--r-- | insserv.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3078,7 +3078,7 @@ int main (int argc, char *argv[]) continue; } - if (!strncmp(d->d_name, "core", strlen("core"))) { + if (!strcmp(d->d_name, "core")) { if (isarg) warn("script name %s is not valid, skipped!\n", d->d_name); continue; |