[OS X TeX] Re: dvips problem [with addendum]

Peter Dyballa Peter_Dyballa at Web.DE
Tue Jun 6 23:33:43 CEST 2006


Am 06.06.2006 um 22:51 schrieb Bruno Voisin:

> 	sudo -H updmap-sys
>
> did precisely that: take input (ie map files) from either ~/Library/ 
> texmf/ or /Library/teTeX/share/temf.local/, and create output (ie  
> psfonts.map pdftex.map etc.) with the proper permissions and  
> settings in /Library/teTeX/share/temf.local/.
>
> I don't remember for sure what are the respective roles of the -H  
> option and of the -sys suffix, but I thought that's what the  
> combination did. But I may very well be wrong.


Sudo -H now is needed to change the effective user id to 0 (i.e.  
root) *and* change the home directory to root's home directory, what  
was done in Panther (Mac OS X 10.3) and before inherently. In Tiger  
(Mac OS X 10.4) a simple sudo leaves $HOME untouched.

In no case a 'cd $HOME' happens or happened. So a 'sudo [-H] updmap'  
leaves files owned by root in one's own directory tree.

When you invoke 'sudo -H updmap-sys' or more verbosely 'sudo -H root  
updmap-sys' then kpsewhich, which locates the MAP file fragments,  
runs in a sub-process under the ID of root, and so $HOME in $TEXMF is  
expanded to root's home directory. My private parts do not get searched.

When you invoke 'sudo updmap-sys' then kpsewhich runs in a sub- 
process under the ID of root but with the old value of $HOME, and so  
$HOME in $TEXMF is expanded to your own home directory. My private  
parts would get searched ... but this can be dangerous when everyone  
on the system would get access to the fonts only I licensed! And it  
could endanger the whole system with my experimental MAP file  
fragments. This does not seem to be Alex' problem, probably the MAP  
file fragments are OK.

Proof:

sudo -H env | grep HOME
sudo    env | grep HOME


(Before I understood these mechanisms in depth I fooled updmap-sys by  
linking root's ~/Library/texmf with my own, to have access to my  
private MAP file fragments. And to link has in German the connotation  
of fooling someone or something!)

--
Greetings

   Pete

"What do you think of Western Civilisation?"
"I think it would be a good idea!"
                          -- Mohandas Karamchand Gandhi


------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list