Enable TIRPC support for Linux
This is enabled by default. To disable, add: in the config/cf/site.def or host.def file. You will need to have the libtirpc-dev package installed. The benefit is that you will no longer need to run rpcbind in insecure mode (the -i option). There are other benefits we may be able to take advantage of in the future, like supporting IPV6 for ToolTalk.
This commit is contained in:
@@ -5,6 +5,8 @@ XCOMM $TOG: Imakefile /main/8 1999/08/30 14:33:22 mgreess $
|
||||
SUBDIRS = dbck shell scripts tt_type_comp \
|
||||
ttauth ttdbserverd ttsession tttar tttrace
|
||||
|
||||
INCLUDES = $(TIRPCINC)
|
||||
|
||||
MakeSubdirs($(SUBDIRS))
|
||||
DependSubdirs($(SUBDIRS))
|
||||
LintSubdirs($(SUBDIRS))
|
||||
|
||||
@@ -9,7 +9,7 @@ EXTRA_LOAD_FLAGS = ExtraLoadFlags $(UNSHARED_CXXLIB)
|
||||
#include "../../tooltalk.tmpl"
|
||||
|
||||
DEFINES =
|
||||
INCLUDES = -I. -I../../slib -I../../lib -I../../mini_isam
|
||||
INCLUDES = $(TIRPCINC) -I. -I../../slib -I../../lib -I../../mini_isam
|
||||
|
||||
DEPLIBS = ../../slib/libstt.a TtClientDepLibs ../../mini_isam/libisam.a
|
||||
LOCAL_LIBRARIES = ../../slib/libstt.a TtClientLibs ../../mini_isam/libisam.a
|
||||
|
||||
@@ -5,6 +5,7 @@ XCOMM $XConsortium: Imakefile /main/4 1996/04/21 19:11:31 drk $
|
||||
/* Any shell scripts shipped as part of ToolTalk are collected here. */
|
||||
|
||||
PROGRAMS = ttce2xdr
|
||||
INCLUDES = $(TIRPCINC)
|
||||
|
||||
all:: $(PROGRAMS)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ EXTRA_LOAD_FLAGS = ExtraLoadFlags $(UNSHARED_CXXLIB)
|
||||
#include "../../tooltalk.tmpl"
|
||||
|
||||
DEFINES =
|
||||
INCLUDES = -I. -I../../lib
|
||||
INCLUDES = $(TIRPCINC) -I. -I../../lib
|
||||
|
||||
DEPLIBS = TtClientDepLibs
|
||||
LOCAL_LIBRARIES = TtClientLibs
|
||||
|
||||
@@ -9,7 +9,7 @@ EXTRA_LOAD_FLAGS = ExtraLoadFlags $(UNSHARED_CXXLIB)
|
||||
#include "../../tooltalk.tmpl"
|
||||
|
||||
DEFINES =
|
||||
INCLUDES = -I../../lib -I../../slib
|
||||
INCLUDES = $(TIRPCINC) -I../../lib -I../../slib
|
||||
|
||||
DEPLIBS = ../../slib/libstt.a TtClientDepLibs
|
||||
LOCAL_LIBRARIES = ../../slib/libstt.a TtClientLibs
|
||||
|
||||
@@ -5,7 +5,7 @@ XCOMM $TOG: Imakefile /main/1 1999/08/30 10:44:56 mgreess $
|
||||
|
||||
DEFINES =
|
||||
CONN_DEFINES = ConnectionFlags
|
||||
INCLUDES = -I. -I../../slib -I../../lib
|
||||
INCLUDES = $(TIRPCINC) -I. -I../../slib -I../../lib
|
||||
|
||||
DEPLIBS = TtClientDepLibs
|
||||
LOCAL_LIBRARIES = TtClientLibs
|
||||
|
||||
@@ -8,8 +8,8 @@ EXTRA_LOAD_FLAGS = ExtraLoadFlags $(UNSHARED_CXXLIB)
|
||||
|
||||
#include "../../tooltalk.tmpl"
|
||||
|
||||
DEFINES =
|
||||
INCLUDES = -I. -I../../slib -I../../lib -I../../mini_isam
|
||||
DEFINES = $(TIRPC_DEFINES)
|
||||
INCLUDES = $(TIRPCINC) -I. -I../../slib -I../../lib -I../../mini_isam
|
||||
|
||||
DEPLIBS = ../../slib/libstt.a TtClientDepLibs ../../mini_isam/libisam.a
|
||||
LOCAL_LIBRARIES = ../../slib/libstt.a TtClientLibs ../../mini_isam/libisam.a
|
||||
|
||||
@@ -2105,12 +2105,13 @@ bool_t msg_q_lock(int isfd, const char *record, int length, SVCXPRT *transp)
|
||||
// (with a 16 byte key, the rec length must be at least 31)
|
||||
if ((length > 30) && !memcmp(record+16, "_TT_QUEUED_MSGS", 15)) {
|
||||
// Get the address of the client
|
||||
#if defined(OPT_TLI)
|
||||
#if defined(OPT_TLI) || defined(OPT_TIRPC)
|
||||
netbuf *client_address = svc_getrpccaller(transp);
|
||||
_Tt_string client_id(client_address->len);
|
||||
memcpy((char *)client_id, client_address->buf, client_address->len);
|
||||
#else
|
||||
struct sockaddr_in *client_address = svc_getcaller(transp);
|
||||
|
||||
_Tt_string client_id(sizeof(struct in_addr));
|
||||
memcpy( (char *)client_id, &client_address->sin_addr,
|
||||
sizeof(struct in_addr) );
|
||||
@@ -2129,7 +2130,7 @@ bool_t msg_q_lock(int isfd, const char *record, int length, SVCXPRT *transp)
|
||||
// (with a 16 byte key, the rec length must be at least 27)
|
||||
else if ((length > 26) && !memcmp(record+16, "_TT_MSG_", 8)) {
|
||||
// Get the address of the client
|
||||
#if defined(OPT_TLI)
|
||||
#if defined(OPT_TLI) || defined(OPT_TIRPC)
|
||||
netbuf *client_address = svc_getrpccaller(transp);
|
||||
_Tt_string client_id(client_address->len);
|
||||
(void)memcpy((char *)client_id, client_address->buf, client_address->len);
|
||||
|
||||
@@ -9,7 +9,7 @@ EXTRA_LOAD_FLAGS = ExtraLoadFlags $(UNSHARED_CXXLIB)
|
||||
#include "../../tooltalk.tmpl"
|
||||
|
||||
DEFINES =
|
||||
INCLUDES = -I. -I../../slib -I../../lib
|
||||
INCLUDES = $(TIRPCINC) -I. -I../../slib -I../../lib
|
||||
|
||||
DEPLIBS = ../../slib/libstt.a TtClientDepLibs
|
||||
LOCAL_LIBRARIES = ../../slib/libstt.a TtClientLibs
|
||||
|
||||
@@ -9,7 +9,7 @@ EXTRA_LOAD_FLAGS = ExtraLoadFlags $(UNSHARED_CXXLIB)
|
||||
#include "../../tooltalk.tmpl"
|
||||
|
||||
DEFINES =
|
||||
INCLUDES = -I. -I../../lib
|
||||
INCLUDES = $(TIRPCINC) -I. -I../../lib
|
||||
|
||||
DEPLIBS = ../../slib/libstt.a TtClientDepLibs ../../mini_isam/libisam.a
|
||||
LOCAL_LIBRARIES = ../../slib/libstt.a TtClientLibs ../../mini_isam/libisam.a
|
||||
|
||||
@@ -9,7 +9,7 @@ EXTRA_LOAD_FLAGS = ExtraLoadFlags $(UNSHARED_CXXLIB)
|
||||
#include "../../tooltalk.tmpl"
|
||||
|
||||
DEFINES =
|
||||
INCLUDES = -I. -I../../lib
|
||||
INCLUDES = $(TIRPCINC) -I. -I../../lib
|
||||
|
||||
DEPLIBS = TtClientDepLibs
|
||||
LOCAL_LIBRARIES = TtClientLibs
|
||||
|
||||
Reference in New Issue
Block a user