summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--parse.c6
-rwxr-xr-xtests.sh2
2 files changed, 5 insertions, 3 deletions
diff --git a/parse.c b/parse.c
index 4e326ec..fa95e69 100644
--- a/parse.c
+++ b/parse.c
@@ -1896,8 +1896,10 @@ static int parse_mode(const struct parser_state *state, const char *mode, struct
}
break;
case 't':
- file_change |= S_ISVTX;
- dir_change |= S_ISVTX;
+ if (who & 0007) {
+ file_change |= S_ISVTX;
+ dir_change |= S_ISVTX;
+ }
break;
default:
mstate = MODE_ACTION_APPLY;
diff --git a/tests.sh b/tests.sh
index 0e1a964..8ec983f 100755
--- a/tests.sh
+++ b/tests.sh
@@ -1762,7 +1762,7 @@ function test_perm_setid() {
}
function test_perm_sticky() {
- bfs_diff rainbow -perm /ug+t
+ bfs_diff rainbow -perm /+t
}
function test_prune() {