Andrew Kyle Purtell created ZOOKEEPER-5124:
----------------------------------------------

             Summary: (C client) Chroot path validation fails to isolate 
namespaces
                 Key: ZOOKEEPER-5124
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-5124
             Project: ZooKeeper
          Issue Type: Bug
          Components: c client
            Reporter: Andrew Kyle Purtell
            Assignee: Andrew Kyle Purtell


On a chrooted handle, the C client would add the chroot to the client path 
before it validated the path. The check then ran on the full path only, so a 
path that did not start with "/" would be silently accepted. (!) Also, 
`sub_string` removed the chroot from server paths by length only.

The fix requires `prepend_chroot` return NULL for a NULL, empty, or relative 
client
path on a chrooted handle. The `isValidPath` check of the caller will then 
return ZBADARGUMENTS as expected. `sub_string` should remove the chroot only on 
a path component boundary and return other paths unchanged. Sync config should 
use
`zoo_awgetconfig` with a completion.




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to