summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsturm <sturm@openbsd.org>2008-06-15 03:58:38 +0000
committersturm <sturm@openbsd.org>2008-06-15 03:58:38 +0000
commitd2a74e6a7b6fc791cbf36b967dffe7d12a4720af (patch)
tree8b21b4e4eac9a7c78cd4a304c1f6180e8ffa1a2f
parentif we are trying to attach to ehci(4) notify the user to disable it (diff)
downloadwireguard-openbsd-d2a74e6a7b6fc791cbf36b967dffe7d12a4720af.tar.xz
wireguard-openbsd-d2a74e6a7b6fc791cbf36b967dffe7d12a4720af.zip
fix filehandle comparison between NFSv2 and NFSv3 filehandles
permits locking in heterogenous environments ok thib
-rw-r--r--usr.sbin/rpc.lockd/lockd_lock.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.sbin/rpc.lockd/lockd_lock.c b/usr.sbin/rpc.lockd/lockd_lock.c
index e44db1d1ee7..c650fc32cea 100644
--- a/usr.sbin/rpc.lockd/lockd_lock.c
+++ b/usr.sbin/rpc.lockd/lockd_lock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lockd_lock.c,v 1.2 2008/06/13 21:34:24 sturm Exp $ */
+/* $OpenBSD: lockd_lock.c,v 1.3 2008/06/15 03:58:38 sturm Exp $ */
/*
* Copyright (c) 2000 Manuel Bouyer.
@@ -64,11 +64,7 @@ typedef struct {
static int
fhcmp(const nfs_fhandle_t *fh1, const nfs_fhandle_t *fh2)
{
-
- if (fh1->fhsize != fh2->fhsize) {
- return 1;
- }
- return memcmp(fh1->fhdata, fh2->fhdata, fh1->fhsize);
+ return memcmp(fh1->fhdata, fh2->fhdata, sizeof(fhandle_t));
}
static int