public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ozan Çağlayan" <ozan@pardus.org.tr>
To: Kunsheng Chen <linux_kernel_chan@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Why current->uid is not working in 2.6.29 ?
Date: Sat, 23 May 2009 12:17:04 +0300	[thread overview]
Message-ID: <4A17BF10.4030604@pardus.org.tr> (raw)
In-Reply-To: <784636.43001.qm@web111109.mail.gq1.yahoo.com>

Kunsheng Chen wrote:
> Hello everyone,
>
> I am new to kernel module programming and got some problem while compiling some old kernel code. 
>
> The
> code is trying to get user id using current->uid,   but it is not
> working by reminding me 'task_struct; doesn't contain field uid '.  
>
> I checked the linux source code , uid is not there any more.
>   
They were replaced by some other calls. For example the following is a
snippet which ports the old code to the new API:

-                      address, current->uid);
+                      address, current_uid());


The commit 1330deb0f6e89525c8e9fcbd6b13522c9243bfc0 is a good example of
what are the new replacements.

This is all that I know,

Ozan Caglayan

      reply	other threads:[~2009-05-23  9:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-23  4:22 Why current->uid is not working in 2.6.29 ? Kunsheng Chen
2009-05-23  9:17 ` Ozan Çağlayan [this message]

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=4A17BF10.4030604@pardus.org.tr \
    --to=ozan@pardus.org.tr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux_kernel_chan@yahoo.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