diff options
author | David Howells <dhowells@redhat.com> | 2008-11-13 18:39:25 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2008-11-13 18:39:25 -0500 |
commit | d76b0d9b2d87cfc95686e148767cbf7d0e22bdc0 (patch) | |
tree | 1a2956614018d245facb256ffb8662568cdabcd4 /drivers/isdn/hysdn | |
parent | 1d045980e1eff4800472f0e81df9460640c8eee9 (diff) |
CRED: Use creds in file structs
Attach creds to file structs and discard f_uid/f_gid.
file_operations::open() methods (such as hppfs_open()) should use file->f_cred
rather than current_cred(). At the moment file->f_cred will be current_cred()
at this point.
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: James Morris <jmorris@namei.org>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'drivers/isdn/hysdn')
-rw-r--r-- | drivers/isdn/hysdn/hysdn_procconf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/isdn/hysdn/hysdn_procconf.c b/drivers/isdn/hysdn/hysdn_procconf.c index 484299b031f8..8f9f4912de32 100644 --- a/drivers/isdn/hysdn/hysdn_procconf.c +++ b/drivers/isdn/hysdn/hysdn_procconf.c | |||
@@ -246,7 +246,8 @@ hysdn_conf_open(struct inode *ino, struct file *filep) | |||
246 | } | 246 | } |
247 | if (card->debug_flags & (LOG_PROC_OPEN | LOG_PROC_ALL)) | 247 | if (card->debug_flags & (LOG_PROC_OPEN | LOG_PROC_ALL)) |
248 | hysdn_addlog(card, "config open for uid=%d gid=%d mode=0x%x", | 248 | hysdn_addlog(card, "config open for uid=%d gid=%d mode=0x%x", |
249 | filep->f_uid, filep->f_gid, filep->f_mode); | 249 | filep->f_cred->fsuid, filep->f_cred->fsgid, |
250 | filep->f_mode); | ||
250 | 251 | ||
251 | if ((filep->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_WRITE) { | 252 | if ((filep->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_WRITE) { |
252 | /* write only access -> write boot file or conf line */ | 253 | /* write only access -> write boot file or conf line */ |
@@ -331,7 +332,8 @@ hysdn_conf_close(struct inode *ino, struct file *filep) | |||
331 | } | 332 | } |
332 | if (card->debug_flags & (LOG_PROC_OPEN | LOG_PROC_ALL)) | 333 | if (card->debug_flags & (LOG_PROC_OPEN | LOG_PROC_ALL)) |
333 | hysdn_addlog(card, "config close for uid=%d gid=%d mode=0x%x", | 334 | hysdn_addlog(card, "config close for uid=%d gid=%d mode=0x%x", |
334 | filep->f_uid, filep->f_gid, filep->f_mode); | 335 | filep->f_cred->fsuid, filep->f_cred->fsgid, |
336 | filep->f_mode); | ||
335 | 337 | ||
336 | if ((filep->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_WRITE) { | 338 | if ((filep->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_WRITE) { |
337 | /* write only access -> write boot file or conf line */ | 339 | /* write only access -> write boot file or conf line */ |