Skip to contentSkip to conversation

Reading from file in module fails

DISCUSSION Pascal Schmidt 1 participant 1 message May 3, 2004 4 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

On Mon, 03 May 2004 14:50:10 +0200, you wrote in linux.kernel:

Quoted 7 lines

That can all be done in userspace.

$ export LD_PRELOAD=3Dlibcopyfilesbeforemodify.so

You just need to program a library that provides all functions that modify files (eg. write, open with O_CREAT, ...) and you're done - 100% in userspace.

This won't catch asm programs that do syscalls by hand or statically linked programs. If you really need to catch all write accesses, it needs to be done in the kernel, probably as an LSM hook or something.

Signature · 2 lines
Ciao,
Pascal