Re: rusers core dumps
Newsgroups: linux.dev.kernel
Date: Sat, 9 Mar 1996 15:03:56 +0900
From: NIIBE Yutaka <gniibe@mri.co.jp>
Subject: The rusers bug.
References: <y3yu400sdji.fsf@pfawww.pp.se>
Sender: owner-linux-kernel@vger.rutgers.edu
Per Persson writes:
> I read an old bug report about rusers but there were no patch
> available at that time, I'm just wondering if someone has fixed this
> or if someone knows what I should do to get a working rusers (or what
> I should fix if it isn't rusers itself which is broken).
[...]
> Any ideas? I need to get this to work to make another program work
> which uses rpc.rusersd and crashes with the same trace...
It's not kernel problem. There are two problem, rusers and libc.
I'm using rusers of NetKit-B-0.06 and libc-5.3.5.
Here is a patch for rusers.
I'll send you another patch for libc later.
--
NIIBE Yutaka
=================
--- rusers/rnusers_xdr.c~
+++ rusers/rnusers_xdr.c
@@ -14,22 +14,18 @@
XDR *xdrs;
struct ru_utmp *objp;
{
- char *ptr;
int size;
- ptr = objp->ut_line;
size = sizeof(objp->ut_line);
- if (!xdr_bytes(xdrs, &ptr, &size, size)) {
+ if (!xdr_bytes(xdrs, &objp->ut_line, &size, size)) {
return (FALSE);
}
- ptr = objp->ut_name;
size = sizeof(objp->ut_line);
- if (!xdr_bytes(xdrs, &ptr, &size, size)) {
+ if (!xdr_bytes(xdrs, &objp->ut_name, &size, size)) {
return (FALSE);
}
- ptr = objp->ut_host;
size = sizeof(objp->ut_host);
- if (!xdr_bytes(xdrs, &ptr, &size, size)) {
+ if (!xdr_bytes(xdrs, &objp->ut_host, &size, size)) {
return (FALSE);
}
if (!xdr_long(xdrs, &objp->ut_time)) {
=================
Reply to: