From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: patch to su: -l and -p should not be used together Resent-From: Rocky Bernstein Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Sat, 17 Dec 2011 22:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 10317@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.132416091032062 (code B ref -1); Sat, 17 Dec 2011 22:29:01 +0000 Received: (at submit) by debbugs.gnu.org; 17 Dec 2011 22:28:30 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rc2k1-0008L3-3G for submit@debbugs.gnu.org; Sat, 17 Dec 2011 17:28:30 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rc1HT-0006Fy-84 for submit@debbugs.gnu.org; Sat, 17 Dec 2011 15:54:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rc1Fn-0004PS-GJ for submit@debbugs.gnu.org; Sat, 17 Dec 2011 15:53:12 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:39985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rc1Fn-0004PO-Eq for submit@debbugs.gnu.org; Sat, 17 Dec 2011 15:53:11 -0500 Received: from eggs.gnu.org ([140.186.70.92]:51040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rc1Fm-0004ej-FX for bug-coreutils@gnu.org; Sat, 17 Dec 2011 15:53:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rc1Fl-0004Oy-FA for bug-coreutils@gnu.org; Sat, 17 Dec 2011 15:53:10 -0500 Received: from mail-pz0-f41.google.com ([209.85.210.41]:47946) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rc1Fl-0004Op-7l for bug-coreutils@gnu.org; Sat, 17 Dec 2011 15:53:09 -0500 Received: by dakl33 with SMTP id l33so3519768dak.0 for ; Sat, 17 Dec 2011 12:53:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=4eq6P4UJuhJd73RJhwlpnGZBTw2tdCpsHid+c9HV50w=; b=MMSpAB/m8nzI9qFAv7RTRRAaarGg+8Cskf/zd5ybQYFLwsztEPHWAZmR70LiLpb8Ke nD05v7fCMKhZfXr0pyGY1uzUe5mzrYYVfF5JrUxM3YVpJTUmdLspUv2yNOpuoSBAVDMs j1i62qfjJxt1uBRPzrqty63izYlqCHIqtAEWs= MIME-Version: 1.0 Received: by 10.68.189.99 with SMTP id gh3mr833823pbc.86.1324155187587; Sat, 17 Dec 2011 12:53:07 -0800 (PST) Received: by 10.142.177.1 with HTTP; Sat, 17 Dec 2011 12:53:07 -0800 (PST) Date: Sat, 17 Dec 2011 15:53:07 -0500 X-Google-Sender-Auth: bEcLukFMF07d505HhQaplDa5ZAA Message-ID: From: Rocky Bernstein Content-Type: multipart/mixed; boundary=e89a8ff1c648956beb04b44fe79a X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.9 (-----) X-Mailman-Approved-At: Sat, 17 Dec 2011 17:28:28 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) --e89a8ff1c648956beb04b44fe79a Content-Type: multipart/alternative; boundary=e89a8ff1c648956be604b44fe798 --e89a8ff1c648956be604b44fe798 Content-Type: text/plain; charset=ISO-8859-1 Hi - I noticed that -m (-p, --preserve-environment) and -l (- --login) can't be used together. Attached is a patch to give a warning if they are and to indicate which option is used. In the code, I opted for the earlier option ignoring the later option. In the code --login has precedence over --preserve-environment. --e89a8ff1c648956be604b44fe798 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi -=A0

I noticed that -m (-p, --preserve-environment) a= nd -l (- --login) can't be used together.=A0

A= ttached is a patch to give a warning if they are and to indicate which opti= on is used. In the code, I opted for the earlier option ignoring the later = option. In the code --login has=A0precedence over --preserve-environment.


--e89a8ff1c648956be604b44fe798-- --e89a8ff1c648956beb04b44fe79a Content-Type: text/x-patch; charset=US-ASCII; name="su-l-vs-p.diff" Content-Disposition: attachment; filename="su-l-vs-p.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gwb3sgzk0 RnJvbSA4YTc0ZWE3MmU3NzE4ZmFjOWJjZjFjMzNhMTdmNjc1YWRiNmExOTg3IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBSLiBCZXJuc3RlaW4gPHJvY2t5QGdudS5vcmc+CkRhdGU6IFNh dCwgMTcgRGVjIDIwMTEgMTU6Mzc6NDggLTA1MDAKU3ViamVjdDogW1BBVENIXSBzdTogV2FybiB0 aGF0IC0tbG9naW4gYW5kIC0tcHJlc2VydmUgZW52aXJvbm1lbnQgYXJlIG11dHVhbGx5IGV4Y2x1 c2l2ZQoKY29yZXV0aWxzLnRleGk6IGRvY3VtZW50IHRoYXQgLWwgYW5kIC1tIGFyZSBtdXR1YWxs eSBleGNsdXNpdmUuCi0tLQogZG9jL2NvcmV1dGlscy50ZXhpIHwgICAgNCArKysrCiBzcmMvc3Uu YyAgICAgICAgICAgfCAgIDE5ICsrKysrKysrKysrKysrKysrLS0KIDIgZmlsZXMgY2hhbmdlZCwg MjEgaW5zZXJ0aW9ucygrKSwgMiBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9kb2MvY29yZXV0 aWxzLnRleGkgYi9kb2MvY29yZXV0aWxzLnRleGkKaW5kZXggYzI2YTUzZC4uZDg3NDUxOSAxMDA2 NDQKLS0tIGEvZG9jL2NvcmV1dGlscy50ZXhpCisrKyBiL2RvYy9jb3JldXRpbHMudGV4aQpAQCAt MTU2MzYsNiArMTU2MzYsOCBAQCBlbnZpcm9ubWVudCB2YXJpYWJsZXMgZXhjZXB0IEBlbnZ7VEVS TX0sIEBlbnZ7SE9NRX0sIGFuZCBAZW52e1NIRUxMfQogZGlyZWN0b3J5LiAgUHJlcGVuZCBAc2Ft cHstfSB0byB0aGUgc2hlbGwncyBuYW1lLCBpbnRlbmRlZCB0byBtYWtlIGl0CiByZWFkIGl0cyBs b2dpbiBzdGFydHVwIGZpbGUocykuCiAKK05vdGUgdGhhdCB0aGlzIG9wdGlvbiBhbmQgdGhlIG5l eHQgb25lIEBvcHRpb257LW19IGFyZSBtdXR1YWxseSBleGNsdXNpdmUuCisKIEBpdGVtIC1tCiBA aXRlbXggLXAKIEBpdGVteCAtLXByZXNlcnZlLWVudmlyb25tZW50CkBAIC0xNTY1NCw2ICsxNTY1 Niw4IEBAIGlzIG5vdCBsaXN0ZWQgaW4gdGhlIGZpbGUgQGZpbGV7L2V0Yy9zaGVsbHN9LCBvciBp biBhIGNvbXBpbGVkLWluIGxpc3QKIGlmIHRoYXQgZmlsZSBkb2VzIG5vdCBleGlzdC4gIFBhcnRz IG9mIHdoYXQgdGhpcyBvcHRpb24gZG9lcyBjYW4gYmUKIG92ZXJyaWRkZW4gYnkgQG9wdGlvbnst LWxvZ2lufSBhbmQgQG9wdGlvbnstLXNoZWxsfS4KIAorTm90ZSB0aGF0IHRoaXMgb3B0aW9uIGFu ZCB0aGUgcHJldmlvdXMgb25lIEBvcHRpb257LWx9IGFyZSBtdXR1YWxseSBleGNsdXNpdmUuCisK IEBpdGVtIC1zIEB2YXJ7c2hlbGx9CiBAaXRlbXggLS1zaGVsbD1AdmFye3NoZWxsfQogQG9waW5k ZXggLXMKZGlmZiAtLWdpdCBhL3NyYy9zdS5jIGIvc3JjL3N1LmMKaW5kZXggYjFiYTJhNy4uNzU5 MzFkNyAxMDA2NDQKLS0tIGEvc3JjL3N1LmMKKysrIGIvc3JjL3N1LmMKQEAgLTQwMCw2ICs0MDAs NyBAQCBtYWluIChpbnQgYXJnYywgY2hhciAqKmFyZ3YpCiAgIGNoYXIgKnNoZWxsID0gTlVMTDsK ICAgc3RydWN0IHBhc3N3ZCAqcHc7CiAgIHN0cnVjdCBwYXNzd2QgcHdfY29weTsKKyAgc3RhdGlj IGJvb2wgc2Vlbl9sb2dpbl9jaGFuZ2VfZW52ID0gZmFsc2UgOwogCiAgIGluaXRpYWxpemVfbWFp biAoJmFyZ2MsICZhcmd2KTsKICAgc2V0X3Byb2dyYW1fbmFtZSAoYXJndlswXSk7CkBAIC00Mjcs MTIgKzQyOCwyNiBAQCBtYWluIChpbnQgYXJnYywgY2hhciAqKmFyZ3YpCiAgICAgICAgICAgYnJl YWs7CiAKICAgICAgICAgY2FzZSAnbCc6Ci0gICAgICAgICAgc2ltdWxhdGVfbG9naW4gPSB0cnVl OworCSAgaWYgKHNlZW5fbG9naW5fY2hhbmdlX2VudiAmJiAhc2ltdWxhdGVfbG9naW4pIHsKKwkg ICAgICBmcHJpbnRmIChzdGRlcnIsIF8oIiVzOiBhbHJlYWR5IHNlZW4gLS1wcmVzZXJ2ZS1lbnZp cm9ubWVudDsgLS1sb2dpbiBpZ25vcmVkLlxuIiksCisJCSAgICAgICBwcm9ncmFtX25hbWUpOwor CSAgfSBlbHNlIHsKKwkgICAgICBzaW11bGF0ZV9sb2dpbiA9IHRydWU7CisJICAgICAgc2Vlbl9s b2dpbl9jaGFuZ2VfZW52ID0gdHJ1ZTsKKwkgIH0KKwogICAgICAgICAgIGJyZWFrOwogCiAgICAg ICAgIGNhc2UgJ20nOgogICAgICAgICBjYXNlICdwJzoKLSAgICAgICAgICBjaGFuZ2VfZW52aXJv bm1lbnQgPSBmYWxzZTsKKwkgIGlmIChzZWVuX2xvZ2luX2NoYW5nZV9lbnYgJiYgY2hhbmdlX2Vu dmlyb25tZW50KSB7CisJICAgICAgZnByaW50ZiAoc3RkZXJyLCBfKCIlczogYWxyZWFkeSBzZWVu IG9wdGlvbiAtLWxvZ2luOyAtLXByZXNlcnZlLWVudmlyb25tZW50IGlnbm9yZWQuXG4iKSwKKwkJ ICAgICAgIHByb2dyYW1fbmFtZSk7CisJICB9IGVsc2UgeworCSAgICAgIGNoYW5nZV9lbnZpcm9u bWVudCA9IGZhbHNlOworCSAgICAgIHNlZW5fbG9naW5fY2hhbmdlX2VudiA9IHRydWU7CisJICB9 CisKICAgICAgICAgICBicmVhazsKIAogICAgICAgICBjYXNlICdzJzoKLS0gCjEuNy40LjEKCg== --e89a8ff1c648956beb04b44fe79a-- From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together References: In-Reply-To: Resent-From: Rocky Bernstein Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Mon, 13 Feb 2012 02:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 10317@debbugs.gnu.org Received: via spool by 10317-submit@debbugs.gnu.org id=B10317.132909847213579 (code B ref 10317); Mon, 13 Feb 2012 02:02:01 +0000 Received: (at 10317) by debbugs.gnu.org; 13 Feb 2012 02:01:12 +0000 Received: from localhost ([127.0.0.1]:38011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RwlE8-0003Wy-4n for submit@debbugs.gnu.org; Sun, 12 Feb 2012 21:01:12 -0500 Received: from mail-pz0-f44.google.com ([209.85.210.44]:41500) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RwlE5-0003Wd-BK for 10317@debbugs.gnu.org; Sun, 12 Feb 2012 21:01:10 -0500 Received: by dakl33 with SMTP id l33so3680813dak.3 for <10317@debbugs.gnu.org>; Sun, 12 Feb 2012 17:59:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=iPsWO72A6VgyWGX7dSZzwo6irQOJkRV9/shp+KhL+5c=; b=lC/74Wu0JeKgtXYIHhqYwQw2LEUYKAjmP7fkmvPxsNpVfaKalSf7pe5vKfM9RVS35O Lj3LxsrW2ihoKZUQFMjkrhsxKAHNHRMIsUbclB0pjYV+d2slUth8Dq8K3AReFxFueChh 2t6Rv5P0Cb/X3jUuNQyrdBpLNF3d88iprXkHQ= MIME-Version: 1.0 Received: by 10.68.212.130 with SMTP id nk2mr42123062pbc.69.1329098375884; Sun, 12 Feb 2012 17:59:35 -0800 (PST) Received: by 10.142.57.6 with HTTP; Sun, 12 Feb 2012 17:59:35 -0800 (PST) Date: Sun, 12 Feb 2012 20:59:35 -0500 X-Google-Sender-Auth: NeLWdQvgAgE7Lpy19uGzF-oJZ6o Message-ID: From: Rocky Bernstein Content-Type: multipart/alternative; boundary=e89a8fb207be90f13304b8ced479 X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --e89a8fb207be90f13304b8ced479 Content-Type: text/plain; charset=ISO-8859-1 Hi - It's been a couple of months since I first sent this was sent without nary an ack. Comments? --e89a8fb207be90f13304b8ced479 Content-Type: text/html; charset=ISO-8859-1 Hi -

It's been a couple of months since I first sent this was sent without nary an ack. Comments?
--e89a8fb207be90f13304b8ced479-- From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Resent-From: Jim Meyering Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Mon, 13 Feb 2012 09:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Rocky Bernstein Cc: 10317@debbugs.gnu.org Received: via spool by 10317-submit@debbugs.gnu.org id=B10317.132912487829372 (code B ref 10317); Mon, 13 Feb 2012 09:22:02 +0000 Received: (at 10317) by debbugs.gnu.org; 13 Feb 2012 09:21:18 +0000 Received: from localhost ([127.0.0.1]:38336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rws62-0007dh-3R for submit@debbugs.gnu.org; Mon, 13 Feb 2012 04:21:18 -0500 Received: from mx.meyering.net ([88.168.87.75]:41749) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rws5z-0007dZ-Ds for 10317@debbugs.gnu.org; Mon, 13 Feb 2012 04:21:16 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id A85C8600CD; Mon, 13 Feb 2012 10:19:44 +0100 (CET) From: Jim Meyering In-Reply-To: (Rocky Bernstein's message of "Sun, 12 Feb 2012 20:59:35 -0500") References: Date: Mon, 13 Feb 2012 10:19:44 +0100 Message-ID: <87bop32iq7.fsf@rho.meyering.net> Lines: 23 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Rocky Bernstein wrote: > It's been a couple of months since I first sent this was sent without nary > an ack. Comments? Hi Rocky, su is barely on life support in coreutils. Meaning that it's no longer really maintained. We stopped installing it (by default) back in the 2007-2008 time frame (6.9.90, 7.0). We nearly removed it altogether. Do you build/install coreutils yourself, or use it via a distribution? If the latter, which distribution? I don't remember looking carefully at your patch before, but glanced through it just now. Here are some suggestions if you'd like to pursue it: - use "error (0, 0, ...", not fprintf ( - indent with spaces, not TABs - use gnu indentation/formatting style (esp. wrt braces) - mention the change in NEWS - for a behavior change like this, we would like a test case From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Resent-From: Rocky Bernstein Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Tue, 14 Feb 2012 02:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Jim Meyering Cc: 10317@debbugs.gnu.org Received: via spool by 10317-submit@debbugs.gnu.org id=B10317.132918664530604 (code B ref 10317); Tue, 14 Feb 2012 02:31:01 +0000 Received: (at 10317) by debbugs.gnu.org; 14 Feb 2012 02:30:45 +0000 Received: from localhost ([127.0.0.1]:39443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rx8AH-0007xY-9S for submit@debbugs.gnu.org; Mon, 13 Feb 2012 21:30:45 -0500 Received: from mail-qw0-f51.google.com ([209.85.216.51]:40689) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rx8AE-0007xL-KE for 10317@debbugs.gnu.org; Mon, 13 Feb 2012 21:30:44 -0500 Received: by qan41 with SMTP id 41so18386qan.3 for <10317@debbugs.gnu.org>; Mon, 13 Feb 2012 18:29:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=/N9xYsY/I94fTGTZW9qQdZxImNr98smkYDspvJLiDR8=; b=rqoCkk1gSDkiWKkfFgks/MpK9XtBkJBkf5+goSb0Sc60xP8h8FZAk0rrWqFtmqWJxw wIPGIjZkUW533wYFIlKqofc4aDqul/LpWmKD177kXsRIoe6cuCV8BX6WFjjRP0C2r9R2 nKXbqVrwoCSsoaBMV7PkIFzGP9jICqYeBkLUY= MIME-Version: 1.0 Received: by 10.229.69.96 with SMTP id y32mr2794116qci.47.1329186543529; Mon, 13 Feb 2012 18:29:03 -0800 (PST) Received: by 10.229.195.146 with HTTP; Mon, 13 Feb 2012 18:29:03 -0800 (PST) In-Reply-To: <87bop32iq7.fsf@rho.meyering.net> References: <87bop32iq7.fsf@rho.meyering.net> Date: Mon, 13 Feb 2012 21:29:03 -0500 X-Google-Sender-Auth: M0q61-WbGA6FwHExnYiGHBz70kM Message-ID: From: Rocky Bernstein Content-Type: multipart/alternative; boundary=0021cc022a8ec46f0004b8e35b7f X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --0021cc022a8ec46f0004b8e35b7f Content-Type: text/plain; charset=ISO-8859-1 On Mon, Feb 13, 2012 at 4:19 AM, Jim Meyering wrote: > Rocky Bernstein wrote: > > It's been a couple of months since I first sent this was sent without > nary > > an ack. Comments? > > Hi Rocky, > > su is barely on life support in coreutils. > Meaning that it's no longer really maintained. > We stopped installing it (by default) back in the 2007-2008 > time frame (6.9.90, 7.0). We nearly removed it altogether. > > Do you build/install coreutils yourself, or use it via a distribution? > If the latter, which distribution? > CenOS 6.2 which seems to use coreutils 8.4 > > I don't remember looking carefully at your patch before, > but glanced through it just now. Here are some suggestions > if you'd like to pursue it: > > - use "error (0, 0, ...", not fprintf ( > - indent with spaces, not TABs > - use gnu indentation/formatting style (esp. wrt braces) > - mention the change in NEWS > - for a behavior change like this, we would like a test case > The above seems all reasonable and easily doable. But are you suggesting is even after getting this into the next coreutils, no OS is likely to use it? The basic idea is that a colleague and I were confused by the fact that -l and -p conflict although this was not apparent in the documentation. I wound up downloading the source code to understand fully. So something even as simple as mentioning this in doc/coreutils.texi would have been helpful (which is the first part of that patch). Going further I realized that it is probably erroneous to supply both -l -p and that can be easily warned. But if there is a better place such to report such problems or get code improved, let me know! Thanks. --0021cc022a8ec46f0004b8e35b7f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Mon, Feb 13, 2012 at 4:19 AM, Jim Meyering <jim@meyering.net> wrote:
Rocky Bernstein wrote:
> It's been a couple of months since I first sent this was sent with= out nary
> an ack. Comments?

Hi Rocky,

su is barely on life support in coreutils.
Meaning that it's no longer really maintained.
We stopped installing it (by default) back in the 2007-2008
time frame (6.9.90, 7.0). =A0We nearly removed it altogether.

Do you build/install coreutils yourself, or use it via a distribution?
If the latter, which distribution?

CenOS 6.2 which= seems to use coreutils 8.4

I don't remember looking carefully at your patch before,
but glanced through it just now. =A0Here are some suggestions
if you'd like to pursue it:

=A0- use "error (0, 0, ...", not fprintf (
=A0- indent with spaces, not TABs
=A0- use gnu indentation/formatting style (esp. wrt braces)
=A0- mention the change in NEWS
=A0- for a behavior change like this, we would like a test case

The above seems all reasonable and easily doable. But are yo= u suggesting is even after getting this into the next coreutils, no OS is l= ikely to use it?

The basic idea is that a colleague and I were confused by the fact that= -l and -p conflict although this was not apparent in the documentation. I = wound up downloading the source code to understand fully.

So someth= ing even as simple as mentioning this in doc/coreutils.texi would have been= helpful (which is the first part of that patch).

Going further I realized that it is probably erroneous to s= upply both -l -p and that can be easily warned.

But if there is a b= etter place such to report such problems or get code improved, let me know!= Thanks.
--0021cc022a8ec46f0004b8e35b7f-- From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Resent-From: Jim Meyering Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Tue, 14 Feb 2012 10:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Rocky Bernstein Cc: 10317@debbugs.gnu.org Received: via spool by 10317-submit@debbugs.gnu.org id=B10317.132921665713159 (code B ref 10317); Tue, 14 Feb 2012 10:51:01 +0000 Received: (at 10317) by debbugs.gnu.org; 14 Feb 2012 10:50:57 +0000 Received: from localhost ([127.0.0.1]:39703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RxFyK-0003QB-RI for submit@debbugs.gnu.org; Tue, 14 Feb 2012 05:50:57 -0500 Received: from mx.meyering.net ([88.168.87.75]:45652) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RxFyH-0003Q0-VR for 10317@debbugs.gnu.org; Tue, 14 Feb 2012 05:50:55 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 16E6D601FB; Tue, 14 Feb 2012 11:49:17 +0100 (CET) From: Jim Meyering In-Reply-To: (Rocky Bernstein's message of "Mon, 13 Feb 2012 21:29:03 -0500") References: <87bop32iq7.fsf@rho.meyering.net> Date: Tue, 14 Feb 2012 11:49:16 +0100 Message-ID: <87pqdhzo43.fsf@rho.meyering.net> Lines: 48 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Rocky Bernstein wrote: > On Mon, Feb 13, 2012 at 4:19 AM, Jim Meyering wrote: > > Rocky Bernstein wrote: > > It's been a couple of months since I first sent this was sent witho= ut nary > > an ack. Comments? > > Hi Rocky, > > su is barely on life support in coreutils. > Meaning that it's no longer really maintained. > We stopped installing it (by default) back in the 2007-2008 > time frame (6.9.90, 7.0). =A0We nearly removed it altogether. > > Do you build/install coreutils yourself, or use it via a distribution? > If the latter, which distribution? > > CenOS 6.2 which seems to use coreutils 8.4 > > I don't remember looking carefully at your patch before, > but glanced through it just now. =A0Here are some suggestions > if you'd like to pursue it: > > =A0- use "error (0, 0, ...", not fprintf ( > =A0- indent with spaces, not TABs > =A0- use gnu indentation/formatting style (esp. wrt braces) > =A0- mention the change in NEWS > =A0- for a behavior change like this, we would like a test case > > The above seems all reasonable and easily doable. But are you suggesting = is even > after getting this into the next coreutils, no OS is likely to use it? > > The basic idea is that a colleague and I were confused by the fact that -= l and > -p conflict although this was not apparent in the documentation. I wound = up > downloading the source code to understand fully. > > So something even as simple as mentioning this in doc/coreutils.texi woul= d have > been helpful (which is the first part of that patch). > > Going further I realized that it is probably erroneous to supply both -l = -p and > that can be easily warned. > > But if there is a better place such to report such problems or get code > improved, let me know! Thanks. I see that Fedora still uses su from coreutils, too, so this is a worthwhile change. From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Resent-From: "Voelker, Bernhard" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Tue, 14 Feb 2012 11:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Jim Meyering , Rocky Bernstein Cc: "10317@debbugs.gnu.org" <10317@debbugs.gnu.org> Received: via spool by 10317-submit@debbugs.gnu.org id=B10317.132921917616980 (code B ref 10317); Tue, 14 Feb 2012 11:33:01 +0000 Received: (at 10317) by debbugs.gnu.org; 14 Feb 2012 11:32:56 +0000 Received: from localhost ([127.0.0.1]:39738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RxGcw-0004Pn-VE for submit@debbugs.gnu.org; Tue, 14 Feb 2012 06:32:56 -0500 Received: from senmx12-mx.siemens-enterprise.com ([62.134.46.10]:45339) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RxGcs-0004PW-V2 for 10317@debbugs.gnu.org; Tue, 14 Feb 2012 06:32:52 -0500 Received: from MCHP063A.global-ad.net (unknown [172.29.37.61]) by senmx12-mx.siemens-enterprise.com (Server) with ESMTP id 27AB223F03F9; Tue, 14 Feb 2012 12:31:09 +0100 (CET) Received: from MCHP058A.global-ad.net ([172.29.37.55]) by MCHP063A.global-ad.net ([172.29.37.61]) with mapi; Tue, 14 Feb 2012 12:31:09 +0100 From: "Voelker, Bernhard" Date: Tue, 14 Feb 2012 12:31:07 +0100 Thread-Topic: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Thread-Index: AczrBlr2omfS/8jwTvShO2N7Mlc1+QABIkCw Message-ID: <7856072A9D04C24B82DFE2B1112FE38A0D8E334D79@MCHP058A.global-ad.net> References: <87bop32iq7.fsf@rho.meyering.net> <87pqdhzo43.fsf@rho.meyering.net> In-Reply-To: <87pqdhzo43.fsf@rho.meyering.net> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Jim Meyering wrote: > I see that Fedora still uses su from coreutils, too, > so this is a worthwhile change. So does OpenSuSE. As in coreutils.texi, -l and -p can be used together, although it's not very clear what will happen: @item -m @itemx -p @itemx --preserve-environment ... Parts of what this option does can be overridden by @option{--login} and @option{--shell}. Have a nice day, Berny From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Resent-From: Rocky Bernstein Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 15 Feb 2012 03:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Jim Meyering Cc: 10317@debbugs.gnu.org Received: via spool by 10317-submit@debbugs.gnu.org id=B10317.132927809825195 (code B ref 10317); Wed, 15 Feb 2012 03:55:02 +0000 Received: (at 10317) by debbugs.gnu.org; 15 Feb 2012 03:54:58 +0000 Received: from localhost ([127.0.0.1]:40838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RxVxJ-0006YJ-13 for submit@debbugs.gnu.org; Tue, 14 Feb 2012 22:54:57 -0500 Received: from mail-pz0-f44.google.com ([209.85.210.44]:55581) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RxVxE-0006Y0-LB for 10317@debbugs.gnu.org; Tue, 14 Feb 2012 22:54:54 -0500 Received: by dakl33 with SMTP id l33so515667dak.3 for <10317@debbugs.gnu.org>; Tue, 14 Feb 2012 19:53:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=f9twTWP9hfYyX838IKT7fp2Fv0Q9z4YAMAB43QOvewk=; b=FIMvjvf/1b1F832AuLrBZjkxp+XaX7OFa9rccGBcWR1t+DPwnr5mhoOVr81Ccjst5h a11rNVUvVOIQamI892aPHXN1W0NR/kCsRmsr000zTdukAQMkGxRqTAl1w61+Y8h3/Kvj t46AZTVC+Ou8R9zcMtmf7H6vqjkXbxoGACx5w= MIME-Version: 1.0 Received: by 10.68.222.72 with SMTP id qk8mr65655243pbc.1.1329277986967; Tue, 14 Feb 2012 19:53:06 -0800 (PST) Received: by 10.142.57.6 with HTTP; Tue, 14 Feb 2012 19:53:06 -0800 (PST) In-Reply-To: <87pqdhzo43.fsf@rho.meyering.net> References: <87bop32iq7.fsf@rho.meyering.net> <87pqdhzo43.fsf@rho.meyering.net> Date: Tue, 14 Feb 2012 22:53:06 -0500 X-Google-Sender-Auth: MX_JyIT-eeo05IaBdnowg_fZM-w Message-ID: From: Rocky Bernstein Content-Type: multipart/mixed; boundary=047d7b2ee3fb3890aa04b8f8a624 X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --047d7b2ee3fb3890aa04b8f8a624 Content-Type: multipart/alternative; boundary=047d7b2ee3fb3890a704b8f8a622 --047d7b2ee3fb3890a704b8f8a622 Content-Type: text/plain; charset=ISO-8859-1 Attached should be a revised patch that addresses all of your suggestions. Cheers, rocky On Tue, Feb 14, 2012 at 5:49 AM, Jim Meyering wrote: > Rocky Bernstein wrote: > > > On Mon, Feb 13, 2012 at 4:19 AM, Jim Meyering wrote: > > > > Rocky Bernstein wrote: > > > It's been a couple of months since I first sent this was sent > without nary > > > an ack. Comments? > > > > Hi Rocky, > > > > su is barely on life support in coreutils. > > Meaning that it's no longer really maintained. > > We stopped installing it (by default) back in the 2007-2008 > > time frame (6.9.90, 7.0). We nearly removed it altogether. > > > > Do you build/install coreutils yourself, or use it via a > distribution? > > If the latter, which distribution? > > > > CenOS 6.2 which seems to use coreutils 8.4 > > > > I don't remember looking carefully at your patch before, > > but glanced through it just now. Here are some suggestions > > if you'd like to pursue it: > > > > - use "error (0, 0, ...", not fprintf ( > > - indent with spaces, not TABs > > - use gnu indentation/formatting style (esp. wrt braces) > > - mention the change in NEWS > > - for a behavior change like this, we would like a test case > > > > The above seems all reasonable and easily doable. But are you suggesting > is even > > after getting this into the next coreutils, no OS is likely to use it? > > > > The basic idea is that a colleague and I were confused by the fact that > -l and > > -p conflict although this was not apparent in the documentation. I wound > up > > downloading the source code to understand fully. > > > > So something even as simple as mentioning this in doc/coreutils.texi > would have > > been helpful (which is the first part of that patch). > > > > Going further I realized that it is probably erroneous to supply both -l > -p and > > that can be easily warned. > > > > But if there is a better place such to report such problems or get code > > improved, let me know! Thanks. > > I see that Fedora still uses su from coreutils, too, > so this is a worthwhile change. > --047d7b2ee3fb3890a704b8f8a622 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Attached should be a revised patch that addresses all of your suggestions. =

Cheers,
=A0=A0 rocky

On Tue, = Feb 14, 2012 at 5:49 AM, Jim Meyering <jim@meyering.net> wrote:
Rock= y Bernstein wrote:

> On Mon, Feb 13, 2012 at 4:19 AM, Jim Meyering <jim@meyering.net> wrote:
>
> =A0 =A0 Rocky Bernstein wrote:
> =A0 =A0 > It's been a couple of months since I first sent this = was sent without nary
> =A0 =A0 > an ack. Comments?
>
> =A0 =A0 Hi Rocky,
>
> =A0 =A0 su is barely on life support in coreutils.
> =A0 =A0 Meaning that it's no longer really maintained.
> =A0 =A0 We stopped installing it (by default) back in the 2007-2008 > =A0 =A0 time frame (6.9.90, 7.0). =A0We nearly removed it altogether.<= br> >
> =A0 =A0 Do you build/install coreutils yourself, or use it via a distr= ibution?
> =A0 =A0 If the latter, which distribution?
>
> CenOS 6.2 which seems to use coreutils 8.4
>
> =A0 =A0 I don't remember looking carefully at your patch before, > =A0 =A0 but glanced through it just now. =A0Here are some suggestions<= br> > =A0 =A0 if you'd like to pursue it:
>
> =A0 =A0 =A0- use "error (0, 0, ...", not fprintf (
> =A0 =A0 =A0- indent with spaces, not TABs
> =A0 =A0 =A0- use gnu indentation/formatting style (esp. wrt braces) > =A0 =A0 =A0- mention the change in NEWS
> =A0 =A0 =A0- for a behavior change like this, we would like a test cas= e
>
> The above seems all reasonable and easily doable. But are you suggesti= ng is even
> after getting this into the next coreutils, no OS is likely to use it?=
>
> The basic idea is that a colleague and I were confused by the fact tha= t -l and
> -p conflict although this was not apparent in the documentation. I wou= nd up
> downloading the source code to understand fully.
>
> So something even as simple as mentioning this in doc/coreutils.texi w= ould have
> been helpful (which is the first part of that patch).
>
> Going further I realized that it is probably erroneous to supply both = -l -p and
> that can be easily warned.
>
> But if there is a better place such to report such problems or get cod= e
> improved, let me know! Thanks.

I see that Fedora still uses su from coreutils, too,
so this is a worthwhile change.

--047d7b2ee3fb3890a704b8f8a622-- --047d7b2ee3fb3890aa04b8f8a624 Content-Type: text/x-diff; charset=US-ASCII; name="su-l-vs-p.diff" Content-Disposition: attachment; filename="su-l-vs-p.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gyntrtac0 ZGlmZiAtLWdpdCBhL05FV1MgYi9ORVdTCmluZGV4IDUxYzQ0YzcuLjA4YTdhOGQgMTAwNjQ0Ci0t LSBhL05FV1MKKysrIGIvTkVXUwpAQCAtMzIsNiArMzIsOSBAQCBHTlUgY29yZXV0aWxzIE5FV1Mg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtKi0gb3V0bGluZSAtKi0KICAgW3lv dSBtaWdodCBzYXkgdGhpcyB3YXMgaW50cm9kdWNlZCBpbiBjb3JldXRpbHMtNy41LCBhbG9uZyB3 aXRoIGlub3RpZnkKICAgIHN1cHBvcnQsIGJ1dCB0aGUgR1BGUyBtYWdpYyBudW1iZXIgd2Fzbid0 IGluIHRoZSB1c3VhbCBwbGFjZXMgdGhlbi5dCiAKKyoqIENoYW5nZXMgaW4gYmVoYXZpb3IKKwor ICBzdSAtbCAtcCBnaXZlcyBhIHdhcm5pbmcgdGhhdCB0aGVzZSBvcHRpb25zIGFyZSBpbmNvbXBh dGlibGUuCiAKICogTm90ZXdvcnRoeSBjaGFuZ2VzIGluIHJlbGVhc2UgOC4xNCAoMjAxMS0xMC0x MikgW3N0YWJsZV0KIApkaWZmIC0tZ2l0IGEvZG9jL2NvcmV1dGlscy50ZXhpIGIvZG9jL2NvcmV1 dGlscy50ZXhpCmluZGV4IGMyNmE1M2QuLmQ4NzQ1MTkgMTAwNjQ0Ci0tLSBhL2RvYy9jb3JldXRp bHMudGV4aQorKysgYi9kb2MvY29yZXV0aWxzLnRleGkKQEAgLTE1NjM2LDYgKzE1NjM2LDggQEAg ZW52aXJvbm1lbnQgdmFyaWFibGVzIGV4Y2VwdCBAZW52e1RFUk19LCBAZW52e0hPTUV9LCBhbmQg QGVudntTSEVMTH0KIGRpcmVjdG9yeS4gIFByZXBlbmQgQHNhbXB7LX0gdG8gdGhlIHNoZWxsJ3Mg bmFtZSwgaW50ZW5kZWQgdG8gbWFrZSBpdAogcmVhZCBpdHMgbG9naW4gc3RhcnR1cCBmaWxlKHMp LgogCitOb3RlIHRoYXQgdGhpcyBvcHRpb24gYW5kIHRoZSBuZXh0IG9uZSBAb3B0aW9uey1tfSBh cmUgbXV0dWFsbHkgZXhjbHVzaXZlLgorCiBAaXRlbSAtbQogQGl0ZW14IC1wCiBAaXRlbXggLS1w cmVzZXJ2ZS1lbnZpcm9ubWVudApAQCAtMTU2NTQsNiArMTU2NTYsOCBAQCBpcyBub3QgbGlzdGVk IGluIHRoZSBmaWxlIEBmaWxley9ldGMvc2hlbGxzfSwgb3IgaW4gYSBjb21waWxlZC1pbiBsaXN0 CiBpZiB0aGF0IGZpbGUgZG9lcyBub3QgZXhpc3QuICBQYXJ0cyBvZiB3aGF0IHRoaXMgb3B0aW9u IGRvZXMgY2FuIGJlCiBvdmVycmlkZGVuIGJ5IEBvcHRpb257LS1sb2dpbn0gYW5kIEBvcHRpb257 LS1zaGVsbH0uCiAKK05vdGUgdGhhdCB0aGlzIG9wdGlvbiBhbmQgdGhlIHByZXZpb3VzIG9uZSBA b3B0aW9uey1sfSBhcmUgbXV0dWFsbHkgZXhjbHVzaXZlLgorCiBAaXRlbSAtcyBAdmFye3NoZWxs fQogQGl0ZW14IC0tc2hlbGw9QHZhcntzaGVsbH0KIEBvcGluZGV4IC1zCmRpZmYgLS1naXQgYS9z cmMvc3UuYyBiL3NyYy9zdS5jCmluZGV4IGIxYmEyYTcuLjVkYWYxYzQgMTAwNjQ0Ci0tLSBhL3Ny Yy9zdS5jCisrKyBiL3NyYy9zdS5jCkBAIC00MDAsNiArNDAwLDcgQEAgbWFpbiAoaW50IGFyZ2Ms IGNoYXIgKiphcmd2KQogICBjaGFyICpzaGVsbCA9IE5VTEw7CiAgIHN0cnVjdCBwYXNzd2QgKnB3 OwogICBzdHJ1Y3QgcGFzc3dkIHB3X2NvcHk7CisgIHN0YXRpYyBib29sIHNlZW5fbG9naW5fY2hh bmdlX2VudiA9IGZhbHNlIDsKIAogICBpbml0aWFsaXplX21haW4gKCZhcmdjLCAmYXJndik7CiAg IHNldF9wcm9ncmFtX25hbWUgKGFyZ3ZbMF0pOwpAQCAtNDI3LDEyICs0MjgsMzIgQEAgbWFpbiAo aW50IGFyZ2MsIGNoYXIgKiphcmd2KQogICAgICAgICAgIGJyZWFrOwogCiAgICAgICAgIGNhc2Ug J2wnOgotICAgICAgICAgIHNpbXVsYXRlX2xvZ2luID0gdHJ1ZTsKKyAgICAgICAgICBpZiAoc2Vl bl9sb2dpbl9jaGFuZ2VfZW52ICYmICFzaW11bGF0ZV9sb2dpbikKKyAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgZXJyb3IgKDAsIDAsCisgICAgICAgICAgICAgICAgICAgICBfKCIlczogYWxy ZWFkeSBzZWVuIG9wdGlvbiAtLXByZXNlcnZlLWVudmlyb25tZW50OyAtLWxvZ2luIGlnbm9yZWQu XG4iKSwKKyAgICAgICAgICAgICAgICAgICAgICAgcHJvZ3JhbV9uYW1lKTsKKyAgICAgICAgICAg IH0KKyAgICAgICAgICBlbHNlCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHNpbXVsYXRl X2xvZ2luID0gdHJ1ZTsKKyAgICAgICAgICAgICAgc2Vlbl9sb2dpbl9jaGFuZ2VfZW52ID0gdHJ1 ZTsKKyAgICAgICAgICAgIH0KICAgICAgICAgICBicmVhazsKIAogICAgICAgICBjYXNlICdtJzoK ICAgICAgICAgY2FzZSAncCc6Ci0gICAgICAgICAgY2hhbmdlX2Vudmlyb25tZW50ID0gZmFsc2U7 CisgICAgICAgICAgaWYgKHNlZW5fbG9naW5fY2hhbmdlX2VudiAmJiBjaGFuZ2VfZW52aXJvbm1l bnQpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGVycm9yICgwLCAwLAorICAgICAgICAg ICAgICAgICAgICAgXygiJXM6IGFscmVhZHkgc2VlbiBvcHRpb24gLS1sb2dpbjsgLS1wcmVzZXJ2 ZS1lbnZpcm9ubWVudCBpZ25vcmVkLlxuIiksCisgICAgICAgICAgICAgICAgICAgICAgIHByb2dy YW1fbmFtZSk7CisgICAgICAgICAgICB9CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgewor ICAgICAgICAgICAgICBjaGFuZ2VfZW52aXJvbm1lbnQgPSBmYWxzZTsKKyAgICAgICAgICAgICAg c2Vlbl9sb2dpbl9jaGFuZ2VfZW52ID0gdHJ1ZTsKKyAgICAgICAgICAgIH0KICAgICAgICAgICBi cmVhazsKIAogICAgICAgICBjYXNlICdzJzoKZGlmZiAtLWdpdCBhL3Rlc3RzL01ha2VmaWxlLmFt IGIvdGVzdHMvTWFrZWZpbGUuYW0KaW5kZXggMjNjYjcwZi4uMDlmMWUzMSAxMDA2NDQKLS0tIGEv dGVzdHMvTWFrZWZpbGUuYW0KKysrIGIvdGVzdHMvTWFrZWZpbGUuYW0KQEAgLTUwMCw2ICs1MDAs NyBAQCBURVNUUyA9CQkJCQkJXAogICBybWRpci9mYWlsLXBlcm0JCQkJXAogICBybWRpci9pZ25v cmUJCQkJCVwKICAgcm1kaXIvdC1zbGFzaAkJCQkJXAorICBzdS9wLWFuZC1sICAJCQkJCVwKICAg dGFpbC0yL2Fzc2VydC0yCQkJCVwKICAgdGFpbC0yL2JpZy00Z2IJCQkJXAogICB0YWlsLTIvZmx1 c2gtaW5pdGlhbAkJCQlcCmRpZmYgLS1naXQgYS90ZXN0cy9zdS9wLWFuZC1sIGIvdGVzdHMvc3Uv cC1hbmQtbApuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi4zN2ZhZTZmCi0tLSAv ZGV2L251bGwKKysrIGIvdGVzdHMvc3UvcC1hbmQtbApAQCAtMCwwICsxLDc0IEBACisjIS91c3Iv YmluL3BlcmwKKyMgVGVzdCB3aGV0aGVyIG9wdGlvbnMgLXAgYW5kIC1sIGdpdmUgYSB3YXJuaW5n LgorCisjIENvcHlyaWdodCAoQykgMjAxMiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4K KworIyBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUg aXQgYW5kL29yIG1vZGlmeQorIyBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFs IFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieQorIyB0aGUgRnJlZSBTb2Z0d2FyZSBGb3Vu ZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZSBMaWNlbnNlLCBvcgorIyAoYXQgeW91ciBv cHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLgorCisjIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRl ZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLAorIyBidXQgV0lUSE9VVCBBTlkg V0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZgorIyBNRVJDSEFO VEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlCisj IEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuCisKKyMgWW91IHNo b3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vu c2UKKyMgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0uICBJZiBub3QsIHNlZSA8aHR0cDovL3d3dy5n bnUub3JnL2xpY2Vuc2VzLz4uCisKKyMjIFRoZSBmb2xsb3dpbmcgbWF5IGJlIGhlbHBmdWwgaW4g ZGVidWdnaW5nCisjIHVzZSBFbmJ1Z2dlcjsgRW5idWdnZXItPmxvYWRfZGVidWdnZXIoJ3RyZXBh bicpOworCit1c2Ugc3RyaWN0OyB1c2Ugd2FybmluZ3M7CisobXkgJE1FID0gJDApID1+IHN8Liov fHw7CisKKyMgU29tZSBvbGRlciB2ZXJzaW9ucyBvZiBFeHBlY3QucG0gKGUuZy4gMS4wNykgbGFj ayB0aGUgbG9nX3VzZXIgbWV0aG9kLAorIyBzbyBjaGVjayBmb3IgdGhhdCwgdG9vLgorZXZhbCB7 IHJlcXVpcmUgRXhwZWN0OyBFeHBlY3QtPnJlcXVpcmVfdmVyc2lvbignMS4xMScpIH07CiskQAor ICBhbmQgQ3VTa2lwOjpza2lwICIkTUU6IHRoaXMgc2NyaXB0IHJlcXVpcmVzIFBlcmwncyBFeHBl Y3QgcGFja2FnZSA+PTEuMTFcbiI7CisKK3sKKyAgbXkgJGZhaWwgPSAwOworICBteSBAdGVzdHMg PSAoCisgICAgICBbInN1IC1sIC1wIGJvZ3VzIiwKKyAgICAgICBxci9hbHJlYWR5IHNlZW4gb3B0 aW9uIC0tbG9naW4vXSwKKyAgICAgIFsic3UgLXAgLWwgYm9ndXMiLAorICAgICAgIHFyL2FscmVh ZHkgc2VlbiBvcHRpb24gLS1wcmVzZXJ2ZS9dLAorICAgICAgKTsKKyAgZm9yZWFjaCBteSAkYXJ5 IChAdGVzdHMpCisgICAgeworICAgICAgbXkgKCRjbWQsICRleHBlY3QpID0gQCRhcnk7CisgICAg ICBteSAkZXhwID0gbmV3IEV4cGVjdDsKKyAgICAgICRleHAtPmxvZ191c2VyKDApOworICAgICAg JGV4cC0+c3Bhd24oIiRjbWQiKQorICAgICAgICBvciAod2FybiAiJE1FOiBjYW5ub3QgcnVuIGAk Y21kJzogJCFcbiIpLCAkZmFpbD0xLCBuZXh0OworICAgICAgbXkgJHNwYXduX29rOworICAgICAg bXkgQGZvdW5kID0gJGV4cC0+ZXhwZWN0KDEsICdQYXNzd29yZDogJyk7CisgICAgICB1bmxlc3Mg KCRmb3VuZFszXSA9fiAkZXhwZWN0KSB7CisJICB3YXJuICIkTUU6ICRjbWQgZGlkIG5vdCBnZXQg ZXhwZWN0ZWQgd2FybmluZzogJGV4cGVjdFxuIjsKKwkgICRmYWlsID0gMTsKKyAgICAgIH0KKyAg ICAgICRleHAtPmhhcmRfY2xvc2UoKTsKKyAgICB9CisgIEB0ZXN0cyA9ICgKKyAgICAgICJzdSAt bCBib2d1cyIsCisgICAgICAic3UgLXAgYm9ndXMiLAorICAgICAgInN1IGJvZ3VzIiwKKyAgICAg ICk7CisgIGZvcmVhY2ggbXkgJGNtZCAoQHRlc3RzKQorICAgIHsKKyAgICAgIG15ICRleHAgPSBu ZXcgRXhwZWN0OworICAgICAgJGV4cC0+bG9nX3VzZXIoMCk7CisgICAgICAkZXhwLT5zcGF3bigi JGNtZCIpCisgICAgICAgIG9yICh3YXJuICIkTUU6IGNhbm5vdCBydW4gYCRjbWQnOiAkIVxuIiks ICRmYWlsPTEsIG5leHQ7CisgICAgICBteSAkc3Bhd25fb2s7CisgICAgICBteSBAZm91bmQgPSAk ZXhwLT5leHBlY3QoMSwgJ1Bhc3N3b3JkOiAnKTsKKyAgICAgIGlmICgkZm91bmRbM10gPX4gcXIv YWxyZWFkeSBzZWVuIG9wdGlvbi8pIHsKKwkgIHdhcm4gIiRNRTogJGNtZCBzaG91bGQgbm90IGdl dCBhbHJlYWR5LXNlZW4gb3B0aW9uIHdhcm5pbmdcbiI7CisJICAkZmFpbCA9IDE7CisgICAgICB9 CisgICAgICAkZXhwLT5oYXJkX2Nsb3NlKCk7CisgICAgfQorICBleGl0ICRmYWlsCit9Cg== --047d7b2ee3fb3890aa04b8f8a624-- From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Resent-From: Philipp Thomas Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Tue, 21 Feb 2012 15:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 10317@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13298367716814 (code B ref -1); Tue, 21 Feb 2012 15:07:01 +0000 Received: (at submit) by debbugs.gnu.org; 21 Feb 2012 15:06:11 +0000 Received: from localhost ([127.0.0.1]:48895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RzrI7-0001li-KA for submit@debbugs.gnu.org; Tue, 21 Feb 2012 10:06:11 -0500 Received: from eggs.gnu.org ([140.186.70.92]:38006) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RzrI3-0001l9-1M for submit@debbugs.gnu.org; Tue, 21 Feb 2012 10:06:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RzrFb-0001yZ-BK for submit@debbugs.gnu.org; Tue, 21 Feb 2012 10:03:40 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:41425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzrFb-0001yV-8d for submit@debbugs.gnu.org; Tue, 21 Feb 2012 10:03:31 -0500 Received: from eggs.gnu.org ([140.186.70.92]:50608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzrFR-0007L9-On for bug-coreutils@gnu.org; Tue, 21 Feb 2012 10:03:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RzrFJ-0001vE-Ug for bug-coreutils@gnu.org; Tue, 21 Feb 2012 10:03:21 -0500 Received: from cantor2.suse.de ([195.135.220.15]:43305 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzrFJ-0001ua-Ph for bug-coreutils@gnu.org; Tue, 21 Feb 2012 10:03:13 -0500 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 2394890182 for ; Tue, 21 Feb 2012 16:03:11 +0100 (CET) Date: Tue, 21 Feb 2012 16:03:11 +0100 From: Philipp Thomas Message-ID: <20120221150311.GC17617@paradies.suse.de> References: <87bop32iq7.fsf@rho.meyering.net> <87pqdhzo43.fsf@rho.meyering.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87pqdhzo43.fsf@rho.meyering.net> X-Operating-System: openSUSE - Kernel Linux 3.2.0-2-desktop x86_64 Organization: SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix =?UTF-8?Q?Imend=C3=B6rffer,?= HRB 21284 (AG =?UTF-8?Q?N=C3=BCrnberg?=) User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.2 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) * Jim Meyering (jim@meyering.net) [20120214 11:49]: > I see that Fedora still uses su from coreutils, too, > so this is a worthwhile change. openSUSE and SLES are also using su from coreutils. Philipp From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Resent-From: Rocky Bernstein Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Sat, 31 Mar 2012 23:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 10317@debbugs.gnu.org, jim@meyering.net X-Debbugs-Original-To: bug-coreutils@gnu.org, Jim Meyering X-Debbugs-Original-Cc: 10317@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13332347512370 (code B ref -1); Sat, 31 Mar 2012 23:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 31 Mar 2012 22:59:11 +0000 Received: from localhost ([127.0.0.1]:33347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SE7GJ-0000cB-1U for submit@debbugs.gnu.org; Sat, 31 Mar 2012 18:59:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39696) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SE7GH-0000c3-3Z for submit@debbugs.gnu.org; Sat, 31 Mar 2012 18:59:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SE7G8-0002wC-GH for submit@debbugs.gnu.org; Sat, 31 Mar 2012 18:59:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:48855) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SE7G8-0002w5-AJ for submit@debbugs.gnu.org; Sat, 31 Mar 2012 18:59:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SE7G6-0005o6-Bn for bug-coreutils@gnu.org; Sat, 31 Mar 2012 18:58:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SE7G4-0002vN-1i for bug-coreutils@gnu.org; Sat, 31 Mar 2012 18:58:57 -0400 Received: from mail-pz0-f52.google.com ([209.85.210.52]:53382) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SE7G3-0002v2-MN for bug-coreutils@gnu.org; Sat, 31 Mar 2012 18:58:55 -0400 Received: by dake40 with SMTP id e40so773080dak.39 for ; Sat, 31 Mar 2012 15:58:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=BkTPAe86Zxn6wHR0005GCSqPkNML8jgVAqfmWDRhshs=; b=qAFA2t2FP2KEcqs8veSBu7OzhQJS38an6e6vWX9cFJ4q5vgFj9c9Rg3MPcLy3mk7A/ z9qs3yaDC4ShPCp1/YG4UdB8lfKvgEM4F7gprGH7nm2j+zCUwyFJTKdQkA1JFoiEF6m3 pdKFyjwDa7xhRgh9CJy515RV535UyObLR5TM1drITrEwY430zllUC92mvl6GNY9mKhNL Cd4ie5CI3FDZca+VZRrgaPMUCh97yCs87yb3Di3cHh4MVOOQsAzf+YhGKT1GChgevORE 0Hfh9RBcgx8LfXIXSkpnqMrWLgLVtLs3xnXMv+3OkaE/iwbb/b98uXLeokxUIj63PtiK Y2Zw== MIME-Version: 1.0 Received: by 10.68.193.138 with SMTP id ho10mr8939440pbc.80.1333234732518; Sat, 31 Mar 2012 15:58:52 -0700 (PDT) Received: by 10.143.93.12 with HTTP; Sat, 31 Mar 2012 15:58:52 -0700 (PDT) In-Reply-To: References: <87bop32iq7.fsf@rho.meyering.net> <87pqdhzo43.fsf@rho.meyering.net> Date: Sat, 31 Mar 2012 18:58:52 -0400 X-Google-Sender-Auth: Oqrr1U4h3ZX59z7kAlh4BuvL1JE Message-ID: From: Rocky Bernstein Content-Type: multipart/alternative; boundary=047d7b15af43a24c1a04bc91e69f X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) --047d7b15af43a24c1a04bc91e69f Content-Type: text/plain; charset=ISO-8859-1 Any progress or thoughts on the revised patch? On Tue, Feb 14, 2012 at 10:53 PM, Rocky Bernstein wrote: > Attached should be a revised patch that addresses all of your suggestions. > > Cheers, > rocky > > > On Tue, Feb 14, 2012 at 5:49 AM, Jim Meyering wrote: > >> Rocky Bernstein wrote: >> >> > On Mon, Feb 13, 2012 at 4:19 AM, Jim Meyering wrote: >> > >> > Rocky Bernstein wrote: >> > > It's been a couple of months since I first sent this was sent >> without nary >> > > an ack. Comments? >> > >> > Hi Rocky, >> > >> > su is barely on life support in coreutils. >> > Meaning that it's no longer really maintained. >> > We stopped installing it (by default) back in the 2007-2008 >> > time frame (6.9.90, 7.0). We nearly removed it altogether. >> > >> > Do you build/install coreutils yourself, or use it via a >> distribution? >> > If the latter, which distribution? >> > >> > CenOS 6.2 which seems to use coreutils 8.4 >> > >> > I don't remember looking carefully at your patch before, >> > but glanced through it just now. Here are some suggestions >> > if you'd like to pursue it: >> > >> > - use "error (0, 0, ...", not fprintf ( >> > - indent with spaces, not TABs >> > - use gnu indentation/formatting style (esp. wrt braces) >> > - mention the change in NEWS >> > - for a behavior change like this, we would like a test case >> > >> > The above seems all reasonable and easily doable. But are you >> suggesting is even >> > after getting this into the next coreutils, no OS is likely to use it? >> > >> > The basic idea is that a colleague and I were confused by the fact that >> -l and >> > -p conflict although this was not apparent in the documentation. I >> wound up >> > downloading the source code to understand fully. >> > >> > So something even as simple as mentioning this in doc/coreutils.texi >> would have >> > been helpful (which is the first part of that patch). >> > >> > Going further I realized that it is probably erroneous to supply both >> -l -p and >> > that can be easily warned. >> > >> > But if there is a better place such to report such problems or get code >> > improved, let me know! Thanks. >> >> I see that Fedora still uses su from coreutils, too, >> so this is a worthwhile change. >> > > --047d7b15af43a24c1a04bc91e69f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Any progress or thoughts on the revised patch?

On Tue, Feb 14, 2012 at 10:53 PM, Rocky Bernstein = <rocky@gnu.org> wrote:
Attached should be a revised patch that addresses all of your suggestions. =

Cheers,
=A0=A0 rocky

On Tue, Feb 14, 2012 at 5:49 AM, Jim Meyeri= ng <jim@meyering.net> wrote:
Rocky Bernstein wrote:

> On Mon, Feb 13, 2012 at 4:19 AM, Jim Meyering <jim@meyering.net> wrote:
>
> =A0 =A0 Rocky Bernstein wrote:
> =A0 =A0 > It's been a couple of months since I first sent this = was sent without nary
> =A0 =A0 > an ack. Comments?
>
> =A0 =A0 Hi Rocky,
>
> =A0 =A0 su is barely on life support in coreutils.
> =A0 =A0 Meaning that it's no longer really maintained.
> =A0 =A0 We stopped installing it (by default) back in the 2007-2008 > =A0 =A0 time frame (6.9.90, 7.0). =A0We nearly removed it altogether.<= br> >
> =A0 =A0 Do you build/install coreutils yourself, or use it via a distr= ibution?
> =A0 =A0 If the latter, which distribution?
>
> CenOS 6.2 which seems to use coreutils 8.4
>
> =A0 =A0 I don't remember looking carefully at your patch before, > =A0 =A0 but glanced through it just now. =A0Here are some suggestions<= br> > =A0 =A0 if you'd like to pursue it:
>
> =A0 =A0 =A0- use "error (0, 0, ...", not fprintf (
> =A0 =A0 =A0- indent with spaces, not TABs
> =A0 =A0 =A0- use gnu indentation/formatting style (esp. wrt braces) > =A0 =A0 =A0- mention the change in NEWS
> =A0 =A0 =A0- for a behavior change like this, we would like a test cas= e
>
> The above seems all reasonable and easily doable. But are you suggesti= ng is even
> after getting this into the next coreutils, no OS is likely to use it?=
>
> The basic idea is that a colleague and I were confused by the fact tha= t -l and
> -p conflict although this was not apparent in the documentation. I wou= nd up
> downloading the source code to understand fully.
>
> So something even as simple as mentioning this in doc/coreutils.texi w= ould have
> been helpful (which is the first part of that patch).
>
> Going further I realized that it is probably erroneous to supply both = -l -p and
> that can be easily warned.
>
> But if there is a better place such to report such problems or get cod= e
> improved, let me know! Thanks.

I see that Fedora still uses su from coreutils, too,
so this is a worthwhile change.


--047d7b15af43a24c1a04bc91e69f-- From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Resent-From: Jim Meyering Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Sat, 07 Apr 2012 06:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Rocky Bernstein Cc: 10317@debbugs.gnu.org X-Debbugs-Original-Cc: bug-coreutils@gnu.org, 10317@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13337793572334 (code B ref -1); Sat, 07 Apr 2012 06:16:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 Apr 2012 06:15:57 +0000 Received: from localhost ([127.0.0.1]:43004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SGOwH-0000ba-7J for submit@debbugs.gnu.org; Sat, 07 Apr 2012 02:15:57 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41088) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SGOwF-0000bU-KK for submit@debbugs.gnu.org; Sat, 07 Apr 2012 02:15:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SGOvX-000234-3P for submit@debbugs.gnu.org; Sat, 07 Apr 2012 02:15:12 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:55231) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGOvX-00022z-0A for submit@debbugs.gnu.org; Sat, 07 Apr 2012 02:15:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGOvV-0000S5-E1 for bug-coreutils@gnu.org; Sat, 07 Apr 2012 02:15:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SGOvT-00022D-JU for bug-coreutils@gnu.org; Sat, 07 Apr 2012 02:15:08 -0400 Received: from mx.meyering.net ([88.168.87.75]:57057) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGOvT-00020v-CX; Sat, 07 Apr 2012 02:15:07 -0400 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 6EB0D60266; Sat, 7 Apr 2012 08:15:04 +0200 (CEST) From: Jim Meyering In-Reply-To: (Rocky Bernstein's message of "Sat, 31 Mar 2012 18:58:52 -0400") References: <87bop32iq7.fsf@rho.meyering.net> <87pqdhzo43.fsf@rho.meyering.net> Date: Sat, 07 Apr 2012 08:15:04 +0200 Message-ID: <87ehs0m5jr.fsf@rho.meyering.net> Lines: 14 MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Rocky Bernstein wrote: > Any progress or thoughts on the revised patch? Hi Rocky, Sorry about the delay. I haven't forgotten. I noticed that your test requires typing a root password. We prefer to avoid that, so that the tests can be run non-interactively. That's why some tests are root-only. (see README for details on running them) They're marked with require_root_. At least one is a bourne shell husk that actually does its work in Perl, so may be a good model. From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Resent-From: Rocky Bernstein Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 13 Apr 2012 02:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Jim Meyering Cc: 10317@debbugs.gnu.org X-Debbugs-Original-Cc: bug-coreutils@gnu.org, 10317@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.133428511128397 (code B ref -1); Fri, 13 Apr 2012 02:46:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Apr 2012 02:45:11 +0000 Received: from localhost ([127.0.0.1]:55360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIWVa-0007Nx-UX for submit@debbugs.gnu.org; Thu, 12 Apr 2012 22:45:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36824) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIWVZ-0007Nr-Ds for submit@debbugs.gnu.org; Thu, 12 Apr 2012 22:45:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SIWUJ-0004jM-RI for submit@debbugs.gnu.org; Thu, 12 Apr 2012 22:43:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:47367) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIWUJ-0004jB-LV for submit@debbugs.gnu.org; Thu, 12 Apr 2012 22:43:51 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIWUH-0007AY-US for bug-coreutils@gnu.org; Thu, 12 Apr 2012 22:43:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SIWUG-0004ir-1Y for bug-coreutils@gnu.org; Thu, 12 Apr 2012 22:43:49 -0400 Received: from mail-pz0-f52.google.com ([209.85.210.52]:63775) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIWUF-0004iY-OY for bug-coreutils@gnu.org; Thu, 12 Apr 2012 22:43:47 -0400 Received: by dake40 with SMTP id e40so3125098dak.39 for ; Thu, 12 Apr 2012 19:43:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=qDdrXm6Oq1gv86++FCv7WiFo2sECfWGeFC4NYbhK/yg=; b=cjukJEQUxskwh8dd4Xu1CQRPK3Y+hWBN/uIzJ6RvquTos/QLuZH5AG+a/dgszQzL/e 3Mox086bHq/4qeBWh5K0aycDRoqnFzQMIvxUIwXX2LoSLpTBSAVg5ucGEG8nqJpEbMgg 022L3P0PtTZ6GBbPerAzLD2zMwqqhfvkFvEwAmAOVH8yf1q1gZMEj3nufvJ1a9p8HvM2 xBZ1DjAHu0xfWL/0CdXnLEa6CMwUY1qs/7+etsmtdf+7GmoSbc2ls+qQe7R6WoZq7qb2 sPL/k6oMii724H609GmMinDb3SMRdsx/Qkhg3OCqObdQ4zQYdHStbqutZnP75rQEOicY 3eGw== MIME-Version: 1.0 Received: by 10.68.221.74 with SMTP id qc10mr756052pbc.80.1334285024606; Thu, 12 Apr 2012 19:43:44 -0700 (PDT) Received: by 10.143.93.12 with HTTP; Thu, 12 Apr 2012 19:43:44 -0700 (PDT) In-Reply-To: <87ehs0m5jr.fsf@rho.meyering.net> References: <87bop32iq7.fsf@rho.meyering.net> <87pqdhzo43.fsf@rho.meyering.net> <87ehs0m5jr.fsf@rho.meyering.net> Date: Thu, 12 Apr 2012 22:43:44 -0400 X-Google-Sender-Auth: xXAMIBTLN_V9pBFPLiEXkpnakhM Message-ID: From: Rocky Bernstein Content-Type: multipart/alternative; boundary=e89a8ff2432bebb93904bd8670c6 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) --e89a8ff2432bebb93904bd8670c6 Content-Type: text/plain; charset=ISO-8859-1 On Sat, Apr 7, 2012 at 2:15 AM, Jim Meyering wrote: > Rocky Bernstein wrote: > > Any progress or thoughts on the revised patch? > > Hi Rocky, > Sorry about the delay. > I haven't forgotten. > > I noticed that your test requires typing a root password. > Um, no. I don't know how you got that impression, but did you try running the test as a non-root or non-privileged user? Here is what I got when I just tried: $ (cd tests && make check TESTS=su/p-and-l) make check-TESTS make[1]: Entering directory `/src/external-vcs/coreutils/tests' make[2]: Entering directory `/src/external-vcs/coreutils/tests' PASS: su/p-and-l ============= 1 test passed ============= (Sorry for the delay - I wrote this long enough ago that I didn't remember what I did and only now have I had the time to review.) We prefer to avoid that, so that the tests can be run > non-interactively. That's why some tests are root-only. > (see README for details on running them) > They're marked with require_root_. > At least one is a bourne shell husk that actually does > its work in Perl, so may be a good model. > --e89a8ff2432bebb93904bd8670c6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Sat, Apr 7, 2012 at 2:15 AM, Jim Meyering <jim@meyering.net> wrote:
Rocky Bernstein wrote:
> Any progress or thoughts on the revised patch?

Hi Rocky,
Sorry about the delay.
I haven't forgotten.

I noticed that your test requires typing a root password.
<= div>
Um, no. I don't know how you got that impression, but did you t= ry running the test as a non-root or non-privileged user?

Here is w= hat I got when I just tried:

$ (cd tests && make check TESTS=3Dsu/p-and-l)
make=A0 check= -TESTS
make[1]: Entering directory `/src/external-vcs/coreutils/tests= 9;
make[2]: Entering directory `/src/external-vcs/coreutils/tests' PASS: su/p-and-l
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
1 test passe= d
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

(Sorry for the delay - = I wrote this long enough ago that=A0 I didn't remember what I did and o= nly now have I had the time to review.)





We prefer to avoid that, so that the tests can be run
non-interactively. =A0That's why some tests are root-only.
(see README for details on running them)
They're marked with require_root_.
At least one is a bourne shell husk that actually does
its work in Perl, so may be a good model.

--e89a8ff2432bebb93904bd8670c6-- From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Resent-From: Rocky Bernstein Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 04 May 2012 00:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Jim Meyering Cc: 10317@debbugs.gnu.org X-Debbugs-Original-Cc: bug-coreutils@gnu.org, 10317@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.133609273524156 (code B ref -1); Fri, 04 May 2012 00:53:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 May 2012 00:52:15 +0000 Received: from localhost ([127.0.0.1]:35382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQ6kp-0006HY-BA for submit@debbugs.gnu.org; Thu, 03 May 2012 20:52:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51486) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQ6kl-0006HC-IO for submit@debbugs.gnu.org; Thu, 03 May 2012 20:52:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQ6j1-00084m-GF for submit@debbugs.gnu.org; Thu, 03 May 2012 20:50:25 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:51911) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQ6j1-00084i-A9 for submit@debbugs.gnu.org; Thu, 03 May 2012 20:50:23 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQ6iz-00014F-E3 for bug-coreutils@gnu.org; Thu, 03 May 2012 20:50:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQ6ix-00084W-9s for bug-coreutils@gnu.org; Thu, 03 May 2012 20:50:20 -0400 Received: from mail-pb0-f41.google.com ([209.85.160.41]:56445) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQ6iw-00084C-Uk for bug-coreutils@gnu.org; Thu, 03 May 2012 20:50:19 -0400 Received: by pbbrp2 with SMTP id rp2so3391452pbb.0 for ; Thu, 03 May 2012 17:50:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=iSIqznR5+enS2RqI5SBcUFvZmaEBQNKr3o3HPr8r04U=; b=NLQnNrSV8sE4AUodTurWVerOmPzxc0PoXjSkc9iTszdzaVesPeTVDHMjgefqdtuvyi ZxU+rFhaCms8DOukznyrT9ura8GAYhU0xbpesAzUAoQkq3KW0CaOqVbOOVMCVJkBsd7i EkSxD3wRmhK2xqfcPUMmtHZaOrhtArMIxTSmP1c6zdJOl4Ixsft0YPwsHaiQfmhqFUEq L+ucOiziQSdITFkJBDjNIrhgGfcnMtHNukNbfD+n+airYWePCwpKz/Eji2xu7koPDeTZ pH37q+Pf1JfkIaEfoRTiNFWY0LNr6A1ZPPOf/TKtzATGF31BGNyRCqkGNEcYz2OkB7Xy 9W9Q== MIME-Version: 1.0 Received: by 10.68.226.3 with SMTP id ro3mr5469589pbc.82.1336092615736; Thu, 03 May 2012 17:50:15 -0700 (PDT) Received: by 10.143.93.12 with HTTP; Thu, 3 May 2012 17:50:15 -0700 (PDT) In-Reply-To: References: <87bop32iq7.fsf@rho.meyering.net> <87pqdhzo43.fsf@rho.meyering.net> <87ehs0m5jr.fsf@rho.meyering.net> Date: Thu, 3 May 2012 20:50:15 -0400 X-Google-Sender-Auth: i7VFSOoNz5_BbpjOrUoydIei_P8 Message-ID: From: Rocky Bernstein Content-Type: multipart/alternative; boundary=047d7b2e0825bf7db204bf2b4d16 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) --047d7b2e0825bf7db204bf2b4d16 Content-Type: text/plain; charset=ISO-8859-1 Any word on this? On Thu, Apr 12, 2012 at 10:43 PM, Rocky Bernstein wrote: > On Sat, Apr 7, 2012 at 2:15 AM, Jim Meyering wrote: > >> Rocky Bernstein wrote: >> > Any progress or thoughts on the revised patch? >> >> Hi Rocky, >> Sorry about the delay. >> I haven't forgotten. >> >> I noticed that your test requires typing a root password. >> > > Um, no. I don't know how you got that impression, but did you try running > the test as a non-root or non-privileged user? > > Here is what I got when I just tried: > > $ (cd tests && make check TESTS=su/p-and-l) > make check-TESTS > make[1]: Entering directory `/src/external-vcs/coreutils/tests' > make[2]: Entering directory `/src/external-vcs/coreutils/tests' > PASS: su/p-and-l > ============= > 1 test passed > ============= > > (Sorry for the delay - I wrote this long enough ago that I didn't > remember what I did and only now have I had the time to review.) > > > > > > We prefer to avoid that, so that the tests can be run >> non-interactively. That's why some tests are root-only. >> (see README for details on running them) >> They're marked with require_root_. >> At least one is a bourne shell husk that actually does >> its work in Perl, so may be a good model. >> > > --047d7b2e0825bf7db204bf2b4d16 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Any word on this?

On Thu, Apr 12, 2012 a= t 10:43 PM, Rocky Bernstein <rocky@gnu.org> wrote:
On Sat, Apr 7, 2012 at 2:15 AM, Jim Meyering <jim@meyerin= g.net> wrote:
Rocky Bernstein wrote:
> Any progress or thoughts on the revised patch?

Hi Rocky,
Sorry about the delay.
I haven't forgotten.

I noticed that your test requires typing a root password.
<= /div>

Um, no. I don't know how you got that impression, but did= you try running the test as a non-root or non-privileged user?

Here is what I got when I just tried:

$ (cd tests && make check TESTS=3Dsu/p-and-l)
make=A0 check= -TESTS
make[1]: Entering directory `/src/external-vcs/coreutils/tests= 9;
make[2]: Entering directory `/src/external-vcs/coreutils/tests' PASS: su/p-and-l
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
1 test passe= d
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

(Sorry for the delay - = I wrote this long enough ago that=A0 I didn't remember what I did and o= nly now have I had the time to review.)





We prefer to avoid that, so that the tests can be run
non-interactively. =A0That's why some tests are root-only.
(see README for details on running them)
They're marked with require_root_.
At least one is a bourne shell husk that actually does
its work in Perl, so may be a good model.


--047d7b2e0825bf7db204bf2b4d16-- From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Resent-From: Jim Meyering Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 04 May 2012 08:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Rocky Bernstein Cc: 10317@debbugs.gnu.org X-Debbugs-Original-Cc: bug-coreutils@gnu.org, 10317@debbugs.gnu.org Received: via spool by 10317-submit@debbugs.gnu.org id=B10317.13361214981131 (code B ref 10317); Fri, 04 May 2012 08:52:02 +0000 Received: (at 10317) by debbugs.gnu.org; 4 May 2012 08:51:38 +0000 Received: from localhost ([127.0.0.1]:35713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQEEi-0000IB-VR for submit@debbugs.gnu.org; Fri, 04 May 2012 04:51:37 -0400 Received: from mx.meyering.net ([88.168.87.75]:34512) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQEEe-0000I2-Av for 10317@debbugs.gnu.org; Fri, 04 May 2012 04:51:34 -0400 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 39F646004B; Fri, 4 May 2012 10:49:47 +0200 (CEST) From: Jim Meyering In-Reply-To: (Rocky Bernstein's message of "Thu, 3 May 2012 20:50:15 -0400") References: <87bop32iq7.fsf@rho.meyering.net> <87pqdhzo43.fsf@rho.meyering.net> <87ehs0m5jr.fsf@rho.meyering.net> Date: Fri, 04 May 2012 10:49:47 +0200 Message-ID: <878vh8nxec.fsf@rho.meyering.net> Lines: 237 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Rocky Bernstein wrote: > Any word on this? Hi Rocky, Sorry about the extended delay. Changing su.c like this has really low priority. I've looked at your patch and see that it changes the semantics of su for those who use -l with (-m or -p). Before your patch, -l would lead to simulate_login being set even when -l was specified after an -m-or-p option. Now, using e.g., "-l -m" evokes a warning but the -l is otherwise ignored. Did you intend that? Normally such a change would be mentioned in a ChangeLog entry or commit log. I tried to use the su from coreutils (with or without your patch) and found that it does not work when it attempts to authenticate. E.g., it cannot su to any user on this Fedora 17 system. If su remains so broken that it does not work out-of-the-box on F17, then it's not worth patching. Remember that I wanted to remove su from coreutils altogether, and only reluctantly agreed to consider this change. If someone who cares about su remaining in coreutils wants to take responsibility for making it usable, that'd be great. It may be as simple as importing a patch or two from Fedora or Suse. If you'd like to pursue your change once su is restored to working order, please justify or revert the semantic change in your patch, starting from the change-set below, which includes the following changes: - remove some space-before-TAB in tests/Makefile.am - remove space-before-semicolon in su.c - split two longer-than-80-col lines - remove both \n and trailing "." from two new diagnostics - adjust NEWS (some were caught by running "make syntax-check") >From 4baf7f9558f45165e1250004ac710a62f4d505ff Mon Sep 17 00:00:00 2001 From: Rocky Bernstein Date: Fri, 4 May 2012 10:31:18 +0200 Subject: [PATCH] su: when -p and -l are used together, warn that they're exclusive * src/su.c (main): FIXME-describe * tests/su/p-and-l: New file. * tests/Makefile.am (TESTS): Add it. * doc/coreutils.texi: Document the change. * NEWS (Changes in behavior): Mention this. --- NEWS | 2 ++ doc/coreutils.texi | 4 +++ src/su.c | 25 ++++++++++++++++-- tests/Makefile.am | 1 + tests/su/p-and-l | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 tests/su/p-and-l diff --git a/NEWS b/NEWS index 1c00d96..cacbca3 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,8 @@ GNU coreutils NEWS -*- outline -*- cp --attributes-only no longer truncates any existing destination file, allowing for more general copying of attributes from one file to another. + su -l -p gives a warning that these options are incompatible. + * Noteworthy changes in release 8.16 (2012-03-26) [stable] diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 4fb52cb..a1d808c 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -15883,6 +15883,8 @@ su invocation directory. Prepend @samp{-} to the shell's name, intended to make it read its login startup file(s). +Note that this option and the next one @option{-m} are mutually exclusive. + @item -m @itemx -p @itemx --preserve-environment @@ -15901,6 +15903,8 @@ su invocation if that file does not exist. Parts of what this option does can be overridden by @option{--login} and @option{--shell}. +Note that this option and the previous one @option{-l} are mutually exclusive. + @item -s @var{shell} @itemx --shell=@var{shell} @opindex -s diff --git a/src/su.c b/src/su.c index bb54cc3..c049df9 100644 --- a/src/su.c +++ b/src/su.c @@ -399,6 +399,7 @@ main (int argc, char **argv) char *shell = NULL; struct passwd *pw; struct passwd pw_copy; + static bool seen_login_change_env = false; initialize_main (&argc, &argv); set_program_name (argv[0]); @@ -426,12 +427,32 @@ main (int argc, char **argv) break; case 'l': - simulate_login = true; + if (seen_login_change_env && !simulate_login) + { + error (0, 0, + _("%s: already seen option --preserve-environment;" + " --login ignored"), program_name); + } + else + { + simulate_login = true; + seen_login_change_env = true; + } break; case 'm': case 'p': - change_environment = false; + if (seen_login_change_env && change_environment) + { + error (0, 0, + _("%s: already seen option --login;" + " --preserve-environment ignored"), program_name); + } + else + { + change_environment = false; + seen_login_change_env = true; + } break; case 's': diff --git a/tests/Makefile.am b/tests/Makefile.am index 72717e3..f2e06f4 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -517,6 +517,7 @@ TESTS = \ rmdir/fail-perm \ rmdir/ignore \ rmdir/t-slash \ + su/p-and-l \ tail-2/assert-2 \ tail-2/big-4gb \ tail-2/flush-initial \ diff --git a/tests/su/p-and-l b/tests/su/p-and-l new file mode 100644 index 0000000..37fae6f --- /dev/null +++ b/tests/su/p-and-l @@ -0,0 +1,74 @@ +#!/usr/bin/perl +# Test whether options -p and -l give a warning. + +# Copyright (C) 2012 Free Software Foundation, Inc. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +## The following may be helpful in debugging +# use Enbugger; Enbugger->load_debugger('trepan'); + +use strict; use warnings; +(my $ME = $0) =~ s|.*/||; + +# Some older versions of Expect.pm (e.g. 1.07) lack the log_user method, +# so check for that, too. +eval { require Expect; Expect->require_version('1.11') }; +$@ + and CuSkip::skip "$ME: this script requires Perl's Expect package >=1.11\n"; + +{ + my $fail = 0; + my @tests = ( + ["su -l -p bogus", + qr/already seen option --login/], + ["su -p -l bogus", + qr/already seen option --preserve/], + ); + foreach my $ary (@tests) + { + my ($cmd, $expect) = @$ary; + my $exp = new Expect; + $exp->log_user(0); + $exp->spawn("$cmd") + or (warn "$ME: cannot run `$cmd': $!\n"), $fail=1, next; + my $spawn_ok; + my @found = $exp->expect(1, 'Password: '); + unless ($found[3] =~ $expect) { + warn "$ME: $cmd did not get expected warning: $expect\n"; + $fail = 1; + } + $exp->hard_close(); + } + @tests = ( + "su -l bogus", + "su -p bogus", + "su bogus", + ); + foreach my $cmd (@tests) + { + my $exp = new Expect; + $exp->log_user(0); + $exp->spawn("$cmd") + or (warn "$ME: cannot run `$cmd': $!\n"), $fail=1, next; + my $spawn_ok; + my @found = $exp->expect(1, 'Password: '); + if ($found[3] =~ qr/already seen option/) { + warn "$ME: $cmd should not get already-seen option warning\n"; + $fail = 1; + } + $exp->hard_close(); + } + exit $fail +} -- 1.7.10.1.456.g16798d0 From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Resent-From: "Voelker, Bernhard" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 04 May 2012 09:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Jim Meyering , Rocky Bernstein Cc: "10317@debbugs.gnu.org" <10317@debbugs.gnu.org> Received: via spool by 10317-submit@debbugs.gnu.org id=B10317.13361233133710 (code B ref 10317); Fri, 04 May 2012 09:22:02 +0000 Received: (at 10317) by debbugs.gnu.org; 4 May 2012 09:21:53 +0000 Received: from localhost ([127.0.0.1]:35722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQEi0-0000xm-3x for submit@debbugs.gnu.org; Fri, 04 May 2012 05:21:53 -0400 Received: from senmx11-mx.siemens-enterprise.com ([62.134.46.9]:47468) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQEhw-0000xW-UE for 10317@debbugs.gnu.org; Fri, 04 May 2012 05:21:50 -0400 Received: from MCHP064A.global-ad.net (unknown [172.29.37.63]) by senmx11-mx.siemens-enterprise.com (Server) with ESMTP id B05E01EB8526; Fri, 4 May 2012 11:19:59 +0200 (CEST) Received: from MCHP058A.global-ad.net ([172.29.37.55]) by MCHP064A.global-ad.net ([172.29.37.63]) with mapi; Fri, 4 May 2012 11:19:59 +0200 From: "Voelker, Bernhard" Date: Fri, 4 May 2012 11:19:56 +0200 Thread-Topic: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Thread-Index: Ac0p0vpCO9MJYXNsRg2/xxEKhTB6oAAA5UBg Message-ID: <7856072A9D04C24B82DFE2B1112FE38A0F0FEC1D14@MCHP058A.global-ad.net> References: <87bop32iq7.fsf@rho.meyering.net> <87pqdhzo43.fsf@rho.meyering.net> <87ehs0m5jr.fsf@rho.meyering.net> <878vh8nxec.fsf@rho.meyering.net> In-Reply-To: <878vh8nxec.fsf@rho.meyering.net> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Jim Meyering wrote: > I tried to use the su from coreutils (with or without your patch) > and found that it does not work when it attempts to authenticate. > E.g., it cannot su to any user on this Fedora 17 system. If su > remains so broken that it does not work out-of-the-box on F17, > then it's not worth patching. Remember that I wanted to remove su > from coreutils altogether, and only reluctantly agreed to consider > this change. If someone who cares about su remaining in coreutils > wants to take responsibility for making it usable, that'd be great. > It may be as simple as importing a patch or two from Fedora or Suse. It (su built from latest git) works here on OpenSuSE-12.1, so it may be a F17 issue. OpenSuSE uses su from coreutils BTW. Have a nice day, Berny From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Resent-From: Rocky Bernstein Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 04 May 2012 11:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Jim Meyering Cc: 10317@debbugs.gnu.org X-Debbugs-Original-Cc: bug-coreutils@gnu.org, 10317@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.133613261727197 (code B ref -1); Fri, 04 May 2012 11:57:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 May 2012 11:56:57 +0000 Received: from localhost ([127.0.0.1]:35868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQH84-00074b-6V for submit@debbugs.gnu.org; Fri, 04 May 2012 07:56:57 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58850) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQH80-00074G-Fm for submit@debbugs.gnu.org; Fri, 04 May 2012 07:56:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQH6C-0002ue-2H for submit@debbugs.gnu.org; Fri, 04 May 2012 07:55:03 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:39958) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQH6B-0002uY-Ro for submit@debbugs.gnu.org; Fri, 04 May 2012 07:54:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQH68-0002h9-OF for bug-coreutils@gnu.org; Fri, 04 May 2012 07:54:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQH65-0002tB-4j for bug-coreutils@gnu.org; Fri, 04 May 2012 07:54:56 -0400 Received: from mail-pz0-f43.google.com ([209.85.210.43]:63501) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQH64-0002sg-KD for bug-coreutils@gnu.org; Fri, 04 May 2012 07:54:53 -0400 Received: by dajz8 with SMTP id z8so3983008daj.30 for ; Fri, 04 May 2012 04:54:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=pjYPMg1u/LqHN78XEx3Hubam4cJwqQz6tG19f9MpZj8=; b=aiwZY7Dx/PltnYMCHme8yE/0jNmfrjt03n+rhNuNIg987j/iKGsS83mFaEMByBhUwp /E5dV66VUSTxSWh6c7llByrc9xM74DbMYJNXR5mII6z56ccBYjrSVGK9F2iuZNpv8U9D rb9pcnsyUncaTYGOoaXaN6r+xzn7LoTcv0hoM3buSVpWvDHj75YdW4G1+J5z9HgwqBl8 U2qaF2JUCt8KfFNqL2L7sT5xpajxxpWE1m07g5hByZDGuPTPqL1jZE3npTa6QchICBwN L5jT542hhAg9KqmsBZ03jSm1wyL3PKKG1LA8En5IJA6BTCPlx7HoANZymMklfcJ4Ra3j 1GZg== MIME-Version: 1.0 Received: by 10.68.228.106 with SMTP id sh10mr6367816pbc.107.1336132490343; Fri, 04 May 2012 04:54:50 -0700 (PDT) Received: by 10.143.93.12 with HTTP; Fri, 4 May 2012 04:54:50 -0700 (PDT) In-Reply-To: <878vh8nxec.fsf@rho.meyering.net> References: <87bop32iq7.fsf@rho.meyering.net> <87pqdhzo43.fsf@rho.meyering.net> <87ehs0m5jr.fsf@rho.meyering.net> <878vh8nxec.fsf@rho.meyering.net> Date: Fri, 4 May 2012 07:54:50 -0400 X-Google-Sender-Auth: 8-pHkQPn7mGJB-VEixXhWceFFwI Message-ID: From: Rocky Bernstein Content-Type: multipart/alternative; boundary=e89a8ffba9f575b3b004bf349606 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) --e89a8ffba9f575b3b004bf349606 Content-Type: text/plain; charset=ISO-8859-1 On Fri, May 4, 2012 at 4:49 AM, Jim Meyering wrote: > Rocky Bernstein wrote: > > Any word on this? > > Hi Rocky, > > Sorry about the extended delay. > Changing su.c like this has really low priority. > > I've looked at your patch and see that it changes the semantics > of su for those who use -l with (-m or -p). > > Before your patch, -l would lead to simulate_login being set even > when -l was specified after an -m-or-p option. > Now, using e.g., "-l -m" evokes a warning but the -l is otherwise ignored. > > Did you intend that? > I never had a strong feeling on it to the extent that ambiguous behavior should be preserved. However much more important is issuing a warning says what's done whatever it is and currently, that is not done. I am sensing (but am not completely sure that) the preferred behavior is to keep compatible behavior whatever the current behavior is? May as well get this cleared up before another 1/3 of a year goes by. Normally such a change would be mentioned in a ChangeLog entry or commit > log. > > I tried to use the su from coreutils (with or without your patch) > and found that it does not work when it attempts to authenticate. > E.g., it cannot su to any user on this Fedora 17 system. If su > remains so broken that it does not work out-of-the-box on F17, > then it's not worth patching. Remember that I wanted to remove su > from coreutils altogether, and only reluctantly agreed to consider > this change. If someone who cares about su remaining in coreutils > wants to take responsibility for making it usable, that'd be great. > It may be as simple as importing a patch or two from Fedora or Suse. > > If you'd like to pursue your change once su is restored to working > order, please justify or revert the semantic change in your patch, > Actually, at this point I am loosing interest. You have created a somewhat unfriendly environment here to work in. I suggest, but leave up to you, whether to just document the behavior as it is leaving the code exactly as it is. > starting from the change-set below, which includes the following changes: > > - remove some space-before-TAB in tests/Makefile.am > - remove space-before-semicolon in su.c > - split two longer-than-80-col lines > - remove both \n and trailing "." from two new diagnostics > - adjust NEWS > Again, if you or anyone reading this can't be bothered to do this, I will also put this on my "low priority" list. You have in mind what you want to see and I've been getting this information in drips and drabs which is annoying. It's now about 5 months since I sent this and only now have you even attempted to try the patch. (The last correspondence you incorrectly made a denigrating assumption which just added gratuitous delay.) Most of the stylistic things mentioned here could have been mentioned a couple of months ago. When I say something is "low priority" it generally means that eventually when I get around to it I will deal with it rather than kick it down the can again. > > (some were caught by running "make syntax-check") > > > From 4baf7f9558f45165e1250004ac710a62f4d505ff Mon Sep 17 00:00:00 2001 > From: Rocky Bernstein > Date: Fri, 4 May 2012 10:31:18 +0200 > Subject: [PATCH] su: when -p and -l are used together, warn that they're > exclusive > > * src/su.c (main): FIXME-describe > * tests/su/p-and-l: New file. > * tests/Makefile.am (TESTS): Add it. > * doc/coreutils.texi: Document the change. > * NEWS (Changes in behavior): Mention this. > --- > NEWS | 2 ++ > doc/coreutils.texi | 4 +++ > src/su.c | 25 ++++++++++++++++-- > tests/Makefile.am | 1 + > tests/su/p-and-l | 74 > ++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 5 files changed, 104 insertions(+), 2 deletions(-) > create mode 100644 tests/su/p-and-l > > diff --git a/NEWS b/NEWS > index 1c00d96..cacbca3 100644 > --- a/NEWS > +++ b/NEWS > @@ -24,6 +24,8 @@ GNU coreutils NEWS > -*- outline -*- > cp --attributes-only no longer truncates any existing destination file, > allowing for more general copying of attributes from one file to another. > > + su -l -p gives a warning that these options are incompatible. > + > > * Noteworthy changes in release 8.16 (2012-03-26) [stable] > > diff --git a/doc/coreutils.texi b/doc/coreutils.texi > index 4fb52cb..a1d808c 100644 > --- a/doc/coreutils.texi > +++ b/doc/coreutils.texi > @@ -15883,6 +15883,8 @@ su invocation > directory. Prepend @samp{-} to the shell's name, intended to make it > read its login startup file(s). > > +Note that this option and the next one @option{-m} are mutually exclusive. > + > @item -m > @itemx -p > @itemx --preserve-environment > @@ -15901,6 +15903,8 @@ su invocation > if that file does not exist. Parts of what this option does can be > overridden by @option{--login} and @option{--shell}. > > +Note that this option and the previous one @option{-l} are mutually > exclusive. > + > @item -s @var{shell} > @itemx --shell=@var{shell} > @opindex -s > diff --git a/src/su.c b/src/su.c > index bb54cc3..c049df9 100644 > --- a/src/su.c > +++ b/src/su.c > @@ -399,6 +399,7 @@ main (int argc, char **argv) > char *shell = NULL; > struct passwd *pw; > struct passwd pw_copy; > + static bool seen_login_change_env = false; > > initialize_main (&argc, &argv); > set_program_name (argv[0]); > @@ -426,12 +427,32 @@ main (int argc, char **argv) > break; > > case 'l': > - simulate_login = true; > + if (seen_login_change_env && !simulate_login) > + { > + error (0, 0, > + _("%s: already seen option --preserve-environment;" > + " --login ignored"), program_name); > + } > + else > + { > + simulate_login = true; > + seen_login_change_env = true; > + } > break; > > case 'm': > case 'p': > - change_environment = false; > + if (seen_login_change_env && change_environment) > + { > + error (0, 0, > + _("%s: already seen option --login;" > + " --preserve-environment ignored"), program_name); > + } > + else > + { > + change_environment = false; > + seen_login_change_env = true; > + } > break; > > case 's': > diff --git a/tests/Makefile.am b/tests/Makefile.am > index 72717e3..f2e06f4 100644 > --- a/tests/Makefile.am > +++ b/tests/Makefile.am > @@ -517,6 +517,7 @@ TESTS = \ > rmdir/fail-perm \ > rmdir/ignore \ > rmdir/t-slash \ > + su/p-and-l \ > tail-2/assert-2 \ > tail-2/big-4gb \ > tail-2/flush-initial \ > diff --git a/tests/su/p-and-l b/tests/su/p-and-l > new file mode 100644 > index 0000000..37fae6f > --- /dev/null > +++ b/tests/su/p-and-l > @@ -0,0 +1,74 @@ > +#!/usr/bin/perl > +# Test whether options -p and -l give a warning. > + > +# Copyright (C) 2012 Free Software Foundation, Inc. > + > +# This program is free software: you can redistribute it and/or modify > +# it under the terms of the GNU General Public License as published by > +# the Free Software Foundation, either version 3 of the License, or > +# (at your option) any later version. > + > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > + > +# You should have received a copy of the GNU General Public License > +# along with this program. If not, see . > + > +## The following may be helpful in debugging > +# use Enbugger; Enbugger->load_debugger('trepan'); > + > +use strict; use warnings; > +(my $ME = $0) =~ s|.*/||; > + > +# Some older versions of Expect.pm (e.g. 1.07) lack the log_user method, > +# so check for that, too. > +eval { require Expect; Expect->require_version('1.11') }; > +$@ > + and CuSkip::skip "$ME: this script requires Perl's Expect package > >=1.11\n"; > + > +{ > + my $fail = 0; > + my @tests = ( > + ["su -l -p bogus", > + qr/already seen option --login/], > + ["su -p -l bogus", > + qr/already seen option --preserve/], > + ); > + foreach my $ary (@tests) > + { > + my ($cmd, $expect) = @$ary; > + my $exp = new Expect; > + $exp->log_user(0); > + $exp->spawn("$cmd") > + or (warn "$ME: cannot run `$cmd': $!\n"), $fail=1, next; > + my $spawn_ok; > + my @found = $exp->expect(1, 'Password: '); > + unless ($found[3] =~ $expect) { > + warn "$ME: $cmd did not get expected warning: $expect\n"; > + $fail = 1; > + } > + $exp->hard_close(); > + } > + @tests = ( > + "su -l bogus", > + "su -p bogus", > + "su bogus", > + ); > + foreach my $cmd (@tests) > + { > + my $exp = new Expect; > + $exp->log_user(0); > + $exp->spawn("$cmd") > + or (warn "$ME: cannot run `$cmd': $!\n"), $fail=1, next; > + my $spawn_ok; > + my @found = $exp->expect(1, 'Password: '); > + if ($found[3] =~ qr/already seen option/) { > + warn "$ME: $cmd should not get already-seen option warning\n"; > + $fail = 1; > + } > + $exp->hard_close(); > + } > + exit $fail > +} > -- > 1.7.10.1.456.g16798d0 > --e89a8ffba9f575b3b004bf349606 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Fri, May 4, 2012 at 4:49 AM, Jim Meyering <jim@meyering.net> wrote:
Rocky Bernstein wrote:
> Any word on this?

Hi Rocky,

Sorry about the extended delay.
Changing su.c like this has really low priority.

I've looked at your patch and see that it changes the semantics
of su for those who use -l with (-m or -p).

Before your patch, -l would lead to simulate_login being set even
when -l was specified after an -m-or-p option.
Now, using e.g., "-l -m" evokes a warning but the -l is otherwise= ignored.
Normally such a change would be mentioned in a ChangeLog entry or commit lo= g.

I tried to use the su from coreutils (with or without your patch)
and found that it does not work when it attempts to authenticate.
E.g., it cannot su to any user on this Fedora 17 system. =A0If su
remains so broken that it does not work out-of-the-box on F17,
then it's not worth patching. =A0Remember that I wanted to remove su from coreutils altogether, and only reluctantly agreed to consider
this change. =A0If someone who cares about su remaining in coreutils
wants to take responsibility for making it usable, that'd be great.
It may be as simple as importing a patch or two from Fedora or Suse.

If you'd like to pursue your change once su is restored to working
order, please justify or revert the semantic change in your patch,


Actually, at this point I am loosing interest. You hav= e created a somewhat unfriendly environment here to work in. I suggest, but= leave up to you, whether to just document the behavior as it is leaving th= e code exactly as it is.

=A0
starting from the change-set below, which includes the following changes:
=A0- remove some space-before-TAB in tests/Makefile.am
=A0- remove space-before-semicolon in su.c
=A0- split two longer-than-80-col lines
=A0- remove both \n and trailing "." from two new diagnostics =A0- adjust NEWS

Again, if you or anyone reading = this can't be bothered to do this, I will also put this on my=A0 "= low priority" list. You have in mind what you want to see and I've= been getting this information in drips and drabs which is annoying.

It's now about 5 months since I sent this and only now have you eve= n attempted to try the patch. (The last correspondence you incorrectly made= a denigrating assumption which just added gratuitous delay.)=A0 Most of th= e stylistic things mentioned here could have been mentioned a couple of mon= ths ago.

When I say something is "low priority" it generally means tha= t eventually when I get around to it I will deal with it rather than kick i= t down the can again.
=A0

(some were caught by running "make syntax-check")


>From 4baf7f9558f45165e1250004ac710a62f4d505ff Mon Sep 17 00:00:00 2001
From: Rocky Bernstein <rocky@gnu.org>
Date: Fri, 4 May 2012 10:31:18 +0200
Subject: [PATCH] su: when -p and -l are used together, warn that they'r= e
=A0exclusive

* src/su.c (main): FIXME-describe
* tests/su/p-and-l: New file.
* tests/Makefile.am (TESTS): Add it.
* doc/coreutils.texi: Document the change.
* NEWS (Changes in behavior): Mention this.
---
=A0NEWS =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A02 ++
=A0doc/coreutils.texi | =A04 +++
=A0src/su.c =A0 =A0 =A0 =A0 =A0 | 25 ++++++++++++++++--
=A0tests/Makefile.am =A0| =A01 +
=A0tests/su/p-and-l =A0 | 74 ++++++++++++++++++++++++++++++++++++++++++++++= ++++++++
=A05 files changed, 104 insertions(+), 2 deletions(-)
=A0create mode 100644 tests/su/p-and-l

diff --git a/NEWS b/NEWS
index 1c00d96..cacbca3 100644
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,8 @@ GNU coreutils NEWS =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-*- outline -*-
=A0 cp --attributes-only no longer truncates any existing destination file= ,
=A0 allowing for more general copying of attributes from one file to anoth= er.

+ =A0su -l -p gives a warning that these options are incompatible.
+

=A0* Noteworthy changes in release 8.16 (2012-03-26) [stable]

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 4fb52cb..a1d808c 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -15883,6 +15883,8 @@ su invocation
=A0directory. =A0Prepend @samp{-} to the shell's name, intended to make= it
=A0read its login startup file(s).

+Note that this option and the next one @option{-m} are mutually exclusive.=
+
=A0@item -m
=A0@itemx -p
=A0@itemx --preserve-environment
@@ -15901,6 +15903,8 @@ su invocation
=A0if that file does not exist. =A0Parts of what this option does can be
=A0overridden by @option{--login} and @option{--shell}.
+Note that this option and the previous one @option{-l} are mutually = exclusive.
+
=A0@item -s @var{shell}
=A0@itemx --shell=3D@var{shell}
=A0@opindex -s
diff --git a/src/su.c b/src/su.c
index bb54cc3..c049df9 100644
--- a/src/su.c
+++ b/src/su.c
@@ -399,6 +399,7 @@ main (int argc, char **argv)
=A0 char *shell =3D NULL;
=A0 struct passwd *pw;
=A0 struct passwd pw_copy;
+ =A0static bool seen_login_change_env =3D false;

=A0 initialize_main (&argc, &argv);
=A0 set_program_name (argv[0]);
@@ -426,12 +427,32 @@ main (int argc, char **argv)
=A0 =A0 =A0 =A0 =A0 break;

=A0 =A0 =A0 =A0 case 'l':
- =A0 =A0 =A0 =A0 =A0simulate_login =3D true;
+ =A0 =A0 =A0 =A0 =A0if (seen_login_change_env && !simulate_login)<= br> + =A0 =A0 =A0 =A0 =A0 =A0{
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0error (0, 0,
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 _("%s: already seen option -= -preserve-environment;"
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 " --login ignored")= , program_name);
+ =A0 =A0 =A0 =A0 =A0 =A0}
+ =A0 =A0 =A0 =A0 =A0else
+ =A0 =A0 =A0 =A0 =A0 =A0{
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0simulate_login =3D true;
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0seen_login_change_env =3D true;
+ =A0 =A0 =A0 =A0 =A0 =A0}
=A0 =A0 =A0 =A0 =A0 break;

=A0 =A0 =A0 =A0 case 'm':
=A0 =A0 =A0 =A0 case 'p':
- =A0 =A0 =A0 =A0 =A0change_environment =3D false;
+ =A0 =A0 =A0 =A0 =A0if (seen_login_change_env && change_environmen= t)
+ =A0 =A0 =A0 =A0 =A0 =A0{
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0error (0, 0,
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 _("%s: already seen option -= -login;"
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 " --preserve-environment= ignored"), program_name);
+ =A0 =A0 =A0 =A0 =A0 =A0}
+ =A0 =A0 =A0 =A0 =A0else
+ =A0 =A0 =A0 =A0 =A0 =A0{
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0change_environment =3D false;
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0seen_login_change_env =3D true;
+ =A0 =A0 =A0 =A0 =A0 =A0}
=A0 =A0 =A0 =A0 =A0 break;

=A0 =A0 =A0 =A0 case 's':
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 72717e3..f2e06f4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -517,6 +517,7 @@ TESTS =3D =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \
=A0 rmdir/fail-perm =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0\
=A0 rmdir/ignore =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 \
=A0 rmdir/t-slash =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0\
+ =A0su/p-and-l =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 \
=A0 tail-2/assert-2 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0\
=A0 tail-2/big-4gb =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 \
=A0 tail-2/flush-initial =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \=
diff --git a/tests/su/p-and-l b/tests/su/p-and-l
new file mode 100644
index 0000000..37fae6f
--- /dev/null
+++ b/tests/su/p-and-l
@@ -0,0 +1,74 @@
+#!/usr/bin/perl
+# Test whether options -p and -l give a warning.
+
+# Copyright (C) 2012 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. =A0See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. =A0If not, see <
http://www.gnu.org/licenses/>.
+
+## The following may be helpful in debugging
+# use Enbugger; Enbugger->load_debugger('trepan');
+
+use strict; use warnings;
+(my $ME =3D $0) =3D~ s|.*/||;
+
+# Some older versions of Expect.pm (e.g. 1.07) lack the log_user method, +# so check for that, too.
+eval { require Expect; Expect->require_version('1.11') };
+$@
+ =A0and CuSkip::skip "$ME: this script requires Perl's Expect pac= kage >=3D1.11\n";
+
+{
+ =A0my $fail =3D 0;
+ =A0my @tests =3D (
+ =A0 =A0 =A0["su -l -p bogus",
+ =A0 =A0 =A0 qr/already seen option --login/],
+ =A0 =A0 =A0["su -p -l bogus",
+ =A0 =A0 =A0 qr/already seen option --preserve/],
+ =A0 =A0 =A0);
+ =A0foreach my $ary (@tests)
+ =A0 =A0{
+ =A0 =A0 =A0my ($cmd, $expect) =3D @$ary;
+ =A0 =A0 =A0my $exp =3D new Expect;
+ =A0 =A0 =A0$exp->log_user(0);
+ =A0 =A0 =A0$exp->spawn("$cmd")
+ =A0 =A0 =A0 =A0or (warn "$ME: cannot run `$cmd': $!\n"), $f= ail=3D1, next;
+ =A0 =A0 =A0my $spawn_ok;
+ =A0 =A0 =A0my @found =3D $exp->expect(1, 'Password: ');
+ =A0 =A0 =A0unless ($found[3] =3D~ $expect) {
+ =A0 =A0 =A0 =A0 warn "$ME: $cmd did not get expected warning: $expec= t\n";
+ =A0 =A0 =A0 =A0 $fail =3D 1;
+ =A0 =A0 =A0}
+ =A0 =A0 =A0$exp->hard_close();
+ =A0 =A0}
+ =A0@tests =3D (
+ =A0 =A0 =A0"su -l bogus",
+ =A0 =A0 =A0"su -p bogus",
+ =A0 =A0 =A0"su bogus",
+ =A0 =A0 =A0);
+ =A0foreach my $cmd (@tests)
+ =A0 =A0{
+ =A0 =A0 =A0my $exp =3D new Expect;
+ =A0 =A0 =A0$exp->log_user(0);
+ =A0 =A0 =A0$exp->spawn("$cmd")
+ =A0 =A0 =A0 =A0or (warn "$ME: cannot run `$cmd': $!\n"), $f= ail=3D1, next;
+ =A0 =A0 =A0my $spawn_ok;
+ =A0 =A0 =A0my @found =3D $exp->expect(1, 'Password: ');
+ =A0 =A0 =A0if ($found[3] =3D~ qr/already seen option/) {
+ =A0 =A0 =A0 =A0 warn "$ME: $cmd should not get already-seen option w= arning\n";
+ =A0 =A0 =A0 =A0 $fail =3D 1;
+ =A0 =A0 =A0}
+ =A0 =A0 =A0$exp->hard_close();
+ =A0 =A0}
+ =A0exit $fail
+}
--
1.7.10.1.456.g16798d0

--e89a8ffba9f575b3b004bf349606-- From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Resent-From: Jim Meyering Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 04 May 2012 12:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Rocky Bernstein Cc: 10317@debbugs.gnu.org X-Debbugs-Original-Cc: bug-coreutils@gnu.org, 10317@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.133613409029410 (code B ref -1); Fri, 04 May 2012 12:22:01 +0000 Received: (at submit) by debbugs.gnu.org; 4 May 2012 12:21:30 +0000 Received: from localhost ([127.0.0.1]:35895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQHVp-0007eI-Ie for submit@debbugs.gnu.org; Fri, 04 May 2012 08:21:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45179) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQHVn-0007e5-8S for submit@debbugs.gnu.org; Fri, 04 May 2012 08:21:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQHU0-0005WW-QL for submit@debbugs.gnu.org; Fri, 04 May 2012 08:19:38 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:56142) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQHU0-0005Vp-Mw for submit@debbugs.gnu.org; Fri, 04 May 2012 08:19:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQHTx-0003uq-TR for bug-coreutils@gnu.org; Fri, 04 May 2012 08:19:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQHTs-0005Nx-1i for bug-coreutils@gnu.org; Fri, 04 May 2012 08:19:33 -0400 Received: from mx.meyering.net ([88.168.87.75]:47000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQHTr-0005Lx-Lc; Fri, 04 May 2012 08:19:27 -0400 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id AA44B60056; Fri, 4 May 2012 14:19:25 +0200 (CEST) From: Jim Meyering In-Reply-To: (Rocky Bernstein's message of "Fri, 4 May 2012 07:54:50 -0400") References: <87bop32iq7.fsf@rho.meyering.net> <87pqdhzo43.fsf@rho.meyering.net> <87ehs0m5jr.fsf@rho.meyering.net> <878vh8nxec.fsf@rho.meyering.net> Date: Fri, 04 May 2012 14:19:25 +0200 Message-ID: <87wr4sm94i.fsf@rho.meyering.net> Lines: 80 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Rocky Bernstein wrote: > On Fri, May 4, 2012 at 4:49 AM, Jim Meyering wrote: > > Rocky Bernstein wrote: > > Any word on this? > > Hi Rocky, > > Sorry about the extended delay. > Changing su.c like this has really low priority. > > I've looked at your patch and see that it changes the semantics > of su for those who use -l with (-m or -p). > > Before your patch, -l would lead to simulate_login being set even > when -l was specified after an -m-or-p option. > Now, using e.g., "-l -m" evokes a warning but the -l is otherwise ign= ored. > > Did you intend that? > > I never had a strong feeling on it to the extent that ambiguous behavior = should > be preserved. However much more important is issuing a warning says what'= s done > whatever it is and currently, that is not done.=A0 I am sensing (but am n= ot > completely sure that)=A0 the preferred behavior is to keep compatible beh= avior > whatever the current behavior is? That is what I expected, and would certainly require less justification. If you have a good case for making the semantic change, I'm open to that, too. > May as well get this cleared up before another > 1/3 of a year goes by. > > Normally such a change would be mentioned in a ChangeLog entry or com= mit > log. > > I tried to use the su from coreutils (with or without your patch) > and found that it does not work when it attempts to authenticate. > E.g., it cannot su to any user on this Fedora 17 system. =A0If su > remains so broken that it does not work out-of-the-box on F17, > then it's not worth patching. =A0Remember that I wanted to remove su > from coreutils altogether, and only reluctantly agreed to consider > this change. =A0If someone who cares about su remaining in coreutils > wants to take responsibility for making it usable, that'd be great. > It may be as simple as importing a patch or two from Fedora or Suse. > > If you'd like to pursue your change once su is restored to working > order, please justify or revert the semantic change in your patch, > > Actually, at this point I am loosing interest. You have created a somewhat > unfriendly environment here to work in. Please don't interpret my review delays or my misreading your patch as anything deliberately unfriendly. I've been trying to keep this list as open/accommodating as possible for nearly two decades. I agree that the long delay is off-putting and apologized for that, twice. > I suggest, but leave up to you, whether > to just document the behavior as it is leaving the code exactly as it is. > > starting from the change-set below, which includes the following chan= ges: > > =A0- remove some space-before-TAB in tests/Makefile.am > =A0- remove space-before-semicolon in su.c > =A0- split two longer-than-80-col lines > =A0- remove both \n and trailing "." from two new diagnostics > =A0- adjust NEWS > > Again, if you or anyone reading this can't be bothered to do this, I will= also > put this on my=A0 "low priority" list. You have in mind what you want to = see and > I've been getting this information in drips and drabs which is annoying. If you had read the contribution guidelines in HACKING, you would have known to run "make syntax-check", which would highlighted three of the five issues listed above. > It's now about 5 months since I sent this and only now have you even atte= mpted > to try the patch. (The last correspondence you incorrectly made a denigra= ting > assumption which just added gratuitous delay.)=A0 Most of the stylistic t= hings > mentioned here could have been mentioned a couple of months ago. From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Resent-From: Jim Meyering Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 04 May 2012 12:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Rocky Bernstein Cc: 10317@debbugs.gnu.org Received: via spool by 10317-submit@debbugs.gnu.org id=B10317.133613428129691 (code B ref 10317); Fri, 04 May 2012 12:25:01 +0000 Received: (at 10317) by debbugs.gnu.org; 4 May 2012 12:24:41 +0000 Received: from localhost ([127.0.0.1]:35900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQHYu-0007ip-8t for submit@debbugs.gnu.org; Fri, 04 May 2012 08:24:40 -0400 Received: from mx.meyering.net ([88.168.87.75]:35070) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQHYr-0007ii-Q6 for 10317@debbugs.gnu.org; Fri, 04 May 2012 08:24:38 -0400 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id DEC1D60056; Fri, 4 May 2012 14:22:52 +0200 (CEST) From: Jim Meyering In-Reply-To: <878vh8nxec.fsf@rho.meyering.net> (Jim Meyering's message of "Fri, 04 May 2012 10:49:47 +0200") References: <87bop32iq7.fsf@rho.meyering.net> <87pqdhzo43.fsf@rho.meyering.net> <87ehs0m5jr.fsf@rho.meyering.net> <878vh8nxec.fsf@rho.meyering.net> Date: Fri, 04 May 2012 14:22:52 +0200 Message-ID: <87r4v0m8yr.fsf@rho.meyering.net> Lines: 9 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Jim Meyering wrote: ... > I tried to use the su from coreutils (with or without your patch) > and found that it does not work when it attempts to authenticate. > E.g., it cannot su to any user on this Fedora 17 system. I've just realized my (silly!) error. For su to do its job, it must be set-UID root, and I was running src/su, a non-set-UID file, in place. From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Resent-From: Rocky Bernstein Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 04 May 2012 14:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Jim Meyering Cc: 10317@debbugs.gnu.org X-Debbugs-Original-Cc: bug-coreutils@gnu.org, 10317@debbugs.gnu.org Received: via spool by 10317-submit@debbugs.gnu.org id=B10317.13361401725902 (code B ref 10317); Fri, 04 May 2012 14:03:01 +0000 Received: (at 10317) by debbugs.gnu.org; 4 May 2012 14:02:52 +0000 Received: from localhost ([127.0.0.1]:36110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQJ5v-0001X9-Ck for submit@debbugs.gnu.org; Fri, 04 May 2012 10:02:52 -0400 Received: from mail-pz0-f41.google.com ([209.85.210.41]:60867) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQJ5p-0001Wq-Kt for 10317@debbugs.gnu.org; Fri, 04 May 2012 10:02:48 -0400 Received: by dakp5 with SMTP id p5so3220347dak.0 for <10317@debbugs.gnu.org>; Fri, 04 May 2012 07:00:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=1l9YX2dRdj85sHpx219VDSCPcCRGlGdDg4fI78+giUU=; b=dVAiZ68BXnb6Wn71NqRqwZf/cSEWB7bt+HgGb08kol/x+zlP2tpWgPZFQOczyUQ+W6 zYUmTo+Rh+HIUk/B1se+kdP9DL9LL+tzhTAvrM7pt2zZYGBX/SI/+32kVYhSWuIXvZUP 5VxbHg/1/yukW4G6bJdlsOjSz3qz84X0eEp0eNg0gs/rXtXwicGXds8XK4QK3Jh0Y1p2 rvK8uaQVA70pD7if15U6VHKCM8FLaOsPy/uSjAame29+WVjQXYhq5aKh8OUAtkds/25J cmPTDNVqNCxi8td7ZQly8GuQ1ylJAi+oM7aMU/dJo0L4YkBjFilLMhn/p7N3yLj9zeAh Ffpg== MIME-Version: 1.0 Received: by 10.68.237.66 with SMTP id va2mr5727487pbc.82.1336140055366; Fri, 04 May 2012 07:00:55 -0700 (PDT) Received: by 10.143.93.12 with HTTP; Fri, 4 May 2012 07:00:55 -0700 (PDT) In-Reply-To: <87wr4sm94i.fsf@rho.meyering.net> References: <87bop32iq7.fsf@rho.meyering.net> <87pqdhzo43.fsf@rho.meyering.net> <87ehs0m5jr.fsf@rho.meyering.net> <878vh8nxec.fsf@rho.meyering.net> <87wr4sm94i.fsf@rho.meyering.net> Date: Fri, 4 May 2012 10:00:55 -0400 X-Google-Sender-Auth: AvA1SWnblPmlCxxPXJWLfbCOmaQ Message-ID: From: Rocky Bernstein Content-Type: multipart/alternative; boundary=047d7b33d6525ecd9504bf3659de X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --047d7b33d6525ecd9504bf3659de Content-Type: text/plain; charset=ISO-8859-1 On Fri, May 4, 2012 at 8:19 AM, Jim Meyering wrote: > Rocky Bernstein wrote: > > On Fri, May 4, 2012 at 4:49 AM, Jim Meyering wrote: > > > > Rocky Bernstein wrote: > > > Any word on this? > > > > Hi Rocky, > > > > Sorry about the extended delay. > > Changing su.c like this has really low priority. > > > > I've looked at your patch and see that it changes the semantics > > of su for those who use -l with (-m or -p). > > > > Before your patch, -l would lead to simulate_login being set even > > when -l was specified after an -m-or-p option. > > Now, using e.g., "-l -m" evokes a warning but the -l is otherwise > ignored. > > > > Did you intend that? > > > > I never had a strong feeling on it to the extent that ambiguous behavior > should > > be preserved. However much more important is issuing a warning says > what's done > > whatever it is and currently, that is not done. I am sensing (but am not > > completely sure that) the preferred behavior is to keep compatible > behavior > > whatever the current behavior is? > > That is what I expected, and would certainly require less justification. > If you have a good case for making the semantic change, I'm open to > that, too. > > > May as well get this cleared up before another > > 1/3 of a year goes by. > > > > Normally such a change would be mentioned in a ChangeLog entry or > commit > > log. > > > > I tried to use the su from coreutils (with or without your patch) > > and found that it does not work when it attempts to authenticate. > > E.g., it cannot su to any user on this Fedora 17 system. If su > > remains so broken that it does not work out-of-the-box on F17, > > then it's not worth patching. Remember that I wanted to remove su > > from coreutils altogether, and only reluctantly agreed to consider > > this change. If someone who cares about su remaining in coreutils > > wants to take responsibility for making it usable, that'd be great. > > It may be as simple as importing a patch or two from Fedora or Suse. > > > > If you'd like to pursue your change once su is restored to working > > order, please justify or revert the semantic change in your patch, > > > > Actually, at this point I am loosing interest. You have created a > somewhat > > unfriendly environment here to work in. > > Please don't interpret my review delays or my misreading your > patch as anything deliberately unfriendly. I didn't say *deliberately unfriendly*. I said there was an *unfriendly environment*. No doubt, it is unintentional. But for me, for this, it is there. More below. I've been trying to keep > this list as open/accommodating as possible for nearly two decades. > I agree that the long delay is off-putting and apologized for that, twice. > Understood and accepted. But really there is not much to show that this has moved forward in the 5 months. Well, okay, for 5 months of time, you have now at least tried the patch. So perhaps for the delays, you or someone reading could make the stylistic changes that would take, what, maybe a few minutes? I promise in the future with respect to coreutils I will follow coreutils conventions more carefully. But is this about me getting following coreutils conventions or is this about getting a "su" problem solved? Right now, if feels like the former, hence "unfriendly environment". Also if you had taken the few minutes to make the stylistic changes, you would have known that things would be properly and it would show that this you have some *interest* in seeing things improved. Deeds sometimes speak volumes more than apologies. > > > I suggest, but leave up to you, whether > > to just document the behavior as it is leaving the code exactly as it is. > > > > starting from the change-set below, which includes the following > changes: > > > > - remove some space-before-TAB in tests/Makefile.am > > - remove space-before-semicolon in su.c > > - split two longer-than-80-col lines > > - remove both \n and trailing "." from two new diagnostics > > - adjust NEWS > > > > Again, if you or anyone reading this can't be bothered to do this, I > will also > > put this on my "low priority" list. You have in mind what you want to > see and > > I've been getting this information in drips and drabs which is annoying. > > If you had read the contribution guidelines in HACKING, you would have > known to run "make syntax-check", which would highlighted three of the > five issues listed above. > Well, that too could have been mentioned 3 months ago -- the *first* time you talked about stylistic things. Did I say information in drips and drabs? And it wouldn't have caught the other two. I guess we can both play the "you did something wrong, let's delay this" game. > > It's now about 5 months since I snt this and only now have you even > attempted > > to try the patch. (The last correspondence you incorrectly made a > denigrating > > assumption which just added gratuitous delay.) Most of the stylistic > things > > mentioned here could have been mentioned a couple of months ago. > --047d7b33d6525ecd9504bf3659de Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Fri, May 4, 2012 at 8:19 AM, Jim Meyering <jim@meyering.net> wrote:
Rocky Bernstein wrote:
> On Fri, May 4, 2012 at 4:49 AM, Jim Meyering <jim@meyering.net> wrote:
>
> =A0 =A0 Rocky Bernstein wrote:
> =A0 =A0 > Any word on this?
>
> =A0 =A0 Hi Rocky,
>
> =A0 =A0 Sorry about the extended delay.
> =A0 =A0 Changing su.c like this has really low priority.
>
> =A0 =A0 I've looked at your patch and see that it changes the sema= ntics
> =A0 =A0 of su for those who use -l with (-m or -p).
>
> =A0 =A0 Before your patch, -l would lead to simulate_login being set e= ven
> =A0 =A0 when -l was specified after an -m-or-p option.
> =A0 =A0 Now, using e.g., "-l -m" evokes a warning but the -l= is otherwise ignored.
>
> =A0 =A0 Did you intend that?
>
> I never had a strong feeling on it to the extent that ambiguous behavi= or should
> be preserved. However much more important is issuing a warning says wh= at's done
> whatever it is and currently, that is not done.=A0 I am sensing (but a= m not
> completely sure that)=A0 the preferred behavior is to keep compatible = behavior
> whatever the current behavior is?

That is what I expected, and would certainly require less justificati= on.
If you have a good case for making the semantic change, I'm open to
that, too.

> May as well get this cleared up before another
> 1/3 of a year goes by.
>
> =A0 =A0 Normally such a change would be mentioned in a ChangeLog entry= or commit
> =A0 =A0 log.
>
> =A0 =A0 I tried to use the su from coreutils (with or without your pat= ch)
> =A0 =A0 and found that it does not work when it attempts to authentica= te.
> =A0 =A0 E.g., it cannot su to any user on this Fedora 17 system. =A0If= su
> =A0 =A0 remains so broken that it does not work out-of-the-box on F17,=
> =A0 =A0 then it's not worth patching. =A0Remember that I wanted to= remove su
> =A0 =A0 from coreutils altogether, and only reluctantly agreed to cons= ider
> =A0 =A0 this change. =A0If someone who cares about su remaining in cor= eutils
> =A0 =A0 wants to take responsibility for making it usable, that'd = be great.
> =A0 =A0 It may be as simple as importing a patch or two from Fedora or= Suse.
>
> =A0 =A0 If you'd like to pursue your change once su is restored to= working
> =A0 =A0 order, please justify or revert the semantic change in your pa= tch,
>
> Actually, at this point I am loosing interest. You have created a some= what
> unfriendly environment here to work in.

Please don't interpret my review delays or my misreading your
patch as anything deliberately unfriendly.

I didn'= ;t say deliberately unfriendly. I said there was an unfriendly en= vironment. No doubt, it is unintentional. But for me, for this, it is t= here. More below.

=A0I've bee= n trying to keep
this list as open/accommodating as possible for nearly two decades.
I agree that the long delay is off-putting and apologized for that, twice.<= br>

Understood and accepted. But really there is not m= uch to show that this has moved forward in the 5 months. Well, okay, for 5 = months of time, you have now at least tried the patch.

So perhaps for the delays, you or someone reading could make the stylis= tic changes that would take, what, maybe a few minutes? I promise in the fu= ture with respect to coreutils I will follow coreutils conventions more car= efully. But is this about me getting following coreutils conventions or is = this about getting a "su" problem solved? Right now, if feels lik= e the former, hence "unfriendly environment".

Also if you had taken the few minutes to make the stylistic changes, yo= u would have known that things would be properly and it would show that thi= s you have some interest in seeing things improved. Deeds sometimes = speak volumes more than apologies.
=A0

> I suggest, but leave up to you, whether
> to just document the behavior as it is leaving the code exactly as it = is.
>
> =A0 =A0 starting from the change-set below, which includes the followi= ng changes:
>
> =A0 =A0 =A0- remove some space-before-TAB in tests/Makefile.am
> =A0 =A0 =A0- remove space-before-semicolon in su.c
> =A0 =A0 =A0- split two longer-than-80-col lines
> =A0 =A0 =A0- remove both \n and trailing "." from two new di= agnostics
> =A0 =A0 =A0- adjust NEWS
>
> Again, if you or anyone reading this can't be bothered to do this,= I will also
> put this on my=A0 "low priority" list. You have in mind what= you want to see and
> I've been getting this information in drips and drabs which is ann= oying.

If you had read the contribution guidelines in HACKING, you would hav= e
known to run "make syntax-check", which would highlighted three o= f the
five issues listed above.

Well, that too could hav= e been mentioned 3 months ago -- the first time you talked about sty= listic things. Did I say information in drips and drabs? And it wouldn'= t have caught the other two. I guess we can both play the "you did som= ething wrong, let's delay this" game.


> It's now about 5 months since I snt this and only now have you eve= n attempted
> to try the patch. (The last correspondence you incorrectly made a deni= grating
> assumption which just added gratuitous delay.)=A0 Most of the stylisti= c things
> mentioned here could have been mentioned a couple of months ago.

--047d7b33d6525ecd9504bf3659de-- From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Resent-From: Jim Meyering Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 04 May 2012 14:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Rocky Bernstein Cc: 10317@debbugs.gnu.org X-Debbugs-Original-Cc: bug-coreutils@gnu.org, 10317@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13361405866524 (code B ref -1); Fri, 04 May 2012 14:10:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 May 2012 14:09:46 +0000 Received: from localhost ([127.0.0.1]:36121 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQJCb-0001hA-Gz for submit@debbugs.gnu.org; Fri, 04 May 2012 10:09:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53196) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQJCY-0001gx-S4 for submit@debbugs.gnu.org; Fri, 04 May 2012 10:09:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQJAd-0004Wv-TE for submit@debbugs.gnu.org; Fri, 04 May 2012 10:07:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:37815) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQJAd-0004Wo-Qn for submit@debbugs.gnu.org; Fri, 04 May 2012 10:07:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQJAY-0006L4-UT for bug-coreutils@gnu.org; Fri, 04 May 2012 10:07:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQJAS-0004UL-EH for bug-coreutils@gnu.org; Fri, 04 May 2012 10:07:38 -0400 Received: from mx.meyering.net ([88.168.87.75]:47310) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQJAS-0004U5-6s; Fri, 04 May 2012 10:07:32 -0400 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 7B64060056; Fri, 4 May 2012 16:07:30 +0200 (CEST) From: Jim Meyering In-Reply-To: (Rocky Bernstein's message of "Fri, 4 May 2012 10:00:55 -0400") References: <87bop32iq7.fsf@rho.meyering.net> <87pqdhzo43.fsf@rho.meyering.net> <87ehs0m5jr.fsf@rho.meyering.net> <878vh8nxec.fsf@rho.meyering.net> <87wr4sm94i.fsf@rho.meyering.net> Date: Fri, 04 May 2012 16:07:30 +0200 Message-ID: <87fwbgm44d.fsf@rho.meyering.net> Lines: 47 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Rocky Bernstein wrote: > On Fri, May 4, 2012 at 8:19 AM, Jim Meyering wrote: ... > Please don't interpret my review delays or my misreading your > patch as anything deliberately unfriendly. > > I didn't say deliberately unfriendly. I said there was an unfriendly envi= ronment > . No doubt, it is unintentional. But for me, for this, it is there. More = below. > > =A0I've been trying to keep > this list as open/accommodating as possible for nearly two decades. > I agree that the long delay is off-putting and apologized for that, t= wice. > > Understood and accepted. But really there is not much to show that this h= as > moved forward in the 5 months. Well, okay, for 5 months of time, you have= now at > least tried the patch. > > So perhaps for the delays, you or someone reading could make the stylistic > changes that would take, what, maybe a few minutes? I promise in the futu= re with > respect to coreutils I will follow coreutils conventions more carefully. = But is > this about me getting following coreutils conventions or is this about ge= tting a > "su" problem solved? Right now, if feels like the former, hence "unfriend= ly > environment". > > Also if you had taken the few minutes to make the stylistic changes, you = would > have known that things would be properly and it would show that this you = have > some interest in seeing things improved. Deeds sometimes speak volumes mo= re than > apologies. Um... You seem to have misread. I did indeed make all of the stylistic adjustments I listed. I even added a commit log for you and included the output of "git format-patch" (the "change-set" I mentioned) including your patch *with those stylistic changes*, so that you could use that as a basis for any additional changes. > > I suggest, but leave up to you, whether > > to just document the behavior as it is leaving the code exactly as = it is. > > > > =A0 =A0 starting from the change-set below, which includes the foll= owing > changes: > > > > =A0 =A0 =A0- remove some space-before-TAB in tests/Makefile.am > > =A0 =A0 =A0- remove space-before-semicolon in su.c > > =A0 =A0 =A0- split two longer-than-80-col lines > > =A0 =A0 =A0- remove both \n and trailing "." from two new diagnosti= cs > > =A0 =A0 =A0- adjust NEWS From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Resent-From: "Voelker, Bernhard" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 04 May 2012 14:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Rocky Bernstein , Jim Meyering Cc: "10317@debbugs.gnu.org" <10317@debbugs.gnu.org> Received: via spool by 10317-submit@debbugs.gnu.org id=B10317.13361408456928 (code B ref 10317); Fri, 04 May 2012 14:15:01 +0000 Received: (at 10317) by debbugs.gnu.org; 4 May 2012 14:14:05 +0000 Received: from localhost ([127.0.0.1]:36126 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQJGm-0001nh-B0 for submit@debbugs.gnu.org; Fri, 04 May 2012 10:14:05 -0400 Received: from senmx12-mx.siemens-enterprise.com ([62.134.46.10]:51304) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQJGk-0001n6-1b for 10317@debbugs.gnu.org; Fri, 04 May 2012 10:14:03 -0400 Received: from MCHP064A.global-ad.net (unknown [172.29.37.63]) by senmx12-mx.siemens-enterprise.com (Server) with ESMTP id D4F4C23F04FC; Fri, 4 May 2012 16:12:11 +0200 (CEST) Received: from MCHP058A.global-ad.net ([172.29.37.55]) by MCHP064A.global-ad.net ([172.29.37.63]) with mapi; Fri, 4 May 2012 16:12:11 +0200 From: "Voelker, Bernhard" Date: Fri, 4 May 2012 16:12:11 +0200 Thread-Topic: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Thread-Index: Ac0p/mtB2SrxoO0GR1OT11y/bK8Z2gAAGJXA Message-ID: <7856072A9D04C24B82DFE2B1112FE38A0F0FEC1E7A@MCHP058A.global-ad.net> References: <87bop32iq7.fsf@rho.meyering.net> <87pqdhzo43.fsf@rho.meyering.net> <87ehs0m5jr.fsf@rho.meyering.net> <878vh8nxec.fsf@rho.meyering.net> <87wr4sm94i.fsf@rho.meyering.net> In-Reply-To: Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Rocky Bernstein wrote: > So perhaps for the delays, you or someone reading could make the stylisti= c > changes that would take, what, maybe a few minutes? IMHO no. As Jim is the CU maintainer, he (or Padraig or someone else) will push changes to git. As it's always good to have someone else to review a change - even if it's (seems to be) a trivial one- , such a change should be reviewed again ... introducing another round. Therefore it's better when you make the change. Have a nice day, Berny From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: PING - bug#10317: patch to su: -l and -p should not be used together Resent-From: Rocky Bernstein Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 04 May 2012 14:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Jim Meyering Cc: 10317@debbugs.gnu.org X-Debbugs-Original-Cc: bug-coreutils@gnu.org, 10317@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13361413657687 (code B ref -1); Fri, 04 May 2012 14:23:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 May 2012 14:22:45 +0000 Received: from localhost ([127.0.0.1]:36145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQJPB-0001zv-3s for submit@debbugs.gnu.org; Fri, 04 May 2012 10:22:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36006) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQJP9-0001zk-1j for submit@debbugs.gnu.org; Fri, 04 May 2012 10:22:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQJNH-0001ye-Ua for submit@debbugs.gnu.org; Fri, 04 May 2012 10:20:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:41820) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQJNH-0001yU-OO for submit@debbugs.gnu.org; Fri, 04 May 2012 10:20:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQJNA-0000Zn-JM for bug-coreutils@gnu.org; Fri, 04 May 2012 10:20:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQJN8-0001x2-4t for bug-coreutils@gnu.org; Fri, 04 May 2012 10:20:40 -0400 Received: from mail-pb0-f41.google.com ([209.85.160.41]:33581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQJN7-0001wq-OV for bug-coreutils@gnu.org; Fri, 04 May 2012 10:20:38 -0400 Received: by pbbrp2 with SMTP id rp2so4213686pbb.0 for ; Fri, 04 May 2012 07:20:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=5ddeuP1BmjlGbhHRWRASrZT12PYL3631W2kkd5pq3vg=; b=lXBnkxqIbE+6cD2n3wFdl9mX1j2pnKMdvNTMHgbwR5X3Ovl0HJhfG3vXJ1Z+nlogyN GDhMJNKFGGI86NjjIEzOZUR0pQCvhWUe2e+xD1/rfnaikANTdSuBefuV65kBwRN0OwVV zACEF8ok9Rffm/VonaZBpAferrztmNAGzD+7E7AR7VP92cwU5a9NA26ZPdl1BTVyCG15 qsQfbkUvtqZmFvzkGYIC/Rqd3mVMDP5go7S4F0QuL0PlEiJdf4cZjKPB/5M1qJ/NVqM9 5d1qIjGUsac7bOnQE4Dscb6mkpbqPkhASeEZiX+pjmTPH4phl3mxh5eLyjxe/9Ie2USE 0ieQ== MIME-Version: 1.0 Received: by 10.68.233.74 with SMTP id tu10mr208491pbc.33.1336141235718; Fri, 04 May 2012 07:20:35 -0700 (PDT) Received: by 10.143.93.12 with HTTP; Fri, 4 May 2012 07:20:35 -0700 (PDT) In-Reply-To: <87fwbgm44d.fsf@rho.meyering.net> References: <87bop32iq7.fsf@rho.meyering.net> <87pqdhzo43.fsf@rho.meyering.net> <87ehs0m5jr.fsf@rho.meyering.net> <878vh8nxec.fsf@rho.meyering.net> <87wr4sm94i.fsf@rho.meyering.net> <87fwbgm44d.fsf@rho.meyering.net> Date: Fri, 4 May 2012 10:20:35 -0400 X-Google-Sender-Auth: SM7zZe4lhesA766oMxw1ysN25vg Message-ID: From: Rocky Bernstein Content-Type: multipart/alternative; boundary=047d7b33ca3cb989c004bf369fc9 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) --047d7b33ca3cb989c004bf369fc9 Content-Type: text/plain; charset=ISO-8859-1 On Fri, May 4, 2012 at 10:07 AM, Jim Meyering wrote: > Rocky Bernstein wrote: > > On Fri, May 4, 2012 at 8:19 AM, Jim Meyering wrote: > ... > > Please don't interpret my review delays or my misreading your > > patch as anything deliberately unfriendly. > > > > I didn't say deliberately unfriendly. I said there was an unfriendly > environment > > . No doubt, it is unintentional. But for me, for this, it is there. More > below. > > > > I've been trying to keep > > this list as open/accommodating as possible for nearly two decades. > > I agree that the long delay is off-putting and apologized for that, > twice. > > > > Understood and accepted. But really there is not much to show that this > has > > moved forward in the 5 months. Well, okay, for 5 months of time, you > have now at > > least tried the patch. > > > > So perhaps for the delays, you or someone reading could make the > stylistic > > changes that would take, what, maybe a few minutes? I promise in the > future with > > respect to coreutils I will follow coreutils conventions more carefully. > But is > > this about me getting following coreutils conventions or is this about > getting a > > "su" problem solved? Right now, if feels like the former, hence > "unfriendly > > environment". > > > > Also if you had taken the few minutes to make the stylistic changes, you > would > > have known that things would be properly and it would show that this you > have > > some interest in seeing things improved. Deeds sometimes speak volumes > more than > > apologies. > > Um... You seem to have misread. > I did indeed make all of the stylistic adjustments I listed. > I even added a commit log for you and included the output of > "git format-patch" (the "change-set" I mentioned) including > your patch *with those stylistic changes*, so that you could > use that as a basis for any additional changes. > Ok - my bad. Thanks. > > > > I suggest, but leave up to you, whether > > > to just document the behavior as it is leaving the code exactly as > it is. > > > > > > starting from the change-set below, which includes the > following > > changes: > > > > > > - remove some space-before-TAB in tests/Makefile.am > > > - remove space-before-semicolon in su.c > > > - split two longer-than-80-col lines > > > - remove both \n and trailing "." from two new diagnostics > > > - adjust NEWS > --047d7b33ca3cb989c004bf369fc9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Fri, May 4, 2012 at 10:07 AM, Jim Mey= ering <jim@meyering.net> wrote:
Rocky Bernstein wrote:
> On Fri, May 4, 2012 at 8:19 AM, Jim Meyering <jim@meyering.net> wrote:
...
> =A0 =A0 Please don't interpret my review delays = or my misreading your
> =A0 =A0 patch as anything deliberately unfriendly.
>
> I didn't say deliberately unfriendly. I said there was an unfriend= ly environment
> . No doubt, it is unintentional. But for me, for this, it is there. Mo= re below.
>
> =A0 =A0 =A0I've been trying to keep
> =A0 =A0 this list as open/accommodating as possible for nearly two dec= ades.
> =A0 =A0 I agree that the long delay is off-putting and apologized for = that, twice.
>
> Understood and accepted. But really there is not much to show that thi= s has
> moved forward in the 5 months. Well, okay, for 5 months of time, you h= ave now at
> least tried the patch.
>
> So perhaps for the delays, you or someone reading could make the styli= stic
> changes that would take, what, maybe a few minutes? I promise in the f= uture with
> respect to coreutils I will follow coreutils conventions more carefull= y. But is
> this about me getting following coreutils conventions or is this about= getting a
> "su" problem solved? Right now, if feels like the former, he= nce "unfriendly
> environment".
>
> Also if you had taken the few minutes to make the stylistic changes, y= ou would
> have known that things would be properly and it would show that this y= ou have
> some interest in seeing things improved. Deeds sometimes speak volumes= more than
> apologies.

Um... You seem to have misread.
I did indeed make all of the stylistic adjustments I listed.
I even added a commit log for you and included the output of
"git format-patch" (the "change-set" I mentioned) inclu= ding
your patch *with those stylistic changes*, so that you could
use that as a basis for any additional changes.

Ok= - my bad. Thanks.
=A0

> =A0 =A0 > I suggest, but leave up to you, whether
> =A0 =A0 > to just document the behavior as it is leaving the code e= xactly as it is.
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 starting from the change-set below, which include= s the following
> =A0 =A0 changes:
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 =A0- remove some space-before-TAB in tests/Makefi= le.am
> =A0 =A0 > =A0 =A0 =A0- remove space-before-semicolon in su.c
> =A0 =A0 > =A0 =A0 =A0- split two longer-than-80-col lines
> =A0 =A0 > =A0 =A0 =A0- remove both \n and trailing "." fr= om two new diagnostics
> =A0 =A0 > =A0 =A0 =A0- adjust NEWS

--047d7b33ca3cb989c004bf369fc9-- From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: su: -l and -p should not be used together References: In-Reply-To: Resent-From: Bernhard Voelker Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 23 May 2013 10:59:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: "util-linux@vger.kernel.org" Cc: 10317@debbugs.gnu.org Received: via spool by 10317-submit@debbugs.gnu.org id=B10317.136930669223882 (code B ref 10317); Thu, 23 May 2013 10:59:03 +0000 Received: (at 10317) by debbugs.gnu.org; 23 May 2013 10:58:12 +0000 Received: from localhost ([127.0.0.1]:57663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UfTDk-0006D5-8H for submit@debbugs.gnu.org; Thu, 23 May 2013 06:58:10 -0400 Received: from moutng.kundenserver.de ([212.227.17.8]:59420) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UfTDe-0006CL-32 for 10317@debbugs.gnu.org; Thu, 23 May 2013 06:58:03 -0400 Received: from [192.168.1.11] (p5091E01B.dip0.t-ipconnect.de [80.145.224.27]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0M8K0I-1UJnSS1H6Y-00vlct; Thu, 23 May 2013 12:57:06 +0200 Message-ID: <519DF601.4090700@bernhard-voelker.de> Date: Thu, 23 May 2013 12:57:05 +0200 From: Bernhard Voelker User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:fmrvgP5cgVDPxPN5CoPZcHZ17K9UsPWhIabK8erovbk X0buPGaKMEp/BH49Noa2fS0mBg0pX1Qv0dEF5PG5daItyABmH/ k3DMgIPAZIEJuh2TpYEd4ZTQyR4TFXR+0jZoPQc66W0iQ7kcMj AyJqmMmHvRUd3Y+Ete2YfyREAn+lFPIQZ7qF1khYEBgHwwTY/8 uVji1AZvQBqNIKVDcvwXpcN+UYdJnc8Kz3JmUhY2zD7XFkf3Jt Ml7qFyml+cX2v1gIFNkDB62UqWKZ8/rIw0NN7ZSqudODnnMuTu XZ5jjpjm9L4dAzZYxQEoNZLPRXUiX7ASuNra2E7gGvew/JSdmA fCqisB6slblOuWbTpnmKl01XbLYRopjZiskRSk3NB X-Spam-Score: 0.8 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) tag 10317 wontfix close 10317 stop A while ago, there has been a bug report to coreutils regarding the unlucky use of the -p and the -l option (or a bare "-") with su: http://bugs.gnu.org/10317 As su is not part of coreutils anymore, I'm hereby closing the bug there, and forward this issue to util-linux where su is now maintained. @Karel: do you think it's worth a warning/error? However, the agreement was that the behaviour should at least be documented. Have a nice day, Berny From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: su: -l and -p should not be used together Resent-From: Karel Zak Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 29 May 2013 09:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Bernhard Voelker Cc: "util-linux@vger.kernel.org" , 10317@debbugs.gnu.org Received: via spool by 10317-submit@debbugs.gnu.org id=B10317.136982051029556 (code B ref 10317); Wed, 29 May 2013 09:42:01 +0000 Received: (at 10317) by debbugs.gnu.org; 29 May 2013 09:41:50 +0000 Received: from localhost ([127.0.0.1]:39008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UhctB-0007gd-GV for submit@debbugs.gnu.org; Wed, 29 May 2013 05:41:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33914) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uhct7-0007gH-1W for 10317@debbugs.gnu.org; Wed, 29 May 2013 05:41:46 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4T9eCdU029930 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 29 May 2013 05:40:13 -0400 Received: from x2.net.home (ovpn-113-20.phx2.redhat.com [10.3.113.20]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r4T9eBk1001906; Wed, 29 May 2013 05:40:12 -0400 Date: Wed, 29 May 2013 11:40:10 +0200 From: Karel Zak Message-ID: <20130529094010.GF30341@x2.net.home> References: <519DF601.4090700@bernhard-voelker.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <519DF601.4090700@bernhard-voelker.de> User-Agent: Mutt/1.5.21 (2012-12-30) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Spam-Score: -5.3 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -8.0 (--------) On Thu, May 23, 2013 at 12:57:05PM +0200, Bernhard Voelker wrote: > A while ago, there has been a bug report to coreutils regarding > the unlucky use of the -p and the -l option (or a bare "-") with su: > http://bugs.gnu.org/10317 > > As su is not part of coreutils anymore, I'm hereby closing the bug > there, and forward this issue to util-linux where su is now maintained. > > @Karel: > do you think it's worth a warning/error? > However, the agreement was that the behaviour should at least > be documented. Thanks for the report, I have added note to the man page as well as warning to the code. Karel >From 3e5c0a2db233b726ca80d37aad9eeca8bae144d4 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 29 May 2013 11:32:58 +0200 Subject: [PATCH] su: ignore --preserve-environment, it's mutually exclusive to --login Addresses: http://bugs.gnu.org/10317 Reported-by: Bernhard Voelker Signed-off-by: Karel Zak --- login-utils/su-common.c | 5 +++++ login-utils/su.1 | 1 + 2 files changed, 6 insertions(+) diff --git a/login-utils/su-common.c b/login-utils/su-common.c index ba2a616..a41d015 100644 --- a/login-utils/su-common.c +++ b/login-utils/su-common.c @@ -810,6 +810,11 @@ su_main (int argc, char **argv, int mode) ++optind; } + if (simulate_login && !change_environment) { + warnx(_("ignore --preserve-environment, it's mutually exclusive to --login.")); + change_environment = true; + } + switch (su_mode) { case RUNUSER_MODE: if (runuser_user) { diff --git a/login-utils/su.1 b/login-utils/su.1 index c82b941..eab1a6f 100644 --- a/login-utils/su.1 +++ b/login-utils/su.1 @@ -98,6 +98,7 @@ Preserves the whole environment, ie does not set .B USER nor .BR LOGNAME . +The option is ignored if the option \fB\-\-login\fR is specified. .TP \fB\-s\fR \fISHELL\fR, \fB\-\-shell\fR=\fISHELL\fR Runs the specified shell instead of the default. The shell to run is -- 1.8.1.4 -- Karel Zak http://karelzak.blogspot.com From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: su: -l and -p should not be used together Resent-From: Bernhard Voelker Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 29 May 2013 09:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Karel Zak Cc: "util-linux@vger.kernel.org" , 10317@debbugs.gnu.org Received: via spool by 10317-submit@debbugs.gnu.org id=B10317.136982140931651 (code B ref 10317); Wed, 29 May 2013 09:57:01 +0000 Received: (at 10317) by debbugs.gnu.org; 29 May 2013 09:56:49 +0000 Received: from localhost ([127.0.0.1]:39055 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uhd7g-0008EQ-Kr for submit@debbugs.gnu.org; Wed, 29 May 2013 05:56:48 -0400 Received: from moutng.kundenserver.de ([212.227.17.10]:53743) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uhd7d-0008E1-Ft for 10317@debbugs.gnu.org; Wed, 29 May 2013 05:56:46 -0400 Received: from [192.168.1.11] (p5091EE60.dip0.t-ipconnect.de [80.145.238.96]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0MWcMY-1UxXN70HHO-00Xesb; Wed, 29 May 2013 11:55:11 +0200 Message-ID: <51A5D07E.8000603@bernhard-voelker.de> Date: Wed, 29 May 2013 11:55:10 +0200 From: Bernhard Voelker User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 References: <519DF601.4090700@bernhard-voelker.de> <20130529094010.GF30341@x2.net.home> In-Reply-To: <20130529094010.GF30341@x2.net.home> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:P0M9Wn6yTVzz6zc2bnONGavYvJ0RIpNkAJ15bStYL8j hO+D/B2qoS9QRmPuqzglfLo+1Dbxa4jNEp7lDoVUtYhTVUuNaL J1HvMKhbw95npmlhefcHGO15Eu8ZQRLDbeM6jk1IiVvVYtc3ba xuY30u/JVtTloc0VEfnqDT19CZs6+rz/eRfzS3jDWs0IS5sGSH SRdISNsmcPBy5ty04B6vqbP+F4jHTCnx9KK6jpbk4XU1gOZ7WX RPJ/2tGaDNwUyxy51IKi/EAsecFmeWXhDS4zg6wjC2nFTQ8O7Y s+xaU0fOGnB+xIEeo8zQ85FUIbrkB/DQmOl5BHcKpjovKnRFef FPbRhURYYRPQjb28mthSx0zsuOK45TpmwJ/ZFcmRX X-Spam-Score: 0.8 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Hi Karel, On 05/29/2013 11:40 AM, Karel Zak wrote: > diff --git a/login-utils/su-common.c b/login-utils/su-common.c > index ba2a616..a41d015 100644 > --- a/login-utils/su-common.c > +++ b/login-utils/su-common.c > @@ -810,6 +810,11 @@ su_main (int argc, char **argv, int mode) > ++optind; > } > > + if (simulate_login && !change_environment) { > + warnx(_("ignore --preserve-environment, it's mutually exclusive to --login.")); > + change_environment = true; > + } > + thanks. As the change was in su-common.c, this also affects runuser. I think this should then be documented in runuser.1, too, right? Have a nice day, Berny From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: su: -l and -p should not be used together Resent-From: Karel Zak Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 07 Jun 2013 09:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Bernhard Voelker Cc: "util-linux@vger.kernel.org" , 10317@debbugs.gnu.org Received: via spool by 10317-submit@debbugs.gnu.org id=B10317.137059730227479 (code B ref 10317); Fri, 07 Jun 2013 09:29:02 +0000 Received: (at 10317) by debbugs.gnu.org; 7 Jun 2013 09:28:22 +0000 Received: from localhost ([127.0.0.1]:55958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uksy5-000797-HR for submit@debbugs.gnu.org; Fri, 07 Jun 2013 05:28:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40324) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uksxz-00078n-9E for 10317@debbugs.gnu.org; Fri, 07 Jun 2013 05:28:19 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r579SAKA006743 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 7 Jun 2013 05:28:10 -0400 Received: from x2.net.home (ovpn-113-20.phx2.redhat.com [10.3.113.20]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r579S8Kd005566; Fri, 7 Jun 2013 05:28:09 -0400 Date: Fri, 7 Jun 2013 11:28:07 +0200 From: Karel Zak Message-ID: <20130607092807.GA19555@x2.net.home> References: <519DF601.4090700@bernhard-voelker.de> <20130529094010.GF30341@x2.net.home> <51A5D07E.8000603@bernhard-voelker.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51A5D07E.8000603@bernhard-voelker.de> User-Agent: Mutt/1.5.21 (2012-12-30) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-Spam-Score: -4.7 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -7.4 (-------) On Wed, May 29, 2013 at 11:55:10AM +0200, Bernhard Voelker wrote: > As the change was in su-common.c, this also affects runuser. > I think this should then be documented in runuser.1, too, right? Good point, fixed. Karel -- Karel Zak http://karelzak.blogspot.com From unknown Mon Aug 18 19:36:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10317: su: -l and -p should not be used together Resent-From: Assaf Gordon Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Mon, 15 Oct 2018 15:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10317 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: Cc: 10317@debbugs.gnu.org Received: via spool by 10317-submit@debbugs.gnu.org id=B10317.153961601323860 (code B ref 10317); Mon, 15 Oct 2018 15:07:02 +0000 Received: (at 10317) by debbugs.gnu.org; 15 Oct 2018 15:06:53 +0000 Received: from localhost ([127.0.0.1]:50937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gC4SL-0006Cg-G7 for submit@debbugs.gnu.org; Mon, 15 Oct 2018 11:06:53 -0400 Received: from mail-pg1-f170.google.com ([209.85.215.170]:46211) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gC4SI-0006CK-Qm; Mon, 15 Oct 2018 11:06:51 -0400 Received: by mail-pg1-f170.google.com with SMTP id a5-v6so9283752pgv.13; Mon, 15 Oct 2018 08:06:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:cc:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=M0S8QuwGbOlnoraHMH7D9YvmNfPhLb454CqmAKYNijA=; b=Q3Fk+E59xZBj0rpuNpYfIH9G02U5AnrFvtOQBsuc4EtPdMgDLJOte3NVpg2be7mut4 cSAkUV8DfblnifEm1Ockhbmh93mRo8brq/BG51km7aE87uv3vxLx7/3zzt7PAik7Jt73 w1LHa5WlGad41/1wbRhtD9R8hdS2YTxWkIsOQfLFEzK/jY3NImi5nOBBL4dmq0+LHxsz VUFrSBB6hbVG6SeTXoy+jFDRfwaDXh3uHWAVNeExEUPQOqXBd8jT1xwNanrzGwur1V/Z mJZTnEsNFbs4HSP4PMM4XaAjxC5ZXEjHmDIuyK5OtGdMjvDjEL7Z2p2eemc7vgHiwIIs Z3xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=M0S8QuwGbOlnoraHMH7D9YvmNfPhLb454CqmAKYNijA=; b=fMttHC3u5EJ6gFgjw8anzoW7xg3YiQIVsAjgthmM4CLuv9TGzY2ElpUpCx8CWRRe5K gDNtHBxNiqPfVHLZw78XrzRUipGae9c0QvKysXIMdRkXwzncCXSAacVT22VZYWdfXsbO xbXFXoOCIj/HeSXuSGYAhvrR5N0VUB2s6B0fBvRFXDHbtHhAf3YzbacTgfMd7un51BxT 3jqQD9zOQIGlzmwEj7TK6HeS4uchpIjaPX+YZFpUTBQry3UzQZsW+ibH06wSsdQqOUck 8AkoTk8EMGvCh8Uv/ivtVM0Cn5E+5Fh5txYhVrcwA5hA1S4zWQ7sJFA8NG46RTXYbWbR j80Q== X-Gm-Message-State: ABuFfojzXbvOoryvmmL9lOwb5qdDCbzuDTVC3iPITl0fsAvyW8M/D59r ZxKqNxJuUNSfxPWi4RUv8ckdZVsQ3Fw= X-Google-Smtp-Source: ACcGV62lJ/KhQcsNfWFMl52csVTmpy/YUYOC0jMWdq1xmI3k1kHBPi6SngYM3Q0MSPOcK8WDGsbMFw== X-Received: by 2002:a62:aa17:: with SMTP id e23-v6mr18036793pff.211.1539616004518; Mon, 15 Oct 2018 08:06:44 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id v190-v6sm22206756pgb.16.2018.10.15.08.06.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Oct 2018 08:06:43 -0700 (PDT) References: <519DF601.4090700@bernhard-voelker.de> <20130529094010.GF30341@x2.net.home> <51A5D07E.8000603@bernhard-voelker.de> <20130607092807.GA19555@x2.net.home> From: Assaf Gordon Message-ID: Date: Mon, 15 Oct 2018 09:06:41 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20130607092807.GA19555@x2.net.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close 10317 stop (triaging old bugs) su(1) is no longer maintained in coreutils, and most distributions have switched to util-linux's su(1). [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.215.170 listed in list.dnswl.org] 1.2 MISSING_HEADERS Missing To: header 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (assafgordon[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.170 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) close 10317 stop (triaging old bugs) su(1) is no longer maintained in coreutils, and most distributions have switched to util-linux's su(1). Closing this bug. regards, - assaf