This is a discussion on Re: setuid logging within the mailing.openbsd.tech forums, part of the OpenBSD category; --> On Wed, Jun 02, 2004 at 11:07:28AM -0700, Matt Provost wrote: +> > Are you sure you always log ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On Wed, Jun 02, 2004 at 11:07:28AM -0700, Matt Provost wrote: +> > Are you sure you always log full path? If not, you probably want to log +> > current directory as well, or you want to do in-kernel realpath(). +> > +> +> Thanks, I'll try and add the current dir. Is there any better way to get +> the full path of a vnode from inside the kernel? It is quite impossible, because there will be one vnode for many hard links to the same file. You also cannot depend on namecache. Things are easier for directories, while UFS doesn't support directory's hard links, so vnodes are unique for directories. +> > +> So it would be possible to do a `find /var -inum 101240` to locate the +> > +> file. It might be possible to try and find the vnode in the namei cache +> > +> but I haven't done that yet. +> > +> > This could be far from trivial. +> +> Yup that's why I didn't try it. If you find a soultion, don't forget to send me a note -- Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! [demime 0.98d removed an attachment of type application/pgp-signature] |