summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Quast <jquast@io.com>2014-12-19 18:46:35 -0800
committerJeff Quast <jquast@io.com>2014-12-19 18:46:35 -0800
commit4242c4605a1de8d3c282e6a5a0b16977b34789ec (patch)
tree72da0d86952d746423b3914d0af9b21d71f33042
parent194e8c287494b52f2294adadc56028d10f49e914 (diff)
downloadpexpect-issue-104-cannot-exec-setuids.tar.gz
Comment on the cause for 'group executable' == noissue-104-cannot-exec-setuids
-rw-r--r--tests/test_which.py4
-rwxr-xr-xtools/teamcity-runtests.sh2
2 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_which.py b/tests/test_which.py
index ec9fbb8..bda3333 100644
--- a/tests/test_which.py
+++ b/tests/test_which.py
@@ -188,6 +188,10 @@ class TestCaseWhich(PexpectTestCase.PexpectTestCase):
shutil.copy(bin_echo, bin_path)
isroot = os.getuid() == 0
for should_match, mode in (
+ # note that although the file may have matching 'group' or
+ # 'other' executable permissions, it is *not* executable
+ # because the current uid is the owner of the file -- which
+ # takes precedence
(False, 0o000), # ----------, no
(isroot, 0o001), # ---------x, no
(isroot, 0o010), # ------x---, no
diff --git a/tools/teamcity-runtests.sh b/tools/teamcity-runtests.sh
index ce4e451..b74f179 100755
--- a/tools/teamcity-runtests.sh
+++ b/tools/teamcity-runtests.sh
@@ -29,7 +29,7 @@ workon ${venv} || mkvirtualenv -p `which python${pyversion}` ${venv} || true
# install ptyprocess
cd $here/../../ptyprocess
-pip uninstall ptyprocess || true
+pip uninstall --yes ptyprocess || true
python setup.py install
# install all test requirements