Subject: mount_nfs fix
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Christos Zoulas <christos@deshaw.com>
List: current-users
Date: 06/19/1994 15:39:43
Try:
mount 128.84.253.11:/usr/local /usr/local
and watch the core dump...
BTW when I do an nfs mount from my local machine to my local machine via:
mount machine-ep0:/usr/local /mnt
The mount succeeds but I cannot access any files, all the processes get stuck
in netio.
mount localhost:/usr/local /mnt
works.
*** mount_nfs.c.dist Wed Jun 8 15:23:05 1994
--- mount_nfs.c Sun Jun 19 15:08:05 1994
***************
*** 426,440 ****
warnx("bad net address %s", hostp);
return (0);
}
! if ((nfsargsp->flags & NFSMNT_KERB) &&
! (hp = gethostbyaddr((char *)&saddr.sin_addr.s_addr,
! sizeof (u_long), AF_INET)) == (struct hostent *)0) {
! warnx("can't reverse resolve net address");
return (0);
}
! } else if ((hp = gethostbyname(hostp)) == NULL) {
! warnx("can't get net id for host");
! return (0);
}
#ifdef KERBEROS
if (nfsargsp->flags & NFSMNT_KERB) {
--- 426,446 ----
warnx("bad net address %s", hostp);
return (0);
}
! if (nfsargsp->flags & NFSMNT_KERB) {
! if ((hp = gethostbyaddr((char *)&saddr.sin_addr.s_addr,
! sizeof (u_long), AF_INET)) == NULL) {
! warnx("can't reverse resolve net address");
! return (0);
! }
! bcopy(hp->h_addr, (caddr_t)&saddr.sin_addr,
! hp->h_length);
! }
! } else {
! if ((hp = gethostbyname(hostp)) == NULL) {
! warnx("can't get net id for host");
return (0);
}
! bcopy(hp->h_addr, (caddr_t)&saddr.sin_addr, hp->h_length);
}
#ifdef KERBEROS
if (nfsargsp->flags & NFSMNT_KERB) {
***************
*** 445,451 ****
}
#endif /* KERBEROS */
- bcopy(hp->h_addr, (caddr_t)&saddr.sin_addr, hp->h_length);
nfhret.stat = EACCES; /* Mark not yet successful */
while (retrycnt > 0) {
saddr.sin_family = AF_INET;
--- 451,456 ----
------------------------------------------------------------------------------