diff options
author | Matthew Monaco <dgbaley27@verizon.net> | 2010-03-17 21:55:00 -0400 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2011-01-26 15:06:27 +0100 |
commit | 450895f047ea093f73eab2e40d10e2c8bbdb19c9 (patch) | |
tree | 0dd4d0d157719aaba50a8692d3578a45098dc680 /ls.c | |
parent | f2fa128c6b9fae758c7d0957fd6f06ea31a872b7 (diff) | |
download | webfs-450895f047ea093f73eab2e40d10e2c8bbdb19c9.tar.gz |
patch for secondary groups
Sorry, I'm inexperienced with actually creating patches, but it should be
obvious what to do... I tested this with and without chrooting.
Hopefully this finds you well, please let me know what you think.
In addition, I thought it would be nice to have a flag that gives the option to
resolve uid and gids... Upon further thought however, the simplicity of webfs
might indicate that the uid and gid don't need to be listed in the first place.
What might be nice though, is command line option to specify a format string for
dir entries with the usual %a %b %c notation.
Diffstat (limited to 'ls.c')
-rw-r--r-- | ls.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -240,14 +240,7 @@ ls(time_t now, char *hostname, char *filename, char *path, int *length) files[count]->r = 0; if (S_ISDIR(files[count]->s.st_mode) || S_ISREG(files[count]->s.st_mode)) { - if (files[count]->s.st_uid == uid && - files[count]->s.st_mode & 0400) - files[count]->r = 1; - else if (files[count]->s.st_uid == gid && - files[count]->s.st_mode & 0040) - files[count]->r = 1; /* FIXME: check additional groups */ - else if (files[count]->s.st_mode & 0004) - files[count]->r = 1; + if (access(line, R_OK) == 0) files[count]->r = 1; } } closedir(dir); |