[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Experiences with compiling Debian

> > - yes fstat and fchown will be somewhat of a problem, but I'll just
> > have to overlod open() etc too, and keep a list of inodes/filenames.
> Hmm... to be more exactly: You have to wrap open(), create(), and
> close(), and have to keep a table of fd -> name mappings for fchown()
> and fchmod().

I think inode->name mappings will be better than fd-> name mappings:
  - we have a chance of solving the pathalogical case below
  - fd->name mappings are no good, have to be (pid,fd)-> name mappings,
    complicates matters:
       int f=open(file1);
       if (fork()){
         int f=open(file2);   /*f is same fd number as in parent, but
	                        different file */
         int g=open(file2);   /*g is different fd number as in parent,
	                        but refers to same "file1" !*/
    Just keeping inode->name mappings must be easier!   

> > 	- I probably will go wrong for pathalogical cases like
> > 
> > 		 ln file1 file2
> > 		 chown mail:sys file2
> > 		 rm file2
> > 		 ls -al file2
> > 
> > 	  I doubt whether these are important, and even if they are, I
> > 	  guess it will be possible to get it right.

joost witteveen, joostje@debian.org
#!/usr/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
#what's this? see http://www.dcs.ex.ac.uk/~aba/rsa/

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: