Patchwork D8581: grep: test that paths get audited

login
register
mail settings
Submitter phabricator
Date May 25, 2020, 11:42 p.m.
Message ID <differential-rev-PHID-DREV-t2zhi4lo72xj7bbtsok4-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46374/
State Superseded
Headers show

Comments

phabricator - May 25, 2020, 11:42 p.m.
valentin.gatienbaron created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8581

AFFECTED FILES
  tests/test-grep.t

CHANGE DETAILS




To: valentin.gatienbaron, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-grep.t b/tests/test-grep.t
--- a/tests/test-grep.t
+++ b/tests/test-grep.t
@@ -670,6 +670,11 @@ 
   $ rm -f added; ln -s symlink-added added
   $ hg grep '' | grep added
   added:symlink-added
+  $ mkdir dir; touch dir/f; hg add dir/f
+  $ rm -rf dir; ln -s / dir
+  $ hg grep ''
+  abort: path 'dir/f' traverses symbolic link 'dir'
+  [255]
 #endif
 
 which can be overridden by -rREV