Pawe³ Jakub Dawidek wrote:
> Nope. We are in kernel area.
> I want to control for example open() syscall:
> static int my_open(register struct proc *p, register struct open_args *ea)
> {
> [...]
> }
> Name of file to open is in ea->path, but this name can be: ./somefile
> and i need a full path to
On Mon, Feb 04, 2002 at 01:36:44PM +0300, Eugene L. Vorokov wrote:
+> I faced that problem once. I used an ugly hack: simulation of __getcwd()
+> syscall. You need to allocate user memory via mmap() with MAP_ANON flag,
+> pass it to __getcwd(), then copy string to kernel using copyin() or like
+>
> I want to control for example open() syscall:
> static int my_open(register struct proc *p, register struct open_args *ea)
> {
> [...]
> }
> Name of file to open is in ea->path, but this name can be: ./somefile
> and i need a full path to it.
I faced that problem once. I used an ugly hack: sim
On Mon, Feb 04, 2002 at 01:27:39AM -0800, Terry Lambert wrote:
+> char *saved_name;
+>
+> func()
+> {
+> char *foo;
+>
+> ...
+>
+> fd = open( foo, O_RDWR, 0664);
+> saved_name = strdup( foo);
+>
+> ...
+>
+>
Pawe³ Jakub Dawidek wrote:
> I can get vnode of changed file.
> I can get inode number of changed file.
> But how can i get file name?
>
> There is a way to get inode when i have file name and p (struct proc), so
> maybe there is a way to get file name from inode number and p.
>
> And another t
On Sun, Feb 03, 2002 at 11:54:58PM -0800, Alfred Perlstein wrote:
+> However there's a dirty way to get at it via the vfs lookup cache
+> entries hung off the vnode. Paul Saab showed me a delta that
+> did something nasty like this, but I've got no clue as to where
+> it is now.
+>
Hmm...
And w
* Pawel Jakub Dawidek <[EMAIL PROTECTED]> [020203 23:49] wrote:
> On Sun, Feb 03, 2002 at 10:11:37PM +0100, Pawel Jakub Dawidek wrote:
> +> But how can i get file name?
> +>
> [...]
> +> I got file name, but how can I get full path name for this file?
> +>
> Answer that there is no way to get th
On Sun, Feb 03, 2002 at 10:11:37PM +0100, Paweł Jakub Dawidek wrote:
+> But how can i get file name?
+>
[...]
+> I got file name, but how can I get full path name for this file?
+>
Answer that there is no way to get that will be nice too.
--
Paweł Jakub Dawidek
Network Administrator.
Am I Evil
8 matches
Mail list logo