Bug 51636

Summary: fonts.dir can be read after running mkfontdir
Product: [Retired] Red Hat Linux Reporter: Niels Basjes <basjes>
Component: XFree86Assignee: Mike A. Harris <mharris>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-08-13 15:03:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
The patch I decided to use for now. none

Description Niels Basjes 2001-08-13 14:14:17 UTC
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 !!)


How reproducible:
Always

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 
4. startx
	

Actual Results:  The X-server doesn't start and gives the error:

Fatal server error:
could not open default cursor font
'cursor'                                                                                                      

Expected Results:  X-server starts.

Additional info:

The file /etc/rc.d/init.d/xfs comes from
XFree86-xfs-4.0.3-5

Comment 1 Niels Basjes 2001-08-13 14:15:36 UTC
Created attachment 27515 [details]
The patch I decided to use for now.

Comment 2 Mike A. Harris 2001-08-13 15:03:02 UTC
Patched mkfontdir to create new files with mode 0644.
XFree86-4.1.0-0.9.13 

Will appear in rawhide sometime.