Bug when doing make test using root user

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Bug when doing make test using root user

From: Jean-Yves LENHOF <hidden>
Date: 2016-06-15 23:05:16

Hi,

I tried to compile git 2.4.3 using root on a server. It failed on test 
41 of t0302-credential-store.sh
In fact even if we remove read access on a directory, root still can 
acces this directory.
Using a not privilegied user make the test work.
Perhaps the test should be adapted to this corner case.
Trace below.

Have fun,

JYL

*** t0302-credential-store.sh ***
ok 1 - helper (store) has no existing data
ok 2 - helper (store) stores password
ok 3 - helper (store) can retrieve password
ok 4 - helper (store) requires matching protocol
ok 5 - helper (store) requires matching host
ok 6 - helper (store) requires matching username
ok 7 - helper (store) requires matching path
ok 8 - helper (store) can forget host
ok 9 - helper (store) can store multiple users
ok 10 - helper (store) can forget user
ok 11 - helper (store) remembers other user
ok 12 - when xdg file does not exist, xdg file not created
ok 13 - setup xdg file
ok 14 - helper (store) has no existing data
ok 15 - helper (store) stores password
ok 16 - helper (store) can retrieve password
ok 17 - helper (store) requires matching protocol
ok 18 - helper (store) requires matching host
ok 19 - helper (store) requires matching username
ok 20 - helper (store) requires matching path
ok 21 - helper (store) can forget host
ok 22 - helper (store) can store multiple users
ok 23 - helper (store) can forget user
ok 24 - helper (store) remembers other user
ok 25 - when xdg file exists, home file not created
ok 26 - setup custom xdg file
ok 27 - helper (store) has no existing data
ok 28 - helper (store) stores password
ok 29 - helper (store) can retrieve password
ok 30 - helper (store) requires matching protocol
ok 31 - helper (store) requires matching host
ok 32 - helper (store) requires matching username
ok 33 - helper (store) requires matching path
ok 34 - helper (store) can forget host
ok 35 - helper (store) can store multiple users
ok 36 - helper (store) can forget user
ok 37 - helper (store) remembers other user
ok 38 - if custom xdg file exists, home and xdg files not created
ok 39 - get: use home file if both home and xdg files have matches
ok 40 - get: use xdg file if home file has no matches
not ok 41 - get: use xdg file if home file is unreadable
#
#               echo "https://home-user:home-pass@example.com" 
 >"$HOME/.git-credentials" &&
#               chmod -r "$HOME/.git-credentials" &&
#               mkdir -p "$HOME/.config/git" &&
#               echo "https://xdg-user:xdg-pass@example.com" 
 >"$HOME/.config/git/credentials" &&
#               check fill store <<-\EOF
#               protocol=https
#               host=example.com
#               --
#               protocol=https
#               host=example.com
#               username=xdg-user
#               password=xdg-pass
#               --
#               EOF
#
ok 42 - store: if both xdg and home files exist, only store in home file
ok 43 - erase: erase matching credentials from both xdg and home files
# failed 1 among 43 test(s)
1..43
make[2]: *** [t0302-credential-store.sh] Error 1
make[2]: Leaving directory `/root/git-2.4.3/t'
make[1]: *** [test] Error 2
make[1]: Leaving directory `/root/git-2.4.3/t'
make: *** [test] Error 2

Re: Bug when doing make test using root user

From: Paul Tan <hidden>
Date: 2016-06-15 23:05:16

On Fri, Jun 12, 2015 at 5:43 PM, Jean-Yves LENHOF
[off-list ref] wrote:
Hi,

I tried to compile git 2.4.3 using root on a server. It failed on test 41 of
t0302-credential-store.sh
In fact even if we remove read access on a directory, root still can acces
this directory.
Using a not privilegied user make the test work.
Perhaps the test should be adapted to this corner case.
Trace below.
Right, the test should have the SANITY prereq.

Thanks for reporting.

Regards,
Paul
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help