Mail Archives: cygwin/2004/03/09/13:30:06
------=_NextPart_000_0148_01C405DA.77F01A50
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Hello,
patch attached (diff kill.orig.cc kill.new.cc > kill.cc.patch)
It's taken from the latest source that I got from setup.exe (sorry, no
access to cvs behind firewall).
Just a note, when I tried to make from /usr/src/cygwin-1.5.7-1, I get the
following error:
make[3]: Entering directory
`/usr/src/cygwin-1.5.7-1/i686-pc-cygwin/winsup/cygserver'
make[3]: *** No rule to make target
`/src/cygwin-1.5.7-1/winsup/cygwin/winsup.h', needed by `libclient.o'.
Stop.
Rob.
----- Original Message -----
From: "Christopher Faylor" <cgf-no-personal-reply-please AT cygwin DOT com>
To: <cygwin AT cygwin DOT com>
Sent: Monday, March 08, 2004 6:15 PM
Subject: Re: killing processes owned by others with kill.exe
> On Mon, Mar 08, 2004 at 05:40:33PM -0500, Rob S.i.k.l.o.s wrote:
> >P.S. - I would do this myself, but I don't think I'm qualified to mess
with
> >core Cygwin stuff.
>
> kill.exe is hardly "core cygwin stuff".
>
> I suggest you take a look at the kill.cc code and offer a patch.
>
> cgf
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Problem reports: http://cygwin.com/problems.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>
>
------=_NextPart_000_0148_01C405DA.77F01A50
Content-Type: application/octet-stream;
name="kill.cc.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="kill.cc.patch"
127a128,153
> static void
> getDebugPriv( void )
> {
> HANDLE hToken;
> LUID sedebugnameValue;
> TOKEN_PRIVILEGES tkp;
>=20
> if ( ! OpenProcessToken( GetCurrentProcess(),
> TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken ) )
> return;
>=20
> if ( !LookupPrivilegeValue( NULL, SE_DEBUG_NAME, &sedebugnameValue ) )
> {
> CloseHandle( hToken );
> return;
> }
>=20
> tkp.PrivilegeCount =3D 1;
> tkp.Privileges[0].Luid =3D sedebugnameValue;
> tkp.Privileges[0].Attributes =3D SE_PRIVILEGE_ENABLED;
>=20
> AdjustTokenPrivileges( hToken, FALSE, &tkp, sizeof tkp, NULL, NULL );
>=20
> CloseHandle( hToken );
> }
>=20
130a157,159
> // try to acquire SeDebugPrivilege
> getDebugPriv();
>=20
256a286
>=20
------=_NextPart_000_0148_01C405DA.77F01A50
Content-Type: text/plain; charset=us-ascii
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
------=_NextPart_000_0148_01C405DA.77F01A50--
- Raw text -