{"thread":{"id":"39610","subject":"Bug when doing make test using root user","startedAt":"2015-06-12T09:43:01Z","lastAt":"2015-06-12T13:17:13Z","messageCount":2,"participants":["Jean-Yves LENHOF","Paul Tan"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"263653","messageId":"28c940a4a806c8da130403068cf4c0ef@lenhof.eu.org","threadId":"39610","inReplyTo":null,"subject":"Bug when doing make test using root user","fromName":"Jean-Yves LENHOF","fromEmail":"jean-yves@lenhof.eu.org","sentAt":"2015-06-12T09:43:01Z","receivedAt":"2015-06-12T09:43:01Z","isPatch":false,"sender":{"key":"jean-yves@lenhof.eu.org","avatar":null},"body":"Hi,\n\nI tried to compile git 2.4.3 using root on a server. It failed on test \n41 of t0302-credential-store.sh\nIn fact even if we remove read access on a directory, root still can \nacces this directory.\nUsing a not privilegied user make the test work.\nPerhaps the test should be adapted to this corner case.\nTrace below.\n\nHave fun,\n\nJYL\n\n*** t0302-credential-store.sh ***\nok 1 - helper (store) has no existing data\nok 2 - helper (store) stores password\nok 3 - helper (store) can retrieve password\nok 4 - helper (store) requires matching protocol\nok 5 - helper (store) requires matching host\nok 6 - helper (store) requires matching username\nok 7 - helper (store) requires matching path\nok 8 - helper (store) can forget host\nok 9 - helper (store) can store multiple users\nok 10 - helper (store) can forget user\nok 11 - helper (store) remembers other user\nok 12 - when xdg file does not exist, xdg file not created\nok 13 - setup xdg file\nok 14 - helper (store) has no existing data\nok 15 - helper (store) stores password\nok 16 - helper (store) can retrieve password\nok 17 - helper (store) requires matching protocol\nok 18 - helper (store) requires matching host\nok 19 - helper (store) requires matching username\nok 20 - helper (store) requires matching path\nok 21 - helper (store) can forget host\nok 22 - helper (store) can store multiple users\nok 23 - helper (store) can forget user\nok 24 - helper (store) remembers other user\nok 25 - when xdg file exists, home file not created\nok 26 - setup custom xdg file\nok 27 - helper (store) has no existing data\nok 28 - helper (store) stores password\nok 29 - helper (store) can retrieve password\nok 30 - helper (store) requires matching protocol\nok 31 - helper (store) requires matching host\nok 32 - helper (store) requires matching username\nok 33 - helper (store) requires matching path\nok 34 - helper (store) can forget host\nok 35 - helper (store) can store multiple users\nok 36 - helper (store) can forget user\nok 37 - helper (store) remembers other user\nok 38 - if custom xdg file exists, home and xdg files not created\nok 39 - get: use home file if both home and xdg files have matches\nok 40 - get: use xdg file if home file has no matches\nnot ok 41 - get: use xdg file if home file is unreadable\n#\n#               echo \"https://home-user:home-pass@example.com\" \n >\"$HOME/.git-credentials\" &&\n#               chmod -r \"$HOME/.git-credentials\" &&\n#               mkdir -p \"$HOME/.config/git\" &&\n#               echo \"https://xdg-user:xdg-pass@example.com\" \n >\"$HOME/.config/git/credentials\" &&\n#               check fill store <<-\\EOF\n#               protocol=https\n#               host=example.com\n#               --\n#               protocol=https\n#               host=example.com\n#               username=xdg-user\n#               password=xdg-pass\n#               --\n#               EOF\n#\nok 42 - store: if both xdg and home files exist, only store in home file\nok 43 - erase: erase matching credentials from both xdg and home files\n# failed 1 among 43 test(s)\n1..43\nmake[2]: *** [t0302-credential-store.sh] Error 1\nmake[2]: Leaving directory `/root/git-2.4.3/t'\nmake[1]: *** [test] Error 2\nmake[1]: Leaving directory `/root/git-2.4.3/t'\nmake: *** [test] Error 2\n"},{"id":"263661","messageId":"CACRoPnSeVWpj0-=Ei39UsKfe7m7UwkRFChkb7KAGoZRoZs23rw@mail.gmail.com","threadId":"39610","inReplyTo":"28c940a4a806c8da130403068cf4c0ef@lenhof.eu.org","subject":"Re: Bug when doing make test using root user","fromName":"Paul Tan","fromEmail":"pyokagan@gmail.com","sentAt":"2015-06-12T13:17:13Z","receivedAt":"2015-06-12T13:17:13Z","isPatch":false,"sender":{"key":"pyokagan@gmail.com","avatar":"https://avatars.githubusercontent.com/u/109479?v=4"},"body":"On Fri, Jun 12, 2015 at 5:43 PM, Jean-Yves LENHOF\n<jean-yves@lenhof.eu.org> wrote:\n> Hi,\n>\n> I tried to compile git 2.4.3 using root on a server. It failed on test 41 of\n> t0302-credential-store.sh\n> In fact even if we remove read access on a directory, root still can acces\n> this directory.\n> Using a not privilegied user make the test work.\n> Perhaps the test should be adapted to this corner case.\n> Trace below.\n\nRight, the test should have the SANITY prereq.\n\nThanks for reporting.\n\nRegards,\nPaul\n"}]}