All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gary Thomas <gary@mlbassoc.com>
To: Yocto Project <yocto@yoctoproject.org>
Subject: su.shadow: Change in behaviour
Date: Fri, 18 Jul 2014 12:28:42 -0600	[thread overview]
Message-ID: <53C9675A.2080109@mlbassoc.com> (raw)

I just noticed a difference in how su.shadow functions with
the latest code.  If I run this
   # su -c /home/root/test -l root
with the previous version (4.1.4.3) I see this flow:
   6761  execve("/bin/su", ["su", "-c", "/home/root/test", "-l"], [/* 13 vars */]) = 0
   6761  execve("/bin/sh", ["/bin/sh", "-c", "/home/root/test"], [/* 7 vars */]) = 0
   6762  execve("/home/root/test", ["/home/root/test"], [/* 8 vars */]) = 0
with the latest version (4.2.1) I see:
   961   execve("/bin/su", ["su", "-c", "/home/root/test", "-l"], [/* 13 vars */]) = 0
   961   execve("/bin/sh", ["-su", "-c", "/home/root/test"], [/* 7 vars */]) = 0
which fails with 'su: applet not found' if /bin.sh is busybox and
succeeds if the /bin/sh is bash.

Is seems that the new version is expecting the shell to take
care of the user switch (maybe it doesn't realize that it's
already 'root') and the busybox shell doesn't handle this.
That said, I can see that busybox is built with 'CONFIG_SU=y',
but there is no 'su' applet.

Who's wrong here (su.shadow or busybox)?  Has anyone else seen
this or does everyone just use bash?

Note: I noticed this because with the latest Poky/Yocto master
with these changes, the X server no longer comes up because it
relies on su (su -l -c "/etc/X11/Xserver&" root) and this now
fails when using /bin/sh==busybox.

Thanks for any pointers or ideas

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


                 reply	other threads:[~2014-07-18 18:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=53C9675A.2080109@mlbassoc.com \
    --to=gary@mlbassoc.com \
    --cc=yocto@yoctoproject.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.