From: MERC::"uunet!alcatel.co.@!Dietmar.Berg" 15-JUN-1992 04:27:56.34 To: uucm000@uxa.ecn.bgu.edu, osyjm@schizo.coe.montana.edu, BEAR@nucvs7.anu.edu.au, martinea@ireq.hydro.qc.ca, ONASCH@ira.uka.de, klein@saturn.glassboro.edu, powers@elros.stg.trw.com, galaxy::gleeve, Mark.Berman@Williams.EDU, kzm@mpens.mpe.ipp-garching.mpg.dE CC: Subj: ILPD Patch01 + some explanations From the feedback received so far from Jaye Mathisen the following changes and explanation seems to be necessary. Included with this mail is a patch that updates some of the source-files. 1.) HOST_NAM_LEN should be much larger to accomodate for fully qualified host-names. 2.) In the config-file, watch out for duplicates (user@host) on the right hand side of the proxy-definitions. This is currently not checked and may lead to surprising results. The worst case that can happen is that a username is mapped to $NOTIFY in addition to the VMS-user it should be mapped to, with the result that the job is always discarded. User-Notification at the UNIX side When lpr is invoked with the -m option, completion mail is sent to the user. This has been used widely in our environment, with the drawback that mail messages accumulate und users do not read their mail any more. To introduce one level of indirection, a reserved name $NOTIFY has been introduced. When the dummy VMS-username $NOTIFY is specified and has a UNIX-username for the host from which the print job came, mail is sent on successful completion not to the owner of the job, but to that username. This should be a suitable alias to pipe the mail to a script which then does some kind of ``biff'' notification (i.e. it *writes*) to the terminal. The original username can be recovered from the fourth word of the `Subject' field, e.g. Subject: Printer/Batch job from NN completed successfully Kind regards, Dietmar Berg P.S.: I would appreciate feedback if any of you get it up and running... ------------------------ This patches the ILPD/DLPD as distributed on 920609. Changes: - rcvjob.c: fixed var-decl in fn_convert(), fixed comments - lpd.h: increased HOST_NAM_LEN, fixed SPOOL_FN_LEN - dlpd.tex: more details on $NOTIFY - baseline.c: updated Feed the rest of this file to the 'patch' program -------------------cut here------------------------- *** rcvjob.c Mon Jun 15 09:42:36 1992 --- ../../rcvjob.c Mon Jun 15 09:41:57 1992 *************** *** 1,4 **** ! static char sccsid[] = "@(#)rcvjob.c 1.8 6/3/92 18:27:42"; /* Receive print job for VMS/UNIX printer daemon --- 1,4 ---- ! static char sccsid[] = "@(#)rcvjob.c 1.9 6/15/92 09:17:17"; /* Receive print job for VMS/UNIX printer daemon *************** *** 493,504 **** /* * This function receives the control file for the current job * from the network link. It is parsed while being read. ! * Each df-file is renamed as soon as a name is known for it. * Files which cannot be printed (special format, e.g. DVI, ...) * are ignored. * Return codes: * SS$_NOPRIV no proxy for this user - * SS$_ABORT could not rename file * SS$_NORMAL ok * * This function is executed at AST level! --- 493,504 ---- /* * This function receives the control file for the current job * from the network link. It is parsed while being read. ! * Each df-file is entered only by file-id, it will be renamed ! * when sending it to the Job-controller. * Files which cannot be printed (special format, e.g. DVI, ...) * are ignored. * Return codes: * SS$_NOPRIV no proxy for this user * SS$_NORMAL ok * * This function is executed at AST level! *************** *** 835,841 **** static char * fn_convert (char * fn) /* convert UNIX-filespec to valid VMS name */ { ! char buf[40]; /* short enough to avoid problems */ register char *p, *q, *last_dot; if ((p = strrchr (fn, '/')) != NULL) --- 835,841 ---- static char * fn_convert (char * fn) /* convert UNIX-filespec to valid VMS name */ { ! static char buf[40]; /* short enough to avoid problems */ register char *p, *q, *last_dot; if ((p = strrchr (fn, '/')) != NULL) *** baseline.c Mon Jun 15 09:42:34 1992 --- ../../baseline.c Mon Jun 15 09:28:03 1992 *************** *** 1,9 **** char*version_no="2.5"; char*version_str="2.5 92/01/30 15:55:54"; char*baseline="Baseline for Version 2.5 92/01/30 15:55:54\n\ ! lpd.h \t1.9\t92/01/30 15:34:38\n\ lpd.c \t1.11\t92/01/30 15:34:35\n\ ! rcvjob.c \t1.8\t92/06/03 18:27:42\n\ showjob.c \t1.4\t92/01/30 15:34:47\n\ deljob.c \t1.5\t92/01/30 15:34:47\n\ inet.c \t1.9\t92/01/30 15:34:44\n\ --- 1,10 ---- char*version_no="2.5"; char*version_str="2.5 92/01/30 15:55:54"; char*baseline="Baseline for Version 2.5 92/01/30 15:55:54\n\ ! (summary from 06/15/92 09:28:01)\n\ ! lpd.h \t1.10\t92/06/15 09:20:42\n\ lpd.c \t1.11\t92/01/30 15:34:35\n\ ! rcvjob.c \t1.9\t92/06/15 09:17:17\n\ showjob.c \t1.4\t92/01/30 15:34:47\n\ deljob.c \t1.5\t92/01/30 15:34:47\n\ inet.c \t1.9\t92/01/30 15:34:44\n\ *************** *** 16,20 **** llist.c \t1.4\t92/01/30 15:34:40\n\ lpdgw.c \t1.2\t92/01/30 15:42:23\n\ dlpd.tex \t1.7\t92/04/21 16:29:19\n\ ! README \t1.1\t92/01/30 15:55:21\n\ "; --- 17,23 ---- llist.c \t1.4\t92/01/30 15:34:40\n\ lpdgw.c \t1.2\t92/01/30 15:42:23\n\ dlpd.tex \t1.7\t92/04/21 16:29:19\n\ ! descrip.mms \t1.2\t92/06/09 10:33:11\n\ ! lpd.opt \t1.1\t92/06/03 18:39:12\n\ ! README \t1.3\t92/06/09 10:36:53\n\ "; *** lpd.h Mon Jun 15 09:42:32 1992 --- ../../lpd.h Mon Jun 15 09:41:56 1992 *************** *** 1,4 **** ! /* @(#)lpd.h 1.9 1/30/92 15:34:38 */ #define DEBUG 1 --- 1,4 ---- ! /* @(#)lpd.h 1.10 6/15/92 09:20:42 */ #define DEBUG 1 *************** *** 86,95 **** #define J_NAM_LEN (40+1) /* jobname */ #define U_NAM_LEN (12+1) /* username */ #define PRC_NAM_LEN (12+1) /* process name */ ! #define HOST_NAM_LEN (16+1) /* UNIX-host name */ #define NODE_NAM_LEN (8+1) /* VMS node name */ #define VMS_STR (255+1) ! #define SPOOL_FN_LEN (20+1) /* spool-filename (dfxnnnnnhost) */ #define NET_BUF_LEN 1024 /* network I/O */ #define MAIL_MBX_BUF_LEN 2048 /* max length of message to UNIX-user */ #define RES_NAM_LEN (32+1) /* resource name */ --- 86,95 ---- #define J_NAM_LEN (40+1) /* jobname */ #define U_NAM_LEN (12+1) /* username */ #define PRC_NAM_LEN (12+1) /* process name */ ! #define HOST_NAM_LEN (255+1) /* UNIX-host name */ #define NODE_NAM_LEN (8+1) /* VMS node name */ #define VMS_STR (255+1) ! #define SPOOL_FN_LEN (HOST_NAM_LEN+16) /* spool-filename (dfxnnnnnhost) */ #define NET_BUF_LEN 1024 /* network I/O */ #define MAIL_MBX_BUF_LEN 2048 /* max length of message to UNIX-user */ #define RES_NAM_LEN (32+1) /* resource name */ *** dlpd.tex Mon Jun 15 09:42:42 1992 --- ../../dlpd.tex Mon Jun 15 09:41:56 1992 *************** *** 1,5 **** % Integration of UNIX-printing under VMS ! % @(#)dlpd.tex 1.7 4/21/92 16:29:19 \documentstyle{article} \pagestyle{plain} --- 1,5 ---- % Integration of UNIX-printing under VMS ! % @(#)dlpd.tex 1.8 6/15/92 09:41:47 \documentstyle{article} \pagestyle{plain} *************** *** 591,597 **** {\em VMS\_USERNAME} must be uppercase and up to 12~characters in length. {\em user} must be lowercase and up to 12~characters in length. {\em host} must be ! lowercase and up to 16~characters in length. It can also refer to one of the equivalence groups defined above. The VMS-user must be enabled (the flag {\tt UIC\$V\_NOACNT} must not be set) and have network access for at least a single hour per week. It does not seem to make sense to restrict --- 591,597 ---- {\em VMS\_USERNAME} must be uppercase and up to 12~characters in length. {\em user} must be lowercase and up to 12~characters in length. {\em host} must be ! lowercase and up to 255~characters in length. It can also refer to one of the equivalence groups defined above. The VMS-user must be enabled (the flag {\tt UIC\$V\_NOACNT} must not be set) and have network access for at least a single hour per week. It does not seem to make sense to restrict *************** *** 629,635 **** this (search for the string {\tt MAX\_PRIVS} in the file {\tt CONFIG.C}.) \end{quote} ! Only the first character of a qualifier is checked. No errors are reported when another character is seen, to allow use of this configuration file for another software package (which needs another qualifier). --- 629,635 ---- this (search for the string {\tt MAX\_PRIVS} in the file {\tt CONFIG.C}.) \end{quote} ! Only the first character of a qualifier is checked. No errors are reported when another character is seen, to allow use of this configuration file for another software package (which needs another qualifier). *************** *** 786,796 **** \appendix \section{User-Notification at the UNIX side} When the dummy VMS-username {\tt \$NOTIFY} is specified and has a UNIX-username for the host from which the print job came, mail is sent on ! successful completion not to the owner of the job, but to that username. This ! can be an alias piping the mail to a script which {\em writes} to the terminal. ! The original username can be restored from the fourth word of the ``Subject'' field, e.g. {\tt Subject: Printer/Batch job from \em NN \tt completed successfully} --- 786,804 ---- \appendix \section{User-Notification at the UNIX side} + When {\tt lpr} is invoked with the {\tt -m} option, completion mail is + sent to the user. This has been used widely in our environment, with + the drawback that mail messages accumulate und users do not read their + mail any more. + + To introduce one level of indirection, a reserved name + {\tt \$NOTIFY} has been introduced. When the dummy VMS-username {\tt \$NOTIFY} is specified and has a UNIX-username for the host from which the print job came, mail is sent on ! successful completion not to the owner of the job, but to that username. ! This should be a suitable alias to pipe the mail to a script which then ! does some kind of ``biff'' notification (i.e. it {\em writes}) to the terminal. ! The original username can be recovered from the fourth word of the ``Subject'' field, e.g. {\tt Subject: Printer/Batch job from \em NN \tt completed successfully}