Make chmod and ls recognize sticky bit (S_ISVTX).

This commit is contained in:
Markus Wichmann
2013-10-20 10:53:43 +02:00
committed by sin
parent 35053c1d48
commit a55cc8c95e
2 changed files with 3 additions and 2 deletions

1
ls.c
View File

@@ -228,6 +228,7 @@ output(Entry *ent)
if(ent->mode & S_ISUID) mode[3] = (mode[3] == 'x') ? 's' : 'S';
if(ent->mode & S_ISGID) mode[6] = (mode[6] == 'x') ? 's' : 'S';
if(ent->mode & S_ISVTX) mode[9] = (mode[9] == 'x') ? 't' : 'T';
errno = 0;
pw = getpwuid(ent->uid);