| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Reject if there are non-flag args,
Reject if the filesystem is not an NFS filesystem.
|
|
|
|
|
| |
Make sure all possible invalid arguments are discovered and reported.
Make sure nothing gets by for uid!=0 that doesn't perfectly match fstab.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Registering sockets with portmap might require root privs,
so don't drop privs until that has been done.
|
|
|
|
|
| |
With -L (for Listen-only) or --no-notify, statd will not run
sm-notify.
|
|
|
|
|
| |
statd now execs sm-notify to notify peers and only listens to
monitor requests and remote notifications itself.
|
|
|
|
|
| |
Add sm-notify to the compile/install scripts,
(and fix a compile warning).
|
|
|
|
|
| |
If /var/lib/nfs/sm is owned by non-root, setuid to that uid
after opening sockets but before receiving answers.
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
| |
This functionality is alreday present in getaddrinfo so it isn't
needed explicitly.
|
|
|
|
| |
for compat with statd.
|
|
|
|
| |
Not included in build yet.
|
|
|
|
|
|
|
|
|
| |
The fake option has to write to mtab like a normal mount. Read mount(8) man
page for more details. It's very important for system init scripts that use
"-f" as a way how write info about mount points to /etc/mtab.
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
| |
When looking for the exportpoint to match a given fsid,
if an NFSEXP_CROSSMOUNT export is found, also check all filesystems
mounted below there.
|
|
|
|
|
|
|
| |
If the kernel finds a mountpoint below a 'crossmnt' export, it will ask
mounted what export options to use. With this patch it will return
the same export options as for the top 'crossmnt' export unless
more specific options have been given.
|
|
|
|
|
|
|
|
|
| |
If we are asked to export a filesystem which is not explicitly
exported, but an ancestor is exported as 'crossmnt', export the
filesystems with the same options as the ancestor.
This is the first step to making 'crossmnt' effectively export
a tree of filesystems.
|
|
|
|
|
|
| |
Without this fix, mountd ignores sockets with filedescriptor > 31,
so if there are more than about 26 concurrent connections, mountd
starts spinning.
|
|
|
|
|
| |
Signed-off-by: Steve Dickson <steved@redhat.com>
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
| |
1/ only warn once per export, as it could get too noisy.
2/ make it a little clearer why this might be a problem.
|
|
|
|
|
|
|
|
|
| |
Future work needs access to the base pipefs directory rather than
the nfs subdirectory. Create two separate paths called
pipefs_dir and pipefs_nfsdir with the name of each.
Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
| |
Don't restrict machine credentials to be "nfs/<machine.name>".
Use any usable credentials contained in the keytab file.
[We actually attempt to use the first entry found for each
realm, not every entry, in the keytab.]
Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new option ("-n") to rpc.gssd to indicate that accesses as root
(uid 0) should not use machine credentials, but should instead use
"normal" Kerberos credentials obtained by root.
This change was prompted by a suggestion and patch from Daniel
Muntz <Dan.Muntz@netapp.com>. That patch suggested trying "normal"
credentials first and falling back to using machine creds for
uid 0 if normal creds failed.
This opens up the case where root may have credentials as "foo@REALM"
and begins accessing files. Then the context using those credentials
expires and must be renewed. If the credentials are now expired, then
root's new context would fall back and be created with the machine
credentials.
Instead, this patch insists that the administrator choose to use either
machine credentials for accesses by uid 0 (the default behavior, as
it was before) or "normal" credentials. In the latter case, arrangements
must be made to obtain credentials before attempting a mount. There
should be no doubts which credentials are used for uid 0.
Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
| |
Free keytab entries while processing keytab file.
Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
|
| |
|
| |
|
|
|
|
| |
Providing user=username or users is listed in mtab.
|
|
|
|
| |
They are identical and the later allows us to use hasmntent.
|
|
|
|
|
|
|
|
|
|
|
|
| |
If "user" or "users" is given, then allow mount.nfs to be run
by a non-root user providing that the mountpoint, filesystem, and options
exactly match what is found in fstab.
For "user", record the user name in mtab so they can unmount the
filesystem later.
Also alwasys ignore auto, owner, group and their negations as well
as "_netdev", "comment" and "loop".
|
|
|
|
|
| |
The version of the interface to the kernel for requesting a mount
it entirely different to the version of NFS that is being mounted.
|
|
|
|
|
| |
Signed-off-by: Steve Dickson <steved@redhat.com>
Signed-off-by: Neil Brown <neilb@suse.de>
|
| |
|
|
|
|
|
|
| |
Because, ofcourse, we haven't.
When we do finally let-go of the mount, the server won't get told,
but the same would happen on a crash, and the server just has to cope.
|
|
|
|
|
|
| |
nfsumount() returns 1 for success and 0 for failure.
Take proper account of this when producing an exit
status.
|
|
|
|
|
| |
Defaults are now tcp/v3.
Several bugs have been fixed.
|
| |
|
|
|
|
|
| |
We don't need it (any more).
Also add AM_PROG_CC_C_O as we seem to need it..
|
|
|
|
|
|
| |
rather than explicit -D_FILE_OFFSET_BITS=64
Taken from Redhat -5 sources.
|
|
|
|
|
|
| |
On distros that support 32 and 64bit userspace, we need to look
a bit more broadly for libraries
(taken from Redhat sources for RHEL5 - thanks).
|
|
|
|
|
| |
Providing write access to the DESTDIR is ok, we shouldn't
fail the install just because 'chown' fails.
|
|
|
|
|
| |
As this is a file in /tmp, a symlink could take us anywhere...
If it was a NFS filesystem with a dead server, we could block for a long time..
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- remove non-used arguments from del_mtab.
- Don't try to pass a "host:/path" string to umount.
It used to be possible to umount("/dev/whatever"). It has never
been possible to umount("host:/path").
- Don't try to read /proc/mounts first. Some mount options (mount_vers)
are only stored in /etc/mtab, not in /proc/mounts. So we have to
prefer /etc/mtab as getmntXbackwards do.
- Only every call one of getmnt{dir,dev}backwards, depending on whether
'spec' looks like a path name or a host:/path.
- Don't call _nfsumount unless we have a host:/path, or del_mtab unless we
have a path name.
|
|
|
|
| |
It is only used in one place.
|
|
|
|
|
|
|
| |
add_mtab2 is used to remove an entry from mtab, rename it to del_mtab.
Signed-off-by: Wei Yongjun <yjwei@nanjing-fnst.com>
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch do following things:
1. When unmounting, we should try /proc/mounts first. Only then in
/etc/mtab if it wasn't found.
2. Reject name passed to us which is not starts with a '/' or not
contains a ':'
3. Fix the method to get UMNT protocol
Signed-off-by: Wei Yongjun <yjwei@nanjing-fnst.com>
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
| |
This fix umount.nfs4's BUG, patch cleanup some useless code.
1. Combine nfs3_umount() and nfs2_umount() to nfs_umount()
2. If it is a nfs4 remote file system or unkown mount version, do not
probe remote mount port and not send UMNT request wich is not necessary
Signed-off-by: Wei Yongjun <yjwei@nanjing-fnst.com>
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
| |
This patch lets umount to use correct UMNT version to do umount.
In latest kernel, the version format is "vers=3" etc., and in old kernel
the version format is "v3","v4" etc.
Signed-off-by: Wei Yongjun <yjwei@nanjing-fnst.com>
Signed-off-by: Neil Brown <neilb@suse.de>
|