From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: akpm@linux-foundation.org, jkj@kapsi.fi,
linux-kernel@vger.kernel.org, mschmidt@redhat.com,
dhowells@redhat.com, jmorris@namei.org
Subject: Re: [PATCH] bsdacct: fix uid/gid misreporting (#14676)
Date: Tue, 1 Dec 2009 08:43:19 -0600 [thread overview]
Message-ID: <20091201144319.GA32117@us.ibm.com> (raw)
In-Reply-To: <20091130224032.GA5598@x200.malnet.ru>
Quoting Alexey Dobriyan (adobriyan@gmail.com):
> commit d8e180dcd5bbbab9cd3ff2e779efcf70692ef541
> "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.
>
> Fix http://bugzilla.kernel.org/show_bug.cgi?id=14676
>
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Yeah seems like it wouuld be needed, thanks.
Acked-by: Serge Hallyn <serue@us.ibm.com>
> ---
>
> Juho, please, confirm.
>
> kernel/acct.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> --- a/kernel/acct.c
> +++ b/kernel/acct.c
> @@ -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
next prev parent reply other threads:[~2009-12-01 14:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-30 22:40 [PATCH] bsdacct: fix uid/gid misreporting (#14676) Alexey Dobriyan
2009-12-01 14:43 ` Serge E. Hallyn [this message]
2009-12-01 15:38 ` David Howells
2009-12-01 17:49 ` Michal Schmidt
2009-12-02 3:49 ` James Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091201144319.GA32117@us.ibm.com \
--to=serue@us.ibm.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=jkj@kapsi.fi \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mschmidt@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox