summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:48:57 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:48:57 +0000
commitb05807f4088054b704dc8854ce08822bea72c161 (patch)
tree72ab513667548d3cfa07c71326538f3d6a630218
parentdffaba3a2b5c9ba6db9fc9d866f39647dfae7d08 (diff)
-rw-r--r--config.c8
-rw-r--r--main.c30
-rw-r--r--pmdb.c8
-rw-r--r--pmint.h41
-rw-r--r--proxymngr.man11
5 files changed, 57 insertions, 41 deletions
diff --git a/config.c b/config.c
index 7cc4f09..08787f6 100644
--- a/config.c
+++ b/config.c
@@ -25,13 +25,15 @@ 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.
*/
+/* $XFree86: xc/programs/proxymngr/config.c,v 1.7 2001/12/14 20:01:01 dawes Exp $ */
+
+#include <stdlib.h>
#include "pmint.h"
#include "config.h"
-
static Bool
-getline (
+getnextline (
char **pbuf,
int *plen,
FILE *f)
@@ -127,7 +129,7 @@ GetConfig (
buflen = 0;
n = strlen (serviceName);
- while (!found && getline (&buf, &buflen, fp))
+ while (!found && getnextline (&buf, &buflen, fp))
{
if (buf[0] == '!')
continue;
diff --git a/main.c b/main.c
index 2131092..ea23ab9 100644
--- a/main.c
+++ b/main.c
@@ -25,6 +25,7 @@ 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.
*/
+/* $XFree86: xc/programs/proxymngr/main.c,v 1.7 2001/12/19 21:37:35 dawes Exp $ */
#include <stdlib.h>
#include "pmint.h"
@@ -43,12 +44,14 @@ from The Open Group.
#include <sys/socket.h>
#include <netdb.h>
-void InstallIOErrorHandler ();
-void NewConnectionXtProc ();
-static Status PMprotocolSetupProc ();
-void PMReplyProcessMessages ();
-void PMSetupProcessMessages ();
-Bool HostBasedAuthProc ();
+static int PMprotocolSetupProc ( IceConn iceConn, int majorVersion,
+ int minorVersion, char *vendor,
+ char *release, IcePointer *clientDataRet,
+ char **failureReasonRet );
+static void SendGetProxyAddr ( PMconn *pmConn, char *serviceName,
+ char *serverAddress, char *hostAddress,
+ char *startOptions, int authLen,
+ char *authName, char *authData );
static int PMAcceptorOpcode;
static int PMOriginatorOpcode;
@@ -95,11 +98,8 @@ SetCloseOnExec (fd)
* Main program
*/
-main (argc, argv)
-
-int argc;
-char **argv;
-
+int
+main (int argc, char *argv[])
{
IceListenObj *listenObjs;
int numTransports, i;
@@ -207,6 +207,7 @@ char **argv;
* Main loop
*/
XtAppMainLoop (appContext);
+ exit (0);
}
@@ -498,7 +499,7 @@ Bool swap;
retVal = getpeername(IceConnectionNumber(iceConn),
(struct sockaddr *) &serverSock,
- &addrLen);
+ (void *) &addrLen);
if (!retVal)
{
struct hostent *hostent;
@@ -859,7 +860,7 @@ Bool swap;
fprintf(stderr, "Received ICE Error: class=0x%x\n offending minor opcode=%d, severity=%d, sequence=%d\n",
pMsg->errorClass, pMsg->offendingMinorOpcode, pMsg->severity,
- pMsg->offendingSequenceNum);
+ (int)pMsg->offendingSequenceNum);
IceDisposeCompleteMessage (iceConn, pStart);
@@ -903,7 +904,7 @@ ForwardRequest( requestor, serviceName, serverAddress, hostAddress,
char *authName, *authData;
{
running_proxy_list *proxyList;
- running_proxy *runningProxy;
+ running_proxy *runningProxy = NULL;
int pushRequest = 0;
if ((proxyList = GetRunningProxyList (
@@ -1029,7 +1030,6 @@ IcePointer *watch_data;
if (opening)
{
XtAppContext appContext = (XtAppContext) client_data;
- void _XtProcessIceMsgProc ();
*watch_data = (IcePointer) XtAppAddInput (
appContext,
diff --git a/pmdb.c b/pmdb.c
index 67842ed..21a6cde 100644
--- a/pmdb.c
+++ b/pmdb.c
@@ -25,12 +25,14 @@ 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.
*/
+/* $XFree86: xc/programs/proxymngr/pmdb.c,v 1.7 2001/12/14 20:01:02 dawes Exp $ */
#include "pmint.h"
#include "pmdb.h"
#include "config.h"
#include <assert.h>
#include <stdio.h>
+#include <stdlib.h>
#include <signal.h>
#if defined(X_NOT_POSIX) && defined(SIGNALRETURNSINT)
@@ -38,14 +40,14 @@ from The Open Group.
#else
#define SIGVAL void
#endif
+typedef SIGVAL (*Signal_Handler)(int);
void SetCloseOnExec (int fd);
static proxy_service *proxyServiceList = NULL;
-SIGVAL (*Signal (sig, handler))()
- int sig;
- SIGVAL (*handler)();
+static Signal_Handler
+Signal (int sig, Signal_Handler handler)
{
#ifndef X_NOT_POSIX
struct sigaction sigact, osigact;
diff --git a/pmint.h b/pmint.h
index cd43127..f355285 100644
--- a/pmint.h
+++ b/pmint.h
@@ -25,12 +25,14 @@ 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.
*/
+/* $XFree86: xc/programs/proxymngr/pmint.h,v 1.5 2001/12/14 20:01:02 dawes Exp $ */
#include <stdio.h>
#include <X11/Xos.h>
#include <X11/Xfuncs.h>
#include <X11/Xmd.h>
#include <X11/ICE/ICElib.h>
+#include <X11/Intrinsic.h>
#define Status int
#define Bool int
@@ -51,23 +53,28 @@ typedef struct {
char *release;
} PMconn;
-extern void
-SendGetProxyAddrReply (
- PMconn* /* requestor */,
- int /* status */,
- char* /* addr */,
- char* /* error */);
-
-extern void
-ForwardRequest(
- PMconn* /* requestor */,
- char* /* serviceName */,
- char* /* serverAddress */,
- char* /* hostAddress */,
- char* /* startOptions */,
- int /* authLen */,
- char* /* authName */,
- char* /* authData */);
+
+/* config.c: $TOG: config.c /main/12 1998/02/09 13:45:22 kaleb $ */
+
+extern int GetConfig ( char *configFile, char *serviceName, int *managed, char **startCommand, char **proxyAddress );
+
+/* main.c: $TOG: main.c /main/36 1998/03/04 11:30:05 barstow $ */
+
+extern void ForwardRequest ( PMconn *requestor, char *serviceName, char *serverAddress, char *hostAddress, char *startOptions, int authLen, char *authName, char *authData );
+extern int HostBasedAuthProc ( char *hostname );
+extern int InitWatchProcs ( XtAppContext appContext );
+extern void InstallIOErrorHandler ( void );
+extern int main ( int argc, char **argv );
+extern void MyIoErrorHandler ( IceConn ice_conn );
+extern void NewConnectionXtProc ( XtPointer client_data, int *source, XtInputId *id );
+extern void PMReplyProcessMessages ( IceConn iceConn, IcePointer clientData, int opcode, unsigned long length, int swap );
+extern void PMSetupProcessMessages ( IceConn iceConn, IcePointer clientData, int opcode, unsigned long length, int swap, IceReplyWaitInfo *replyWait, int *replyReadyRet );
+extern void SendGetProxyAddrReply ( PMconn *requestor, int status, char *addr, char *error );
+extern void SetCloseOnExec ( int fd );
+extern void Usage ( void );
+extern void _XtIceWatchProc ( IceConn ice_conn, IcePointer client_data, int opening, IcePointer *watch_data );
+extern void _XtProcessIceMsgProc ( XtPointer client_data, int *source, XtInputId *id );
+
/*
diff --git a/proxymngr.man b/proxymngr.man
index 0129d7f..901f62b 100644
--- a/proxymngr.man
+++ b/proxymngr.man
@@ -23,7 +23,10 @@
.\" other dealings in this Software without prior written authorization
.\" from The Open Group.
.\"
-.TH PROXYMNGR 1 "Release 6.4" "X Version 11"
+.\"
+.\" $XFree86: xc/programs/proxymngr/proxymngr.man,v 1.8 2003/02/20 03:27:32 dawes Exp $
+.\"
+.TH PROXYMNGR 1 __xorgversion__
.SH NAME
proxymngr - proxy manager service
.SH SYNOPSIS
@@ -73,7 +76,9 @@ requests are received and proxies are started.
.PP
The proxy manager maintains a local configuration file describing the proxy
services available. This configuration file is installed
-in /usr/X11R6.4/lib/X11/proxymngr/pmconfig during the installation
+in
+.I __projectroot__/lib/X11/proxymngr/pmconfig
+during the installation
of proxymngr. The location of the configuration file can be overwritten using
the \fB\-config\fP command line option.
.PP
@@ -125,7 +130,7 @@ Here is a sample configuration file:
! or
! <serviceName> unmanaged <proxyAddress>
!
-lbx managed /usr/X11R6.4/bin/lbxproxy
+lbx managed __projectroot__/bin/lbxproxy
!
! substitute site-specific info
xfwp unmanaged firewall:4444