diff options
author | marha <marha@users.sourceforge.net> | 2010-06-23 07:03:58 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-06-23 07:03:58 +0000 |
commit | 345335d61c71c245846d679d568a8b5eca1a5ca9 (patch) | |
tree | 7b878ae84134fa091dd2bdc2695251e609209ebe /xorg-server/os | |
parent | fbbbbe88405440920f4baa5a3107ec0b9a6f8cb7 (diff) | |
parent | c356d5298f18cd103ef7caad015d98d2022044ac (diff) | |
download | vcxsrv-345335d61c71c245846d679d568a8b5eca1a5ca9.tar.gz vcxsrv-345335d61c71c245846d679d568a8b5eca1a5ca9.tar.bz2 vcxsrv-345335d61c71c245846d679d568a8b5eca1a5ca9.zip |
svn merge "^/branches/released" .
Diffstat (limited to 'xorg-server/os')
-rw-r--r-- | xorg-server/os/access.c | 5 | ||||
-rw-r--r-- | xorg-server/os/utils.c | 55 |
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,
¬used, &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__ */
|