Bug 1980 - make XErrorDB location configurable
Summary: make XErrorDB location configurable
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xlib (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-01 05:00 UTC by Alexander Gottwald
Modified: 2005-07-04 09:07 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
proposed patch (608 bytes, patch)
2004-12-01 05:02 UTC, Alexander Gottwald
no flags Details | Splinter Review
document XERRORDB environment variable (669 bytes, patch)
2004-12-04 09:15 UTC, Alexander Gottwald
no flags Details | Splinter Review

Description Alexander Gottwald 2004-12-01 05:00:21 UTC
The XErrorDB location should be configurable in the same way as XKeysymDB is
Comment 1 Alexander Gottwald 2004-12-01 05:02:08 UTC
Created attachment 1435 [details] [review]
proposed patch

Use environment variable XERRORDB as location and fall back to compiletime
default if it is not set
Comment 2 Alexander Gottwald 2004-12-01 05:07:11 UTC
/cvs/xorg/xc/ChangeLog,v  <--  ChangeLog
new revision: 1.555; previous revision: 1.554
/cvs/xorg/xc/lib/X11/ErrDes.c,v  <--  ErrDes.c
new revision: 1.3; previous revision: 1.2


fixed in HEAD
Comment 3 Dan McNichol 2004-12-01 08:58:46 UTC
Might I propose another addition to this:

Use $XERRORDB like shown here.
If not found, then look for ProjectRoot/lib/X11/$LANG/XErrorDB .
If not found, then use the standard ProjectRoot/lib/X11/XErrorDB .

This way we can support translated XErrorDB files by default.
Comment 4 Alexander Gottwald 2004-12-04 09:15:57 UTC
Created attachment 1467 [details] [review]
document XERRORDB environment variable

added documentation of XERRORDB to X.man
Comment 5 Alexander Gottwald 2004-12-04 09:21:30 UTC
Commited documentation patch to HEAD

/cvs/xorg/xc/ChangeLog,v  <--  ChangeLog
new revision: 1.568; previous revision: 1.567
/cvs/xorg/xc/doc/man/general/X.man,v  <--  X.man
new revision: 1.5; previous revision: 1.4
Comment 6 Jim Gettys 2004-12-06 09:41:09 UTC
***WHY*** should the XErrorDB location be configurable?

Without the motivation, we can't tell if this is a feature we want...
Comment 7 Alexander Gottwald 2004-12-06 10:53:17 UTC
I need a relocatable libX11 for Windows. The package should be completly
relocatable. I can already relocate rgb.txt, XLOCALEDIR, XKEYSYMDB and the fonts
but XErrorDB is always searched in places defined at compiletime.
Comment 8 Jim Gettys 2004-12-07 08:45:56 UTC
We worry about possible security issues; and it is far from clear this should be
an option on other platforms.
Comment 9 Egbert Eich 2004-12-07 10:57:05 UTC
This patch raises security questions especially for SUID root programs.
I don't think it is save to allow the user to override this for SUID root
programs even though this is read only. Yes, and you've mentioned more potential
problems here.

Comment 10 Alexander Gottwald 2004-12-08 05:44:32 UTC
Wrapped the handling of XERRORDB with #ifdef WIN32 and removed the patch from
the X man page. Removed the 6.8.2 approval flag too.

/cvs/xorg/xc/ChangeLog,v  <--  ChangeLog
new revision: 1.585; previous revision: 1.584
/cvs/xorg/xc/lib/X11/ErrDes.c,v  <--  ErrDes.c
new revision: 1.4; previous revision: 1.3
/cvs/xorg/xc/doc/man/general/X.man,v  <--  X.man
new revision: 1.6; previous revision: 1.5
Comment 11 Alexander Gottwald 2005-07-05 02:07:02 UTC
The code is only used on WIN32. So there's no security problem on other OS

marking as fixed


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.