userns: Convert stat to return values mapped from kuids and kgids

- Store uids and gids with kuid_t and kgid_t in struct kstat
- Convert uid and gids to userspace usable values with
  from_kuid and from_kgid

Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
This commit is contained in:
Eric W. Biederman 2012-02-09 09:10:30 -08:00
parent 52137abe18
commit a7c1938e22
8 changed files with 21 additions and 20 deletions

View file

@ -58,14 +58,15 @@
#include <linux/types.h>
#include <linux/time.h>
#include <linux/uidgid.h>
struct kstat {
u64 ino;
dev_t dev;
umode_t mode;
unsigned int nlink;
uid_t uid;
gid_t gid;
kuid_t uid;
kgid_t gid;
dev_t rdev;
loff_t size;
struct timespec atime;