Don:
Yeah, I realize the potential dangers, but if processing is bypassed on some
things it’s no big deal.
I’ve looked into PsSetCreateProcessNotifyRoutine and friends, but they have
some major downsides (get called for *every* process, cannot unload before
system shutdown, only 8 allowed per system, etc.). Plus the driver may get
loaded after the service has started.
PsGetProcessImageFileName looks perfect, but it sure is undocumented (not in
any .h file I can find - even in the Srv03 SP1 DDK).
At least I know I haven’t missed something stupid. I’ll figure out
something.
Thanks very much!
Ken
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Wednesday, October 20, 2004 2:12 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] Detect specific process?
First it is dangerous to just use the image name, there little or no
security here. If you own the process have it pass your filter the pid, and
use it. Otherwise, the official way to handle what you are asking for
involves PsSetCreateProcessNotifyRoutine and PsSetLoadImageNotifyRoutine.
You need to build a table to convert pid’s to paths by creating an entry on
process creation, filling it in on image load, and deleting it at process
termination.
There is an undocumented call in XP and later named
PsGetProcessImageFileName that I believe will get you the path.
–
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply
“Ken Cross” wrote in message news:xxxxx@ntfsd…
> NTFSD Folk:
>
> I have a minifilter driver that does strange and wonderful things to
certain
> types of files.
>
> However, there is one process (a user-mode service) that I’d like to be
> exempt from this processing. I can’t figure out how to detect this
process.
> I’m sure the info (the ImageName would be sufficient) is in the KEPROCESS
> block somewhere, but that’s supposed to be opaque.
>
> Is there any way to obtain detailed process information from the kernel
> (primarily in the IRP_MJ_CREATE handler)?
>
> Thanks,
> Ken
>
>
>
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@comcast.net
To unsubscribe send a blank email to xxxxx@lists.osr.com