|
From: Dag W. <da...@wi...> - 2003-04-22 10:04:09
|
On Tue, 22 Apr 2003, Malcolm Tredinnick wrote:
> On Mon, Apr 21, 2003 at 06:41:25AM +0200, Dag Wieers wrote:
>
> > And segfaults eventually. The cause of this might be due the same=20
> > or a very similar problem.
>=20
> I cannot think why this is happening. All those repeated /dev entries
> look pretty bad. Looks like I'm going to have to download soapbox and
> play around with it to try and repeat this.
Keep in mind (when you're debugging) that if you use soapbox with the=20
default action "warn" that it fakes as if every system call that wants to=
=20
change something outside of it's 'safepath' succeeds. So a program could=20
end up doing crazy things because of that ;)
If you use action "err" it will return Permission Denied. Which is more=20
like it would expect ;)
[dag@lisse ~]# soapbox -a err scrollkeeper-update -p /var/scrollkeeper/
Attempt to open64("/dev/tty", O_RDWR|O_NONBLOCK, 0000).
Attempt to open64("/dev/pts/9", O_RDWR|O_NONBLOCK, 0000).
Attempt to open64("/dev/tty", O_RDWR|O_NONBLOCK, 0000).
Attempt to open64("/dev/pts/9", O_RDWR|O_NONBLOCK, 0000).
Attempt to mkdir("/var/scrollkeeper", 0755).
Could not create directory /var/scrollkeeper : Permission denied
Could not create database. Aborting update.
Or if you use "halt" a system call that is not allowed will cause the=20
program being halted 'succesfully' without being executed.
I have 2 things on my soapbox wishlist to improve this scheme.
The first one is using ptrace (instead of function) overloading. Someone=20
told me you can intervene with ptrace and do almost the same things=20
(which I still have to see ;p)
The second thing I would like to do (probably a seperate program) is that=
=20
every action outside the safepath that is changing files is making a copy=
=20
of that file to another location and manipulates it there. So that at any=
=20
point you can do a recursive diff of both the original and the files that=
=20
were touched by the program.
If I can add this, I can have the same functionality. I can see what=20
actually is happening without it changing anything for real and without=20
fooling the program. And probably your program would have worked as norma=
l=20
in that case too.
But now I have to live with the imperfections I create ;P
Kind regards,
-- dag wieers, da...@wi..., http://dag.wieers.com/ --
=ABAny errors in spelling, tact or fact are transmission errors=BB
|