lkml.org 
[lkml]   [2004]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRE: how do you call userspace syscalls (e.g. sys_rename) from inside kernel
On Mon, 11 Oct 2004, Aboo Valappil wrote:

> In the past I looked in to open, read and write a file from a kernel
> module. But problem I faced using the kernel function was that it
> checks for the permissions of the file and path against the "current"
> process. For eg: open_namei() function ... My requirement was to open
> the file regardless of the permissions on the file and also not by
> modifying task_struct of the current process to change the permissions
> first ! I also wanted not associate the file with the current/any
> processes. Any ideas on this ?

1) This is offtopic on LKML, kernelnewbies might be more apropriate list
2) look at set_fs() and filp_open() calls, they might be useful for you
3) Think twice if opening files from kernel is the thing you are willing
to do

--
JiKos.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.074 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site