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

List:       busybox
Subject:    Re: login shell when using CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
From:       Sam Gandhi <samgandhi9 () gmail ! com>
Date:       2011-06-30 20:17:20
Message-ID: BANLkTi=w-Qe=EGQWCBqoCyOyJp9K5jcHYg () mail ! gmail ! com
[Download RAW message or body]

Hello Jim,

In your system are using CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS=y or
you using CONFIG_INSTALL_APPLET_SYMLINKS=y option?


If one compiles busybox with APPLET_SCRIPT option, the /bin/sh turns
out to be a file that has content #!/bin/busybox so when login is
invoked, the leading '-' to indicate its login invocation of shell is
lost.

If you are using APPLETT_SCRITP_WRAPPER option, would like to see
output of cat /bin/sh and see if there is some modification that is
made to that file.

Warm Regards,
-Sam

On Thu, Jun 30, 2011 at 11:08 AM, Cathey, Jim <jcathey@ciena.com> wrote:
> Once upon a time login shell activity was triggered
> by the first character of argv[0] (to the shell) being
> a '-' character.  Strange, and maybe stupid, but that's
> how it was done.  The "-l" option was just to trigger
> (manually) the automatic '-/bin/sh' behavior, when you
> needed it in scripts.
>
> Our busybox system is still using that leading '-'
> character, why isn't yours?
>
> -- Jim
>
>
>
> -----Original Message-----
> From: busybox-bounces@busybox.net [mailto:busybox-bounces@busybox.net]
> On Behalf Of Sam Gandhi
> Sent: Thursday, June 30, 2011 6:20 AM
> To: busybox@busybox.net
> Subject: login shell when using CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
>
> I am running busybox with option
> CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS, I need to run with this option
> because of SELinux.
>
> Only issue I am running into is when I login /etc/profile or
> ~/.profile are not getting run. I see that busybox has option to run
> shell with -l option.
>
> But if I modify my /etc/passwd file to refer to shell as /bin/sh -l ,
> login works fine but other programs such as dropbear don't work.
>
> Before I start patching those programs wanted to find out if there is
> some other way I can invoke shell to let it know that its login shell
> v/s non-login shell?
>
> -Sam
> _______________________________________________
> busybox mailing list
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
>
>
_______________________________________________
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