aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/os')
-rw-r--r--xorg-server/os/access.c5
-rw-r--r--xorg-server/os/utils.c55
2 files changed, 6 insertions, 54 deletions
diff --git a/xorg-server/os/access.c b/xorg-server/os/access.c
index 862d98a96..bce861d34 100644
--- a/xorg-server/os/access.c
+++ b/xorg-server/os/access.c
@@ -1123,6 +1123,11 @@ Bool LocalClient(ClientPtr client)
pointer addr;
register HOST *host;
+ if (!client->osPrivate)
+ return FALSE;
+ if (!((OsCommPtr)client->osPrivate)->trans_conn)
+ return FALSE;
+
if (!_XSERVTransGetPeerAddr (((OsCommPtr)client->osPrivate)->trans_conn,
&notused, &alen, &from))
{
diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c
index f3ecf781c..9919fba83 100644
--- a/xorg-server/os/utils.c
+++ b/xorg-server/os/utils.c
@@ -205,8 +205,6 @@ int auditTrailLevel = 1;
#define HAS_SAVED_IDS_AND_SETEUID
#endif
-static char *dev_tty_from_init = NULL; /* since we need to parse it anyway */
-
OsSigHandlerPtr
OsSignal(int sig, OsSigHandlerPtr handler)
{
@@ -892,8 +890,7 @@ ProcessCommandLine(int argc, char *argv[])
}
else if (strncmp (argv[i], "tty", 3) == 0)
{
- /* just in case any body is interested */
- dev_tty_from_init = argv[i];
+ /* init supplies us with this useless information */
}
#ifdef XDMCP
else if ((skip = XdmcpOptions(argc, argv, i)) != i)
@@ -1873,53 +1870,3 @@ error:
free(list);
return NULL;
}
-
-#ifdef __SCO__
-#include <fcntl.h>
-
-static void
-lockit (int fd, short what)
-{
- struct flock lck;
-
- lck.l_whence = 0;
- lck.l_start = 0;
- lck.l_len = 1;
- lck.l_type = what;
-
- (void)fcntl (fd, F_SETLKW, &lck);
-}
-
-/* SCO OpenServer 5 lacks pread/pwrite. Emulate them. */
-ssize_t
-pread (int fd, void *buf, size_t nbytes, off_t offset)
-{
- off_t saved;
- ssize_t ret;
-
- lockit (fd, F_RDLCK);
- saved = lseek (fd, 0, SEEK_CUR);
- lseek (fd, offset, SEEK_SET);
- ret = read (fd, buf, nbytes);
- lseek (fd, saved, SEEK_SET);
- lockit (fd, F_UNLCK);
-
- return ret;
-}
-
-ssize_t
-pwrite (int fd, const void *buf, size_t nbytes, off_t offset)
-{
- off_t saved;
- ssize_t ret;
-
- lockit (fd, F_WRLCK);
- saved = lseek (fd, 0, SEEK_CUR);
- lseek (fd, offset, SEEK_SET);
- ret = write (fd, buf, nbytes);
- lseek (fd, saved, SEEK_SET);
- lockit (fd, F_UNLCK);
-
- return ret;
-}
-#endif /* __SCO__ */