-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add POSIX setgid/setuid/sticky bit support (#59)
* posix: Do not refute listings including setuid/setgid/sticky bits As written, the regex that matches on POSIX directory listings misses some cases that can appear, especially on more complex systems. These are cases where the set-user-ID on execution, set-group-ID on execution, and saved-text (aka setuid, setgid, and "sticky" bits respectively) are set, typically by a system administrator. These are quite consistently represented by 's' and 't' in place of the eXecute bit, and the uppercase alternatives ('S' and 'T') if the eXecute bit is not set, but the corresponding setuid/setgid/sticky bit is set. Given that the extant regex does not attempt to validate the ordering (i.e., xwrxwrxwr is entirely valid), I chose to simply extend the set of valid values that are accepted in the string of 9 characters following the initial -/l/d part. Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> * posix: Correct pex parsing logic to handle uppercase S/T bits Lowercase s and lowercase t indicate the presence of a setuid/setgid or sticky bit (respectively), when the execute bit is also present. Their uppercase counterparts indicate the presence of the bit but not the execute bit. Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> * posix: Minor cleanup / typo correction Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> --------- Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
- Loading branch information
Showing
1 changed file
with
93 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters