Commit b214c73b authored by Mike Gabriel's avatar Mike Gabriel

nxauth: Drop nxauth tool completely, xauth can be successfully used with nxagent / nxproxy instead.

parent a3a29528
......@@ -103,7 +103,7 @@ install-lite:
gzip $(DESTDIR)$(PREFIX)/share/man/man1/*.1
install-full:
for f in nxagent nxauth; do \
for f in nxagent; do \
$(INSTALL_PROGRAM) bin/$$f $(DESTDIR)$(BINDIR); done
for d in nxcompext nxcompshad; do \
$(MAKE) -C $$d install; done
......@@ -115,13 +115,10 @@ install-full:
$(INSTALL_FILE) nx-X11/programs/Xserver/Xext/SecurityPolicy $(DESTDIR)$(PREFIX)/share/nx
$(INSTALL_DIR) $(DESTDIR)$(NXLIBDIR)/bin
$(INSTALL_PROGRAM) nx-X11/programs/nxauth/nxauth $(DESTDIR)$(NXLIBDIR)/bin
$(INSTALL_PROGRAM) nx-X11/programs/Xserver/nxagent $(DESTDIR)$(NXLIBDIR)/bin
$(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/man/man1/
$(INSTALL_FILE) nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 $(DESTDIR)$(PREFIX)/share/man/man1/
$(INSTALL_FILE) nx-X11/programs/nxauth/nxauth.man $(DESTDIR)$(PREFIX)/share/man/man1/
mv -f $(DESTDIR)$(PREFIX)/share/man/man1/nxauth.man $(DESTDIR)$(PREFIX)/share/man/man1/nxauth.1
gzip $(DESTDIR)$(PREFIX)/share/man/man1/*.1
# create a clean nx-X11/.build-exports space
......@@ -180,7 +177,7 @@ uninstall-lite:
$(RM_DIR) $(DESTDIR)$(NXLIBDIR)/share/nx/
uninstall-full:
for f in nxagent nxauth; do \
for f in nxagent; do \
$(RM_FILE) $(DESTDIR)$(BINDIR)/$$f; done
$(RM_FILE) $(DESTDIR)$(PREFIX)/share/nx/VERSION.nxagent
......
......@@ -10,7 +10,7 @@ This package originally pulled in 7 source tarballs from NoMachine:
nx-X11
nxagent
nxauth
nxauth (discontinued in nx-libs)
nxcomp
nxcompshad
nxcompext
......
......@@ -430,6 +430,10 @@ Depends:
Recommends:
xfonts-base,
xkb-data,
Breaks:
nxauth,
Replaces:
nxauth,
Description: NX agent
NX is a software suite which implements very efficient
compression of the X11 protocol. This increases performance when
......@@ -473,12 +477,16 @@ Description: NX agent (debug package)
Package: nxproxy
Architecture: any
Breaks: qvd-nxproxy
Replaces: qvd-nxproxy
Multi-Arch: foreign
Depends:
${shlibs:Depends},
${misc:Depends},
Breaks:
qvd-nxproxy,
nxauth,
Replaces:
qvd-nxproxy,
nxauth,
Description: NX proxy
NX is a software suite which implements very efficient
compression of the X11 protocol. This increases performance when
......@@ -507,38 +515,6 @@ Description: NX proxy (debug package)
helpful backtraces. You can safely remove it if you do not intend to
debug NX packages on this system.
Package: nxauth
Architecture: any
Multi-Arch: foreign
Depends:
${shlibs:Depends},
${misc:Depends},
Description: NX xauth
NX is a software suite which implements very efficient
compression of the X11 protocol. This increases performance when
using X applications over a network, especially a slow one.
.
This package provides the NX xauth binary.
Package: nxauth-dbg
Section: debug
Architecture: any
Multi-Arch: foreign
Depends:
nxauth (= ${binary:Version}),
${misc:Depends},
Breaks: nx-x11-dbg (<< 2:3.5.0.29-1~),
Description: NX auth (debug package)
NX is a software suite which implements very efficient
compression of the X11 protocol. This increases performance when
using X applications over a network, especially a slow one.
.
This package provides the NX auth binary.
.
This package contains detached debug symbols that help generating more
helpful backtraces. You can safely remove it if you do not intend to
debug NX packages on this system.
Package: libxcomp3
Architecture: any
Multi-Arch: same
......
usr/bin
usr/lib/nx/bin
usr/lib/nx/bin/nxauth
usr/bin/nxauth
usr/share/man/man1/nxauth.1*
......@@ -63,5 +63,4 @@ override_dh_strip:
dh_strip -plibxcompext3 --dbg-package=libxcompext3-dbg
dh_strip -pnxagent --dbg-package=nxagent-dbg
dh_strip -pnxproxy --dbg-package=nxproxy-dbg
dh_strip -pnxauth --dbg-package=nxauth-dbg
......@@ -22,11 +22,7 @@
XSSRCDIR = Xserver
#endif
#if defined(NXEmbeddedXServer)
SUBDIRS = $(XSSRCDIR)
#else
SUBDIRS = $(XSSRCDIR) nxauth
#endif
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
ChangeLog:
nxauth-3.5.0-1
- Opened the 3.5.0 branch based on nxauth-3.4.0-3.
- Updated copyright to year 2011.
nxauth-3.4.0-3
- Updated the launchd socket detection to support OSX versions relea-
sed so far.
nxauth-3.4.0-2
- Updated copyright to year 2010.
nxauth-3.4.0-1
- Opened the 3.4.0 branch based on nxauth-3.3.0-1.
- Updated copyright to year 2009.
nxauth-3.3.0-1
- Opened the 3.3.0 branch based on nxauth-3.2.0-1.
nxauth-3.2.0-1
- Opened the 3.2.0 branch based on nxauth-3.1.0-2.
nxauth-3.1.0-2
- Added support for launchd socket.
nxauth-3.1.0-1
- Opened the 3.1.0 branch based on nxauth-3.0.0-6.
nxauth-3.0.0-6
- Updated the NoMachine copyright notice.
nxauth-3.0.0-5
- Changed the copyright attribution from Medialogic to NoMachine.
nxauth-3.0.0-4
- Changed the LICENSE file to state that the software is only made
available under the version 2 of the GPL.
- Added file COPYING.
nxauth-3.0.0-3
- Updated copyright notices to year 2007.
nxauth-3.0.0-2
- Imported changes up to nxauth-2.1.0-1.
- Ignoring lock on '.Xauthority' file.
- Using '__CYGWIN__' definition in process.c. 'WIN32' is not defined
during compilation under nx-X11 and wrong code block is used to
rename xauth temporary file.
nxauth-3.0.0-1
- Opened the 3.0.0 branch based on nxauth-2.0.0-2.
nxauth-2.0.0-2
- Updated the NoMachine copyright notices.
nxauth-2.0.0-1
- Opened the 2.0.0 branch based on the 1.6.0-1.
nxauth-1.6.0-1
- Opened the 1.6.0 branch based on nxauth-1.5.0-1.
nxauth-1.5.0-1
- Opened the 1.5.0 branch.
nxauth-1.4.1-1
- Opened the 1.4.1 branch.
nxauth-1.4.0-2
- Removed debug message 'host name is'.
nxauth-1.4.0-1
- Opened the 1.4.0 branch based on nxauth-1.3.2-1.
nxauth-1.3.2-1
- Opened the 1.3.2 branch.
nxauth-1.3.1-2
- Fixed problem with compilation on systems without
X11 includes instaled.
XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:54:11 cpqbld Exp $
XCOMM $XFree86: xc/programs/xauth/Imakefile,v 3.5 2001/03/30 02:15:23 keithp Exp $
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAUTH, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
/* software is allowed according to terms specified in the file LICENSE */
/* which comes in the source distribution. */
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
/**************************************************************************/
/* LOCAL_LIBRARIES = $(DESTDIR)$(SHLIBDIR)/libXau.a */
INCLUDES=-I../../lib
DEPLIBS = $(DEPXAUTHLIB)
LOCAL_LIBRARIES = $(XAUTHLIB)
SRCS = xauth.c gethost.c process.c parsedpy.c
OBJS = xauth.o gethost.o process.o parsedpy.o
CONN_DEFINES = $(CONNECTION_FLAGS)
ComplexProgramTarget(nxauth)
SpecialCObjectRule(gethost,$(ICONFIGFILES),$(CONN_DEFINES) $(SIGNAL_DEFINES))
SpecialCObjectRule(process,$(ICONFIGFILES),$(SIGNAL_DEFINES))
SpecialCObjectRule(parsedpy,$(ICONFIGFILES),$(CONN_DEFINES))
Copyright (c) 2001, 2010 NoMachine - http://www.nomachine.com/.
NXAUTH and NX extensions to X are copyright of NoMachine.
Redistribution and use of this software is allowed according to the
following terms:
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License Version 2, and
not any other version, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTA-
BILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, you can request a copy to NoMachine
or write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston, MA 02111-1307 USA
Parts of this software are derived from XFree86 project. Other copy-
rights and the MIT/X11 license applies to different sources. Please
check the applicable copyrights in each file or subdirectory.
All rights reserved.
/*
* $Xorg: gethost.c,v 1.5 2001/02/09 02:05:38 xorgcvs Exp $
*
*
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
* *
* Author: Jim Fulton, MIT X Consortium
*/
/* $XFree86: xc/programs/xauth/gethost.c,v 3.16 2001/12/14 20:01:14 dawes Exp $ */
/* sorry, streams support does not really work yet */
#if defined(STREAMSCONN) && defined(SVR4)
#undef STREAMSCONN
#define TCPCONN
#endif
#ifdef WIN32
#include <nx-X11/Xwinsock.h>
#define EPROTOTYPE WSAEPROTOTYPE
#endif
#include <nx-X11/X.h>
#include <signal.h>
#include <setjmp.h>
#include <ctype.h>
#ifndef __TYPES__
#include <sys/types.h>
#define __TYPES__
#endif
#ifndef WIN32
#ifndef STREAMSCONN
#ifndef Lynx
#include <sys/socket.h>
#else
#include <socket.h>
#endif
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#ifdef SYSV
#ifdef i386
#ifndef sco
#include <net/errno.h>
#endif /* !sco */
#endif /* i386 */
#endif /* SYSV */
#endif /* !STREAMSCONN */
#endif /* !WIN32 */
#include <errno.h>
#include "xauth.h"
#ifdef DNETCONN
#include <netdnet/dn.h>
#include <netdnet/dnetdb.h>
#endif
#ifdef SIGALRM
Bool nameserver_timedout = False;
/*
* get_hostname - Given an internet address, return a name (CHARON.MIT.EDU)
* or a string representing the address (18.58.0.13) if the name cannot
* be found. Stolen from xhost.
*/
static jmp_buf env;
static
#ifdef SIGNALRETURNSINT
int
#else
void
#endif
nameserver_lost(int sig)
{
nameserver_timedout = True;
longjmp (env, -1);
/* NOTREACHED */
#ifdef SIGNALRETURNSINT
return -1; /* for picky compilers */
#endif
}
#endif
char *
get_hostname (auth)
Xauth *auth;
{
static struct hostent *hp = NULL;
#ifdef DNETCONN
struct nodeent *np;
static char nodeaddr[4 + 2 * DN_MAXADDL];
#endif /* DNETCONN */
if (auth->address_length == 0)
return "Illegal Address";
#ifdef TCPCONN
if (auth->family == FamilyInternet) {
#ifdef SIGALRM
/* gethostbyaddr can take a LONG time if the host does not exist.
Assume that if it does not respond in NAMESERVER_TIMEOUT seconds
that something is wrong and do not make the user wait.
gethostbyaddr will continue after a signal, so we have to
jump out of it.
*/
nameserver_timedout = False;
signal (SIGALRM, nameserver_lost);
alarm (4);
if (setjmp(env) == 0) {
#endif
hp = gethostbyaddr (auth->address, auth->address_length, AF_INET);
#ifdef SIGALRM
}
alarm (0);
#endif
if (hp)
return (hp->h_name);
else
return (inet_ntoa(*((struct in_addr *)(auth->address))));
}
#endif
#ifdef DNETCONN
if (auth->family == FamilyDECnet) {
struct dn_naddr *addr_ptr = (struct dn_naddr *) auth->address;
if (np = getnodebyaddr(addr_ptr->a_addr, addr_ptr->a_len, AF_DECnet)) {
sprintf(nodeaddr, "%s:", np->n_name);
} else {
sprintf(nodeaddr, "%s:", dnet_htoa(auth->address));
}
return(nodeaddr);
}
#endif
return (NULL);
}
#ifdef TCPCONN
/*
* cribbed from lib/X/XConnDis.c
*/
static Bool
get_inet_address(char *name, unsigned int *resultp)
{
unsigned int hostinetaddr = inet_addr (name);
struct hostent *host_ptr;
struct sockaddr_in inaddr; /* dummy variable for size calcs */
#ifndef INADDR_NONE
#define INADDR_NONE -1
#endif
if (hostinetaddr == INADDR_NONE) {
if ((host_ptr = gethostbyname (name)) == NULL) {
/* No such host! */
errno = EINVAL;
return False;
}
/* Check the address type for an internet host. */
if (host_ptr->h_addrtype != AF_INET) {
/* Not an Internet host! */
errno = EPROTOTYPE;
return False;
}
memmove( (char *)&hostinetaddr, (char *)host_ptr->h_addr,
sizeof(inaddr.sin_addr));
}
*resultp = hostinetaddr;
return True;
}
#endif
#ifdef DNETCONN
static Bool get_dnet_address (name, resultp)
char *name;
struct dn_naddr *resultp;
{
struct dn_naddr *dnaddrp, dnaddr;
struct nodeent *np;
if (dnaddrp = dnet_addr (name)) { /* stolen from xhost */
dnaddr = *dnaddrp;
} else {
if ((np = getnodebyname (name)) == NULL) return False;
dnaddr.a_len = np->n_length;
memmove( dnaddr.a_addr, np->n_addr, np->n_length);
}
*resultp = dnaddr;
return True;
}
#endif
char *get_address_info (family, fulldpyname, prefix, host, lenp)
int family;
char *fulldpyname;
int prefix;
char *host;
int *lenp;
{
char *retval = NULL;
int len = 0;
char *src = NULL;
#ifdef TCPCONN
unsigned int hostinetaddr;
#endif
#ifdef DNETCONN
struct dn_naddr dnaddr;
#endif
char buf[255];
/*
* based on the family, set the pointer src to the start of the address
* information to be copied and set len to the number of bytes.
*/
switch (family) {
case FamilyLocal: /* hostname/unix:0 */
/* handle unix:0 and :0 specially */
if (prefix == 0 && (strncmp (fulldpyname, "unix:", 5) == 0 ||
fulldpyname[0] == ':')) {
if (!get_local_hostname (buf, sizeof buf)) {
len = 0;
} else {
src = buf;
len = strlen (buf);
}
} else {
src = fulldpyname;
len = prefix;
}
break;
case FamilyInternet: /* host:0 */
#ifdef TCPCONN
if (!get_inet_address (host, &hostinetaddr)) return NULL;
src = (char *) &hostinetaddr;
len = 4; /* sizeof inaddr.sin_addr, would fail on Cray */
break;
#else
return NULL;
#endif
case FamilyDECnet: /* host::0 */
#ifdef DNETCONN
if (!get_dnet_address (host, &dnaddr)) return NULL;
src = (char *) &dnaddr;
len = (sizeof dnaddr);
break;
#else
/* fall through since we don't have code for it */
#endif
default:
src = NULL;
len = 0;
}
/*
* if source was provided, allocate space and copy it
*/
if (len == 0 || !src) return NULL;
retval = malloc (len);
if (retval) {
memmove( retval, src, len);
*lenp = len;
}
return retval;
}
/*
* $Xorg: parsedpy.c,v 1.4 2001/02/09 02:05:38 xorgcvs Exp $
*
* parse_displayname - utility routine for splitting up display name strings
*
*
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
* *
* Author: Jim Fulton, MIT X Consortium
*/
/* $XFree86: xc/programs/xauth/parsedpy.c,v 3.6 2001/12/14 20:01:15 dawes Exp $ */
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAUTH, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
/* software is allowed according to terms specified in the file LICENSE */
/* which comes in the source distribution. */
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
/**************************************************************************/
#include <stdio.h> /* for NULL */
#include <ctype.h> /* for isascii() and isdigit() */
#include <nx-X11/Xos.h> /* for strchr() and string routines */
#include <nx-X11/Xlib.h> /* for Family contants */
#ifdef hpux
#include <sys/utsname.h> /* for struct utsname */
#endif
#include <nx-X11/Xauth.h> /* for FamilyLocal */
#if defined(UNIXCONN) || defined(LOCALCONN)
#define UNIX_CONNECTION "unix"
#define UNIX_CONNECTION_LENGTH 4
#endif
#include <stdlib.h>
#include "xauth.h"
#define PANIC
#define WARNING
#undef TEST
#undef DEBUG
/*
* private utility routines
*/
char *
copystring (char *src, int len)
{
char *cp;
if (!src && len != 0) return NULL;
cp = malloc (len + 1);
if (cp) {
if (src) strncpy (cp, src, len);
cp[len] = '\0';
}
return cp;
}
char *
get_local_hostname (char *buf, int maxlen)
{
buf[0] = '\0';
/*
(void) XmuGetHostname (buf, maxlen);
*/
/*FIXME*/
(void) gethostname (buf, maxlen);
buf [maxlen - 1] = '\0';
#ifdef TEST
printf("get_local_hostname: Host name is %s", buf);
#endif
return (buf[0] ? buf : NULL);
}
#ifndef UNIXCONN
static char *
copyhostname (void)
{
char buf[256];
return (get_local_hostname (buf, sizeof buf) ?
copystring (buf, strlen (buf)) : NULL);
}
#endif
/*
* parse_displayname - display a display string up into its component parts
*/
Bool
parse_displayname (char *displayname,
int *familyp, /* return */
char **hostp, /* return */
int *dpynump, /* return */
int *scrnump, /* return */
char **restp) /* return */
{
char *ptr; /* work variables */
int len; /* work variable */
int family = -1; /* value to be returned */
char *host = NULL; /* must free if set and error return */
int dpynum = -1; /* value to be returned */
int scrnum = 0; /* value to be returned */
char *rest = NULL; /* must free if set and error return */
Bool dnet = False; /* if true then using DECnet */
/* check the name */
if (!displayname || !displayname[0]) return False;
/* must have at least :number */
ptr = strchr(displayname, ':');
if (!ptr || !ptr[1]) return False;
if (ptr[1] == ':') {
if (ptr[2] == '\0') return False;
dnet = True;
}
/*
* get the host string; if none is given, use the most effiecient path
*/
len = (ptr - displayname); /* length of host name */
if (len == 0) { /* choose most efficient path */
#if defined(UNIXCONN) || defined(LOCALCONN)
host = copystring (UNIX_CONNECTION, UNIX_CONNECTION_LENGTH);
family = FamilyLocal;
#else
if (dnet) {
host = copystring ("0", 1);
family = FamilyDECnet;
} else {
host = copyhostname ();
family = FamilyInternet;
}
#endif
} else {
host = copystring (displayname, len);
if (dnet) {
family = dnet;
} else {
#if defined(UNIXCONN) || defined(LOCALCONN)
if (host && strcmp (host, UNIX_CONNECTION) == 0)
family = FamilyLocal;
else
#endif
family = FamilyInternet;
}
}
if (!host) return False;
/*
* get the display number; we know that there is something after the
* colon (or colons) from above. note that host is now set and must
* be freed if there is an error.
*/
if (dnet) ptr++; /* skip the extra DECnet colon */
ptr++; /* move to start of display num */
{
register char *cp;
for (cp = ptr; *cp && isascii(*cp) && isdigit(*cp); cp++) ;
len = (cp - ptr);
/* check present and valid follow */
if (len == 0 || (*cp && *cp != '.')) {
free (host);
return False;
}
dpynum = atoi (ptr); /* it will handle num. as well */
ptr = cp;
}
/*
* now get screen number if given; ptr may point to nul at this point
*/
if (ptr[0] == '.') {
register char *cp;
ptr++;
for (cp = ptr; *cp && isascii(*cp) && isdigit(*cp); cp++) ;
len = (cp - ptr);
if (len == 0 || (*cp && *cp != '.')) { /* all prop name */
free (host);
return False;
}
scrnum = atoi (ptr); /* it will handle num. as well */
ptr = cp;
}
/*
* and finally, get any additional stuff that might be following the
* the screen number; ptr must point to a period if there is anything
*/
if (ptr[0] == '.') {
ptr++;
len = strlen (ptr);
if (len > 0) {
rest = copystring (ptr, len);
if (!rest) {
free (host);
return False;
}
}
}
/*
* and we are done!
*/
*familyp = family;
*hostp = host;
*dpynump = dpynum;
*scrnump = scrnum;
*restp = rest;
return True;
}
/*
* $Xorg: xauth.c,v 1.4 2001/02/09 02:05:38 xorgcvs Exp $
*
* xauth - manipulate authorization file
*
*
Copyright 1989,1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
* *
* Author: Jim Fulton, MIT X Consortium
*/
/* $XFree86: xc/programs/xauth/xauth.c,v 1.5 2001/12/14 20:01:15 dawes Exp $ */
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAUTH, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
/* software is allowed according to terms specified in the file LICENSE */
/* which comes in the source distribution. */
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
/**************************************************************************/
#include "xauth.h"
/*
* global data
*/
char *ProgramName; /* argv[0], set at top of main() */
int verbose = -1; /* print certain messages */
Bool ignore_locks = True; /* for error recovery */
Bool break_locks = False; /* for error recovery */
/*
* local data
*/
static char *authfilename = NULL; /* filename of cookie file */
static char *defcmds[] = { "source", "-", NULL }; /* default command */
static int ndefcmds = 2;
static char *defsource = "(stdin)";
/*
* utility routines
*/
static void
usage(void)
{
static char *prefixmsg[] = {
"",
"where options include:",
" -f authfilename name of authority file to use",
" -v turn on extra messages",
" -q turn off extra messages",
" -i ignore locks on authority file",
" -b break locks on authority file",
"",
"and commands have the following syntax:",
"",
NULL };
static char *suffixmsg[] = {
"A dash may be used with the \"merge\" and \"source\" to read from the",
"standard input. Commands beginning with \"n\" use numeric format.",
"",
NULL };
char **msg;
fprintf (stderr, "usage: %s [-options ...] [command arg ...]\n",
ProgramName);
for (msg = prefixmsg; *msg; msg++) {
fprintf (stderr, "%s\n", *msg);
}
print_help (stderr, NULL, " "); /* match prefix indentation */
fprintf (stderr, "\n");
for (msg = suffixmsg; *msg; msg++) {
fprintf (stderr, "%s\n", *msg);
}
exit (1);
}
/*
* The main routine - parses command line and calls action procedures
*/
int
main(int argc, char *argv[])
{
int i;
char *sourcename = defsource;
char **arglist = defcmds;
int nargs = ndefcmds;
int status;
ProgramName = argv[0];
for (i = 1; i < argc; i++) {
char *arg = argv[i];
if (arg[0] == '-') {
char *flag;
for (flag = (arg + 1); *flag; flag++) {
switch (*flag) {
case 'f': /* -f authfilename */
if (++i >= argc) usage ();
authfilename = argv[i];
continue;
case 'v': /* -v */
verbose = 1;
continue;
case 'q': /* -q */
verbose = 0;
continue;
case 'b': /* -b */
break_locks = True;
continue;
case 'i': /* -i */
ignore_locks = True;
continue;
default:
usage ();
}
}
} else {
sourcename = "(argv)";
nargs = argc - i;
arglist = argv + i;
if (verbose == -1) verbose = 0;
break;
}
}
if (verbose == -1) { /* set default, don't junk stdout */
verbose = (isatty(fileno(stdout)) != 0);
}
if (!authfilename) {
authfilename = XauFileName (); /* static name, do not free */
if (!authfilename) {
fprintf (stderr,
"%s: unable to generate an authority file name\n",
ProgramName);
exit (1);
}
}
if (auth_initialize (authfilename) != 0) {
/* error message printed in auth_initialize */
exit (1);
}
status = process_command (sourcename, 1, nargs, arglist);
(void) auth_finalize ();
exit ((status != 0) ? 1 : 0);
}
/*
* $Xorg: xauth.h,v 1.4 2001/02/09 02:05:38 xorgcvs Exp $
*
*
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
* *
* Author: Jim Fulton, MIT X Consortium
*/
/* $XFree86: xc/programs/xauth/xauth.h,v 1.6 2001/12/14 20:01:15 dawes Exp $ */
#include <stdio.h>
#include <nx-X11/Xos.h>
#include <nx-X11/Xauth.h>
#include <nx-X11/Xfuncs.h>
#ifndef True
typedef int Bool;
#define False 0
#define True 1
#endif
extern char *ProgramName;
#include <stdlib.h>
extern char *get_hostname ( Xauth *auth );
extern char *get_address_info ( int family, char *fulldpyname, int prefix, char *host, int *lenp );
extern char *copystring ( char *src, int len );
extern char *get_local_hostname ( char *buf, int maxlen );
extern Bool parse_displayname ( char *displayname, int *familyp, char **hostp, int *dpynump, int *scrnump, char **restp );
extern int auth_initialize ( char *authfilename );
extern int auth_finalize ( void );
extern int process_command ( char *inputfilename, int lineno, int argc, char **argv );
extern int dump_numeric ( FILE *fp, Xauth *auth );
extern int print_help ( FILE *fp, char *cmd, char *prefix );
extern int verbose;
extern Bool ignore_locks;
extern Bool break_locks;
......@@ -391,18 +391,6 @@ related requests locally, ensuring that the most common source of
round-trips are nearly reduced to zero.
%package -n nxauth
Group: Applications/System
Summary: NX Auth
%description -n nxauth
NX is a software suite which implements very efficient compression of
the X11 protocol. This increases performance when using X
applications over a network, especially a slow one.
This package provides the NX xauth binary.
%package -n nxproxy
Group: Applications/System
Summary: NX Proxy
......@@ -669,13 +657,6 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans
%{_datadir}/nx/rgb
%{_datadir}/man/man1/nxagent.1*
%files -n nxauth
%defattr(-,root,root)
%{_bindir}/nxauth
%dir %{_libdir}/nx/bin
%{_libdir}/nx/bin/nxauth
%{_datadir}/man/man1/nxauth.1*
%files -n nxproxy
%defattr(-,root,root)
%{_bindir}/nxproxy
......
......@@ -100,7 +100,7 @@ if [ "x$MODE" = "xfull" ]; then
echo "${file##*/}" >> "doc/applied-patches/series"
done
else
rm -f "bin/"{nxagent,nxauth}
rm -f "bin/nxagent"
rm -Rf "nxcompshad"*
rm -Rf "nxcompext"*
rm -Rf "nx-X11"*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment