delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/03/09/13:30:06

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <014b01c40604$61266ac0$920aa8c0@adexainc.com>
From: "Rob S.i.k.l.o.s" <rob2 AT siklos DOT ca>
To: <cygwin AT cygwin DOT com>
References: <038c01c4055e$5e167010$920aa8c0 AT adexainc DOT com> <20040308231518 DOT GA5264 AT redhat DOT com>
Subject: Re: killing processes owned by others with kill.exe
Date: Tue, 9 Mar 2004 13:28:54 -0500
MIME-Version: 1.0
X-IsSubscribed: yes
Note-from-DJ: This may be spam

------=_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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019