Commit Graph

34 Commits

Author SHA1 Message Date
chs 6347f22e62 this file uses the <sys/queue.h> macros so it should include
that header itself, rather than relying on getting it indirectly
by including some other header (which will soon be changed
to not do that anymore).
2017-06-08 03:25:03 +00:00
wiz 2ea831cdd8 Fix typo in syslog message.
From Edgar Fuß in PR 46950.
2012-09-13 11:09:41 +00:00
plunky 87d4f6076b Apply casts to cases where xdrproc_t is expected but is not
strictly passed, for example because the second argument is
a different kind of pointer.
2011-08-30 17:06:20 +00:00
christos 6b6eea3c51 allow comparing v2 and v3 filehandles. 2009-11-19 22:27:26 +00:00
bouyer 6d07b400dc Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
2009-10-19 18:41:07 +00:00
christos 0c27a0cd54 fix dev_t format. 2008-12-29 03:38:26 +00:00
christos ceaa3a4f21 - pass lint (not completely)
- KNF
- ansify
- use %m instead of "%s, strerror(errno)" in syslog messages
2007-11-04 23:12:50 +00:00
christos 5f2b082001 PR/37236: Matthias Scheler: Mac OS X NFS client frequently crashes rpc.lockd(8)
on NetBSD. Use calloc to allocate the lock as suggested in the PR.
2007-10-27 18:41:54 +00:00
martin e06a3327c9 Typo 2006-08-09 14:12:47 +00:00
yamt a52757bf4c deal with variable sized file handles. 2006-08-08 13:10:05 +00:00
martin b4cb63a646 Make filehandles opaque to userland 2006-07-31 16:34:42 +00:00
martin a3b5baed42 Fix alignement problems for fhandle_t, exposed by gcc4.1.
While touching all vptofh/fhtovp functions, get rid of VFS_MAXFIDSIZ,
version the getfh(2) syscall and explicitly pass the size available in
the filehandle from userland.

Discussed on tech-kern, with lots of help from yamt (thanks!).
2006-07-13 12:00:24 +00:00
christos c4ee9f6d2e 64 bit inode changes 2005-08-19 02:07:18 +00:00
lukem 677504d9ca Test the correct pointer 'rfl' rather than an uninitialized 'fl' when
determining whether the lock was a LOCK_V4 or not.
Detected with gcc -Wuninitialized.
2005-06-02 09:30:27 +00:00
bouyer 7b066791c8 Remove references to University of California from my copyright notices. 2003-10-05 17:48:49 +00:00
bouyer d6242d4312 We can't keep a reference to the value returned by svc_getrpccaller().
Instead malloc() some memory and copy the sockaddr returned there.
Fix a bug where after a blocked lock gets granted, the grant message would
be sent to the wrong machine (or possibly to a completely bogus address).

While there, add a NULL check for the return value of another malloc().
2003-06-19 11:13:06 +00:00
yamt f9cc84c69d getlock: detect duplicated locks slightly correctly.
XXX how should we do for byte range lock?
2003-03-16 09:05:56 +00:00
yamt acc9d6c0f9 for lock/unlock requests, log svid as well as client name. 2003-03-16 06:55:47 +00:00
yamt 3f4a2b19c2 fix a typo in the previous. 2003-03-14 14:10:00 +00:00
yamt c5c265a7aa use strlcpy instead of strncpy. 2003-03-14 14:08:44 +00:00
yamt f947a8c4c1 use LIST_FOREACH macro. 2003-03-14 14:03:00 +00:00
yamt 44f53bece1 for fork'ed children, use _exit instead of exit. 2003-03-14 13:53:08 +00:00
yamt 3337a32246 - protect from pid reusing.
- fix a null dereference on the error.
2003-03-14 13:46:23 +00:00
simonb 276fd1665c The Double-Semi-Colon Police. 2003-01-20 05:29:53 +00:00
wiz 5db23d2c5d enouth -> enough. 2002-07-26 01:00:39 +00:00
wiz 4b20971f01 Spell acquire with a 'c'. 2002-07-10 23:16:32 +00:00
oster 4a785b3509 Fix a memory leak: when unlocking make sure we release the memory associated
with the lock begin removed!

Reviewed by thorpej.
2001-10-23 19:54:53 +00:00
wiz 0a600be867 receive, not recieve 2001-06-12 15:17:10 +00:00
wiz 14dbdf5518 Negative exit code cleanup: Replace exit(-x) with exit(x).
As seen on tech-userlevel.
2001-04-06 11:13:45 +00:00
enami 6bc7e18094 Don't try to deallocate an object pointed by NULL pointer. Instead,
deallocate the right one.
2000-11-21 03:47:41 +00:00
thorpej 8521dd166a Clean up some include paths. 2000-08-12 18:08:43 +00:00
itojun 4941865cd4 setproctitle fix. from openbsd 2000-07-05 22:21:15 +00:00
fvdl 7704425071 Convert to tirpc interface, and to be af-independent. 2000-06-09 14:00:52 +00:00
bouyer 227ed98327 Implement file locking in lockd. All the stuff is done in userland, using
fhopen() and flock(). This means that if you kill lockd, all locks will
be relased (but you're supposed to kill statd at the same time, so
remote hosts will know it and re-establish the lock).
Tested against solaris 2.7 and linux 2.2.14 clients.
Shared lock are not handled efficiently, they're serialised in lockd when they
could be granted.
2000-06-07 14:34:40 +00:00