Bug 16356 - xdm Xstartup/Xreset configuration files malconstructed by cpp
Summary: xdm Xstartup/Xreset configuration files malconstructed by cpp
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: App/xdm (show other bugs)
Version: unspecified
Hardware: All NetBSD
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-14 22:50 UTC by David Sainty
Modified: 2008-08-04 19:07 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Trivial patch to fix config/Xstartup (439 bytes, patch)
2008-06-14 23:10 UTC, David Sainty
no flags Details | Splinter Review
Trivial patch to fix config/Xstartup (439 bytes, patch)
2008-06-14 23:10 UTC, David Sainty
no flags Details | Splinter Review
Trivial patch to fix config/Xreset (437 bytes, patch)
2008-06-14 23:11 UTC, David Sainty
no flags Details | Splinter Review

Description David Sainty 2008-06-14 22:50:54 UTC
Ever since:

http://gitweb.freedesktop.org/?p=xorg/app/xdm.git;a=commit;h=37f9293e3cc00411d8d335ce729d18995bb9ce59

... it looks like there has been a problem with the Xstartup and Xreset scripts.  Since the change has been around for a while now I assume that it does actually work on some platform with some cpp(1).  But not NetBSD, and not Linux.

The problem is that cpp(1) cares about the quotes.  So from the .ccp lines:

BINDIR/sessreg  -a -w "/var/log/wtmp" -u "/var/run/utmp" \
        -x "XDMCONFIGDIR/Xservers" -l $DISPLAY -h "" $USER

... you get:

/usr/local/bin/sessreg  -a -w "/var/log/wtmp" -u "/var/run/utmp"        -x "XDMCONFIGDIR/Xservers" -l $DISPLAY -h "" $USER

... where XDMCONFIGDIR was intended to be expanded.  Remove the quotes and you get:

/usr/local/bin/sessreg  -a -w "/var/log/wtmp" -u "/var/run/utmp"        -x /usr/
local/lib/X11/xdm/Xservers -l $DISPLAY -h "" $USER

I like the thought behind the quotes being there.  In fact, I don't really like $DISPLAY and $USER being unquoted!  But it is quite hard to fix this in cpp.

- It could be fixed with sed (what can't?)

- If the rule is "XDMCONFIGDIR can't include whitespace" then just removing the quotes is a solution.

The files in question are xdm-1.1.8/config/Xstartup.cpp and config/Xreset.cpp.
Comment 1 David Sainty 2008-06-14 23:10:11 UTC
Created attachment 17114 [details] [review]
Trivial patch to fix config/Xstartup
Comment 2 David Sainty 2008-06-14 23:10:47 UTC
Created attachment 17115 [details] [review]
Trivial patch to fix config/Xstartup
Comment 3 David Sainty 2008-06-14 23:11:14 UTC
Created attachment 17116 [details] [review]
Trivial patch to fix config/Xreset
Comment 4 David Sainty 2008-06-14 23:13:11 UTC
Comment on attachment 17115 [details] [review]
Trivial patch to fix config/Xstartup

What!?  Duplicate.  Nice one Bugzilla.
Comment 5 Alan Coopersmith 2008-08-04 19:07:23 UTC
Fix pushed to git master - sorry about that, and thanks for the fix.


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.