diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2007-09-19 07:25:55 -0400 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil> | 2007-09-19 07:25:55 -0400 |
commit | 97c150b61bbe436453b05d3c07cd2173870aac40 (patch) | |
tree | 5335d0df93703e7ca8617cfae57315709d032a29 /os/connection.c | |
parent | 57907e0943da0c3fd3bf6c128d210b544629ce72 (diff) | |
parent | 547ad2125ece93bbe01f6d09a3baf176ebd16bb3 (diff) |
Merge branch 'master' into XACE-SELINUX
Conflicts:
afb/afbpntwin.c
afb/afbscrinit.c
afb/afbwindow.c
cfb/cfb.h
cfb/cfballpriv.c
cfb/cfbscrinit.c
cfb/cfbwindow.c
configure.ac
fb/wfbrename.h
hw/xfree86/xf4bpp/ppcIO.c
hw/xfree86/xf4bpp/ppcPntWin.c
hw/xfree86/xf4bpp/ppcWindow.c
hw/xfree86/xf8_32bpp/cfbscrinit.c
mfb/mfb.h
mfb/mfbpntwin.c
mfb/mfbscrinit.c
mfb/mfbwindow.c
mi/miexpose.c
Note: conflicts caused by devPrivates rework vs. paintwindow changes.
Diffstat (limited to 'os/connection.c')
-rw-r--r-- | os/connection.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/os/connection.c b/os/connection.c index afe392c66..3d9d2e919 100644 --- a/os/connection.c +++ b/os/connection.c @@ -74,6 +74,9 @@ SOFTWARE. #define TRANS_SERVER #define TRANS_REOPEN #include <X11/Xtrans/Xtrans.h> +#ifdef HAVE_LAUNCHD +#include <X11/Xtrans/Xtransint.h> +#endif #include <errno.h> #include <signal.h> #include <stdio.h> @@ -657,10 +660,21 @@ ClientAuthorized(ClientPtr client, XID auth_id; char *reason = NULL; XtransConnInfo trans_conn; +#ifdef HAVE_LAUNCHD + struct sockaddr *saddr; +#endif priv = (OsCommPtr)client->osPrivate; trans_conn = priv->trans_conn; +#ifdef HAVE_LAUNCHD + 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); @@ -710,6 +724,7 @@ ClientAuthorized(ClientPtr client, } } priv->auth_id = auth_id; + done: priv->conn_time = 0; #ifdef XDMCP |