Changes to rtems_shell_script() working directory?

Joel Sherrill joel.sherrill at oarcorp.com
Mon Jun 29 01:02:37 UTC 2015



On June 28, 2015 7:58:25 PM CDT, Peter Dufault <dufault at hda.com> wrote:
>
>> On Jun 28, 2015, at 19:36 , Chris Johns <chrisj at rtems.org> wrote:
>> 
>> On 29/06/2015 9:23 am, Joel Sherrill wrote:
>>> 
>>> 
>>> On June 28, 2015 6:11:05 PM CDT, Chris Johns <chrisj at rtems.org>
>wrote:
>>>> On 28/06/2015 9:20 pm, Peter Dufault wrote:
>>>>> Does anyone know of changes in how the shell starts up that would
>>>> affect the current working directory?  
>>>> 
>>>> Nothing that explains exactly what you are seeing.
>>>> 
>>>> Changes to the environment have been made to support SMP. The
>previous
>>>> implementation used task variables and these do not work on SMP so
>we
>>>> had to change the code. I am not sure if this has had an effect in
>some
>>>> subtle way on your set up.
>>> 
>>> Another more likely change was Sebastian's work that tightened the
>permissions on commands. Run the fileio sample and you will see what
>the difference between living in as root or a normal user is.
>>> 
>> 
>> Yes perms can lock you out. If the script has not had the equivalent
>of
>> "chmod +x script" it will not run.
>> 
>> FYI I am using those perms in production to restrict user access. In
>one
>> product we have 3 levels and it works well. The only issue is the
>need
>> to add a C interface to change the perms and ownership.
>> 
>> Chris
>
>What I really wonder is why it worked before.  I made the change I
>outlined previously (move the “chdir” above the “fopen”) and it now
>works, the shells current working directory is evidently “/“ until the
>“chdir”.
>
>Is anyone else using rtems_shell_script() and seeing this?

I wonder if there is a test case in the test suite.

>It isn’t 
>Peter
>-----------------
>Peter Dufault
>HD Associates, Inc.      Software and System Engineering

--joel


More information about the users mailing list