diff options
author | Thomas Bushnell <thomas@gnu.org> | 1996-11-18 23:47:20 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1996-11-18 23:47:20 +0000 |
commit | e66be025a8e310737dd4aa3c64ca3a96f164f1bb (patch) | |
tree | af26ddfd8ae39e686b8dfe7ff5f91a5cfecf5079 /libfshelp/fshelp.h | |
parent | c7dedd7240b8444673256b88521fe0acd7c835f6 (diff) |
Fri Nov 15 14:43:44 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* fshelp.h (fshelp_access): Uh, shift bits the right direction.
Tue Nov 12 22:07:41 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* fetch-root.c (fshelp_fetch_root): Name idvec members correctly.
* fshelp.h: <iohelp.h> -> <hurd/iohelp.h>.
Include <sys/stat.h>.
(fshelp_access): Declare `gotit'.
Diffstat (limited to 'libfshelp/fshelp.h')
-rw-r--r-- | libfshelp/fshelp.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libfshelp/fshelp.h b/libfshelp/fshelp.h index 93ebd11f..3392006f 100644 --- a/libfshelp/fshelp.h +++ b/libfshelp/fshelp.h @@ -27,7 +27,8 @@ #include <mach.h> #include <hurd/hurd_types.h> #include <cthreads.h> -#include <iohelp.h> +#include <hurd/iohelp.h> +#include <sys/stat.h> #ifndef FSHELP_EI #define FSHELP_EI extern inline @@ -269,10 +270,11 @@ fshelp_isowner (struct stat *st, struct iouser *user) FSHELP_EI error_t fshelp_access (struct stat *st, int op, struct iouser *user) { + int gotit; if (idvec_contains (user->uids, 0)) gotit = 1; else if (user->uids->num == 0 && (st->st_mode & S_IUSEUNK)) - gotit = st->st_mode & (op << S_IUSEUNKSHIFT); + gotit = st->st_mode & (op << S_IUNKSHIFT); else if (!fshelp_isowner (st, user)) gotit = st->st_mode & op; else if (idvec_contains (user->gids, st->st_gid)) |