Mailinglist Archive: opensuse-security (226 mails)
| < Previous | Next > |
Re: [suse-security] Re: Strange links, /usr/bin/[ ?
- From: Randall R Schulz <rschulz@xxxxxxxxx>
- Date: Wed, 6 Apr 2005 06:39:36 -0700
- Message-id: <200504060639.37023.rschulz@xxxxxxxxx>
Carlos,
On Tuesday 05 April 2005 19:11, Carlos E. R. wrote:
> The Monday 2005-04-04 at 20:03 -0700, Randall R Schulz wrote:
> > On Saturday 02 April 2005 03:10, Carlos E. R. wrote:
> > > ...
> > >
> > > Quick question:
> > >
> > > Is there an easier way to list hardlinks, than comparing inode
> > > numbers?
> >
> > No. ...
> >
> > So the only way to find what names refer to the same inode is to
> > enumerate directory entries and compare inode numbers.
>
> Ah, I see. So it is not easy as well to know if a file somewhere is
> hardlinked somewhere else, except by comparing all inode entries in
> all directory lists from the same partition/disk.
Precisely. In fact, back in the bad old days when there was just "the
Unix file system," there used to be (and probably still is, under a
name I don't know) a utility called "ncheck" that would take a device
name and an inode number and find all the full path names that referred
to that inode. It took forever because it had to walk the directory
structure exhaustively looking for references to that inode.
> Do you know of a (brief) description of how a inode fs works,
> somewhere? I come from Dos; I did study how FAT worked in detail, but
> unix was out of bounds for me at the time, and later I had no
> occasion to study ext2 or similar. So, although I have some inkling
> of what an inode is, I really don't know O:-)
I did a little looking. This seems accurate and detailed, at least
w.r.t. ext2: <http://www.tldp.org/LDP/tlk/fs/filesystem.html>. Most of
what I could find wouldn't add to the knowledge you already have.
> Carlos Robinson
Randall Schulz
On Tuesday 05 April 2005 19:11, Carlos E. R. wrote:
> The Monday 2005-04-04 at 20:03 -0700, Randall R Schulz wrote:
> > On Saturday 02 April 2005 03:10, Carlos E. R. wrote:
> > > ...
> > >
> > > Quick question:
> > >
> > > Is there an easier way to list hardlinks, than comparing inode
> > > numbers?
> >
> > No. ...
> >
> > So the only way to find what names refer to the same inode is to
> > enumerate directory entries and compare inode numbers.
>
> Ah, I see. So it is not easy as well to know if a file somewhere is
> hardlinked somewhere else, except by comparing all inode entries in
> all directory lists from the same partition/disk.
Precisely. In fact, back in the bad old days when there was just "the
Unix file system," there used to be (and probably still is, under a
name I don't know) a utility called "ncheck" that would take a device
name and an inode number and find all the full path names that referred
to that inode. It took forever because it had to walk the directory
structure exhaustively looking for references to that inode.
> Do you know of a (brief) description of how a inode fs works,
> somewhere? I come from Dos; I did study how FAT worked in detail, but
> unix was out of bounds for me at the time, and later I had no
> occasion to study ext2 or similar. So, although I have some inkling
> of what an inode is, I really don't know O:-)
I did a little looking. This seems accurate and detailed, at least
w.r.t. ext2: <http://www.tldp.org/LDP/tlk/fs/filesystem.html>. Most of
what I could find wouldn't add to the knowledge you already have.
> Carlos Robinson
Randall Schulz
| < Previous | Next > |