[tex-live] updmap and /

Lars Madsen daleif at imf.au.dk
Sun Mar 1 18:21:35 CET 2009


Zdenek Wagner wrote:
> 2009/3/1 Reinhard Kotucha <reinhard.kotucha at web.de>:
>> On 24 February 2009 Zdenek Wagner wrote:
>>
>>  > And why is it necessary to "cd" anywhere? I would do it like that:
>>  > rm -rf "$tmpdir" if -d "$tmpdir";
>>
>> Thomas explained it to me some years ago:  Since you can't remove your
>> current working directory, you have to make sure that you are not
>> inside a directory you want to remove.  The reason he chose "/" is
>> that this directory always exists and never is supposed to be removed.
>>
>> Please also note that Thomas usually installs signal handlers in order
>> to remove temporary files when the script aborts unexpectedly.  Hence,
>> the code you propose will not work reliably.  You don't know where you
>> are if the process is killed by a signal.  Yes, it's necessary to "cd"
>> to a directory outside "$tmpdir".
>>
> In theory, the permissions of a directory can be 0744 so that
> everybody can read it but cannot cd into it. It is possible to cd into
> subdirectories but name completion by TAB does not work. It would be
> quite strange for /. It might help to store `pwd` at the beginning of
> the script because the user can cd into it and it should be outside
> $tmpdir (I hope).
> 

I'm trying to figure out why our system is set like this, not sure if it 
  is own own installation script or if it is redhat.

I any case, a script like this should not make the assumption that / is 
readable since the user has no business there.

/daleif



More information about the tex-live mailing list