mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
bsdacct: fix uid/gid misreporting
commit d8e180dcd5 "bsdacct: switch
credentials for writing to the accounting file" introduced credential
switching during final acct data collecting. However, uid/gid pair
continued to be collected from current which became credentials of who
created acct file, not who exits.
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=14676
Signed-off-by: Alexey Dobriyan <[email protected]>
Reported-by: Juho K. Juopperi <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
Acked-by: David Howells <[email protected]>
Reviewed-by: Michal Schmidt <[email protected]>
Cc: James Morris <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
5443040754
commit
4b731d50ff
1 changed files with 2 additions and 1 deletions
|
|
@ -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 */
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue