diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_cred.h')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_cred.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/xfs/linux-2.6/xfs_cred.h b/fs/xfs/linux-2.6/xfs_cred.h index e279d00779f4..8c022cd0ad67 100644 --- a/fs/xfs/linux-2.6/xfs_cred.h +++ b/fs/xfs/linux-2.6/xfs_cred.h @@ -23,8 +23,14 @@ /* * Credentials */ -typedef struct cred { - /* EMPTY */ -} cred_t; +typedef const struct cred cred_t; + +extern cred_t *sys_cred; + +/* this is a hack.. (assumes sys_cred is the only cred_t in the system) */ +static inline int capable_cred(cred_t *cr, int cid) +{ + return (cr == sys_cred) ? 1 : capable(cid); +} #endif /* __XFS_CRED_H__ */ |