bsdacct: fix uid/gid misreporting
[safe/jmp/linux-2.6] / kernel / acct.c
index 9a4715a..a6605ca 100644 (file)
@@ -536,7 +536,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 */
        do_div(elapsed, AHZ);
        ac.ac_btime = get_seconds() - elapsed;
        /* we really need to bite the bullet and change layout */
-       current_uid_gid(&ac.ac_uid, &ac.ac_gid);
+       ac.ac_uid = orig_cred->uid;
+       ac.ac_gid = orig_cred->gid;
 #if ACCT_VERSION==2
        ac.ac_ahz = AHZ;
 #endif
 #if ACCT_VERSION==2
        ac.ac_ahz = AHZ;
 #endif