Patchwork [Bug,5229] New: NetBSD: env does not provide -u flag

login
register
mail settings
Submitter mercurial-bugs@selenic.com
Date May 6, 2016, 8:05 a.m.
Message ID <bug-5229-285@https.bz.mercurial-scm.org/>
Download mbox | patch
Permalink /patch/14937/
State Not Applicable
Headers show

Comments

mercurial-bugs@selenic.com - May 6, 2016, 8:05 a.m.
https://bz.mercurial-scm.org/show_bug.cgi?id=5229

            Bug ID: 5229
           Summary: NetBSD: env does not provide -u flag
           Product: Mercurial
           Version: 3.8.1
          Hardware: All
                OS: Other
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: Mercurial
          Assignee: bugzilla@selenic.com
          Reporter: tk@giga.or.at
                CC: mercurial-devel@selenic.com

On NetBSD, env(1) does not provide a -u flag, which makes test-subrepo-git.t
fail:


   $ env GIT_ALLOW_PROTOCOL=ext hg clone malicious-subrepository
malicious-subrepository-clone-allowed

Patch

--- .../mercurial-3.8.1/tests/test-subrepo-git.t
+++ .../mercurial-3.8.1/tests/test-subrepo-git.t.err
@@ -1146,12 +1146,9 @@ 
   $ hg commit -m "add subrepo"
   $ cd ..
   $ env -u GIT_ALLOW_PROTOCOL hg clone malicious-subrepository
malicious-subrepository-protected
-  Cloning into '$TESTTMP/tc/malicious-subrepository-protected/s'... (glob)
-  fatal: transport 'ext' not allowed
-  updating to branch default
-  cloning subrepo s from ext::sh -c echo% pwned% >&2
-  abort: git clone error 128 in s (in subrepo s)
-  [255]
+  env: unknown option -- u
+  Usage: env [-i] [name=value ...] [command]
+  [1]

 whitelisting of ext should be respected (that's the git submodule behaviour)