[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: Unicode issues with ash
From:       Seb <sbb () tuxfamily ! org>
Date:       2011-03-28 21:20:53
Message-ID: 20110328232053.1541c65a.sbb () tuxfamily ! org
[Download RAW message or body]

Le Mon, 28 Mar 2011 20:05:42 +0200
Denys Vlasenko <vda.linux@googlemail.com> a écrit:


> execve("/bin/ash", ["-su"], [/* 10 vars */]) = 0
> 
> AHA. I know why it works in this case. Config you sent me has only two
> applets enabled:
> CONFIG_PWDX=y
> CONFIG_ASH=y
> 
> If you disable pwdx, you end up with "single-applet busybox", and in this case
> it doesn't check program name. Therefore it works in this case.

That's the key! I've tryed a bbx with ash+ls applets and have got the
same error. Then I have thought the test I've previously made was
using an interpretor, so the argv[0] was certainly fed by sh. I've
therefore cooked a little "/tmp/argv" exec with my poor C skill:

  #include <stdio.h>
  #include <stdlib.h>

  int main (int argc, char *argv[]) {
      printf("%s\n", argv[0]);
      return EXIT_SUCCESS;
  }

Here are the results:

  # useradd unibug -s /tmp/argv -d /tmp  -p ""
  # su unibug 
  argv

  # su - unibug
  -su

Nothing to argue anymore, the "dumb bunny" theory is definitively the
good one... damn it!

> So, please try updating su. And updating strace too:
> strace which was adding unnecessary "..." after each string,
> like here:
> read(3, "/bin/bash\n/bin/dash\n/bin/ash\n"..., 4096) = 29
> is known to be buggy.
> 
> What are the versions of those tools on the affected machine?

strace 4.5.18 and shadow 4.1.4.3 (the very last).

@+
Seb.
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic