Without this argument it's impossible to pass an object instance to procedure
callbacks which basically forces users to either use global variables or to
write additional boilerplate code and find object instances from rpc_context
pointer values.
Otherwise it segfaults inside any string decoding inside rpc_process_call()
as it doesn't zero the allocated memory, so libnfs_zdr_string() may receive
non-zero *strp which is very easy to reproduce by writing a simple NFS server
example using libnfs :-)
Fix the versioning in makerpms.sh
Fix some compile issues in the test programs.
NFSv3: skip commit on close if the file has not been written to.
Add nfs_umount() to NFSv3
Add nfs_statvfs64()
Fix invalid shift of pid_t when generating rpc->xid
Compile fixes for Mac OSX
Fix for dup2() on Windows
NFSv4 fix for directory handling
Improvements to configure/bulding
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Add a new function nfs_statvfs64() that returns a struct nfs_statvfs_64
where all fields are uint64_t.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Running "configure --enable-utils" _disables_ compilation/installation of
utils (and vice versa) while omitting the --(en|dis)able-utils option auto-
enables utils.
This patch fixes the logic when the option is given on command line but
keeps utils build enabled when the option was omitted.
This change adds the main include dir to the include directories for
cmake such that when integrating libnfs with another project, this dir
is added to the include list.
NFSv4 support.
lockf() support (NFSv4 only).
fcntl() support for locking (NFSv4 only).
Add CMake support.
URL arguments to select NFS version.
URL argument to set nfsport. This allows NFSv4 to work for
servers without portmapper support.
URL argument to set he mount port.
NFSv4: use getpwnam to map NFSv4 (Ganesha) when passing uid/gid
as a user/group name insead of as a uid/gid.
Added nfs-fh: a simle utility to print the filehandle for a nfs file.
Win32 build fixes.
Add a new open2() function that takes a mode argument.
Add a testsuite for libnfs.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Default to use port 2049. If server runs on a different port then
we must manually override this with the nfsport flag.
NFSv4 servers can run without any portmapper daemon at all and we
must be prepared for that.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Explanation of the bug:
- nfs_opendir_cb() queues a READDIR when it receives RPC_STATUS_ERROR.
- rpc_purge_all_pdus() explicitly says that no further pdus should be
queued when rpc_purge_all_pdus() is invoked and the outqueue is being
cleared.
- Since nfs_opendir_cb() is called in rpc_purge_all_pdus() with
status=RPC_STATUS_ERROR, this invariant is broken.
Fix:
- Invoke check_nfs3_error() which will invoke the appropriate
callback with the right error.
- Disallow queueing a request in the if block