Red Hat Bugzilla – Bug 51636
fonts.dir can be read after running mkfontdir
Last modified: 2007-04-18 12:35:47 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.2.14-5.0 i686)
Description of problem:
As can be seen in /etc/rc.d/init.d/xfs after mkfontdir a chmod a+r must be
performed in order to allow the xfs which is using -droppriv to read the
fonts.dir file. Without read rights the X server won't start at all.
After installing a package like kdebase-2.1.1-8.i386.rpm (which includes
some fonts), the post install script of this RPM runs the mkfontdir
application te regenerate the fonts.dir file without the (for xfs
-dropppriv) required chmod command. Because the xfs script only does the
chmod command if the fonts.dir is older than the fonts it will not be run
because the RPM script already ran the mkfontdir program.
2 possible solutions:
1) Change mkfontdir to create the fonts.dir file with 644 rights.
2) Change /etc/rc.d/init.d/xfs to set the correct rights.
3) Nolonger run xfs with -droppriv (BAD idea !!)
Steps to Reproduce:
1. Ensure X is not running.
2. /usr/X11R6/bin/mkfontdir /usr/X11R6/lib/X11/fonts/misc
3. /etc/rc.d/init.d/xfs restart
Actual Results: The X-server doesn't start and gives the error:
Fatal server error:
could not open default cursor font
Expected Results: X-server starts.
The file /etc/rc.d/init.d/xfs comes from
Created attachment 27515 [details]
The patch I decided to use for now.
Patched mkfontdir to create new files with mode 0644.
Will appear in rawhide sometime.