From: project8sem4@fastmail.fm
To: linux-kernel@vger.kernel.org
Subject: wierd current->uid in module
Date: Sat, 01 May 2004 21:19:40 -0700 [thread overview]
Message-ID: <1083471580.11934.185480850@webmail.messagingengine.com> (raw)
hi
i am doing a project on
a very simple system call interception module.
the module is supposed to return the uid of the
user who made the call to the syscall. i m trying to
do it thus:
//in the kernel module
asmlinkage long my_syscall(arg1,arg2)
{
sprintf(buffer, "%s%s%i", arg1,arg2,current->uid);
//this buffer is later read.
return original_syscall(arg1,arg2);
}
the problem is that the uid returned is always -1
whether the user is root or otherwise.
could you suggest a way out please.
thanx
-kt
--
http://www.fastmail.fm - The way an email service should be
next reply other threads:[~2004-05-02 4:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-02 4:19 project8sem4 [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-05-02 4:22 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=1083471580.11934.185480850@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