deb_libnfs.git
10 years agoSet default uid/gid to 65534/nobody for ANDROID
Ronnie Sahlberg [Thu, 13 Mar 2014 02:31:20 +0000 (19:31 -0700)] 
Set default uid/gid to 65534/nobody for ANDROID

10 years agoWe only need to spend CPU computing a new error string IFF there was an error
Ronnie Sahlberg [Wed, 12 Mar 2014 12:54:38 +0000 (05:54 -0700)] 
We only need to spend CPU computing a new error string IFF there was an error
when unmarshalling the reply.

10 years agoImprove error reporting when unmarshalling of message headers fail.
Ronnie Sahlberg [Wed, 12 Mar 2014 01:52:48 +0000 (18:52 -0700)] 
Improve error reporting when unmarshalling of message headers fail.

10 years agoAdd a new nfs_stat64() function that operates on a always-64-bit stat structure
Ronnie Sahlberg [Wed, 5 Mar 2014 03:40:05 +0000 (19:40 -0800)] 
Add a new nfs_stat64() function that operates on a always-64-bit stat structure

10 years agonfs_pread_async: plug potential memleaks
Arne Redlich [Tue, 18 Feb 2014 19:56:24 +0000 (20:56 +0100)] 
nfs_pread_async: plug potential memleaks

Spotted by clang analyzer.

This also introduces asserts to help clang analyzer avoid reporting
false positives.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agonfs_write_async: plug potential memory leaks
Arne Redlich [Tue, 18 Feb 2014 19:51:36 +0000 (20:51 +0100)] 
nfs_write_async: plug potential memory leaks

Spotted by clang analyzer.

This also introduces asserts to help clang analyzer avoid
reporting false positives.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agorpc_read_from_socket: fix use-after-free due to missing return
Arne Redlich [Tue, 18 Feb 2014 19:22:11 +0000 (20:22 +0100)] 
rpc_read_from_socket: fix use-after-free due to missing return

Spotted by clang analyzer.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agosocket.c: fix format string issues (too few arguments)
Arne Redlich [Mon, 17 Feb 2014 23:42:14 +0000 (00:42 +0100)] 
socket.c: fix format string issues (too few arguments)

These were uncovered by the previously added __attribute__((format(printf))).

Emacs also removed trailing whitespace while at it.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years ago{nfs,rpc}_set_error: add __attribute__((format(printf))) annotations
Arne Redlich [Mon, 17 Feb 2014 23:41:05 +0000 (00:41 +0100)] 
{nfs,rpc}_set_error: add __attribute__((format(printf))) annotations

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agonfs_rename_continue_1_internal: fix use-after-free
Arne Redlich [Mon, 17 Feb 2014 23:32:10 +0000 (00:32 +0100)] 
nfs_rename_continue_1_internal: fix use-after-free

Spotted by clang analyzer.
This introduces another allocation to create a copy of the target path
of a rename in case it needs to be reported via rpc_set_error - it might
be a better idea to avoid the allocation and have a slightly less informative
error message?

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agonfs_unlink_async: plug potential memory leak
Arne Redlich [Mon, 17 Feb 2014 23:22:45 +0000 (00:22 +0100)] 
nfs_unlink_async: plug potential memory leak

Spotted by clang analyzer

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agonfs_rmdir_async: fix potential memory leak
Arne Redlich [Mon, 17 Feb 2014 23:20:59 +0000 (00:20 +0100)] 
nfs_rmdir_async: fix potential memory leak

Spotted by clang analyzer.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agonfs_mkdir_async: fix potential memory leak
Arne Redlich [Mon, 17 Feb 2014 23:19:23 +0000 (00:19 +0100)] 
nfs_mkdir_async: fix potential memory leak

Pointed out by clang analyzer

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agonfs_mknod_async: fix use-after-free
Arne Redlich [Mon, 17 Feb 2014 22:53:38 +0000 (23:53 +0100)] 
nfs_mknod_async: fix use-after-free

Spotted by clang analyzer

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agonfs_fchown_async: fix use-after-free
Arne Redlich [Mon, 17 Feb 2014 22:51:48 +0000 (23:51 +0100)] 
nfs_fchown_async: fix use-after-free

Spotted by clang analyzer.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agonfs_fchmod_async: fix use-after-free
Arne Redlich [Mon, 17 Feb 2014 22:50:17 +0000 (23:50 +0100)] 
nfs_fchmod_async: fix use-after-free

Spotted by clang analyzer

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agonfs_opendir2_cb: plug potential memleaks
Arne Redlich [Mon, 17 Feb 2014 22:42:42 +0000 (23:42 +0100)] 
nfs_opendir2_cb: plug potential memleaks

Spotted by clang analyzer

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agofree_nfs_cb_data: make static and drop superfluous nullptr checks / assignments
Arne Redlich [Mon, 17 Feb 2014 22:34:18 +0000 (23:34 +0100)] 
free_nfs_cb_data: make static and drop superfluous nullptr checks / assignments

free() can cope with nullptrs and there's no point in null-ing free'd members
as the containing struct is free'd as well.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agofree_nfs_cb_data: add assert(data->free_continue_data)
Arne Redlich [Mon, 17 Feb 2014 22:29:07 +0000 (23:29 +0100)] 
free_nfs_cb_data: add assert(data->free_continue_data)

Non-debug builds will trip over the nullptr too - do we rather
want to leak the memory there?

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agonfs_fchown_async: fix nullptr dereference
Arne Redlich [Mon, 17 Feb 2014 22:22:02 +0000 (23:22 +0100)] 
nfs_fchown_async: fix nullptr dereference

nfs_chown_data is hooked up under nfs_cb_data->continue_data but
no ->free_continue_data is configured, so once free_nfs_cb_data is
invoked it will trip over a nullptr.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agonfs_fchown_async: plug potential memleak
Arne Redlich [Mon, 17 Feb 2014 22:17:15 +0000 (23:17 +0100)] 
nfs_fchown_async: plug potential memleak

Spotted by clang analyzer.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agonfs_creat_async: plug potential memleak
Arne Redlich [Mon, 17 Feb 2014 22:11:59 +0000 (23:11 +0100)] 
nfs_creat_async: plug potential memleak

Spotted by clang analyzer.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agonfs_mknod_async: plug potential memory leak
Arne Redlich [Mon, 17 Feb 2014 22:09:31 +0000 (23:09 +0100)] 
nfs_mknod_async: plug potential memory leak

Pointed out by clang analyzer.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agonfs_lookuppath_async: plug potential memleak
Arne Redlich [Mon, 17 Feb 2014 22:06:32 +0000 (23:06 +0100)] 
nfs_lookuppath_async: plug potential memleak

Spotted by clang analyzer.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agonfs_opendir_cb: plug potential memory leak
Arne Redlich [Mon, 17 Feb 2014 21:44:47 +0000 (22:44 +0100)] 
nfs_opendir_cb: plug potential memory leak

Spotted by clang analyzer.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agolibnfs-raw.h: rename export -> exportname to avoid clash with C++ keyword
Arne Redlich [Mon, 17 Feb 2014 21:17:04 +0000 (22:17 +0100)] 
libnfs-raw.h: rename export -> exportname to avoid clash with C++ keyword

From http://en.cppreference.com/w/cpp/keyword/export :

  Until C++11:
  "Used to mark a template definition exported, which allows the same
   template to be declared, but not defined, in other translation units."

  Since C++11:
  "The keyword is unused and reserved."

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agolibnfs.h: wrap in extern "C" for C++ compatibility
Arne Redlich [Sun, 16 Feb 2014 20:36:17 +0000 (21:36 +0100)] 
libnfs.h: wrap in extern "C" for C++ compatibility

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agonfs_normalize_path: fix using the results of assignments in while loops
Arne Redlich [Thu, 13 Feb 2014 21:36:54 +0000 (22:36 +0100)] 
nfs_normalize_path: fix using the results of assignments in while loops

Spotted by clang:
 ../../libnfs.git/lib/libnfs.c:1002:13: warning: using the result of an assignment as a condition without parentheses
       [-Wparentheses]
         while (str = strstr(path, "//")) {
                ~~~~^~~~~~~~~~~~~~~~~~~~
 ../../libnfs.git/lib/libnfs.c:1002:13: note: place parentheses around the assignment to silence this warning
         while (str = strstr(path, "//")) {
                    ^
                (                       )
 ../../libnfs.git/lib/libnfs.c:1002:13: note: use '==' to turn this assignment into an equality comparison
         while (str = strstr(path, "//")) {
                    ^
                    ==

Make the intent clear by adding extra parentheses, and also
remove trailing whitespace from libnfs.c while at it.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agolibnfs-zdr.h: wrap in extern "C" for C++ compatibility
Arne Redlich [Thu, 13 Feb 2014 21:29:11 +0000 (22:29 +0100)] 
libnfs-zdr.h: wrap in extern "C" for C++ compatibility

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agolibnfs-raw.h: wrap in extern "C" for C++ compatibility
Arne Redlich [Thu, 13 Feb 2014 21:28:54 +0000 (22:28 +0100)] 
libnfs-raw.h: wrap in extern "C" for C++ compatibility

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agolibnfs-private.h: wrap in extern "C" for C++ compatibility
Arne Redlich [Thu, 13 Feb 2014 21:27:57 +0000 (22:27 +0100)] 
libnfs-private.h: wrap in extern "C" for C++ compatibility

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agoslist.h: add include guards
Arne Redlich [Thu, 13 Feb 2014 21:20:00 +0000 (22:20 +0100)] 
slist.h: add include guards

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agolibnfs-private.h: add include guards
Arne Redlich [Thu, 13 Feb 2014 21:19:51 +0000 (22:19 +0100)] 
libnfs-private.h: add include guards

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agolibnfs-raw.h: remove trailing whitespace
Arne Redlich [Thu, 13 Feb 2014 21:17:31 +0000 (22:17 +0100)] 
libnfs-raw.h: remove trailing whitespace

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agolibnfs.h: add include guards
Arne Redlich [Thu, 13 Feb 2014 21:17:20 +0000 (22:17 +0100)] 
libnfs.h: add include guards

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
10 years agoChange license for the ld preload hack to gplv3
Ronnie Sahlberg [Wed, 12 Feb 2014 02:36:24 +0000 (18:36 -0800)] 
Change license for the ld preload hack to gplv3

10 years agoAdd a simple LD_PRELOAD toy to make cat and cp nfs-aware
Ronnie Sahlberg [Mon, 3 Feb 2014 02:03:50 +0000 (18:03 -0800)] 
Add a simple LD_PRELOAD toy to make cat and cp nfs-aware

10 years agoWe need to pass a filehandle back for open(O_TRUNC) or else the app will
Ronnie Sahlberg [Mon, 3 Feb 2014 01:39:04 +0000 (17:39 -0800)] 
We need to pass a filehandle back for open(O_TRUNC) or else the app will
be unhappy

10 years agoAdd support for O_TRUNC with nfs_open()
Ronnie Sahlberg [Sun, 2 Feb 2014 20:16:07 +0000 (12:16 -0800)] 
Add support for O_TRUNC with nfs_open()

O_TRUNC will attempt to truncate the file when opened with O_RDWR
or O_WRONLY.

Normal posix open(O_RDONLY|O_TRUNC) is undefined.

libnfs nfs_open() only uses the O_TRUNC flag when used in combination with either O_RDWR or O_WRONLY.
When O_TRUNC is used together with O_RDONLY libnfs will silently ignore the O_TRUNC flag.

Libnfs nfs_open(O_RDONLY|O_TRUNC) is thus the same as nfs_open(O_RDONLY)

10 years agoRename the nfs_open() argument from mode to flags
Ronnie Sahlberg [Sun, 2 Feb 2014 19:41:22 +0000 (11:41 -0800)] 
Rename the nfs_open() argument from mode to flags

10 years agoAdd a rpc_set_fd() fucntion which can be used to swap the underlying socket file...
Ronnie Sahlberg [Sun, 2 Feb 2014 16:45:21 +0000 (08:45 -0800)] 
Add a rpc_set_fd() fucntion which can be used to swap the underlying socket file descriptor

This is mainly needed when having to track and control the file descriptors that are used by libnfs, for example when trying to emulate dup2() ontop
of libnfs.

10 years agoEmpty paths are no longer an error. Translate it to '.' instead.
Ronnie Sahlberg [Sat, 1 Feb 2014 16:03:12 +0000 (08:03 -0800)] 
Empty paths are no longer an error. Translate it to '.' instead.

10 years agoAdd support for chdir and getcwd
Ronnie Sahlberg [Tue, 28 Jan 2014 04:54:14 +0000 (20:54 -0800)] 
Add support for chdir and getcwd

Add chdir and getcwd and store cwd in the nfs_context.
Add functions to process the paths specified and normalize them
by performing the transforms :
    // -> /
    /./ -> /
    ^/../ -> error
    ^[^/] -> error
    /string/../ -> /
    /$ -> \0
    /.$ -> \0
    ^/..$ -> error
    /string/..$ -> /

Update the path lookup function to allow specifying relative paths based on
cwd for all functions.

10 years agoRemove chdir changes for now. Needs more testing.
Ronnie Sahlberg [Fri, 31 Jan 2014 02:30:25 +0000 (18:30 -0800)] 
Remove chdir changes for now. Needs more testing.

10 years agoRevert "Add support for chdir and getcwd"
Ronnie Sahlberg [Fri, 31 Jan 2014 02:26:39 +0000 (18:26 -0800)] 
Revert "Add support for chdir and getcwd"

This reverts commit fb6f315257a8752c3a8b96a71261a5613a6f2069.

10 years agoNew version 1.9.1
Ronnie Sahlberg [Tue, 28 Jan 2014 14:41:31 +0000 (06:41 -0800)] 
New version  1.9.1

Add back the libnfs-raw-*.h headers to make install

10 years agoWe need the libnfs-raw-*.h files in include/Makefile.am
Ronnie Sahlberg [Tue, 28 Jan 2014 14:35:52 +0000 (06:35 -0800)] 
We need the libnfs-raw-*.h files in include/Makefile.am
or else the autotools (which I dont really understand how it works)
will not install the headers.

10 years agoAdd support for chdir and getcwd
Ronnie Sahlberg [Tue, 28 Jan 2014 04:54:14 +0000 (20:54 -0800)] 
Add support for chdir and getcwd

Add chdir and getcwd and store cwd in the nfs_context.
Add functions to process the paths specified and normalize them
by performing the transforms :
    // -> /
    /./ -> /
    ^/../ -> error
    ^[^/] -> error
    /string/../ -> /
    /$ -> \0
    /.$ -> \0
    ^/..$ -> error
    /string/..$ -> /

Update the path lookup function to allow specifying relative paths based on
cwd for all functions.

10 years agoNew version : 1.9.0
Ronnie Sahlberg [Tue, 28 Jan 2014 04:47:24 +0000 (20:47 -0800)] 
New version : 1.9.0

 - Use _stat64 on windows so file sizes become 64bit always.
 - Increase default marshalling buffer so we can marshall large PDUs.
 - RPC layer support for NFSv2
 - Win32 updates and fixes
 - Add URL parsing functions and URL argument support.
 - New utility: nfs-io
 - nfs-ls enhancements
 - RPC layer support for NSM
 - Add example FUSE filesystem.
 - Minor fixes.

10 years agoMerge pull request #50 from asgeirn/master
Ronnie Sahlberg [Thu, 16 Jan 2014 14:25:35 +0000 (06:25 -0800)] 
Merge pull request #50 from asgeirn/master

Fixed SPEC file to work with Red Hat 6.3 x64.

10 years agoFixed SPEC file to work with Red Hat 6.3 x64.
Asgeir Storesund Nilsen [Thu, 16 Jan 2014 10:03:14 +0000 (10:03 +0000)] 
Fixed SPEC file to work with Red Hat 6.3 x64.

10 years agoMerge pull request #49 from Memphiz/win32fix4
Ronnie Sahlberg [Tue, 14 Jan 2014 02:14:19 +0000 (18:14 -0800)] 
Merge pull request #49 from Memphiz/win32fix4

Win32fix4

10 years ago[win32] - fix comilation by removing a unused "int i;" - though i have no
Memphiz [Mon, 13 Jan 2014 18:52:58 +0000 (19:52 +0100)] 
[win32] - fix comilation by removing a unused "int i;" - though i have no
clue why this fails with "';' missing before 'Typ'"

10 years ago[win32] - add new missing files to vs project
Memphiz [Mon, 13 Jan 2014 09:20:40 +0000 (10:20 +0100)] 
[win32] - add new missing files to vs project

10 years ago[win32/nlm] - add missing typedef for u_quad_t and quad_t
Memphiz [Mon, 13 Jan 2014 09:16:34 +0000 (10:16 +0100)] 
[win32/nlm] - add missing typedef for u_quad_t and quad_t

10 years agoMake sure cookie is initialized before we use it.
Ronnie Sahlberg [Mon, 13 Jan 2014 14:36:38 +0000 (06:36 -0800)] 
Make sure cookie is initialized before we use it.

10 years agoExport the three new nfs_set_* functions from the windows library/dll
Ronnie Sahlberg [Mon, 13 Jan 2014 14:30:43 +0000 (06:30 -0800)] 
Export the three new nfs_set_* functions from the windows library/dll

10 years agoMerge pull request #48 from plieven/master
Ronnie Sahlberg [Mon, 13 Jan 2014 14:28:46 +0000 (06:28 -0800)] 
Merge pull request #48 from plieven/master

make adjustments for v6 of the qemu NFS driver

10 years agomake adjustments for v6 of the qemu NFS driver
Peter Lieven [Mon, 13 Jan 2014 10:22:21 +0000 (11:22 +0100)] 
make adjustments for v6 of the qemu NFS driver

Signed-off-by: Peter Lieven <pl@kamp.de>
10 years agoMerge pull request #47 from Memphiz/win32fix3
Ronnie Sahlberg [Sun, 12 Jan 2014 23:18:59 +0000 (15:18 -0800)] 
Merge pull request #47 from Memphiz/win32fix3

[win32] - fixed bad number casting when using libnfs on 64bit win8 syste...

10 years ago[win32] - fixed bad number casting when using libnfs on 64bit win8 systems - force...
Memphiz [Sun, 12 Jan 2014 13:42:56 +0000 (14:42 +0100)] 
[win32] - fixed bad number casting when using libnfs on 64bit win8 systems - force the usage of struct __stat64 as its done on other platforms implicitly

10 years agoMerge pull request #45 from maksbotan/master
Ronnie Sahlberg [Wed, 8 Jan 2014 14:32:07 +0000 (06:32 -0800)] 
Merge pull request #45 from maksbotan/master

Adjust Makefile.am's to support out-of-source builds

10 years agoAdjust Makefile.am's to support out-of-source builds
Maxim Koltsov [Wed, 8 Jan 2014 08:35:19 +0000 (12:35 +0400)] 
Adjust Makefile.am's to support out-of-source builds

10 years agoAdd uid/gid to the stat data returned in the readdir directoryentry
Ronnie Sahlberg [Wed, 1 Jan 2014 00:25:01 +0000 (16:25 -0800)] 
Add uid/gid to the stat data returned in the readdir directoryentry

We also get uid/gid for free when using READDIRPLU3 (and READDIRPLUS3 emulation)
so store these too so applications that needs to look at the uid/gid can avoid
the extra call to nfs_stat()

10 years agoAssign the whole nfs_fh3 structure instead of element by element when possible
Ronnie Sahlberg [Wed, 1 Jan 2014 00:11:11 +0000 (16:11 -0800)] 
Assign the whole nfs_fh3 structure instead of element by element when possible

10 years agoChange rpc_nfs_readdirplus to rpc_nfs3_readdirplus
Ronnie Sahlberg [Tue, 31 Dec 2013 23:58:59 +0000 (15:58 -0800)] 
Change rpc_nfs_readdirplus to rpc_nfs3_readdirplus

10 years agoChange rpc_nfs_readdir to rpc_nfs3_readir
Ronnie Sahlberg [Tue, 31 Dec 2013 23:53:40 +0000 (15:53 -0800)] 
Change rpc_nfs_readdir to rpc_nfs3_readir

10 years agoChange rpc_nfs_readlink to rpc_nfs3_readlink
Ronnie Sahlberg [Tue, 31 Dec 2013 23:46:32 +0000 (15:46 -0800)] 
Change rpc_nfs_readlink to rpc_nfs3_readlink

10 years agoChange rpc_nfs_symlink to rpc_nfs3_symlink
Ronnie Sahlberg [Tue, 31 Dec 2013 23:44:15 +0000 (15:44 -0800)] 
Change rpc_nfs_symlink to rpc_nfs3_symlink

10 years agoChane rpc_nfs_link to rpc_nfs3_link
Ronnie Sahlberg [Tue, 31 Dec 2013 23:43:00 +0000 (15:43 -0800)] 
Chane rpc_nfs_link to rpc_nfs3_link

10 years agoChange rpc_nfs_rename to rpc_nfs3_rename
Ronnie Sahlberg [Tue, 31 Dec 2013 23:37:40 +0000 (15:37 -0800)] 
Change rpc_nfs_rename to rpc_nfs3_rename

10 years agoChange rpc_nfs_mknod to rpc_nfs3_mknod
Ronnie Sahlberg [Tue, 31 Dec 2013 23:33:36 +0000 (15:33 -0800)] 
Change rpc_nfs_mknod to rpc_nfs3_mknod

10 years agoChange rpc_nfs_remove to rpc_nfs3_remove
Ronnie Sahlberg [Tue, 31 Dec 2013 23:23:44 +0000 (15:23 -0800)] 
Change rpc_nfs_remove to rpc_nfs3_remove

10 years agoChange rpc_nfs_create to rpc_nfs3_create
Ronnie Sahlberg [Tue, 31 Dec 2013 23:21:20 +0000 (15:21 -0800)] 
Change rpc_nfs_create to rpc_nfs3_create

10 years agoChange rpc_nfs_rmdir to rpc_nfs3_rmdir
Ronnie Sahlberg [Tue, 31 Dec 2013 23:20:28 +0000 (15:20 -0800)] 
Change rpc_nfs_rmdir to rpc_nfs3_rmdir

10 years agoChange rpc_nfs_mkdir to rpc_nfs3_mkdir
Ronnie Sahlberg [Tue, 31 Dec 2013 23:17:16 +0000 (15:17 -0800)] 
Change rpc_nfs_mkdir to rpc_nfs3_mkdir

10 years agoChange rpc_nfs_commit to rpc_nfs3_commit
Ronnie Sahlberg [Tue, 31 Dec 2013 23:16:02 +0000 (15:16 -0800)] 
Change rpc_nfs_commit to rpc_nfs3_commit

10 years agoChange rpc_nfs_setattr to rpc_nfs3_setattr
Ronnie Sahlberg [Tue, 31 Dec 2013 23:12:32 +0000 (15:12 -0800)] 
Change rpc_nfs_setattr to rpc_nfs3_setattr

10 years agoChange all calls to rpc_nfs_fsstat to rpc_nfs3_fsstat
Ronnie Sahlberg [Tue, 31 Dec 2013 23:08:11 +0000 (15:08 -0800)] 
Change all calls to rpc_nfs_fsstat to rpc_nfs3_fsstat

10 years agoChange all calls to rpc_nfs_fsinfo to rpc_nfs3_fsinfo
Ronnie Sahlberg [Tue, 31 Dec 2013 23:06:25 +0000 (15:06 -0800)] 
Change all calls to rpc_nfs_fsinfo to rpc_nfs3_fsinfo

10 years agoMerge pull request #44 from plieven/master
Ronnie Sahlberg [Thu, 26 Dec 2013 19:00:04 +0000 (11:00 -0800)] 
Merge pull request #44 from plieven/master

fix 3 flaws detected by valgrind and bump version to intermediate version

10 years agoCreate SOCURRENT/SOREVISION/SOAGE in lib/Makefile.am
Ronnie Sahlberg [Thu, 26 Dec 2013 18:52:43 +0000 (10:52 -0800)] 
Create SOCURRENT/SOREVISION/SOAGE in lib/Makefile.am

10 years agoFix some compiler warnings and bugs
Ronnie Sahlberg [Thu, 26 Dec 2013 18:40:37 +0000 (10:40 -0800)] 
Fix some compiler warnings and bugs

Add missing %s to two example programs and fix incorrect argument to
rpc_nfs3_fsinfo_async()

10 years agoChange rpc_mount_* to rpc_mount3_* and make it explicit which version of
Ronnie Sahlberg [Thu, 26 Dec 2013 17:11:05 +0000 (09:11 -0800)] 
Change rpc_mount_* to rpc_mount3_* and make it explicit which version of
the protocol we are using.

10 years agoChange rpc_set_context_args to nfs_set_context_args and make it static
Ronnie Sahlberg [Thu, 26 Dec 2013 17:08:26 +0000 (09:08 -0800)] 
Change rpc_set_context_args to nfs_set_context_args and make it static

It only makes sense to pass url arguments to an nfs URL and thus a nfs context.
While some arguments may apply to the underlying raw rpc context (uid, gid,
tcp settings etc) some future arguments may need to apply to the nfs context
instead, such as selecting nfs version, whether or not to force sync writes
etc.

10 years agonfs-cp: don't leave file_context->url unitialized
Peter Lieven [Thu, 26 Dec 2013 13:03:57 +0000 (14:03 +0100)] 
nfs-cp: don't leave file_context->url unitialized

Signed-off-by: Peter Lieven <pl@kamp.de>
10 years agobump version to 1.8.90
Peter Lieven [Thu, 26 Dec 2013 11:49:28 +0000 (12:49 +0100)] 
bump version to 1.8.90

I need this to detect that we have (almost) version 1.9.0 in qemu,
but I think we should do some more testing before releasing 1.9.0.

Signed-off-by: Peter Lieven <pl@kamp.de>
10 years agonfs_parse_url: initialize memory
Peter Lieven [Thu, 26 Dec 2013 11:48:21 +0000 (12:48 +0100)] 
nfs_parse_url: initialize memory

the urls struct was accidently left unitialized.

Signed-off-by: Peter Lieven <pl@kamp.de>
10 years agonfs_parse_url_incomplete: fix use after free in param parsing
Peter Lieven [Thu, 26 Dec 2013 09:43:15 +0000 (10:43 +0100)] 
nfs_parse_url_incomplete: fix use after free in param parsing

if no server is specified flagsp points into urls->server.

Signed-off-by: Peter Lieven <pl@kamp.de>
10 years agoCreate a new function rpc_set_context_args where we parse and set the context
Ronnie Sahlberg [Thu, 26 Dec 2013 00:57:52 +0000 (16:57 -0800)] 
Create a new function rpc_set_context_args where we parse and set the context
arguments.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
10 years agoMOUNT: The wrappers for the old MOUNT rpc calls should call the new functions and...
Ronnie Sahlberg [Thu, 26 Dec 2013 00:46:52 +0000 (16:46 -0800)] 
MOUNT: The wrappers for the old MOUNT rpc calls should call the new functions and not recurse

10 years agoAdd the url parsing functions to libnfs-win32.def
Ronnie Sahlberg [Thu, 26 Dec 2013 00:29:00 +0000 (16:29 -0800)] 
Add the url parsing functions to libnfs-win32.def

10 years agoDocument the URL syntax
Ronnie Sahlberg [Thu, 26 Dec 2013 00:27:10 +0000 (16:27 -0800)] 
Document the URL syntax

10 years agoMerge pull request #43 from plieven/master
Ronnie Sahlberg [Thu, 26 Dec 2013 00:11:29 +0000 (16:11 -0800)] 
Merge pull request #43 from plieven/master

URL parsing functions and minor fixes + enhancements

10 years agoWrite the total number of bytes copied by nfs-cp, not just the last block written.
Ronnie Sahlberg [Tue, 24 Dec 2013 21:05:04 +0000 (13:05 -0800)] 
Write the total number of bytes copied by nfs-cp, not just the last block written.

10 years agoGrow the marshalling buffer from 64k to 1M so we can marshall really large WRITE3s
Ronnie Sahlberg [Tue, 24 Dec 2013 21:03:50 +0000 (13:03 -0800)] 
Grow the marshalling buffer from 64k to 1M so we can marshall really large WRITE3s

10 years agoMOUNT: Add RPC support for MOUNTv1
Ronnie Sahlberg [Tue, 24 Dec 2013 20:20:41 +0000 (12:20 -0800)] 
MOUNT: Add RPC support for MOUNTv1

10 years agoAdd NFSv2 RPC support
Ronnie Sahlberg [Tue, 24 Dec 2013 19:28:56 +0000 (11:28 -0800)] 
Add NFSv2 RPC support

10 years agoNFS: Add new function signatures for rpc_nfs3_ that takes *3args arguments
Ronnie Sahlberg [Tue, 24 Dec 2013 19:16:21 +0000 (11:16 -0800)] 
NFS: Add new function signatures for rpc_nfs3_ that takes *3args arguments
to match the XDR.

Leave the existing ad-hoc rpc_nfs_* functions for backward compatibility.

10 years agoAdd missing symbols to libnfs-win32.def and make them EXTERN
Ronnie Sahlberg [Tue, 24 Dec 2013 16:54:28 +0000 (08:54 -0800)] 
Add missing symbols to libnfs-win32.def and make them EXTERN