RE: How to get user login or logoff notifications in driver ?

In My case the driver has an interactive service associated with it which
controls the behaviour of the driver.since the driver is a TDI filter
driver the it service sets default filters without any messageboxes
dispalayed before login by reading registry settings and could be configured
remotely.my task was to display the filter info messageboxes form service
only when the admin or any user with appropriate rights has logged on
otherwise filter silently using default settings using event notifications
between kmode and usermode :).Thus i need info about logon and logoff
also…

Regards…
Subodh Radheshyam Gupta

----- Original Message -----
From: “Michal Vodicka”
To: “NT Developers Interest List”
Sent: Wednesday, April 16, 2003 2:31 AM
Subject: [ntdev] RE: How to get user login or logoff notifications in driver
?

> In our case it was a driver which creates drives over encrypted file.
Drives
> are mounted on user request given proper encryption key. Drive device is
> created with drive letter. Driver doesn’t check subsequent request after
> mount and anybody can access mounted drive so drives should be dismounted
> after logoff. We have an application which does it automatically but user
> can kill it and I felt it would be safer (and simpler) if driver handles
it.
>
> (yes, I’m aware about problems with fast user switching / terminal
services)
>
> Best regards,
>
> Michal Vodicka
> STMicroelectronics Design and Application s.r.o.
> [michal.vodicka@st.com, http:://www.st.com]
>
> > ----------
> > From:
> > xxxxx@compuware.com[SMTP:xxxxx@compuware.com]
> > Reply To: xxxxx@lists.osr.com
> > Sent: Tuesday, April 15, 2003 9:55 PM
> > To: xxxxx@lists.osr.com
> > Subject: [ntdev] RE: How to get user login or logoff notifications in
> > driver ?
> >
> > Wow, cool, can you guys give me a possible use for that ? I mean, what
> > kind
> > of driver would need to be aware of user logoffs ?
> >
> > ALberto.
> >
> >
> > -----Original Message-----
> > From: Michal Vodicka [mailto:xxxxx@veridicom.cz.nospam]
> > Sent: Tuesday, April 15, 2003 3:43 PM
> > To: NT Developers Interest List
> > Subject: [ntdev] RE: How to get user login or logoff notifications in
> > driver ?
> >
> >
> > It is right but my experience says it doesn’t work as expected always.
> > First, you may not receive logoff notification immediately after user
> > logoff. It can take several minutes, sometimes until next logon. Second,
> > for
> > the first interractive session you may not receive logoff notification
at
> > all (first mean nobody if logged on, it works for subsequent fast user
> > switching sessions). It seems appropriate kernel structure reference
count
> > never reaches zero. It can be a bug (tested with w2k and XP SP0) or a
> > problem with my driver, it is some time I played with. If somebody have
> > different experience, info welcome.
> >
> > Best regards,
> >
> > Michal Vodicka
> > STMicroelectronics Design and Application s.r.o.
> > [michal.vodicka@st.com, http:://www.st.com]
> >
> > > ----------
> > > From: xxxxx@nryan.com[SMTP:xxxxx@nryan.com]
> > > Reply To: xxxxx@lists.osr.com
> > > Sent: Tuesday, April 15, 2003 9:28 AM
> > > To: xxxxx@lists.osr.com
> > > Subject: [ntdev] RE: How to get user login or logoff notifications in
> > > driver ?
> > >
> > > For logoff you can use:
> > >
> > > SeRegisterLogonSessionTerminatedRoutine
> > > SeMarkLogonSessionForTerminationNotification
> > > SeUnregisterLogonSessionTerminatedRoutine
> > >
> > > - Nicholas Ryan
> > >
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > > [mailto:xxxxx@lists.osr.com] On Behalf Of subodh gupta
> > > Sent: Monday, April 14, 2003 11:25 PM
> > > To: NT Developers Interest List
> > > Subject: [ntdev] How to get user login or logoff notifications in
driver
> > > ?
> > >
> > >
> > > Hi All,
> > >
> > > Is it possible to get the notification of user login,Logoff and User
> > > Credentials Information in a Driver ?
> > > If Yes How ? Is there some notification routine Provided ?
> > > I know that a user mode NT service can get the notification of
> > > Logoff,and i also know how to detect logon using winlogon process
> > > detection…But is there some kernel mode APIs available for the same ?
> > >
> > > Any Help is appreciated…
> > > Regards…
> > > Subodh Radheshyam Gupta
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@nryan.com
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> > >
> > >
> > > —
> > > You are currently subscribed to ntdev as: michal.vodicka@st.com
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@compuware.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> >
> > The contents of this e-mail are intended for the named addressee only.
It
> > contains information that may be confidential. Unless you are the named
> > addressee or an authorized designee, you may not copy or use it, or
> > disclose
> > it to anyone else. If you received it in error please notify us
> > immediately
> > and then destroy it.
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: michal.vodicka@st.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@softhome.net
> To unsubscribe send a blank email to xxxxx@lists.osr.com