All of lore.kernel.org
 help / color / mirror / Atom feed
From: DervishD <raul@pleyades.net>
To: Jakob Oestergaard <jakob@unthought.net>
Cc: Linux-kernel <linux-kernel@vger.kernel.org>
Subject: Changing argv[0] under Linux. This MUST work...
Date: Wed, 15 Jan 2003 18:36:56 +0100	[thread overview]
Message-ID: <20030115173656.GG86@DervishD> (raw)
In-Reply-To: <20030115171009.GF86@DervishD>

    Hi Jakob :)

    Your solution of exec'ing ourselves MUST undoubtly work (well, I
know that this an affirmation that I will lament XDDDD), because it
only relies on 'exec()' passing the argv[0] you provide as the
argv[0] of the invoked binary, and that should work or programs like
'/bin/login' will stop working... They rely on the same principle,
since they need to prepend an '-' to the shell name to make it a
login shell :))) Didn't remember this until now!

    So, if you do 'execl(ourselves, "my new name", ..., NULL)', the
argv[0] received by the binary specified in 'ourselves' MUST be 'my
new name'. Otherwise '/bin/login' and a good bunch of shells won't
work...

    If you happen to come to Spain at any point in the future, just
tell me, I'll buy you a beer (or crack, or whatever you use XDDD).

    Thanks :)

    Raúl

  reply	other threads:[~2003-01-15 17:28 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-14 18:59 Changing argv[0] under Linux DervishD
2003-01-14 19:10 ` Richard B. Johnson
2003-01-14 19:14   ` DervishD
2003-01-14 19:43     ` Richard B. Johnson
2003-01-14 19:50       ` DervishD
2003-01-14 19:56         ` Richard B. Johnson
2003-01-14 20:23           ` Mark Mielke
2003-01-14 20:28             ` Richard B. Johnson
2003-01-14 21:21               ` Mark Mielke
2003-01-15 14:00                 ` Richard B. Johnson
2003-01-15 16:43                 ` Richard B. Johnson
2003-01-15 16:57                   ` DervishD
2003-01-14 22:00             ` DervishD
2003-01-21 14:16     ` Bill Davidsen
2003-01-21 15:33       ` DervishD
2003-01-14 20:25   ` Philippe Troin
2003-01-14 20:56     ` Richard B. Johnson
2003-01-14 22:04     ` DervishD
2003-01-14 23:04       ` Bob Miller
2003-01-14 23:11         ` Bob Miller
2003-01-15  4:46           ` Mark Mielke
2003-01-15  8:25             ` jw schultz
2003-01-15 11:41               ` DervishD
2003-01-15 13:16                 ` Jakob Oestergaard
2003-01-15 16:22                   ` DervishD
2003-01-15 16:47                     ` Jakob Oestergaard
2003-01-15 17:10                       ` DervishD
2003-01-15 17:36                         ` DervishD [this message]
2003-01-15 21:26                       ` Andreas Schwab
2003-01-15 21:36                         ` Jesse Pollard
2003-01-15 22:03                         ` DervishD
2003-01-16  9:19                           ` Dorin Lazar
2003-01-15 11:35         ` DervishD
2003-01-14 21:55   ` Miquel van Smoorenburg
2003-01-14 22:04     ` Valdis.Kletnieks
2003-01-15 11:28     ` DervishD
2003-01-27  7:47 ` Anuradha Ratnaweera

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=20030115173656.GG86@DervishD \
    --to=raul@pleyades.net \
    --cc=jakob@unthought.net \
    --cc=linux-kernel@vger.kernel.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.
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.