summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove the now unused functionsKevin Coffman2007-03-312-235/+0
| | | | | | | | Remove functions that are no longer used when when obtaining machine credentials. Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* Clean up gssd_get_single_krb5_cred and its debugging messagesKevin Coffman2007-03-311-8/+12
| | | | | | | Clean up gssd_get_single_krb5_cred and its debugging messages Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* Use newly added keytab functionsKevin Coffman2007-03-315-20/+31
| | | | | | | | | | | | | | | | | | | | | | | Use the new functions added in the previous patch. Obtain machine credentials in a pre-determined order Look for appropriate machine credentials in the following order: root/<fqdn>@REALM nfs/<fqdn>@REALM host/<fqdn>@REALM root/<any-name>@REALM nfs/<any-name>@REALM host/<any-name>@REALM The first matching credential will be used. Also, the machine credentials to be used are now determined "on-demand" rather than at gssd startup. This allows keytab additions to be noticed and used without requiring a restart of gssd. Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* Add new keytab handling functions for dealing with machine credentialsKevin Coffman2007-03-312-0/+468
| | | | | | | | | | | | | | | Add new functions that will be used in the next patch. The new behavior is to search for particular keytab entries in a specified order: root/<fqdn>@<REALM> nfs/<fqdn>@<REALM> host/<fqdn>@<REALM> root/<any-name>@<REALM> nfs/<any-name>@<REALM> host/<any-name>@<REALM> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* Hide differences between MIT and Heimdal in macrosKevin Coffman2007-03-312-25/+20
| | | | | | | | | Clean up a lot of #ifdef'd code using macros, masking the differences between MIT and Heimdal implementations. The currently unused macros will be used in later patches. Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* Fix memory leak on error path of limit_krb5_enctypes()Kevin Coffman2007-03-311-0/+1
| | | | | | | Return credential on error path of limit_krb5_enctypes() Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* Add missing newlinesKevin Coffman2007-03-311-6/+6
| | | | | | | Add missing newlines to error messages. Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* Update version to 1.1.0-rc1Neil Brown2007-03-291-1/+1
|
* New 'NEWS' file with release-notes for 1.1.0Neil Brown2007-03-291-1/+43
|
* Add start-statd script.Neil Brown2007-03-292-0/+10
| | | | | This script is used by mount.nfs to run statd if needed. It can be locally modified to change arguements if required.
* Rename configure.in to configure.acNeil Brown2007-03-291-0/+0
| | | | It is a more standard name...
* Change default to use system rpcgen.Neil Brown2007-03-291-5/+8
| | | | | | | | | | If system-installed rpcgen if such exists. If none is found, build our own. Override with ./configure --with-rpcgen=internal for internal rpcgen or ./configure --with-rpcgen=/local/rpcgen for a non-standard location.
* sm-notify: Try all addresses of a multihomed host.Neil Brown2007-03-291-17/+28
| | | | | | | When sending an SM_NOTIFY to multi-homed host, try all the addresses in rotation. After 4 failures on one address, try the next. Signed-off-by: Neil Brown <neilb@suse.de>
* statd - use dnsname to ensure correct matching of NOTIFY requests.Neil Brown2007-03-293-17/+36
| | | | | | | | | | | | | | | 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>
* mount.nfs - nordirplus optionSteve Dickson2007-03-293-0/+11
| | | | | | | | | | From: Steve Dickson <steved@redhat.com> Adds the -o nordirplus mount option that will disable NFS clients from using the READDIRPLUS RPC. Signed-off-by: Steve Dickson <steved@redhat.com> Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs.man - Use nolocks for /, /usr, /varNeil Brown2007-03-291-5/+12
| | | | | | | Make it clear in manpage for mount.nfs that using nolock is appropriate for /, /usr and /var. Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs - require statd to be running to mount without nolocksNeil Brown2007-03-292-9/+48
| | | | | | | | | If we are mounting nfsv2 or nfsv3 and statd isn't running and we cannot start statd, then fail the mount request. Also use an RPC ping to check on statd. Signed-off-by: Neil Brown <neilb@suse.de>
* statd - only unregister/register once.Neil Brown2007-03-291-16/+13
| | | | | | | | | | | | | The for loop that restarts on SIGUSR or simu_reboot currently includes several once-only things, that are probably best taken out of the loop. We also take the unregister/register out of the loop as if statd does drop privileges, then the second register won't use a privileged port properly. On the whole, cleaner code. Signed-off-by: Neil Brown <neilb@suse.de>
* mountd - better response to failed attempts to export filesystemsNeil Brown2007-03-291-3/+6
| | | | | | | | | | If the kernel rejects an attempt to export a filesystem - e.g. because it is not exportable, we shouldn't just ignore the error, but rather should tell the kernel that the relevant filehandle or path cannot be supported. We should really print out some error messages too. Signed-off-by: Neil Brown <neilb@suse.de>
* sm-notify - fix bugs related to run-only-once.Neil Brown2007-03-291-2/+2
| | | | | | Make sure that sm-notify really runs only once per reboot. Signed-off-by: Neil Brown <neilb@suse.de>
* statd - keep persistent state in sm/* files.Neil Brown2007-03-293-1/+83
| | | | | | | | | | | | 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>
* statd - fix bug so statd can talk to kernel again.Neil Brown2007-03-231-0/+2
| | | | | | | We need to call statd_get_socket before dropping privileges so that we have a privileged port. We use to do that when initialising notification as the same socket was used for reboot notication as for callbacks to the kernel. Now it is a different socket..
* sm-notify - Fix typos in Usage message.Neil Brown2007-03-221-1/+1
|
* mount.nfs: Fix issue with -o user,execNeil Brown2007-03-221-4/+2
| | | | | | | | | | | | It would seem to make sense for mount.nfs to impose the "-o user" => "-o noexec,nodev,nosuid" rule. However if you give "user,exec" to /sbin/mount, it will pass down nodev,nosuid,user with the 'exec' flag :-( So we have to leave that handling of that particular rule to /sbin/mount.
* Fix errors in statd calling sm-notify.Neil Brown2007-03-221-4/+5
| | | | | | The option for set-source-address is '-v', not '-N'. And only warn about -N if -N was actually used.
* Never set SO_REUSEADDR on a UDP socket.Neil Brown2007-03-222-3/+6
| | | | | | | | The effect is quite different from TCP sockets. For TCP, it allows you to listen for new connections even if there are outstanding old connections with the same local address. For UDP, it allows other people to steal your packets by binding to the same address.
* Fix a couple of problems that crept into mountKevin Coffman2007-03-211-2/+2
| | | | | | | | | | | | Commit 6facb22402a0bd8cd49be2ed1a0856b24fef42f4 changed the allocation of len to no longer get 20 extra bytes. It needs to get at least one extra byte for a null character, otherwise a single extra option such as "sec=krb5" is never copied in parse_opt() and is dropped. Commit 44a3727a3243e674a1f1fdad5cbbc639aa25d01c added a typo when checking the program name. Signed-off-by: Neil Brown <neilb@suse.de>
* statd - remove try_to_resolveNeil Brown2007-03-201-60/+2
| | | | | | try_to_resolve is used to resolve a hostname when sending a notification. But we now only send notifications to localhost, so name resolution is not needed.
* umount should succeed even if we cannot contact the server.Neil Brown2007-03-201-4/+3
| | | | | | Failure to tell mountd about the unmount should not be classes and an error and DEFINTELY should not stop the filesystem from being unmounted.
* Add support for quoted mount optionsKarel Zak2007-03-202-15/+53
| | | | | | | | | | | | The patch avoid the collision between commas in security contexts and the delimiter between mount options. Try: mount.nfs foo://mnt/bar /mnt/bar -o context=\"aaa,bbb,ccc\",ro Signed-off-by: Cory Olmo <colmo@TrustedCS.com> Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Neil Brown <neilb@suse.de>
* Build mount.nfs by default, and install setuidNeil Brown2007-03-204-6/+19
| | | | Also fix a few bugs that came up in initial testing.
* mount.nfs - make sure program name in error message is correct.Neil Brown2007-03-202-1/+3
| | | | | | getopt_long uses argv[0] in error messages. So it it is given argv+2 for example, we need to make sure that argv[2] has the correct program name.
* umount.nfs - more strict checks on command line args.Neil Brown2007-03-201-0/+11
| | | | | Reject if there are non-flag args, Reject if the filesystem is not an NFS filesystem.
* mount.nfs - Tidy up option parsing.Neil Brown2007-03-201-14/+38
| | | | | Make sure all possible invalid arguments are discovered and reported. Make sure nothing gets by for uid!=0 that doesn't perfectly match fstab.
* sm-notify - use state directory provided via ./configureNeil Brown2007-03-201-1/+5
|
* Allow disabling of libblkid usage.Neil Brown2007-03-202-2/+19
| | | | | | | Some versions of libblkid have a terrible memory leak which makes mounted grow toooo big. So support --disable-uuid to remove the uuid functionality and liblkid with it.
* Add --with-rpcgen= for configure so that the system rpcgen can be used.Neil Brown2007-03-205-7/+32
| | | | | | | Ultimately it makes sense to remove remove rpcgen from the nfs-utils release as it is already in the glibc release. With this patch you can use the system rpcgen to make sure it works. It is not default yet, but it might be in a future release.
* Handle -o remount betterNeil Brown2007-03-202-2/+16
| | | | | | | | On -o remount, we need to update the entry in mtab rather than add a new one. update_mtab does this so use that. However it might free some strings that shouldn't be freed, so stop it from calling free - the program will exit soon anyway so no exit is needed.
* statd - delay drop-privs until sockets have been setup.Neil Brown2007-03-201-1/+5
| | | | | Registering sockets with portmap might require root privs, so don't drop privs until that has been done.
* Allow rpc.statd to *not* run sm-notify.Neil Brown2007-03-203-22/+47
| | | | | With -L (for Listen-only) or --no-notify, statd will not run sm-notify.
* Remove notify functionality from statd in favour of sm-notifyNeil Brown2007-03-209-392/+84
| | | | | statd now execs sm-notify to notify peers and only listens to monitor requests and remote notifications itself.
* sm-notify - compile and installNeil Brown2007-03-203-4/+8
| | | | | Add sm-notify to the compile/install scripts, (and fix a compile warning).
* sm-notify - drop privileges before receiving packets from network.Neil Brown2007-03-202-0/+47
| | | | | If /var/lib/nfs/sm is owned by non-root, setuid to that uid after opening sockets but before receiving answers.
* Prevent sm-notify from being run multiple times per reboot.Neil Brown2007-03-202-4/+62
| | | | | | | | | As "mount.nfs" can start statd, and as statd can start sm-notify, the risk of sm-notify being run multiple times increases. As this is not normally appropriate, sm-notify now creates a file in /var/run which will stop future instances from being run (though ofcourse this behaviour can be controlled by a new command line option).
* sm-notify - make the manpage a little more up-to-dateNeil Brown2007-03-201-18/+29
|
* sm-notify: remove addr_parseNeil Brown2007-03-201-22/+2
| | | | | This functionality is alreday present in getaddrinfo so it isn't needed explicitly.
* sm-notify: Allow base path to be set by command line option.Neil Brown2007-03-201-4/+26
| | | | for compat with statd.
* Add sm-notify from SuSENeil Brown2007-03-202-0/+792
| | | | Not included in build yet.