[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#750469: xserver-wrapper.c's Errors Could Be More Specific.



Package: xorg
Version: 1:7.7+7

Package xorg is leaving error messages in log files, e.g.

    X: /tmp/.X11-unix has suspicious mode (not 1777) or is not a directory, aborting.

They're from debian/local/xserver-wrapper.c, so not upstream xorg, e.g.

    if ((statbuf.st_uid != 0) || (statbuf.st_gid != 0)) {
      (void) fprintf(stderr, "X: %s has suspicious ownership (not root:root), "
                     "aborting.\n", X_SOCKET_DIR);
      exit(1);
    }

    if (statbuf.st_mode != (S_IFDIR | X_SOCKET_DIR_MODE)) {
      (void) fprintf(stderr, "X: %s has suspicious mode (not %o) or is not a "
                     "directory, aborting.\n", X_SOCKET_DIR, X_SOCKET_DIR_MODE);
      exit(1);
    }

It would help a lot, given the number of times these errors appear on Google,
if the message included what the unexpected value(s) were, e.g.

    X: /tmp/.X11-unix has suspicious mode, 01755 is not 01777, aborting.
    X: /tmp/.X11-unix has suspicious ownership, 1000:0 is not 0:0, aborting.

(If the `%o' were `%#o' too then the error would make clear the numbers are
octal.)

It might seem that the user with the error can investigate further but
it's often a novice reporting the error and requesting help from others.
Stating both the expected and actual value, or the value of a symlink
that's deemed to point to one of a set of known filenames, would mean
the user's quotes are more complete and help those that come searching
afterwards.

So I'm suggesting the error messages in that file be checked and extra
information added where possible, e.g. the value of the symlink that's
invalid.

https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/622179 is some
earlier discussion.


Reply to: