diff options
| author | Eric W. Biederman <ebiederm@xmission.com> | 2013-01-30 19:21:14 -0800 | 
|---|---|---|
| committer | Eric W. Biederman <ebiederm@xmission.com> | 2013-02-13 06:00:53 -0800 | 
| commit | d83f5901bc0cd7131a3b8534169ee889efc4c257 (patch) | |
| tree | ec47947fcec33d9d373367d86b787b08be997168 /include/linux/coda_psdev.h | |
| parent | 9fd973e085f7759f710603422b2e11ad5f2e000d (diff) | |
| download | olio-linux-3.10-d83f5901bc0cd7131a3b8534169ee889efc4c257.tar.xz olio-linux-3.10-d83f5901bc0cd7131a3b8534169ee889efc4c257.zip  | |
coda: Restrict coda messages to the initial user namespace
Remove the slight chance that uids and gids in coda messages will be
interpreted in the wrong user namespace.
- Only allow processes in the initial user namespace to open the coda
  character device to communicate with coda filesystems.
- Explicitly convert the uids in the coda header into the initial user
  namespace.
- In coda_vattr_to_attr make kuids and kgids from the initial user
  namespace uids and gids in struct coda_vattr that just came from
  userspace.
- In coda_iattr_to_vattr convert kuids and kgids into uids and gids
  in the intial user namespace and store them in struct coda_vattr for
  sending to coda userspace programs.
Nothing needs to be changed with mounts as coda does not support
being mounted in anything other than the initial user namespace.
Cc: Jan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'include/linux/coda_psdev.h')
| -rw-r--r-- | include/linux/coda_psdev.h | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h index 8031d6eef10..5b8721efa94 100644 --- a/include/linux/coda_psdev.h +++ b/include/linux/coda_psdev.h @@ -34,7 +34,7 @@ int venus_lookup(struct super_block *sb, struct CodaFid *fid,  		 const char *name, int length, int *type,   		 struct CodaFid *resfid);  int venus_close(struct super_block *sb, struct CodaFid *fid, int flags, -		vuid_t uid); +		kuid_t uid);  int venus_open(struct super_block *sb, struct CodaFid *fid, int flags,  	       struct file **f);  int venus_mkdir(struct super_block *sb, struct CodaFid *dirfid,   |