summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rpc.lockd
Commit message (Collapse)AuthorAgeFilesLines
* - Fix compilaton with DUMP_FILELOCK_VERBOSE.kuriyama2007-04-121-8/+8
| | | | | - Use consistent "get_lock_matching_unlock" function name in debuglog().
* Add the "-p" option, which allows to specify a port which the daemonmatteo2007-04-032-8/+92
| | | | | | | | should bind to. PR: bin/100969 Reviewed by: alfred@ MFC after: 1 week
* Fix a typo in a comment, introduced in rev. 1.19.brueffer2007-01-161-1/+1
|
* some whitespace cleanup (which I usually don't bother with)mjacob2007-01-041-57/+55
| | | | | | so I could note that the previous delta was: Reviewed by: Mohan
* Add a function that checks for duplicate requests (basedmjacob2007-01-041-2/+43
| | | | | | | | | on some fairly tight criteria) so we avoid having broken clients spam rpc.lockd to death. PR: 107530 Obtained from: Doug Rudoff MFC after: 1 week
* Set alarm timer for grace period from the grace_period variable, insteadthomas2006-08-231-1/+1
| | | | | | | | of hard-coding a value of 10 seconds. Command line flag -g is thus now correctly taken into account. PR: bin/102176 MFC after: 1 week
* o Style previous.maxim2006-08-171-2/+2
|
* Use setproctitle(3) to provide identification of the client and serverthomas2006-08-161-0/+2
| | | | | | processes created by rpc.lockd. MFC after: 1 week
* Remove extraneous trailing \0 in string literal.thomas2006-08-111-2/+1
| | | | MFC after: 2 weeks
* Move call to ignore SIGPIPE signals before calling fork(),rodrigc2006-05-271-1/+3
| | | | | | | | so that both parent and child processes ignore this signal. PR: bin/97768 Submitted by: Gea-Suan Lin <gslin at csie dot nctu dot edu dot tw> MFC after: 3 days
* Ignore SIGPIPE signals on write() failures.rodrigc2006-05-251-0/+1
| | | | | | | | | We already check for write() failures and handle EPIPE. Failure to handle SIGPIPE was resulting in rpc.lockd terminating. PR: bin/97768 Reported by: Gea-Suan Lin <gslin at csie dot nctu dot edu dot tw> MFC after: 1 day
* When a user is in more than 16 groups the call to authunix_create() willharti2005-11-171-1/+6
| | | | | | | | | result in abort() beeing called. This is because there is a limit of the number of groups in the RPC which is 16. When the actual number of groups is too large it results in xdr_array() returning an error which, in turn, authunix_create() handles by just calling abort(). Fix this by passing only the first 16 groups to authunix_create().
* Add FBSDID. Add missing prototypes. Remove unused variables. Give variablecharnier2005-05-202-14/+15
| | | | an initial value to silent compiler.
* Consumers of nfslockdans() seems to think it should return 0 on success, socognet2005-03-161-1/+1
| | | | make it so.
* Fixed the misplaced $FreeBSD$.ru2005-02-091-1/+1
|
* - Use svc_getrpccaller() rather than svc_getcaller() for usingkuriyama2005-02-031-20/+16
| | | | | | | | xt_rtaddr member of SVCXPRT structure. This allows to use IPv6 address stored in "struct sockaddr_storage" in "struct netbuf". - Output the reason of getnameinfo() error. Reviewed by: alfred
* Sort sections.ru2005-01-181-2/+2
|
* 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.
OpenPOWER on IntegriCloud