Five command procedures are provided, CNTLM_INSTALL.COM, CNTLM_STARTUP.COM, CNTLM_SHUTDOWN.COM, MAKEVMS.COM and CNTLM_MAKEKIT.COM.
Six header files are provided, most importantly CONFIG.H, which contains some build options and missing defines and typedefs. STDINT.H includes INTTYPES.H. SYSLOG.H is a copy of a Linux syslog.h, and includes the function prototypes for openlog, syslog and closelog, all implemented in IMITATE_SYSLOG.C. TERMIOS.H defines fork to nonsense, implements a rudimentary termios structure and fnmatch to a wrapper function around decc$match_wild in IMITATE_SYSLOG.C SELECT.H and FNMATCH.H are empty.
IMITATE_SYSLOG.C contains the stub pre for fork, fnmatch, syslog and opcom functions.
CNTLM.HLP and VMSPORT.HLP contain the CNTLM and these VMS port notes in HELP format. They can be added to a help library by
$ append vmsport.hlp cntlm.hlp ! ignore warning $ library/insert/help libraryname.HLB cntlm.hlp ! if creating a new library, replace insertby create. Converting manpages can be done by the quick and dirty man2help tool, available on http://peut.org/man2help/
For VMS: 238 return (i == 0 || (i == -1 && errno != EWOULDBLOCK && errno != EAGAIN && errno != ENOENT)); Original: 238 return (i == 0 || (i == -1 && errno != EAGAIN && errno != ENOENT));In file ntlm.c %ld has been changed to %Ld to correctly print a 64 bit long int:
For VMS: 82 printf("NTLMv2:\n\t Nonce: %s\n\tTimestamp: %Ld\n", tmp, tw); Original: 82 printf("NTLMv2:\n\t Nonce: %s\n\tTimestamp: %ld\n", tmp, tw);In file main.c several changes have been made. Parsing nonproxy didn't work. Apparently mainly caused by omitting braces.
For VMS: 296 297 if (list->aux && strlen(list->aux) && fnmatch(list->aux, (char *)addr, 0) == 0) { 298 if (debug)printf("MATCH: %s (%s)\n", addr, (char *)list->aux); 299 return 1; 300 } else { 301 if (debug) printf(" NO: %s (%s)\n", addr, (char *)list->aux); 302 } 303 Original: 295 if (list->aux && strlen(list->aux) 296 && fnmatch(list->aux, addr, 0) == 0) { 297 if (debug) 298 printf("MATCH: %s (%s)\n", addr, (char *)list->aux); 299 return 1; 300 } else if (debug) 301 printf(" NO: %s (%s)\n", addr, (char *)list->aux); 302The asdaemon variable has as default 0 for VMS has been disabled:
716 #ifdef __VMS 717 asdaemon = 0; 718 #endif
CNTLM_STARTUP.COM and CNTLM_SHUTDOWN.COM are copied to SYS$COMMON:[SYSMGR]
Installing on Alpha can be done with the product tool. The kit is built by CNTLM_MAKEKIT.COM.
CNTLM can safest be set up to just listen on localhost, so it cannot function as gateway for other hosts. See the Gateway description.
Local hosts, or hosts on your Intranet should not be proxied to the NTLM proxy. Use the NoProxy option in cntlm.conf.
In CNTLMHOME:CNTLM_RUN.COM symbol CNTLM_OPCOM can be set to a comma separated list of classes to send these messages to. Like
cntlm_opcom = "OPER2,NETWORK,SECURITY"If the symbol nor a logical exist, or CNTLM_OPCOM is empty or does not contain valid OPCOM classes, no OPCOM messages are sent.
Also, the cntlm command can be provided with extra switches, if needed. Consult the CNTLM docs or cntlm -h for options.
Note that CNTLM_RUN.COM is defined as the LGICMD for the CNTLM_PROXY user. As the restricted flag is set up and the user has external access disabled, no privileges and no write access to it's configuration, it should not open up too big a hole in system security.
N.B. No attempt has been made to define quota for user CNTLM_PROXY. Normal default quota should suffice, but this depends on your system and your load. More is usually better.
The proxy can be stopped by @sys$startup:cntlm_shutdown.com.
$ ALL_PROXY = "localhost:3128" $ curl http://sourceforge.net/apps/mediawiki/cntlm/index.php?title=Main_PageShould show you the main page of the cntlm project.
N.B. The proxy does not work for any other protocol than HTTP(S) to hosts defined as noproxy. This feature is not implemented in CNTLM.
If it doesn't work, you have probably done something wrong. Stop worrying and check the log- and the configuration file. Then start thinking again.
Thanks to Jim Duff and Philippe Vouters for putting online their VMS source examples. Thanks to John Wallace's remark on c.o.v. for inspiring this port.