From 158211060c413bcbdebba3f87478673cbee12dc0 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 7 Feb 2020 21:03:49 -0800 Subject: 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. --- tests/018/chmod.tl | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/018') diff --git a/tests/018/chmod.tl b/tests/018/chmod.tl index f815548c..a5494998 100644 --- a/tests/018/chmod.tl +++ b/tests/018/chmod.tl @@ -40,3 +40,4 @@ (cht "------------" "+rwx,g-r+w,o-r+w" "---rwx-wx-wx") (cht "---------rwx" "u=rwsx" "s--rwx---rwx") (cht "---------rwx" "u=rwsx,g=rwx,go-x" "s--rwxrw-rw-") +(cht "---------rwx" "g=o,g-w+s,u=g,o-x" "-g-r-xr-xrw-") -- cgit v1.2.3