Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH v2] tests: A SANITY test prereq for testing if we're root

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:49:16

Ævar Arnfjörð Bjarmason  [off-list ref] writes:
+ - SANITY
+
+   Test is not run by root user, and an attempt to write to an
+   unwritable file is expected to fail correctly.
As I said in the previous round, I am indeed in favor of having a single
"running as root---code that expects that the normal UNIXy permission
based protection to apply, aka 'running in sane environment', will not
work correctly" prerequisite token, rather than having separate "can I
expect an unwritable file to be unwritable?"  "can I expect an unreadble
file to be unreadable?" bits.  The name of the token _might_ be subject to
debate (I am fine with either SANITY or NOROOT), but the explanation
should mention this is defined to be a bit more broad than "unWRITABLE", I
think.  "test -w /" is a traditional way to approximately check if you are
running as root (technically, it only checks if you are running with
unduly high privilege---your sysadm _could_ have done "chmod 2775 /" and
made it owned by the admin group).

But that is just a nitpick on the wording we could fix if necessary.

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