summaryrefslogtreecommitdiffstats
path: root/utils/statd/monitor.c
Commit message (Collapse)AuthorAgeFilesLines
* Add -Wstrict-prototypes to compiler args, and fix warnings caused.Neil Brown2007-07-291-1/+1
|
* statd - the files created are named for dns_name, so use that when unlinking.Neil Brown2007-05-031-2/+2
| | | | Also free dns_name when freeing an 'nlist', so do the unlink before the free.
* Don't hide my_name in statd.Neil Brown2007-04-201-7/+22
| | | | | statd now passes the 'my_name' from the SM_MON call faithfully to the ha-callout and records it in the sm/ files.
* Tell NFS/lockd client what that local state number is.Neil Brown2007-04-021-5/+13
| | | | | | | | | | | | Both SM_STAT and SM_MON can return the state of an NSM, but it is unclear which NSM they return the state of, so the value cannot be used, and lockd doesn't use it. Document this confusion, and give the current state to the kernel via a sysctl if that sysctl is available (since about 2.6.19). This should make is possible for the NFS server to detect a small class of bad SM_NOTIFY packets and not flush locks in that case. Signed-off-by: Neil Brown <neilb@suse.de>
* statd - use dnsname to ensure correct matching of NOTIFY requests.Neil Brown2007-03-291-13/+27
| | | | | | | | | | | | | | | When lockd asks to monitor a host, we find the FQDN from the DNS and remember that, both internally and in the /var/lib/nfs/sm/* file. When we receive an SM_NOTIFY request, we compare both the mon_name and the source IP address against that DNS name to find a match. If a DNS name is not available, we fall back to the name provided by lockd, which at least is known to map to an IP address via gethostbyname. Signed-off-by: Neil Brown <neilb@suse.de>
* statd - check for 'priv' when looking for duplicate registrations.Neil Brown2007-03-291-1/+2
| | | | | | | | From the point of view of the client (lockd), the 'priv' blob is probably the most important key, so make sure to not throw away requests with new 'priv' information. Signed-off-by: Neil Brown <neilb@suse.de>
* statd - remove a pointless ifNeil Brown2007-03-291-19/+17
| | | | | | The if contains a while with essentially the same condition. Signed-off-by: Neil Brown <neilb@suse.de>
* statd - keep persistent state in sm/* files.Neil Brown2007-03-291-1/+76
| | | | | | | | | | | | If statd dies and is restarted, it forgets what peers the kernel is interested in monitoring, and so will not forward NOTIFY requests properly. With this patch the required information is recorded in the files in /var/lib/nfs/sm/* so that a kill/restart does what you might hope. Signed-off-by: Neil Brown <neilb@suse.de>
* Make --enable-secure-statd the default.Neil Brown2007-03-151-6/+14
| | | | | | | | | | | | | | i.e. you now need --disable-secure-statd if you want any client other than lockd to talk to statd. Also relax the RESTRICTED_STATD checks so that a recent kernel with /proc/sys/fs/nfs/nsm_use_hostnames set can still talk to statd. Finally, restrict access to simulate_crash so that only privileged processes on localhost can call it. Having it accessible by the whole world is probably not much more than a minor inconvenience, but it really should be kept closed.
* Fix a number of the easier compile warnings: unused variables,Greg Banks2006-06-221-0/+4
| | | | unused labels, constness, signedness.
* Autogen updateneilbrown2005-12-201-1/+3
|
* Assorted changes from Steve Dicksonneilbrown2005-10-061-1/+2
|
* Fix spurious error message: erroneous SM_UNMON if RESTRICTED_STATDneilbrown2004-09-151-5/+41
|
* Support --ha-callout for high-availability calloutsneilbrown2004-09-061-0/+9
|
* Rename statd log() to note() to avoid conflict with ISO C.chip2003-08-221-18/+18
|
* Support "-P path" in statd as alternate to /var/lib/nfsneilbrown2002-09-021-1/+1
|
* 2000-12-10 Chip Salzenberg <chip@valinux.com>chip2000-12-111-4/+7
| | | | | | * utils/statd/monitor.c (sm_mon_1_svc): Fix buggy check for program and procedure numbers of kernel lockd's callback. Also, besides the old (and broken) procedure #24, allow #16 per Trond.
* Accept lockd callbacks to the new port 24 as well as the historicalchip1999-11-251-1/+4
| | | | port 100021.
* Initial revisionhjl1999-10-181-0/+287