From c076f68b37380418c859fda619ef78554a13927f Mon Sep 17 00:00:00 2001 From: Juan Carlos Luciani Date: Thu, 5 Oct 2006 21:25:00 +0000 Subject: [PATCH] Finished the auth token client port to Linux and made some minor makefile system maintenance. --- CASA-auth-token/non-java/client/engine.c | 2 +- .../non-java/client/linux/Makefile.am | 7 +++++-- .../non-java/client/linux/platform.c | 20 +++++++++++-------- CASA-auth-token/non-java/client/linux/rpc.c | 12 +++++------ .../krb5/linux/Krb5Authenticate_lib64.conf | 12 +++++++++++ .../client/mechanisms/krb5/linux/Makefile.am | 14 ++++++++++--- .../client/mechanisms/krb5/linux/get.c | 5 +++-- .../client/mechanisms/pwd/linux/Makefile.am | 14 ++++++++++--- .../pwd/linux/PwdAuthenticate_lib64.conf | 12 +++++++++++ .../non-java/client/mechanisms/pwd/util.c | 2 +- .../linux/CASA_auth_token_native.changes | 5 +++++ .../linux/CASA_auth_token_native.spec.in | 20 ++++++++++--------- .../ApacheSupport/2.2/linux/Makefile.am | 8 +++++--- .../AuthTokenValidate/Svc/linux/Makefile.am | 11 ++++++---- .../casa/linux/CasaIdentityToken.conf | 2 +- .../casa/linux/CasaIdentityToken_lib64.conf | 15 ++++++++++++++ .../idenTokenProviders/casa/linux/Makefile.am | 17 +++++++++++++--- .../AuthTokenValidate/linux/Makefile.am | 6 +++--- .../IpcLibs/linux/client/Makefile.am | 10 +++++++--- .../IpcLibs/linux/server/Makefile.am | 10 +++++++--- 20 files changed, 149 insertions(+), 55 deletions(-) create mode 100644 CASA-auth-token/non-java/client/mechanisms/krb5/linux/Krb5Authenticate_lib64.conf create mode 100644 CASA-auth-token/non-java/client/mechanisms/pwd/linux/PwdAuthenticate_lib64.conf create mode 100644 CASA-auth-token/non-java/server/AuthTokenValidate/idenTokenProviders/casa/linux/CasaIdentityToken_lib64.conf diff --git a/CASA-auth-token/non-java/client/engine.c b/CASA-auth-token/non-java/client/engine.c index d3467a01..f902aa08 100644 --- a/CASA-auth-token/non-java/client/engine.c +++ b/CASA-auth-token/non-java/client/engine.c @@ -41,7 +41,7 @@ InitializeLibrary(void); // // Debug tracing level // -int DebugLevel = 3; +int DebugLevel = 0; // // Operating parameter diff --git a/CASA-auth-token/non-java/client/linux/Makefile.am b/CASA-auth-token/non-java/client/linux/Makefile.am index b81ed378..6668e29b 100644 --- a/CASA-auth-token/non-java/client/linux/Makefile.am +++ b/CASA-auth-token/non-java/client/linux/Makefile.am @@ -23,8 +23,10 @@ if DEBUG TARGET_CFG = Debug CFLAGS += -v -w +DEFINES = -DDBG else TARGET_CFG = Release +DEFINES = -DNDEBUG endif SUBDIRS = @@ -59,11 +61,12 @@ CFILES = ../authmech.c \ CSFILES_CSC := INCLUDES = -I. -I.. -I../../include RESOURCES = -DEFINES = -fno-strict-aliasing + if LIB64 DEFINES += -D_LIB64 endif -CFLAGS += $(INCLUDES) $(DEFINES) + +CFLAGS += -Wno-format-extra-args -fno-strict-aliasing $(INCLUDES) $(DEFINES) LIBS = -lpthread -ldl -lexpat -lcurl -lidn -lssl -lcrypto -lz -lmicasa LDFLAGS = -Bsymbolic -shared -Wl,-soname=$(MODULE_NAME).$(MODULE_EXT) -L$(ROOT)/lib/$(TARGET_CFG) diff --git a/CASA-auth-token/non-java/client/linux/platform.c b/CASA-auth-token/non-java/client/linux/platform.c index d61fd2f1..fbbb9cbe 100644 --- a/CASA-auth-token/non-java/client/linux/platform.c +++ b/CASA-auth-token/non-java/client/linux/platform.c @@ -140,6 +140,7 @@ Local_sem_open(const char *pathname, int oflag, ... ) // modifications from W. Richard Stevens book: UNIX Network // Programming, Interprocess Communications (Printed in 1999). // +// L2 //=======================================================================-- { int i, fd, semflag, semid, save_errno; @@ -245,6 +246,7 @@ Local_sem_wait(Local_sem_t *sem) // modifications from W. Richard Stevens book: UNIX Network // Programming, Interprocess Communications (Printed in 1999). // +// L2 //=======================================================================-- { struct sembuf op; @@ -278,6 +280,7 @@ Local_sem_post(Local_sem_t *sem) // modifications from W. Richard Stevens book: UNIX Network // Programming, Interprocess Communications (Printed in 1999). // +// L2 //=======================================================================-- { struct sembuf op; @@ -310,6 +313,7 @@ Local_sem_close(Local_sem_t *sem) // modifications from W. Richard Stevens book: UNIX Network // Programming, Interprocess Communications (Printed in 1999). // +// L2 //=======================================================================-- { if (sem->sem_magic != SEM_MAGIC) { @@ -335,7 +339,7 @@ GetTickCount(void) // // Notes: // -// L1 +// L2 //=======================================================================-- { struct tms tm; @@ -349,7 +353,7 @@ GetTickCount(void) long ticksPerSecond; ticksPerSecond = sysconf(_SC_CLK_TCK); - DbgTrace(0, "-GetTickCount- TicksPerSec = %0X\n", ticksPerSecond); + DbgTrace(3, "-GetTickCount- TicksPerSec = %0X\n", ticksPerSecond); g_milliSecondsPerTicks = 1000 / ticksPerSecond; } @@ -376,7 +380,7 @@ CreateUserMutex( // // Notes: // -// L1 +// L2 //=======================================================================-- { CasaStatus retStatus = CasaStatusBuild(CASA_SEVERITY_ERROR, @@ -385,7 +389,7 @@ CreateUserMutex( DbgTrace(1, "-CreateUserMutex- Start\n", 0); - // We use Posix Named Semaphores to provide this functionality. The semaphore names are + // We use Named Semaphores to provide this functionality. The semaphore names are // linked to the user via its uid. if (sprintf(g_userNamedSemName, "/var/lib/CASA/authtoken/semuser_%d", geteuid()) != -1) { @@ -428,7 +432,7 @@ AcquireUserMutex( // // Notes: // -// L1 +// L2 //=======================================================================-- { DbgTrace(2, "-AcquireUserMutex- Start\n", 0); @@ -460,7 +464,7 @@ ReleaseUserMutex( // // Notes: // -// L1 +// L2 //=======================================================================-- { DbgTrace(2, "-ReleaseUserMutex- Start\n", 0); @@ -492,7 +496,7 @@ DestroyUserMutex( // // Notes: // -// L1 +// L2 //=======================================================================-- { DbgTrace(2, "-DestroyUserMutex- Start\n", 0); @@ -620,7 +624,7 @@ NormalizeHostName( // // Notes: // -// L1 +// L2 //=======================================================================-- { char *pNormalizedName = NULL; diff --git a/CASA-auth-token/non-java/client/linux/rpc.c b/CASA-auth-token/non-java/client/linux/rpc.c index c7e7cf97..245fcb8d 100644 --- a/CASA-auth-token/non-java/client/linux/rpc.c +++ b/CASA-auth-token/non-java/client/linux/rpc.c @@ -55,7 +55,7 @@ CurlWriteCallback( // // Notes: // -// L0 +// L2 //=======================================================================-- { size_t dataConsumed = numDataItems; @@ -124,7 +124,7 @@ OpenRpcSession( // // Notes: // -// L0 +// L2 //=======================================================================-- { RpcSession *pSession; @@ -263,7 +263,7 @@ CloseRpcSession( // // Notes: // -// L1 +// L2 //=======================================================================-- { DbgTrace(1, "-CloseRpcSession- Start\n", 0); @@ -307,7 +307,7 @@ InternalRpc( // // Notes: // -// L1 +// L2 //=======================================================================-- { CasaStatus retStatus; @@ -323,7 +323,7 @@ InternalRpc( *ppResponseData = NULL; *pResponseDataLen = 0; - // Setup the final URL using the input parameters + // Setup the URL using the input parameters if (secure) { pPartialUrl = pSession->pPartialHttpsUrl; @@ -505,7 +505,7 @@ InitializeRpc(void) // // Notes: // -// L0 +// L2 //=======================================================================-- { CasaStatus retStatus; diff --git a/CASA-auth-token/non-java/client/mechanisms/krb5/linux/Krb5Authenticate_lib64.conf b/CASA-auth-token/non-java/client/mechanisms/krb5/linux/Krb5Authenticate_lib64.conf new file mode 100644 index 00000000..c1bc0bb6 --- /dev/null +++ b/CASA-auth-token/non-java/client/mechanisms/krb5/linux/Krb5Authenticate_lib64.conf @@ -0,0 +1,12 @@ +####################################################### +# # +# CASA Authentication Token System configuration file # +# for module: # +# # +# Krb5Authenticate # +# # +####################################################### + +LibraryName /usr/lib64/CASA/authtoken/krb5mech.so + + diff --git a/CASA-auth-token/non-java/client/mechanisms/krb5/linux/Makefile.am b/CASA-auth-token/non-java/client/mechanisms/krb5/linux/Makefile.am index bc5c8040..0dc23daf 100644 --- a/CASA-auth-token/non-java/client/mechanisms/krb5/linux/Makefile.am +++ b/CASA-auth-token/non-java/client/mechanisms/krb5/linux/Makefile.am @@ -23,8 +23,10 @@ if DEBUG TARGET_CFG = Debug CFLAGS += -v -w +DEFINES = -DDBG else TARGET_CFG = Release +DEFINES = -DNDEBUG endif SUBDIRS = @@ -52,18 +54,23 @@ CFILES = get.c \ CSFILES_CSC := INCLUDES = -I. -I.. -I../../.. -I$(ROOT)/include RESOURCES = -DEFINES = -fno-strict-aliasing + +DEST_CONF_FILE_NAME = Krb5Authenticate.conf if LIB64 DEFINES += -D_LIB64 +SRC_CONF_FILE_NAME = Krb5Authenticate_lib64.conf +else +SRC_CONF_FILE_NAME = Krb5Authenticate.conf endif -CFLAGS += $(INCLUDES) $(DEFINES) + +CFLAGS += -Wno-format-extra-args -fno-strict-aliasing $(INCLUDES) $(DEFINES) LIBS = -lpthread -lc -lgssapi LDFLAGS = -Bsymbolic -shared -Wl,-soname=$(MODULE_NAME).$(MODULE_EXT) -L$(ROOT)/lib/$(TARGET_CFG) OBJDIR = ./$(TARGET_CFG)/$(LIB) OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o)) -EXTRA_DIST = $(CFILES) *.h Krb5Authenticate.conf +EXTRA_DIST = $(CFILES) *.h Krb5Authenticate.conf Krb5Authenticate_lib64.conf CUR_DIR := $(shell pwd) @@ -85,6 +92,7 @@ $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(OBJS) @echo [======== Linking $@ ========] $(LINK) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(LIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT) + cp -f $(SRC_CONF_FILE_NAME) $(LIBDIR)/$(TARGET_CFG)/$(DEST_CONF_FILE_NAME) $(OBJDIR): [ -d $(OBJDIR) ] || mkdir -p $(OBJDIR) diff --git a/CASA-auth-token/non-java/client/mechanisms/krb5/linux/get.c b/CASA-auth-token/non-java/client/mechanisms/krb5/linux/get.c index 07edfa49..d1459ddf 100644 --- a/CASA-auth-token/non-java/client/mechanisms/krb5/linux/get.c +++ b/CASA-auth-token/non-java/client/mechanisms/krb5/linux/get.c @@ -165,7 +165,7 @@ AuthTokenIf_GetAuthToken( // Description: // Get authentication token to authenticate user to specified service. // -// L0 +// L2 //=======================================================================-- { CasaStatus retStatus; @@ -241,7 +241,8 @@ AuthTokenIf_GetAuthToken( char *pEncodedToken; int encodedTokenLen; - // The security context was initialized, now return it to the caller after base64 encoding it. + // The security context was initialized, now return the token to the + // caller after base64 encoding it. retStatus = EncodeData(gssSendToken.value, gssSendToken.length, &pEncodedToken, diff --git a/CASA-auth-token/non-java/client/mechanisms/pwd/linux/Makefile.am b/CASA-auth-token/non-java/client/mechanisms/pwd/linux/Makefile.am index 889d8385..372511f1 100644 --- a/CASA-auth-token/non-java/client/mechanisms/pwd/linux/Makefile.am +++ b/CASA-auth-token/non-java/client/mechanisms/pwd/linux/Makefile.am @@ -23,8 +23,10 @@ if DEBUG TARGET_CFG = Debug CFLAGS += -v -w +DEFINES = -DDBG else TARGET_CFG = Release +DEFINES = -DNDEBUG endif SUBDIRS = @@ -52,18 +54,23 @@ CFILES = ../get.c \ CSFILES_CSC := INCLUDES = -I. -I.. -I../../.. -I$(ROOT)/include RESOURCES = -DEFINES = -fno-strict-aliasing + +DEST_CONF_FILE_NAME = PwdAuthenticate.conf if LIB64 DEFINES += -D_LIB64 +SRC_CONF_FILE_NAME = PwdAuthenticate_lib64.conf +else +SRC_CONF_FILE_NAME = PwdAuthenticate.conf endif -CFLAGS += $(INCLUDES) $(DEFINES) + +CFLAGS += -Wno-format-extra-args -fno-strict-aliasing $(INCLUDES) $(DEFINES) LIBS = -lpthread -lmicasa LDFLAGS = -Bsymbolic -shared -Wl,-soname=$(MODULE_NAME).$(MODULE_EXT) -L$(ROOT)/lib/$(TARGET_CFG) OBJDIR = ./$(TARGET_CFG)/$(LIB) OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o)) -EXTRA_DIST = $(CFILES) *.h PwdAuthenticate.conf +EXTRA_DIST = $(CFILES) *.h PwdAuthenticate.conf PwdAuthenticate_lib64.conf CUR_DIR := $(shell pwd) @@ -85,6 +92,7 @@ $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(OBJS) @echo [======== Linking $@ ========] $(LINK) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(LIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT) + cp -f $(SRC_CONF_FILE_NAME) $(LIBDIR)/$(TARGET_CFG)/$(DEST_CONF_FILE_NAME) $(OBJDIR): [ -d $(OBJDIR) ] || mkdir -p $(OBJDIR) diff --git a/CASA-auth-token/non-java/client/mechanisms/pwd/linux/PwdAuthenticate_lib64.conf b/CASA-auth-token/non-java/client/mechanisms/pwd/linux/PwdAuthenticate_lib64.conf new file mode 100644 index 00000000..f0435d9c --- /dev/null +++ b/CASA-auth-token/non-java/client/mechanisms/pwd/linux/PwdAuthenticate_lib64.conf @@ -0,0 +1,12 @@ +####################################################### +# # +# CASA Authentication Token System configuration file # +# for module: # +# # +# PwdAuthenticate # +# # +####################################################### + +LibraryName /usr/lib64/CASA/authtoken/pwmech.so + + diff --git a/CASA-auth-token/non-java/client/mechanisms/pwd/util.c b/CASA-auth-token/non-java/client/mechanisms/pwd/util.c index 9cea7357..90454c7a 100644 --- a/CASA-auth-token/non-java/client/mechanisms/pwd/util.c +++ b/CASA-auth-token/non-java/client/mechanisms/pwd/util.c @@ -33,7 +33,7 @@ //===[ Global variables ]================================================== // Debug Level -int DebugLevel = 3; +int DebugLevel = 0; // Tables for Base64 encoding and decoding static const int8_t g_Base64[] = diff --git a/CASA-auth-token/non-java/package/linux/CASA_auth_token_native.changes b/CASA-auth-token/non-java/package/linux/CASA_auth_token_native.changes index a0264268..68e948f1 100644 --- a/CASA-auth-token/non-java/package/linux/CASA_auth_token_native.changes +++ b/CASA-auth-token/non-java/package/linux/CASA_auth_token_native.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Oct 5 15:21:39 MDT 2006 - jluciani@novell.com + +- Ported the client to Linux and created the CASA_auth_token_client package. + ------------------------------------------------------------------- Mon Oct 2 11:47:16 MDT 2006 - jluciani@novell.com diff --git a/CASA-auth-token/non-java/package/linux/CASA_auth_token_native.spec.in b/CASA-auth-token/non-java/package/linux/CASA_auth_token_native.spec.in index ad854a64..a844bea8 100644 --- a/CASA-auth-token/non-java/package/linux/CASA_auth_token_native.spec.in +++ b/CASA-auth-token/non-java/package/linux/CASA_auth_token_native.spec.in @@ -202,15 +202,15 @@ install -d -m 755 %{buildroot}/etc/CASA/authtoken.d/client.d/mechanisms.d ## CASA_auth_token_native ## # Libs install -m 755 %{_lib}/%{cfg}/libcasa_s_authtoken.so %{buildroot}%{prefix}/%{_lib}/libcasa_s_authtoken.so.%{bldno} -install -m 755 %{_lib}/%{cfg}/casa_iden_token.so %{buildroot}%{prefix}/%{_lib}/casa_iden_token.so.%{bldno} +install -m 755 %{_lib}/%{cfg}/casa_iden_token.so %{buildroot}%{prefix}/%{_lib}/CASA/authtoken/casa_iden_token.so.%{bldno} install -m 755 %{_lib}/%{cfg}/libcasa_c_ipc.so %{buildroot}%{prefix}/%{_lib}/libcasa_c_ipc.so.%{bldno} install -m 755 %{_lib}/%{cfg}/libcasa_s_ipc.so %{buildroot}%{prefix}/%{_lib}/libcasa_s_ipc.so.%{bldno} # Lib Symbolic Links ln -sf libcasa_s_authtoken.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_s_authtoken.so ln -sf libcasa_s_authtoken.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_s_authtoken.so.1 -ln -sf casa_iden_token.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/casa_iden_token.so -ln -sf casa_iden_token.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/casa_iden_token.so.1 +ln -sf casa_iden_token.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/CASA/authtoken/casa_iden_token.so +ln -sf casa_iden_token.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/CASA/authtoken/casa_iden_token.so.1 ln -sf libcasa_c_ipc.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_c_ipc.so ln -sf libcasa_c_ipc.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_c_ipc.so.1 ln -sf libcasa_s_ipc.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_s_ipc.so @@ -220,7 +220,7 @@ ln -sf libcasa_s_ipc.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_s_ipc.so. install -m 755 bin/%{cfg}/CasaAuthtokenValidateD %{buildroot}%{prefix}/bin/casa_atvd # Others -install -m 644 server/AuthTokenValidate/idenTokenProviders/casa/linux/CasaIdentityToken.conf %{buildroot}/etc/CASA/authtoken.d/modules.d/CasaIdentityToken.conf +install -m 644 %{_lib}/%{cfg}/CasaIdentityToken.conf %{buildroot}/etc/CASA/authtoken.d/modules.d/CasaIdentityToken.conf install -m 755 server/AuthTokenValidate/Svc/linux/CasaAuthtokenValidateD %{buildroot}/etc/init.d/casa_atvd install -m 750 server/AuthTokenValidate/Svc/linux/envvars %{buildroot}/etc/CASA/authtoken.d/validate.d/ ln -sf casa_atvd %{buildroot}%{prefix}/sbin/rccasa_atvd @@ -241,8 +241,8 @@ ln -sf pwmech.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/CASA/authtoken/pwmech.so # Others install -m 644 client/client.conf %{buildroot}/etc/CASA/authtoken.d/client.d/client.conf -install -m 644 client/mechanisms/krb5/linux/Krb5Authenticate.conf %{buildroot}/etc/CASA/authtoken.d/client.d/mechanisms.d/Krb5Authenticate.conf -install -m 644 client/mechanisms/pwd/linux/PwdAuthenticate.conf %{buildroot}/etc/CASA/authtoken.d/client.d/mechanisms.d/PwdAuthenticate.conf +install -m 644 %{_lib}/%{cfg}/Krb5Authenticate.conf %{buildroot}/etc/CASA/authtoken.d/client.d/mechanisms.d/Krb5Authenticate.conf +install -m 644 %{_lib}/%{cfg}/PwdAuthenticate.conf %{buildroot}/etc/CASA/authtoken.d/client.d/mechanisms.d/PwdAuthenticate.conf ## CASA_auth_token_pam_support ## # Libs @@ -312,6 +312,8 @@ rm -rf /var/lib/CASA/authtoken/validate %files %defattr(-,root,root) +%dir %{prefix}/%{_lib}/CASA +%dir %{prefix}/%{_lib}/CASA/authtoken %dir /var/lib/CASA %dir /var/lib/CASA/authtoken %dir %attr(-, casaatvd, casaauth) /var/lib/CASA/authtoken/validate @@ -322,9 +324,9 @@ rm -rf /var/lib/CASA/authtoken/validate %{prefix}/%{_lib}/libcasa_s_authtoken.so.%{bldno} %{prefix}/%{_lib}/libcasa_s_authtoken.so %{prefix}/%{_lib}/libcasa_s_authtoken.so.1 -%{prefix}/%{_lib}/casa_iden_token.so.%{bldno} -%{prefix}/%{_lib}/casa_iden_token.so -%{prefix}/%{_lib}/casa_iden_token.so.1 +%{prefix}/%{_lib}/CASA/authtoken/casa_iden_token.so.%{bldno} +%{prefix}/%{_lib}/CASA/authtoken/casa_iden_token.so +%{prefix}/%{_lib}/CASA/authtoken/casa_iden_token.so.1 %{prefix}/%{_lib}/libcasa_c_ipc.so.%{bldno} %{prefix}/%{_lib}/libcasa_c_ipc.so %{prefix}/%{_lib}/libcasa_c_ipc.so.1 diff --git a/CASA-auth-token/non-java/server/ApacheSupport/2.2/linux/Makefile.am b/CASA-auth-token/non-java/server/ApacheSupport/2.2/linux/Makefile.am index 4f61eb80..04bcce2e 100644 --- a/CASA-auth-token/non-java/server/ApacheSupport/2.2/linux/Makefile.am +++ b/CASA-auth-token/non-java/server/ApacheSupport/2.2/linux/Makefile.am @@ -29,8 +29,6 @@ TARGET_CFG = Release DEFINES = -DNDEBUG endif -CFLAGS += -Wno-format-extra-args -fno-strict-aliasing - SUBDIRS = DIST_SUBDIRS = @@ -58,7 +56,11 @@ CSFILES_CSC := INCLUDES = -I. -I$(ROOT)/include -I$(APACHEINCLUDE) -I$(APRINCLUDE) RESOURCES = -CFLAGS += $(INCLUDES) $(DEFINES) -D_LARGEFILE64_SOURCE +if LIB64 +DEFINES += -D_LIB64 +endif + +CFLAGS += -Wno-format-extra-args -fno-strict-aliasing $(INCLUDES) $(DEFINES) -D_LARGEFILE64_SOURCE LIBS = -lpthread -lcasa_s_authtoken -lapr-1 -laprutil-1 LDFLAGS = -Bsymbolic -shared -Wl,-soname=$(MODULE_NAME).$(MODULE_EXT) -L$(LIBDIR)/$(TARGET_CFG) -L$(APACHELIB) -L$(APRLIB) -Xlinker diff --git a/CASA-auth-token/non-java/server/AuthTokenValidate/Svc/linux/Makefile.am b/CASA-auth-token/non-java/server/AuthTokenValidate/Svc/linux/Makefile.am index 4009fa98..c0328f44 100644 --- a/CASA-auth-token/non-java/server/AuthTokenValidate/Svc/linux/Makefile.am +++ b/CASA-auth-token/non-java/server/AuthTokenValidate/Svc/linux/Makefile.am @@ -29,8 +29,6 @@ TARGET_CFG = Release DEFINES = -DNDEBUG endif -CFLAGS += -Wno-format-extra-args -fno-strict-aliasing -fshort-wchar - # Override the link setting for C++ LINK = g++ @@ -57,8 +55,13 @@ CPPFILES = server.cpp CSFILES_CSC := INCLUDES = -I. -I$(ROOT)/include -I$(JAVA_INCDIR) RESOURCES = -CFLAGS += $(INCLUDES) $(DEFINES) -CPPFLAGS += -fPIC $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) + +if LIB64 +DEFINES += -D_LIB64 +endif + +CFLAGS += -Wno-format-extra-args -fno-strict-aliasing $(INCLUDES) $(DEFINES) +CPPFLAGS += -Wno-format-extra-args -fno-strict-aliasing -fPIC $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) LIBS = -lpthread -lcasa_s_ipc -ljvm -ljsig -lj9thr23 LDFLAGS = -L$(LIBDIR)/$(TARGET_CFG) -L$(JAVA_LIBDIR) -L$(JAVA_LIBDIR)/classic diff --git a/CASA-auth-token/non-java/server/AuthTokenValidate/idenTokenProviders/casa/linux/CasaIdentityToken.conf b/CASA-auth-token/non-java/server/AuthTokenValidate/idenTokenProviders/casa/linux/CasaIdentityToken.conf index 35a6d6a2..656bd9d6 100644 --- a/CASA-auth-token/non-java/server/AuthTokenValidate/idenTokenProviders/casa/linux/CasaIdentityToken.conf +++ b/CASA-auth-token/non-java/server/AuthTokenValidate/idenTokenProviders/casa/linux/CasaIdentityToken.conf @@ -10,6 +10,6 @@ # # ####################################################### -LibraryName /usr/lib/casa_iden_token.so +LibraryName /usr/lib/CASA/authtoken/casa_iden_token.so diff --git a/CASA-auth-token/non-java/server/AuthTokenValidate/idenTokenProviders/casa/linux/CasaIdentityToken_lib64.conf b/CASA-auth-token/non-java/server/AuthTokenValidate/idenTokenProviders/casa/linux/CasaIdentityToken_lib64.conf new file mode 100644 index 00000000..b377307b --- /dev/null +++ b/CASA-auth-token/non-java/server/AuthTokenValidate/idenTokenProviders/casa/linux/CasaIdentityToken_lib64.conf @@ -0,0 +1,15 @@ +####################################################### +# # +# CASA Authentication Token System configuration file # +# for module: # +# # +# CasaIdentityToken # +# # +# Note: This module is the provider of Casa Identity # +# tokens. # +# # +####################################################### + +LibraryName /usr/lib64/CASA/authtoken/casa_iden_token.so + + diff --git a/CASA-auth-token/non-java/server/AuthTokenValidate/idenTokenProviders/casa/linux/Makefile.am b/CASA-auth-token/non-java/server/AuthTokenValidate/idenTokenProviders/casa/linux/Makefile.am index 5f5c67b7..1124f371 100644 --- a/CASA-auth-token/non-java/server/AuthTokenValidate/idenTokenProviders/casa/linux/Makefile.am +++ b/CASA-auth-token/non-java/server/AuthTokenValidate/idenTokenProviders/casa/linux/Makefile.am @@ -23,8 +23,10 @@ if DEBUG TARGET_CFG = Debug CFLAGS += -v -w +DEFINES = -DDBG else TARGET_CFG = Release +DEFINES = -DNDEBUG endif SUBDIRS = @@ -54,15 +56,23 @@ CFILES = ../identokenprovider.c \ CSFILES_CSC := INCLUDES = -I. -I.. -I../../.. -I$(CASAINCLUDE) -I../../../../../include RESOURCES = -DEFINES = -fno-strict-aliasing -CFLAGS += $(INCLUDES) $(DEFINES) + +DEST_CONF_FILE_NAME = CasaIdentityToken.conf +if LIB64 +DEFINES += -D_LIB64 +SRC_CONF_FILE_NAME = CasaIdentityToken_lib64.conf +else +SRC_CONF_FILE_NAME = CasaIdentityToken.conf +endif + +CFLAGS += -Wno-format-extra-args -fno-strict-aliasing $(INCLUDES) $(DEFINES) LIBS = -lpthread -ldl -lexpat LDFLAGS = -Bsymbolic -shared -Wl,-soname=$(MODULE_NAME).$(MODULE_EXT) OBJDIR = ./$(TARGET_CFG)/$(LIB) OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o)) -EXTRA_DIST = $(CFILES) *.h CasaIdentityToken.conf +EXTRA_DIST = $(CFILES) *.h CasaIdentityToken.conf CasaIdentityToken_lib64.conf CUR_DIR := $(shell pwd) @@ -84,6 +94,7 @@ $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(OBJS) @echo [======== Linking $@ ========] $(LINK) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(LIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT) + cp -f $(SRC_CONF_FILE_NAME) $(LIBDIR)/$(TARGET_CFG)/$(DEST_CONF_FILE_NAME) $(OBJDIR): [ -d $(OBJDIR) ] || mkdir -p $(OBJDIR) diff --git a/CASA-auth-token/non-java/server/AuthTokenValidate/linux/Makefile.am b/CASA-auth-token/non-java/server/AuthTokenValidate/linux/Makefile.am index c63f2577..7a4f57ed 100644 --- a/CASA-auth-token/non-java/server/AuthTokenValidate/linux/Makefile.am +++ b/CASA-auth-token/non-java/server/AuthTokenValidate/linux/Makefile.am @@ -29,8 +29,6 @@ TARGET_CFG = Release DEFINES = -DNDEBUG endif -CFLAGS += -Wno-format-extra-args -fno-strict-aliasing - SUBDIRS = DIST_SUBDIRS = @@ -59,10 +57,12 @@ CFILES = ../config.c \ CSFILES_CSC := INCLUDES = -I. -I.. -I$(CASAINCLUDE) -I../../../include RESOURCES = + if LIB64 DEFINES += -D_LIB64 endif -CFLAGS += $(INCLUDES) $(DEFINES) + +CFLAGS += -Wno-format-extra-args -fno-strict-aliasing $(INCLUDES) $(DEFINES) LIBS = -lpthread -ldl LDFLAGS = -Bsymbolic -shared -Wl,-soname=$(MODULE_NAME).$(MODULE_EXT) -L$(ROOT)/lib/$(TARGET_CFG) diff --git a/CASA-auth-token/non-java/utilities/IpcLibs/linux/client/Makefile.am b/CASA-auth-token/non-java/utilities/IpcLibs/linux/client/Makefile.am index ada38918..53c41a45 100644 --- a/CASA-auth-token/non-java/utilities/IpcLibs/linux/client/Makefile.am +++ b/CASA-auth-token/non-java/utilities/IpcLibs/linux/client/Makefile.am @@ -61,9 +61,13 @@ COMMONCPPFILES = channelproto.cpp CSFILES_CSC := INCLUDES = -I. -I.. -I../common -I../../../../include RESOURCES = -DEFINES += -Wno-format-extra-args -fno-strict-aliasing -fshort-wchar -CFLAGS += $(INCLUDES) $(DEFINES) -CPPFLAGS += -fPIC $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) + +if LIB64 +DEFINES += -D_LIB64 +endif + +CFLAGS += -Wno-format-extra-args -fno-strict-aliasing -fshort-wchar $(INCLUDES) $(DEFINES) +CPPFLAGS += -Wno-format-extra-args -fno-strict-aliasing -fshort-wchar -fPIC $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) LIBS = -lpthread LDFLAGS = -Bsymbolic -shared -Wl,-soname=$(MODULE_NAME).$(MODULE_EXT) diff --git a/CASA-auth-token/non-java/utilities/IpcLibs/linux/server/Makefile.am b/CASA-auth-token/non-java/utilities/IpcLibs/linux/server/Makefile.am index c5dceb3e..5119d0b0 100644 --- a/CASA-auth-token/non-java/utilities/IpcLibs/linux/server/Makefile.am +++ b/CASA-auth-token/non-java/utilities/IpcLibs/linux/server/Makefile.am @@ -61,9 +61,13 @@ COMMONCPPFILES = channelproto.cpp CSFILES_CSC := INCLUDES = -I. -I.. -I../common -I../../../../include RESOURCES = -DEFINES += -Wno-format-extra-args -fno-strict-aliasing -fshort-wchar -CFLAGS += $(INCLUDES) $(DEFINES) -CPPFLAGS += -fPIC $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) + +if LIB64 +DEFINES += -D_LIB64 +endif + +CFLAGS += -Wno-format-extra-args -fno-strict-aliasing -fshort-wchar $(INCLUDES) $(DEFINES) +CPPFLAGS += -Wno-format-extra-args -fno-strict-aliasing -fshort-wchar -fPIC $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) LIBS = -lpthread LDFLAGS = -Bsymbolic -shared -Wl,-soname=$(MODULE_NAME).$(MODULE_EXT)