Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* remote printing problems
@ 1997-01-26  5:08 Daniel Gruner
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Gruner @ 1997-01-26  5:08 UTC (permalink / raw)


Hi

I have problems with lpd, when a remote machine tries to print on
my alpha box.  I am running lpr-0.13-1.axp.rpm (and its equivalent
on the remote intel box).  Local printing is fine, as is printing
from windows boxes using samba.  When trying to access the lpd
from the remote machine, the following messages appear in the 
/var/log/messages file:

Jan 26 00:00:02 lior kernel: lpd: memory violation at pc=12000d110 rp=1555570353
4 (bad address = 00000000)

ad infinitum...

I am running RedHat 4.0, kernel 2.0.27, and I do have proper /etc/hosts.lpd
and /etc/hosts.equiv files.

Any suggestions?  Thanks.
Daniel

-- 

Dr. Daniel Gruner                        dgruner@tikva.chem.utoronto.ca
Dept. of Chemistry                       phone:  (416)-978-8689
University of Toronto                    fax:    (416)-978-5325

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: remote printing problems
@ 1997-01-26 12:44 Jeff Hutchison
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Hutchison @ 1997-01-26 12:44 UTC (permalink / raw)


I had the same exact symptoms and had to go back to using the old statically
linked version of lpr-0.06-12 that came with 3.0.3.

Jeff Hutchison                            Kalamazoo, MI
<jhut@inst.strykercorp.com>

On Sun, 26 Jan 1997, Daniel Gruner wrote:

> I have problems with lpd, when a remote machine tries to print on
> my alpha box.  I am running lpr-0.13-1.axp.rpm (and its equivalent
> on the remote intel box).  Local printing is fine, as is printing
> from windows boxes using samba.  When trying to access the lpd
> from the remote machine, the following messages appear in the 
> /var/log/messages file:
> 
> Jan 26 00:00:02 lior kernel: lpd: memory violation at pc=12000d110 rp=1555570353
> 4 (bad address = 00000000)
> 
> ad infinitum...
> 
> I am running RedHat 4.0, kernel 2.0.27, and I do have proper /etc/hosts.lpd
> and /etc/hosts.equiv files.

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: remote printing problems
       [not found] <199701260508.AAA05960@tikva>
@ 1997-01-28  1:35 ` Jeff Odom
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Odom @ 1997-01-28  1:35 UTC (permalink / raw)


On Sun, 26 Jan 1997, Daniel Gruner wrote:

> Hi
> 
> I have problems with lpd, when a remote machine tries to print on
> my alpha box.  I am running lpr-0.13-1.axp.rpm (and its equivalent
> on the remote intel box).  Local printing is fine, as is printing
> from windows boxes using samba.  When trying to access the lpd
> from the remote machine, the following messages appear in the 
> /var/log/messages file:
> 
> Jan 26 00:00:02 lior kernel: lpd: memory violation at pc=12000d110 rp=1555570353
> 4 (bad address = 00000000)
> 
> ad infinitum...
> 
> I am running RedHat 4.0, kernel 2.0.27, and I do have proper /etc/hosts.lpd
> and /etc/hosts.equiv files.

I posted a patch to the 0.13 distribution that fixes the remote printing
problem a little while back.  I've included it again, below.  Basically,
the problem lies with a bad call to an undocumented pam routine and a
k&r varargs problem (I'm not sure if the problem is with gcc or glibc, so
I just converted it to ansi-c).

It's a bit ugly with the pam routine.  Hopefully I'll get off my lazy butt
and clean it up, and post an rpm, but for now, this patch is what I've
got... :)

Jeff Odom
System Administrator
The Johns Hopkins Krieger Mind/Brain Institute

--- lpd.old/lpd.c	Wed Sep  4 16:31:49 1996
+++ lpd/lpd.c	Tue Jan  7 22:28:25 1997
@@ -450,8 +450,11 @@
 	hostf = fopen(_PATH_HOSTSEQUIV, "r");
 again:
 	if (hostf) {
-#ifdef __alpha__
+#ifdef __alpha__ 
+                if (!checkuser(hostf,fromb,baselen)) {
+/*
 		if (!__ivaliduser(hostf, fromb, DUMMY, DUMMY, baselen)) {
+*/
 			(void) fclose(hostf);
 			return;
 		}
@@ -470,3 +473,17 @@
 	}
 	fatal("Your host does not have line printer access");
 }
+
+int checkuser(FILE *fd, char *name, int baselen) {
+        char basename[100],buf[100];
+        strcpy(basename,name);
+        basename[baselen]='\0';
+
+        while (fgets(buf,100,fd)!=NULL) {
+                buf[strlen(buf)-1]='\0';
+                if (!strcmp(buf,name) || !strcmp(buf,basename))
+                        return 0;
+                }
+        return 1;
+}
+
--- lpd.old/printjob.c	Thu Dec  1 20:59:43 2016
+++ lpd/printjob.c	Tue Jan  7 22:37:25 1997
@@ -45,7 +45,7 @@
 
 #include "lp.h"
 #include "pathnames.h"
-
+#include <stdarg.h>
 #define DORETURN	0	/* absorb fork error */
 #define DOABORT		1	/* abort if dofork fails */
 
@@ -1289,9 +1289,37 @@
 }
 
 /*VARARGS1*/
+/*
 status(msg, a1, a2, a3)
 	char *msg;
 	void *a1, *a2, *a3;
+*/
+void status(char *msg, ...)
+{
+        register int fd;
+        char buf[BUFSIZ];
+        char *s1=NULL, *s2=NULL;
+
+        va_list vlist;
+        va_start(vlist, msg);
+        s1=va_arg(vlist,char *);
+        if (s1!=NULL)
+                s2=va_arg(vlist,char *);
+
+        umask(0);
+        fd = open(ST, O_WRONLY|O_CREAT, 0664);
+        if (fd < 0 || flock(fd, LOCK_EX) < 0) {
+                syslog(LOG_ERR, "%s: %s: %m", printer, ST);
+                exit(1);
+        }
+        ftruncate(fd, 0);
+        sprintf(buf, msg, s1, s2);
+        strcat(buf, "\n");
+        (void) write(fd, buf, strlen(buf));
+        (void) close(fd);
+        va_end(dummy);
+}
+/*
 {
 	register int fd;
 	char buf[BUFSIZ];
@@ -1308,3 +1336,4 @@
 	(void) write(fd, buf, strlen(buf));
 	(void) close(fd);
 }
+*/

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1997-01-28  1:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-01-26  5:08 remote printing problems Daniel Gruner
  -- strict thread matches above, loose matches on Subject: below --
1997-01-26 12:44 Jeff Hutchison
     [not found] <199701260508.AAA05960@tikva>
1997-01-28  1:35 ` Jeff Odom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox