public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: project8sem4@fastmail.fm
To: linux-kernel@vger.kernel.org
Subject: wierd current->uid in module
Date: Sat, 01 May 2004 21:22:19 -0700	[thread overview]
Message-ID: <1083471739.12474.185480952@webmail.messagingengine.com> (raw)




hi 
i am new to the kernel. i am working on a simple
 system call interception module that is supposed
 to return the uid of the user who made the call.
 this i do by using current->uid.
 
a fragment of my code:
 
//in kernel module
 asmlinkage long my_mkdir(const char * filename)
 {
         sprintf(buffer,"%s,%i",filename, current->uid);
         //this buffer is later read.
         return original_mkdir( filename);
 }
 
the problem is that the current->uid value always 
turns out to be -1, whether its root or a non-root
 user.
 im using redhat 7.2 (kernel 2.4.7-10)
 can anyone please help me out..
 thanx in advance,
 kt
 

-- 
http://www.fastmail.fm - mmm... Fastmail...

             reply	other threads:[~2004-05-02  4:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-02  4:22 project8sem4 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-05-02  4:19 wierd current->uid in module project8sem4

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=1083471739.12474.185480952@webmail.messagingengine.com \
    --to=project8sem4@fastmail.fm \
    --cc=linux-kernel@vger.kernel.org \
    /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