From e66be025a8e310737dd4aa3c64ca3a96f164f1bb Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Mon, 18 Nov 1996 23:47:20 +0000 Subject: Fri Nov 15 14:43:44 1996 Thomas Bushnell, n/BSG * fshelp.h (fshelp_access): Uh, shift bits the right direction. Tue Nov 12 22:07:41 1996 Thomas Bushnell, n/BSG * fetch-root.c (fshelp_fetch_root): Name idvec members correctly. * fshelp.h: -> . Include . (fshelp_access): Declare `gotit'. --- libfshelp/fshelp.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libfshelp/fshelp.h') 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 #include #include -#include +#include +#include #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)) -- cgit v1.2.3