On Tue, 7 Jan 2003, Pawel Jakub Dawidek wrote:
> from vnode was mistake). That's why I think that there should be some > caching mechanism that should remember file name of every opened file, > name of executable and working directory. > > Example rules: I vaguely remember that Linux keeps teh path used aroud on openned file descriptors some how but I don't remember the details. > > We want to permit those operations: > - opening file /etc/master.passwd for read only, > - opening files that match to /tmp/temp.* for write, > - changing mode of files /tmp/temp.* to '0666', BUT via fchmod(2). > > How to do that correct? > There is no chance to do this in simple, clean way. you would have to attach a 'chmod capability' to the file descriptor when you open it.. in other words it would be pre-decided at open time. Even if you remembered what name was used when you openned it you would have no proof that it still had that name when you do the chmod. > > I've returned to my old, ugly way - caching filenames on open(2) - > it's working fine, but is complicated, because I need to catch calls > of p->p_fd->fd_ofiles[X]->f_ops->fo_close() functions. > > -- > Pawel Jakub Dawidek > UNIX Systems Administrator > http://garage.freebsd.pl > Am I Evil? Yes, I Am. > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message