This commit is contained in:
Connor Lane Smith
2011-05-28 15:37:42 +01:00
parent 0a3a8c55e4
commit 3172b979dc
5 changed files with 48 additions and 6 deletions

4
ls.c
View File

@@ -186,8 +186,8 @@ output(Entry *ent)
if(ent->mode & S_IWOTH) mode[8] = 'w';
if(ent->mode & S_IXOTH) mode[9] = 'x';
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_ISUID) mode[3] = (mode[3] == 'x') ? 's' : 'S';
if(ent->mode & S_ISGID) mode[6] = (mode[6] == 'x') ? 's' : 'S';
errno = 0;
pw = getpwuid(ent->uid);