Bug 2906

Summary: startx doesn't check device existence of /dev/urandom
Product: xorg Reporter: arundel <arundel>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: high CC: arundel, matthieu.herrb
Version: 6.8.2   
Hardware: x86 (IA32)   
OS: FreeBSD   
URL: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/73743
Whiteboard:
i915 platform: i915 features:

Description arundel 2005-04-05 09:18:59 UTC
The following is a problem-report that was send to www.freebsd.org (modified):

>xorg starts with the following error message:
>"xauth: (stdin):1:  bad add command line"
>This error gets caused by the startx script. In order to
>generate a hexkey (MIT-MAGIC-COOKIE-1) for the xauth entry
>in ~/.Xauthority it uses /dev/urandom. If random
>(urandom -> random [symlink under FreeBSD-STABLE]) is not present (kernel or
>kld), the device
>node is missing and `xauth add` will fail due to a missing hexkey.

>This problem is probably also being caused by any previous
>Xorg and XFree86 port version and very likely appears on all
>FreeBSD RELENGs that use `devd` instead of the MAKEDEV system (>=RELENG_5).
>Since `sh MAKEDEV all` on older systems should take care of
>/dev/random and the link to /dev/urandom it should also be possible
>to delete the device node from /dev and experience the very same
>problems, as in RELENG_5 and higher.

This problem should occur on any OS that has a kernel that can be compiled
without a static /dev/urandom or /dev/random device. Under FreeBSD (maybe other
*BSDs) that device can be loaded from a kernel module.

It would be very nice if the startx script could check for the device existence
of /dev/urandom or /dev/random before it issues the xauth command. The error
message above is very confusing for people dealing with this problem and trying
to solve it.
Comment 1 Daniel Stone 2007-02-27 01:26:05 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 2 Adam Jackson 2008-07-11 14:32:01 UTC
startx does this now.

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.