How to directly read a file (ex. /etc/XXX) in driver code?

How to directly read a file (ex. /etc/XXX) in driver code?

Post by Rober » Sat, 06 Nov 1999 04:00:00



Hello:
    Could someone tell me how to read a file (ex. /etc/XXX)  in
driver code? Now, I just do it bypass application.( ie. application reads
the file, then pass the
file content into driver by ioctl()). But It's a dirty method; I don't know
it is
possible just to access a file of  file system by driver itself?

Thanks!

 
 
 

How to directly read a file (ex. /etc/XXX) in driver code?

Post by Przemek Klosowsk » Mon, 08 Nov 1999 04:00:00



>     Could someone tell me how to read a file (ex. /etc/XXX) in
> driver code? Now, I just do it bypass application.( ie. application
> reads the file, then pass the file content into driver by
> ioctl()). But It's a dirty method; I don't know it is possible just
> to access a file of file system by driver itself?  Thanks!

I think it is neither advisable nor possible. Note that normally you
will install your driver as a module; the kernel module installer can
run pre/post installation commands; it would be a perfect place to
stick your userland initialization via ioctl()s.

--

                        NIST Center for Neutron Research (bldg. 235), E111
                        National Institute of Standards and Technology
                        Gaithersburg, MD 20899,      USA
                        .. and for spam extractors, FCC Commisioners' email is:


 
 
 

1. question: Who is xxx.xxx.xxx.xxx tell xxx.yyy.yyy.zzz

This morning I noticed the activity LED on my cable modem has been going
nuts with loads of network traffic. I'm just sitting there not doing
anything. I'm using a Mandrake 7.2 box with IPCHAINS and Portsentry.

I checked my log files and Portsentry mail and see lots of DENY stuff.

I then fired up ethereal and start capturing. I see page after page of
messages such as:

Who has 24.177.63.127 Tell 65.112.55.123

The numbers are not accurate (I can post them if needed), but the messages
are all the same with differing IP numbers on both sides.

What does this mean? I called my broadband provider and they said they had
no idea.

Has my system been hacked?

Thanks,
Paul Nixon

2. Oops in 2.0.21 - kernal paging

3. Arpresolve error: can't allocate llinfo for xxx.xxx.xxx.xxx

4. Sco Unix hanged

5. These "ICMP redirect from xxx.xxx.xxx.xxx" errors

6. Losing 3c509 netconfig

7. Installation freezing at "Add default route xxx.xxx.xxx.xxx" with NE2000 card

8. Cron job to verify the runing process and kill it if exists

9. kernel: ICMP: xxx.xxx.xxx.xxx: Source route failed

10. Telnet xxx.xxx.xxx.xxx 25

11. Arpresolve error: can't allocate llinfo for xxx.xxx.xxx.xxx

12. Netstat returns IP= xxx.xxx.xxx.xxx.blackjack what's up?

13. ICMP: xxx.xxx.xxx.xxx Source Route Failed ?