From e3ce0338d4c4d60052b6f9f92175218cf6cf97c8 Mon Sep 17 00:00:00 2001
From: Rob Landley <rob@landley.net>
Date: Wed, 25 Nov 2020 16:00:47 -0600
Subject: Fix help text to explain why o+s isn't +t, add test +s not setting
 +t.

---
 tests/chmod.test   | 1 +
 toys/posix/chmod.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/chmod.test b/tests/chmod.test
index cbc32805..9dcf796e 100755
--- a/tests/chmod.test
+++ b/tests/chmod.test
@@ -109,6 +109,7 @@ chtest -w "dr-xr-xr-x\n-r--r--r--\n"
 chtest -x "drw-r--r--\n-rw-r--r--\n"
 chtest g+s "drwxr-sr-x\n-rw-r-Sr--\n"
 chtest u+s "drwsr-xr-x\n-rwSr--r--\n"
+chtest +s "drwsr-sr-x\n-rwSr-Sr--\n"
 chtest o+s "drwxr-xr-x\n-rw-r--r--\n"
 chtest +t  "drwxr-xr-t\n-rw-r--r-T\n"
 
diff --git a/toys/posix/chmod.c b/toys/posix/chmod.c
index 3645ebc8..3838b527 100644
--- a/toys/posix/chmod.c
+++ b/toys/posix/chmod.c
@@ -19,7 +19,7 @@ config CHMOD
     Stanzas are applied in order: For each category (u = user,
     g = group, o = other, a = all three, if none specified default is a),
     set (+), clear (-), or copy (=), r = read, w = write, x = execute.
-    s = u+s = suid, g+s = sgid, o+s = sticky. (+t is an alias for o+s).
+    s = u+s = suid, g+s = sgid, +t = sticky. (o+s ignored so a+s doesn't set +t)
     suid/sgid: execute as the user/group who owns the file.
     sticky: can't delete files you don't own out of this directory
     X = x for directories or if any category already has x set.
-- 
cgit v1.2.3