summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rpc.lockd
Commit message (Collapse)AuthorAgeFilesLines
* Userland change corresponding to the change in kernel/userland communicationphk2004-12-061-31/+19
| | | | for NFS locking.
* Include <unistd.h> for {g,s}eteuid().stefanf2004-10-091-0/+1
|
* After talking to Colin,mr2004-07-163-64/+70
| | | | | | | | apply the patch of bin/61718 (which should include/elimatate kern/61122 also). It seems to fix a few annoying bugs. PR: bin/61718, kern/61122 Submitted by: bg@sics.se ohartman@mail.physik.uni-mainz.de
* Remove spurious semicolons. Outside of functions they are actually errors butstefanf2004-05-161-1/+1
| | | | | | | | GCC doesn't warn about them without -pedantic. Approved by: das (mentor) PR: 56649 Reviewed by: md5
* Make rpc.lockd bind to a reserved port, since there are NFS clientsroam2004-03-041-0/+18
| | | | | | | | which ignore NLM requests not coming from a reserved port. PR: 56500 Submitted by: Jonathan Lennox <lennox@cs.columbia.edu> MFC after: 1 week
* The callrpc call to unmonitor hosts was passing the wrong xdralfred2004-02-171-2/+2
| | | | | decode/encode functions for the arguments to the statd unmonitor call. Fix it.
* Make this compile cleanly. It passes WARNS=2, but I haven't checkedpeter2003-10-265-29/+44
| | | | it is so on more platforms.
* When getting back an NLM DENIED response for a requested lock from therwatson2003-05-151-2/+2
| | | | | | | | | | | | server, map it to EAGAIN locally rather than EACCES. The NLM spec indicates the DENIED corresponds to lock contention, not a permission failure. This fixes O_EXLOCK/O_SHLOCK with O_NONBLOCK, which would previously give a permission error, which in turn fixes things like mailq(8) and lockf(1) over NFS. Approved by: scottl (re) Reviewed by: truckman, Andrew P Lentvorski, Jr. <bsder@allcaps.org> Idea from: truckman
* Avoid registering for a lock on the server in the event the NFS clientrwatson2003-05-141-6/+11
| | | | | | | | | | | has requested the lock in a non-blocking form, instead returning an immediate failure. This appears to help reduce one of my "locks get lost" symptoms involving lockf(1), which attempts a non-blocking lock attempt before actually blocking on the lock. At this point the client still gets back EACCES, which is an issue we're still working. Approved by: re (scottl) Submitted by: Andrew P. Lentvorski, Jr. <bsder@allcaps.org>
* When receiving NLM_GRANTED_RES or NLM4_GRANTED_RES lock granted messagesrwatson2003-05-141-2/+7
| | | | | | | | | | | | | from the NFS server, following contention on a lock by this or another client, immediately notify the waiting process that the lock has been granted via a wakeup. Without this change, the client rpc.lockd will not wakeup the waiting process until it next re-polls the lock (sometime in the next ten seconds), which can lead to marked latency across all potential lockers, as the lock is held by the client for the duration. Approved by: re (scottl) Submitted by: truckman Reviewed by: Andrew P. Lentvorski, Jr <bsder@allcaps.org>
* init_nsm() is executed after a call to daemon(*, 0), so error andghelmer2003-04-241-2/+4
| | | | | | warning messages should be logged rather than sent to /dev/null. PR: bin/45461
* style.Makefile(5)obrien2003-04-041-2/+0
|
* Implement nonblocking tpc-connections. rpcgen -m does stillmbr2003-01-161-1/+6
| | | | | | | | produce backcompatible code. Reviewed by: rwatson Obtained from: NetBSD MFC after: 1 day
* Remove a case of exposing 'struct ucred' to userspace. Use a struct xucredalfred2002-08-151-7/+7
| | | | | | for LOCKD_MSG instead. Requested by: rwatson
* Add IPv6 support.alfred2002-07-151-5/+15
| | | | Submitted by: Jean-Luc Richier <Jean-Luc.Richier@imag.fr>
* The .Nm utilitycharnier2002-07-141-2/+2
|
* When binding to transports if getnetconfigent() fails then actuallyalfred2002-04-111-1/+2
| | | | | | print out the correct transport it failed on rather than always spitting out 'udp', also call nc_sperror() to give a more verbose error message detailing the problem.
* Use char foo[] = "BAR" to avoid direct assignment of const char * into char *.alfred2002-03-221-2/+4
| | | | | | rpcgen can't really make those fields const because the remote side might want to munge them, so we need to pass non-const in. Hackish, but should work.
* Const fix.alfred2002-03-221-1/+1
|
* Remove cast that's not needed.alfred2002-03-221-1/+1
|
* WARNS from 3 to 4. still some warnings about assigning const char * toalfred2002-03-221-1/+1
| | | | char *, but we'll fix those later.
* constify log_from_addr() parameter.alfred2002-03-221-2/+2
|
* Bring code to WARNS=3 level. Mostly fix unused variables.alfred2002-03-213-17/+22
|
* Remove main() prototype.alfred2002-03-211-1/+0
|
* Remove __P.alfred2002-03-213-15/+15
|
* Fix boundry condition in lock management:alfred2002-01-171-2/+13
| | | | | | | | | | | | | | | | | | | Alfred, I took a look at retry_blockingfilelocklist() and the solution seemed simple enough. Please correct me if I am wrong. It seems said routine doesn't take into account boundary conditions when putting back file_lock entries into the blocked lock-list. Specifically, it fails when the file_lock being put back is the last element in the list, and when it is the only element in the list. I've included a patch below. Basically, it introduces another variable: pfl, which keeps track of the list item before ifl. That way if nfl is NULL, ifl gets inserted after pfl. If pfl is also NULL, then it gets inserted at the head of the list (since it was the only element in the list). Submitted by: Mike Makonnen <mike_makonnen@yahoo.com> Tested by: Thomas Quinot <thomas@cuivre.fr.eu.org>
* prototype functions and fix some line wrappingalfred2001-12-021-6/+16
|
* Fold ANDREW_LOCKD into -current.alfred2001-11-293-566/+1965
|
* Turn on NO_WERROR and set WARNS to 1.alfred2001-11-135-20/+27
| | | | | | | | | | | | Fix the WARNS 1 warnings except unused variables. Add prototype for log_netobj(). Don't compare signed/unsigned. Cast u_int64_t to 'unsigned long long' and print using %llu. Fix constness of string arrays. Use a cast to avoid an unused parameter in a signal handler. alarm(2) can't fail, so don't check for it. ANSI'ify some functions.
* fix parameters to lock_answer().alfred2001-11-121-1/+1
| | | | Submitted by: Timo Geusch <freebsd@unix-consult.com>
* Fixup for WARNS.alfred2001-11-121-6/+9
|
* Drop privs while servicing kernel lock requests.alfred2001-11-111-7/+17
| | | | | | Restore umask used before FIFO creation. If opening the FIFO fails, exit. Properly check the return value of open (use == -1 instead of < 0).
* leverage fixed fifo implementation (rev 1.56 ofalfred2001-11-081-8/+3
| | | | | | | | | | src/sys/fs/fifofs/fifo_vnops.c) to serve locks better, my previous workaround for lack of decent fifo system wasn't cutting it, particularly the kernel would send a message down the fifo and immediately close it, this would lead to delayed unlock requests being seen by the lockd causing all sorts of badness. Basically, don't reopen the fifo, just select(2) on it.
* use syslog rather than printf so we can see what's going on in debug modealfred2001-11-081-4/+4
|
* style fixes, fix line wrap and function declarationalfred2001-11-081-6/+5
|
* Implement partial-file NFS lock testing.alfred2001-10-143-13/+139
| | | | Submitted by: "Andrew P. Lentvorski" <andrewl@io.com>
* Userland part of nfs client/server split and cleanup.peter2001-09-181-5/+5
|
* Perform a major cleanup of the usr.sbin Makefiles.obrien2001-07-201-2/+2
| | | | | These are not perfectly in agreement with each other style-wise, but they are orders of orders of magnitude more consistent style-wise than before.
* Distinguish between rpc version numbers in the client cache to avoidalfred2001-04-281-1/+6
| | | | replying on the wrong port.
* handles.c belonged to the old stub lockd, nuke it.alfred2001-04-281-61/+0
|
* procs.c belonged to the old stub lockd, nuke it.alfred2001-04-281-592/+0
|
* mdoc(7) police: Removed forgotten .Pp.ru2001-04-271-1/+0
|
* Fix compiling without -O, some dead code was using non-existant functions,alfred2001-04-252-6/+10
| | | | | | | | | | | make the code not automatically dead but actually use the debug level in order to determine if output is needed. Fix non-existant from_addr() by #define'ing it to inet_ntoa(). Remove hardcoded -g from Makefile. Reported by: "John W. De Boskey" <jwd@bsdwins.com> Tested by: "John W. De Boskey" <jwd@bsdwins.com>
* Remove section from bugs that says we don't support client locks.alfred2001-04-191-11/+0
| | | | Pointed out by: Martin Blapp <mb@imp.ch>
* remove debug code left in by accidentalfred2001-04-181-7/+0
|
* Implement client side NFS locks.alfred2001-04-176-9/+672
| | | | | Obtained from: BSD/os Import Ok'd by: mckusick, jkh, motd on builder.freebsd.org
* - Backout botched attempt to introduce MANSECT feature.ru2001-03-261-0/+1
| | | | - MAN[1-9] -> MAN.
* Set the default manual section for usr.sbin/ to 8.ru2001-03-201-1/+0
|
* Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) andalfred2001-03-198-160/+2390
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | associated changes that had to happen to make this possible as well as bugs fixed along the way. Bring in required TLI library routines to support this. Since we don't support TLI we've essentially copied what NetBSD has done, adding a thin layer to emulate direct the TLI calls into BSD socket calls. This is mostly from Sun's tirpc release that was made in 1994, however some fixes were backported from the 1999 release (supposedly only made available after this porting effort was underway). The submitter has agreed to continue on and bring us up to the 1999 release. Several key features are introduced with this update: Client calls are thread safe. (1999 code has server side thread safe) Updated, a more modern interface. Many userland updates were done to bring the code up to par with the recent RPC API. There is an update to the pthreads library, a function pthread_main_np() was added to emulate a function of Sun's threads library. While we're at it, bring in NetBSD's lockd, it's been far too long of a wait. New rpcbind(8) replaces portmap(8) (supporting communication over an authenticated Unix-domain socket, and by default only allowing set and unset requests over that channel). It's much more secure than the old portmapper. Umount(8), mountd(8), mount_nfs(8), nfsd(8) have also been upgraded to support TI-RPC and to support IPV6. Umount(8) is also fixed to unmount pathnames longer than 80 chars, which are currently truncated by the Kernel statfs structure. Submitted by: Martin Blapp <mb@imp.ch> Manpage review: ru Secure RPC implemented by: wpaul
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-1/+1
|
OpenPOWER on IntegriCloud