Re: Need an example Makefile for arealdap.c for Linux
It looks like I had to change the LICENSE_MASK in the arealdap.c code. I had to change the AREA_LICENSE_MASK_ALL to AREA_LICENSE_MASK_WRITE. /* * We found a match and either the password is good or * we are just processing information for notification * purposes. */ (*response)-licenseMask = AREA_LICENSE_MASK_WRITE; (*response)-licenseWrite = AR_LICENSE_TYPE_FLOATING; (*response)-licenseFTS = AR_LICENSE_TYPE_NONE; (*response)-licenseRes1 = AR_LICENSE_TYPE_NONE; ... On 4/8/08, Geoffrey Endresen [EMAIL PROTECTED] wrote: OK, I must be missing something. I got it to compile and run. It now returns OK in the plugin.log but returns this error to the user tool. ARERR [8922] The authentication service is not responding. Cannot connect to the system at this time. Contact your AR System Administrator for assistance. returns OK and the plugin died Server (pid:21564) died with 11. PLGN TID: -1233937488 RPC ID: 01 Queue: AREA Client-RPC: 390695 /* Tue Apr 08 2008 16:07:04.8098 */ +VL AREAVerifyLoginCallback -- user endresen END OF LOG FILE PLGN TID: -1233937488 RPC ID: 01 Queue: AREA Client-RPC: 390695 /* Tue Apr 08 2008 16:07:05.4189 */ -VL OK END OF LOG FILE PLGN TID: -1211276320 RPC ID: 00 Queue: Dispatcher Client-RPC: 00 /* Tue Apr 08 2008 16:07:05.4264 */ Plug-In Trace Log -- ON END OF LOG FILE -- -Geoff Endresen Amazon.com ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are
Re: Need an example Makefile for arealdap.c for Linux
Here's a follow-up question. I got my own copy to compile with the AR System 6.3 libraries on RHEL3. But the example ldap script does not actually work for me. I used the arealdap.c example and modified it. ARERR [623] Authentication failed Is there something else that needs to change to get the example to work I started with the example in ./api/src/area/ldap/arealdap.c I changed these lines in the arealdap.c file to make myarealdap.c #define MY_PORT LDAP_PORT #define MY_HOST localhost ! #define MY_PEOPLEBASE ou=People, o=amazon.com ! #define MY_GROUPBASEou=Groups, o=amazon.com - my compile steps and Makefile - sudo gcc -o myarealdap.o myarealdap.c -g -fPIC -malign-double -shared -lnsl -lpthread -I/opt/ar/remedy-app/api/include sudo make - Makefile --- # Parameters. PLUGIN = myarealdap.so OBJECTS = myarealdap.o RM = rm -f # Compiler flags. CC = gcc CFLAGS = -g -fPIC -malign-double -shared LDFLAGS = -shared CPPFLAGS = -I../../../include LDLIBS = -lnsl -lpthread # Standard targets. all: $(PLUGIN) $(PLUGIN): $(OBJECTS) $(CC) -o $(PLUGIN) $(OBJECTS) $(LDFLAGS) $(LDLIBS) clean: $(RM) $(PLUGIN) $(OBJECTS) core == arplugin.log == PLGN TID: -1233929296 RPC ID: 01 Queue: AREA Client-RPC: 390695 /* Tue Apr 08 2008 10:59:52.6636 */ +VL AREAVerifyLoginCallback -- user endresen END OF LOG FILE PLGN TID: -1233929296 RPC ID: 01 Queue: AREA Client-RPC: 390695 /* Tue Apr 08 2008 10:59:52.6643 */ -VLFAIL END OF LOG FILE ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are
Re: Need an example Makefile for arealdap.c for Linux
Your make is OK else the plug-in server would blow up. You will need to add logging to your plugin and perhaps increase the plugin log level (by lowering the number to 100). It looks like your plugin returned a fail code (ie the user was not authenticated). I am not familiar with the sample ldap plugin but have written many other AREA plugins. I always write to the log file within my code with something like this: sprintf(wa, AREAVerifyLoginCallback: Rsp: LicenseMask: %s, getLicMask((*response)-licenseMask)); if (Log) Log( (ARPluginIdentification *) kAreaId, AR_PLUGIN_LOG_FINE, wa); Finally, I compile my plug-in with an #ifdef'd main() so that I have a stand-alone executable that I can use for testing. The main() calls all of the plug-in functions as though it were ARS itself converting passed command line arguments into the plugin function call parameters. Cheers Ben _ From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Endresen Sent: April 8, 2008 8:14 PM To: arslist@ARSLIST.ORG Subject: Re: Need an example Makefile for arealdap.c for Linux ** Here's a follow-up question. I got my own copy to compile with the AR System 6.3 libraries on RHEL3. But the example ldap script does not actually work for me. I used the arealdap.c example and modified it. ARERR [623] Authentication failed Is there something else that needs to change to get the example to work I started with the example in ./api/src/area/ldap/arealdap.c I changed these lines in the arealdap.c file to make myarealdap.c #define MY_PORT LDAP_PORT #define MY_HOST localhost ! #define MY_PEOPLEBASE ou=People, o=amazon.com ! #define MY_GROUPBASEou=Groups, o=amazon.com - my compile steps and Makefile - sudo gcc -o myarealdap.o myarealdap.c -g -fPIC -malign-double -shared -lnsl -lpthread -I/opt/ar/remedy-app/api/include sudo make - Makefile --- # Parameters. PLUGIN = myarealdap.so OBJECTS = myarealdap.o RM = rm -f # Compiler flags. CC = gcc CFLAGS = -g -fPIC -malign-double -shared LDFLAGS = -shared CPPFLAGS = -I../../../include LDLIBS = -lnsl -lpthread # Standard targets. all: $(PLUGIN) $(PLUGIN): $(OBJECTS) $(CC) -o $(PLUGIN) $(OBJECTS) $(LDFLAGS) $(LDLIBS) clean: $(RM) $(PLUGIN) $(OBJECTS) core == arplugin.log == PLGN TID: -1233929296 RPC ID: 01 Queue: AREA Client-RPC: 390695 /* Tue Apr 08 2008 10:59:52.6636 */ +VL AREAVerifyLoginCallback -- user endresen END OF LOG FILE PLGN TID: -1233929296 RPC ID: 01 Queue: AREA Client-RPC: 390695 /* Tue Apr 08 2008 10:59:52.6643 */ -VL FAIL END OF LOG FILE __Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are html___ ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are
Re: Need an example Makefile for arealdap.c for Linux
I also have some helper functions for c plug-in logging here: http://arswiki.org/projects/arfprng/browser/trunk/lib Set up the pointer to the logging function: http://arswiki.org/projects/arfprng/browser/trunk/lib/arfprng.c#L48 http://arswiki.org/projects/arfprng/browser/trunk/lib/arfprng.c#L128 Call the log_fine function: http://arswiki.org/projects/arfprng/browser/trunk/lib/arfprng.c#L255 Then the log functions themselves: http://arswiki.org/projects/arfprng/browser/trunk/lib/logger.c http://arswiki.org/projects/arfprng/browser/trunk/lib/logger.h Calls look like this (function accepts parameters same as printf(3)): ret = log_fine (ARPluginTermination called...); if (ret == -1) return AR_RETURN_ERROR; Axton Grams On Tue, Apr 8, 2008 at 3:04 PM, Ben Chernys [EMAIL PROTECTED] wrote: ** Your make is OK else the plug-in server would blow up. You will need to add logging to your plugin and perhaps increase the plugin log level (by lowering the number to 100). It looks like your plugin returned a fail code (ie the user was not authenticated). I am not familiar with the sample ldap plugin but have written many other AREA plugins. I always write to the log file within my code with something like this: sprintf(wa, AREAVerifyLoginCallback: Rsp: LicenseMask: %s, getLicMask((*response)-licenseMask)); if (Log) Log( (ARPluginIdentification *) kAreaId, AR_PLUGIN_LOG_FINE, wa); Finally, I compile my plug-in with an #ifdef'd main() so that I have a stand-alone executable that I can use for testing. The main() calls all of the plug-in functions as though it were ARS itself converting passed command line arguments into the plugin function call parameters. Cheers Ben -- *From:* Action Request System discussion list(ARSList) [mailto: [EMAIL PROTECTED] *On Behalf Of *Geoffrey Endresen *Sent:* April 8, 2008 8:14 PM *To:* arslist@ARSLIST.ORG *Subject:* Re: Need an example Makefile for arealdap.c for Linux ** Here's a follow-up question. I got my own copy to compile with the AR System 6.3 libraries on RHEL3. But the example ldap script does not actually work for me. I used the arealdap.c example and modified it. ARERR [623] Authentication failed Is there something else that needs to change to get the example to work I started with the example in ./api/src/area/ldap/arealdap.c I changed these lines in the arealdap.c file to make myarealdap.c #define MY_PORT LDAP_PORT #define MY_HOST localhost ! #define MY_PEOPLEBASE ou=People, o=amazon.com ! #define MY_GROUPBASEou=Groups, o=amazon.com - my compile steps and Makefile - sudo gcc -o myarealdap.o myarealdap.c -g -fPIC -malign-double -shared -lnsl -lpthread -I/opt/ar/remedy-app/api/include sudo make - Makefile --- # Parameters. PLUGIN = myarealdap.so OBJECTS = myarealdap.o RM = rm -f # Compiler flags. CC = gcc CFLAGS = -g -fPIC -malign-double -shared LDFLAGS = -shared CPPFLAGS = -I../../../include LDLIBS = -lnsl -lpthread # Standard targets. all: $(PLUGIN) $(PLUGIN): $(OBJECTS) $(CC) -o $(PLUGIN) $(OBJECTS) $(LDFLAGS) $(LDLIBS) clean: $(RM) $(PLUGIN) $(OBJECTS) core == arplugin.log == PLGN TID: -1233929296 RPC ID: 01 Queue: AREA Client-RPC: 390695 /* Tue Apr 08 2008 10:59:52.6636 */ +VL AREAVerifyLoginCallback -- user endresen END OF LOG FILE PLGN TID: -1233929296 RPC ID: 01 Queue: AREA Client-RPC: 390695 /* Tue Apr 08 2008 10:59:52.6643 */ -VLFAIL END OF LOG FILE __Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are html___ __Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are html___ ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are
Re: Need an example Makefile for arealdap.c for Linux
OK, I must be missing something. I got it to compile and run. It now returns OK in the plugin.log but returns this error to the user tool. ARERR [8922] The authentication service is not responding. Cannot connect to the system at this time. Contact your AR System Administrator for assistance. returns OK and the plugin died Server (pid:21564) died with 11. PLGN TID: -1233937488 RPC ID: 01 Queue: AREA Client-RPC: 390695 /* Tue Apr 08 2008 16:07:04.8098 */ +VL AREAVerifyLoginCallback -- user endresen END OF LOG FILE PLGN TID: -1233937488 RPC ID: 01 Queue: AREA Client-RPC: 390695 /* Tue Apr 08 2008 16:07:05.4189 */ -VL OK END OF LOG FILE PLGN TID: -1211276320 RPC ID: 00 Queue: Dispatcher Client-RPC: 00 /* Tue Apr 08 2008 16:07:05.4264 */ Plug-In Trace Log -- ON END OF LOG FILE ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are
Re: Need an example Makefile for arealdap.c for Linux
http://arswiki.org/projects/arapi/browser/trunk/7.1/linux/src/area/skeleton/Makefile On Thu, Apr 3, 2008 at 6:47 PM, Geoffrey Endresen [EMAIL PROTECTED] wrote: ** Hackers, I must admit it's been about 2 years since I've compiled anything using gcc. Anyone have a default Make file for compiling the arealdap.c and creating my own arealdap.so file for Linux RHEL-3? -- -Geoff Endresen Amazon.com __Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are html___ ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are