Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/usr.bin/find Pull up following revision(s) (requested by ...
details: https://anonhg.NetBSD.org/src/rev/0f69c567f6fe
branches: netbsd-8
changeset: 434011:0f69c567f6fe
user: snj <snj%NetBSD.org@localhost>
date: Thu Jun 15 05:46:49 2017 +0000
description:
Pull up following revision(s) (requested by christos in ticket #40):
usr.bin/find/function.c: revision 1.76
PR/52295: Anthony Mallet: find -delete: "relative path not safe" with absolute
paths ... Fix from OpenBSD
diffstat:
usr.bin/find/function.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 77f5e6eed7df -r 0f69c567f6fe usr.bin/find/function.c
--- a/usr.bin/find/function.c Thu Jun 15 05:45:17 2017 +0000
+++ b/usr.bin/find/function.c Thu Jun 15 05:46:49 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: function.c,v 1.75 2016/06/13 02:06:44 pgoyette Exp $ */
+/* $NetBSD: function.c,v 1.75.8.1 2017/06/15 05:46:49 snj Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "from: @(#)function.c 8.10 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: function.c,v 1.75 2016/06/13 02:06:44 pgoyette Exp $");
+__RCSID("$NetBSD: function.c,v 1.75.8.1 2017/06/15 05:46:49 snj Exp $");
#endif
#endif /* not lint */
@@ -465,7 +465,7 @@
errx(1, "-delete: insecure options got turned on");
/* Potentially unsafe - do not accept relative paths whatsoever */
- if (strchr(entry->fts_accpath, '/') != NULL)
+ if (entry->fts_level > 0 && strchr(entry->fts_accpath, '/') != NULL)
errx(1, "-delete: %s: relative path potentially not safe",
entry->fts_accpath);
Home |
Main Index |
Thread Index |
Old Index