Path: utzoo!utgpu!water!watmath!clyde!burl!codas!killer!pollux!ti-csl!tifsie!kent From: kent@tifsie.UUCP (Russell Kent) Newsgroups: comp.unix.wizards Subject: Re: To find out the names of open files in a process Message-ID: <287@tifsie.UUCP> Date: 29 Jan 88 00:32:58 GMT References: <2120@ttrdc.UUCP> Organization: TI Process Automation Center, Dallas Texas Lines: 26 Posted: Thu Jan 28 18:32:58 1988 in article <2120@ttrdc.UUCP>, levy@ttrdc.UUCP (Daniel R. Levy) says: [ deleted lines - RAK ] } #> Alternately you can write a simple character device driver that will } #> open a file given inode information. You can thus supply this as } #> an ioctl to the program that can then munge the internals of the } #> kernel data structures (XXX). } } This if not done carefully would pose a security hole. Either this form } of access should only be allowed to the superuser (perhaps by making the } special device be readable/writeable only by the root, a la /dev/mem } and block devices for disks) or access should only be permitted for files } which could also be opened in the desired manner by pathname. } -- } Dan Levy Wouldn't "access ... permitted for files which could also be opened in the desired manner by pathname" imply that the kernel would have to search the file system directory tree for an accessible path? Do you _really_ want to put this sort of thing into the kernel (can you see the kernel spending millions of machine cycles scanning the disk drive??) -- Russell Kent Phone: +1 214 995 3501 Texas Instruments UUCP address: P.O. Box 655012 MS 3635 ...!convex!smu!tifsie!kent Dallas, TX 75265 ...!ut-sally!im4u!ti-csl!tifsie!kent