RE: how do you call userspace syscalls (e.g. sys_rename) from inside kernel
From: Jirka Kosina (jikos_at_jikos.cz)
Date: 10/11/04
- Previous message: Nick Piggin: "Re: Linux 2.6.9-rc4 - pls test (and no more patches)"
- In reply to: Aboo Valappil: "RE: how do you call userspace syscalls (e.g. sys_rename) from inside kernel"
- Next in thread: Jon Masters: "Re: how do you call userspace syscalls (e.g. sys_rename) from inside kernel"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 11 Oct 2004 11:56:18 +0200 (CEST) To: Aboo Valappil <aboo@ABOOSPLANET.com>
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/
- Previous message: Nick Piggin: "Re: Linux 2.6.9-rc4 - pls test (and no more patches)"
- In reply to: Aboo Valappil: "RE: how do you call userspace syscalls (e.g. sys_rename) from inside kernel"
- Next in thread: Jon Masters: "Re: how do you call userspace syscalls (e.g. sys_rename) from inside kernel"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|