TRANS_NOXAUTH
Jeremy Huddleston
jeremyhu at freedesktop.org
Tue Aug 5 19:09:21 PDT 2008
I've added a new connection flag to xtrans to use with our launchd
sockets to disable checking xauth handshaking. The diff in the server
pretty much boils down to what's below. Should I go ahead and commit
it to master, or should I throw some #ifdef __APPLE__ around it? It's
not exactly apple-specific, but it does require an updated xtrans for
the TRANS_NOXAUTH.
--Jeremy
--- a/os/connection.c
+++ b/os/connection.c
@@ -707,12 +707,11 @@ ClientAuthorized(ClientPtr client,
saddr = (struct sockaddr *) (trans_conn->addr);
/* Allow any client to connect without authorization on a launchd
socket,
because it is securely created -- this prevents a race
condition on launch */
- if (saddr->sa_len > 11 && saddr->sa_family == AF_UNIX &&
- !strncmp(saddr->sa_data, "/tmp/launch", 11)) goto done;
-#endif
-
- auth_id = CheckAuthorization (proto_n, auth_proto,
- string_n, auth_string, client, &reason);
+ if(trans_conn->flags | TRANS_NOXAUTH) {
+ auth_id = (XID) 0L;
+ } else {
+ auth_id = CheckAuthorization (proto_n, auth_proto, string_n,
auth_string, client, &reason);
+ }
if (auth_id == (XID) ~0L)
{
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3040 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20080805/51c63b8a/attachment.bin>
More information about the xorg
mailing list