summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2004-08-03 06:58:40 +0000
committermiod <miod@openbsd.org>2004-08-03 06:58:40 +0000
commite3e259cdc27c945064314bb3729f80d3b422df4b (patch)
tree1590c885a92f4c63ef6e8e291f15b88a0659ec8f
parentDocument 'syncpeer'. (diff)
downloadwireguard-openbsd-e3e259cdc27c945064314bb3729f80d3b422df4b.tar.xz
wireguard-openbsd-e3e259cdc27c945064314bb3729f80d3b422df4b.zip
When accessing device nodes over nfs, do not trim major and minor numbers
to 8 bits only; found the hard way by henning@. Ok deraadt@ marius@ millert@
-rw-r--r--sys/nfs/nfs_subs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c
index 03c30ea00da..6cd3d3290c7 100644
--- a/sys/nfs/nfs_subs.c
+++ b/sys/nfs/nfs_subs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_subs.c,v 1.48 2004/07/21 17:30:55 marius Exp $ */
+/* $OpenBSD: nfs_subs.c,v 1.49 2004/08/03 06:58:40 miod Exp $ */
/* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */
/*
@@ -1139,8 +1139,8 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
if (v3) {
vtyp = nfsv3tov_type(fp->fa_type);
vmode = fxdr_unsigned(mode_t, fp->fa_mode);
- rdev = makedev(fxdr_unsigned(u_char, fp->fa3_rdev.specdata1),
- fxdr_unsigned(u_char, fp->fa3_rdev.specdata2));
+ rdev = makedev(fxdr_unsigned(u_int32_t, fp->fa3_rdev.specdata1),
+ fxdr_unsigned(u_int32_t, fp->fa3_rdev.specdata2));
fxdr_nfsv3time(&fp->fa3_mtime, &mtime);
} else {
vtyp = nfsv2tov_type(fp->fa_type);