diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-02-07 21:03:49 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-02-07 21:03:49 -0800 |
commit | 158211060c413bcbdebba3f87478673cbee12dc0 (patch) | |
tree | 4181c8f72e0b96eba1be8e3cd682f493e52ce27c /sysif.c | |
parent | 7b094eccd23ab67c39c4569ffd8e0ce7533038bb (diff) | |
download | txr-158211060c413bcbdebba3f87478673cbee12dc0.tar.gz txr-158211060c413bcbdebba3f87478673cbee12dc0.tar.bz2 txr-158211060c413bcbdebba3f87478673cbee12dc0.zip |
chmod: bug handling comma after right hand ugo.
* sysif.c (chmod_wrap): The chm_comma state is transitioned to
after seeing a right hand side u, g or o. These do not combine
with other letters, so ch_comma expects a comma after which a
new permission clause we start,. Therefore the srcm and who
variables must be rest. It's also a good idea to continue the
loop.
* tests/018/chmod.tl: New test case which exposed
the above issue.
Diffstat (limited to 'sysif.c')
-rw-r--r-- | sysif.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -630,8 +630,7 @@ static val chmod_wrap(val target, val mode) case chm_comma: if (ch != ',') goto inval; - cs = chm_who; - break; + srcm = 0; who = 0; cs = chm_who; continue; } { |