[PATCH 2/4] Make chmod honor S_ISVTX.

From: Markus Wichmann <nullplan_AT_gmx.net>
Date: Sun, 20 Oct 2013 10:50:58 +0200

---
 chmod.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/chmod.c b/chmod.c
index 6d0f8a7..1af3f45 100644
--- a/chmod.c
+++ b/chmod.c
_AT_@ -95,6 +95,7 @@ parsemode(const char *str)
 	if(*end == '\0') {
 		if(octal & 04000) mode |= S_ISUID;
 		if(octal & 02000) mode |= S_ISGID;
+                if(octal & 01000) mode |= S_ISVTX;
 		if(octal & 00400) mode |= S_IRUSR;
 		if(octal & 00200) mode |= S_IWUSR;
 		if(octal & 00100) mode |= S_IXUSR;
_AT_@ -140,6 +141,9 @@ parsemode(const char *str)
 		case 's':
 			mode |= S_ISUID|S_ISGID;
 			break;
+                case 't':
+                        mode |= S_ISVTX;
+                        break;
 		/* error */
 		default:
 			eprintf("%s: invalid mode\n", str);
-- 
1.8.4.rc3
--LQksG6bCIzRHxTLp
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="0003-Make-chmod-and-ls-recognize-sticky-bit-S_ISVTX.patch"
Received on Mon Sep 17 2001 - 00:00:00 CEST

This archive was generated by hypermail 2.3.0 : Sun Oct 20 2013 - 11:48:02 CEST