fcea4da daemon: allow NULs in X11 cookie

Authored and Committed by rstrode 11 years ago
    daemon: allow NULs in X11 cookie
    
    We currently allow the slave access to its X server via two
    mechanisms:
    
    1) we set XAUTHORITY to point to the X servers Xauthority file
    2) we call XSetAuthorization with the cookie from the Xauthority file
    
    1) may fail if the user's hostname changes at the wrong moment, and
    a bug in the code meant that 2 would fail if NULs are encoded in the
    auth cookie.
    
    This commit fixes 2) to work with embedded NUL bytes.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=687691
    (cherry picked from commit eaabecd70f79c89f6bfd912557c0cbb7718d4c63)
    
        
file modified
+6 -1
file modified
+3 -1
file modified
+28 -10