Patch-ID# 100173-07
Keywords: 4.1.1 NFS Jumbo Patch
Synopsis: SunOS 4.1.1: NFS Jumbo Patch
Date: 5/Nov/91

SunOS RELEASE: 4.1.1

Topic: NFS patches (1)

BugID's fixed with this patch: 1039977 1032959 1029628 1037476 1038302 1034328 
                               1045536 1030884 1045993 1047557 1052330 1053679
			       1041409 1065361 1066287 1064433 1070654

Architectures for which this patch is available: sun3, sun3x, sun4, sun4c

Obsolete By: 4.1.2

Problem Description:

Multiple NFS bug fixes.

NOTE: This patch is incompatible with Online: DiskSuite and Backup: Copilot.

NOTES: These patches were made by using "GENERIC" config file.

BUGID:1039977
        When the kernel is built with the NFS debugging
        options the resulting kernel panics due to a bug
	 in the nfs debugging code. I also suspect
        that it would panic if you compiled the kernel 
	with the trace option on.

BUGID:1032959
	A client call to NFSPROC_MKDIR causes incorrect
	attributes to be returned.

BUGID:1029628
        When a program with the setuid bit set is copied
	between local files the setuid bit is cleared.
	If the same file is copied to an nfs file system
	the setuid bit is not cleared on the new file.     

BUGID:1037476
        Sending bad procedure number to NFS server can 
	cause mbuf leak.

BUGID:1038302
        NFS export option "anon=-1" does not work.
	The user will not be allowed to mount the exported
	filesystem.

BUGID:1034328
        An NFS client can crash if two procedures unlink 
	the same file at once.

BUGID:1030884
	Whenever a write to a file cannot be satisfied because
	the filesystem is filled, an ENOSPC error is returned
	(as expected). Subsequent to this error condition, any
	write to the file on that open descriptor also return
	ENOSPC.

BUGID:1045536
        NFS exports to non-sun systems can allow file
	truncation (security violation).
       
BUGID:1045993
        NFS attribute problem on locked files over nfs results
	in read error.

BUGID: 1047557
        Old pages not being purged if file gets truncated
	on server.

BUGID: 1052330
        Repeatedly lock, RW, and unlock an NFS file between
 	several clients, can results in inconsistent file
        contents.

BUGID: 1053679
	File range locking of NFS files was broken in 4.x.

BUGID: 1041409 (June-3-91)
       setuid  

BUGID: 1065361 (July-29-91)
       When an existing file is created again it has the wrong gid.

BUGID: 1064433 (Aug-19-91)
	Export of subtree doesn't work due to rfs_lookup not checking for ".." of the 
	export point.

BUGID: 1066287 (Aug-19-91)
	nfs hang when looking at large file being changed on server 

BUGID: 1066287 (Nov-5-91)
	Added check for page being null that could cause a panic.

BUGID: 1070654 (Nov-5-91)
	When files are recreated, it is marked as being in use such
	that removal of the file results in a .nfsXXX file being created
	and unmount is not possible.

INSTALL:

As root, backup the old files:
mv /sys/`arch -k`/OBJ/nfs_client.o /sys/`arch -k`/OBJ/nfs_client.o.FCS
mv /sys/`arch -k`/OBJ/nfs_common.o /sys/`arch -k`/OBJ/nfs_common.o.FCS
mv /sys/`arch -k`/OBJ/nfs_dump.o /sys/`arch -k`/OBJ/nfs_dump.o.FCS
mv /sys/`arch -k`/OBJ/nfs_export.o /sys/`arch -k`/OBJ/nfs_export.o.FCS
mv /sys/`arch -k`/OBJ/nfs_server.o /sys/`arch -k`/OBJ/nfs_server.o.FCS
mv /sys/`arch -k`/OBJ/nfs_subr.o /sys/`arch -k`/OBJ/nfs_subr.o.FCS
mv /sys/`arch -k`/OBJ/nfs_vfsops.o /sys/`arch -k`/OBJ/nfs_vfsops.o.FCS
mv /sys/`arch -k`/OBJ/nfs_vnodeops.o /sys/`arch -k`/OBJ/nfs_vnodeops.o.FCS
mv /sys/`arch -k`/OBJ/nfs_xdr.o /sys/`arch -k`/OBJ/nfs_xdr.o.FCS

Now install the patched files:
cp `arch -k`/nfs_client.o /sys/`arch -k`/OBJ/nfs_client.o
cp `arch -k`/nfs_common.o /sys/`arch -k`/OBJ/nfs_common.o
cp `arch -k`/nfs_dump.o /sys/`arch -k`/OBJ/nfs_dump.o
cp `arch -k`/nfs_export.o /sys/`arch -k`/OBJ/nfs_export.o
cp `arch -k`/nfs_server.o /sys/`arch -k`/OBJ/nfs_server.o
cp `arch -k`/nfs_subr.o /sys/`arch -k`/OBJ/nfs_subr.o
cp `arch -k`/nfs_vfsops.o /sys/`arch -k`/OBJ/nfs_vfsops.o
cp `arch -k`/nfs_vnodeops.o /sys/`arch -k`/OBJ/nfs_vnodeops.o
cp `arch -k`/nfs_xdr.o /sys/`arch -k`/OBJ/nfs_xdr.o

Config, make and install a new kernel.

Please refer to the system and networking administration manual
for details on building and installing a new kernel


