delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/03/11/17:29:00

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=CUqp16XNed8MQq2pc6wDRmcNkckpX8JsCW4/ETJaq3592OltHU+RH
Gl05G+tWRoMZd1vUpiX7/yD34fvaomRXOKbKm4bru6M+CU0if+mVDxyk9rElbogT
rLg+bBecxFYIhiPQjLXfPumoIU9qhvUNChgXtd6hf0VHeK9jp0X6pQ=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=1UiSmqIBYhpSHt4AsHUbXaPjFUg=; b=QGFH3p476t+0rni1ScvKjCTaGlyE
cPHYViUbC+cAW2rlhY0b1tJcpHmqWDTO6wVv0dO1C53iHg++kG4ngvIhm4k9H6B1
iZeMs9gaxXKdOrxFK3MdBVno1npz8Dto3uP2tVEyEbcAa23lPydXvaH3NGWGyBEA
M6aVB4cw8f8XuTI=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-102.2 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=privileges, permissions, she, showing
X-HELO: mout.kundenserver.de
Date: Mon, 11 Mar 2019 22:28:45 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Privilege(s) needed to run top command
Message-ID: <20190311212845.GE3785@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <1552323028120-0 DOT post AT n5 DOT nabble DOT com> <87r2bd4003 DOT fsf AT Rainer DOT invalid>
MIME-Version: 1.0
In-Reply-To: <87r2bd4003.fsf@Rainer.invalid>
User-Agent: Mutt/1.11.3 (2019-02-01)

--NEAjDeynQrrxd8+d
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mar 11 21:41, Achim Gratz wrote:
> jwang writes:
> > This is used to work for a ordinary login.
> >
> > After re-install, top does not show the true load et al.  Nor processes
> > owned by SYSTEM.
> >
> > Please shed some light.
>=20
> Cygwin is a user-space layer.  It can't show you information that the
> underlying OS determines to be off-limits for you.

And I just checked, even under Cygwin 2.11.2, procps and top were
not showing foreign processes if you're running under a non-admin
user account or a non-elevated shell, so this is nothing new.

In fact, `procps' at least tries to access /proc/<PID>/stat.  This
doesn't return valid information because it has to be able to open a
process with PROCESS_QUERY_LIMITED_INFORMATION and PROCESS_VM_READ
permissions.  No ordinary user has these permissions on processes she
doesn't own.(*)

However, Cygwin's `ps -e' was supposed to show all processes, but
it didn't anymore since I created helper objects in the NT namespace
with insufficient privileges for everyone.  I pushed a patch and
uploaded new developer snapshots to https://cywin.com/snapshots/
for testing.


Thanks,
Corinna

(*) That doesn't mean it's not possible.  In theory all Cygwin
    processes could be opened to allow everyone
    PROCESS_QUERY_LIMITED_INFORMATION access, which would at least
    fill most of /proc/<PID>/stat for foreign processes.
    However, we never did that, so it can't have worked yet.

--=20
Corinna Vinschen
Cygwin Maintainer

--NEAjDeynQrrxd8+d
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAlyG0w0ACgkQ9TYGna5E
T6B7/hAAhtGBgHAVr6tGPCKUMf1rVBx9fX3SW40sSCEKxffT/dtA9TmB1KPEIfgi
Hug7J274gpmT83GFsVYrdxXYgtti9nd3owkrFG5V8La2cJHpzpRH6AStSBrOrj34
LF38ALyde7rWHGz5YA1+24ngrWydQDBkAyK/lgnutk//AyiqTI2GGmLO6xF1iUgA
fWMwdNaoeQyO+toPDti4UqyKbW9jKzxIOGqhNVl2K4uIPBJ8mO8nL2aeJfvG+HUo
47Tf0UOPYn1yAcEf9u0bhKfK8rUmw2PbdUkwSyR8DOvRpyRQjQU8RdQI90Wtk/lQ
WvUgYdf+kTHolwWBlVKcJo9gM6oOjm8Pv4Sz4dXzqit+8pa5LALjq4cUFlK23I5m
Wv3TOKC1b0M1HquYqRacmey+TPgaE+NZIpEodAS6IWgfwE/xaEJdpmJbnFn+bPQ9
GESZcTkIdQrax74+oF3+cgA1CY3YrmeghDFQNaXDU0Pg9CKozaWFSQcZAqP4c7gy
9/JWgXYjLWS/v5wYxTPkVcdEPwNQM+B+K6TRqSUaoA3uvUS01RgrCrqBa/liOwNo
RPvyg73gsVDyRC5TWnaOc+VddrvXh847+i/7kJEc1aVx/Qih9BzDhYTPSkkPL/Se
JF7J7VXCqerId1sVJ1GahBgNGLrBdDevL+/UODyCtDvFG4zG43k=
=FSLG
-----END PGP SIGNATURE-----

--NEAjDeynQrrxd8+d--

- Raw text -


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