]> Pileus Git - ~andy/linux/blobdiff - kernel/acct.c
acct: constify the name arg to acct_on
[~andy/linux] / kernel / acct.c
index 02e6167a53b0af6bcbc166cc810cae9ab04e54f7..5be01017d30febe251e8fe5a6906414e7ba5568d 100644 (file)
@@ -193,7 +193,7 @@ static void acct_file_reopen(struct bsd_acct_struct *acct, struct file *file,
        }
 }
 
-static int acct_on(char *name)
+static int acct_on(const char *name)
 {
        struct file *file;
        struct vfsmount *mnt;
@@ -507,8 +507,8 @@ static void do_acct_process(struct bsd_acct_struct *acct,
        do_div(elapsed, AHZ);
        ac.ac_btime = get_seconds() - elapsed;
        /* we really need to bite the bullet and change layout */
-       ac.ac_uid = orig_cred->uid;
-       ac.ac_gid = orig_cred->gid;
+       ac.ac_uid = from_kuid_munged(file->f_cred->user_ns, orig_cred->uid);
+       ac.ac_gid = from_kgid_munged(file->f_cred->user_ns, orig_cred->gid);
 #if ACCT_VERSION==2
        ac.ac_ahz = AHZ;
 #endif