all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Troy Sankey <sankeytms@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>,
	"Eric Bavier" <ericbavier@openmailbox.org>
Cc: help-guix@gnu.org,
	Help-Guix <help-guix-bounces+ericbavier=openmailbox.org@gnu.org>
Subject: Re: [UX] real names exposed
Date: Sat, 03 Sep 2016 18:21:07 -0400	[thread overview]
Message-ID: <147294126799.23966.17879039892323433100@what> (raw)
In-Reply-To: <147291661814.23966.15325855743314158034@what>

[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]

I suspect the scope of this UX "bug" is larger than python.  I think this probably affects every executable written in an interpreted
language and using a shebang.  Here's another example with a bash
script:

  $ cat > t.sh
  #!/bin/bash
  sed 's/\x0/\\0/g'  # replaces null bytes with a visible '\0'
  
  $ ./t.sh </proc/self/cmdline
  /bin/bash\0./t.sh\0

Looks like '/bin/bash' is argv[0].  What happens when we try exec -a:
  
  $ bash -c 'exec -a FOO bash t.sh </proc/self/cmdline'
  FOO\0t.sh\0

  $ bash -c 'exec -a FOO ./t.sh </proc/self/cmdline'
  /bin/bash\0/tmp/t.sh\0

"t.sh" still appears. The result of that last command surprised me,
there's no FOO in /prod/self/cmdline at all (still confused)!  By the
way, bash does the same as python, in that $0 always references the
script name, never the actual argv[0]:

  $ cat >s.sh
  #!/bin/bash
  echo $0
  
  $ ./s.sh </proc/self/cmdline
  ./s.sh

  $ bash s.sh </proc/self/cmdline
  s.sh

I'm not sure what the solution is.

Troy

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAABCAAGBQJXy0zRAAoJEIRGmXXw0dCUIM4P/3VL2lx7UaXaj3KvSi3tkS8q
Xx88KQwuxrMWGWHN36PbH1LNxlsh6051L0/cgYu9WDmuHhTDlkYjFcLhydeXOpM8
6z6bD3WYuYQPPTG/59RW94DfzZZ0JeVQMllkfOhk+Lx/fuR0cnyVsE12I3X5SBFe
b9kn7HEZiHAF9GXW4UflWraty4rwCXbJIxCpNkBv3YEC+B3GHTyQoU/sRm3sY9zG
V/y7gmGToe4FJfh7xSGx9Zw9Sz5ngqdhOYxF/o9wggu4YbUXbR50Vflsr8ffj29N
zZZcBV0rJ6IAj/0hbPTHeY76anfnSBuSYUrpIA1c6u5PtFcsEZE7pKRu473qHAZa
4QqvDdQwg9vNSYw6L8i9XCs2dTUleFJhZB4O8JKSQgCGsaKINId47TeVcP1z8aDt
tacC5Rb1r/uk4+k9hm4XzDjNKkey3uX617k7H5KdTzyiT3skapd0r2oNt56h5SVJ
/gVwDj/sfP24/khYuUtlU8Mz7+wx98ZhLUB/TSAIALBGvVFnkfZB7qgplB09gKcH
6bfqhdDGj3VzccfOWHScLv/TbciCFkCOJC+drtjx/LZ32jBT7rBV27mVL+vfDcCV
D0no+sich3/wk8K0eNsIx7b+dqpPqVPaH5lV7Gq7Qzh85XvJ5z9QY+IQEQu+VRPz
RhE1lsxW0cPHK/zPkyTQ
=Z5Wl
-----END PGP SIGNATURE-----

  reply	other threads:[~2016-09-03 22:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-31 18:25 [UX] real names exposed Troy Sankey
2016-08-31 23:11 ` Leo Famulari
2016-08-31 23:33   ` Eric Bavier
2016-09-01  8:59     ` Ludovic Courtès
2016-09-03 15:30       ` Troy Sankey
2016-09-03 22:21         ` Troy Sankey [this message]
2016-09-04 19:38           ` Ludovic Courtès
2016-09-03 22:33       ` Ludovic Courtès
2016-09-04 19:41         ` Ludovic Courtès
2016-09-06  3:09           ` Eric Bavier
2016-09-07 22:04             ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=147294126799.23966.17879039892323433100@what \
    --to=sankeytms@gmail.com \
    --cc=ericbavier@openmailbox.org \
    --cc=help-guix-bounces+ericbavier=openmailbox.org@gnu.org \
    --cc=help-guix@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.