Memphiz [Mon, 13 Jan 2014 09:16:34 +0000 (10:16 +0100)]
[win32/nlm] - add missing typedef for u_quad_t and quad_t
Ronnie Sahlberg [Mon, 13 Jan 2014 14:36:38 +0000 (06:36 -0800)]
Make sure cookie is initialized before we use it.
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
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
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>
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...
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
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
Maxim Koltsov [Wed, 8 Jan 2014 08:35:19 +0000 (12:35 +0400)]
Adjust Makefile.am's to support out-of-source builds
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()
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
Ronnie Sahlberg [Tue, 31 Dec 2013 23:58:59 +0000 (15:58 -0800)]
Change rpc_nfs_readdirplus to rpc_nfs3_readdirplus
Ronnie Sahlberg [Tue, 31 Dec 2013 23:53:40 +0000 (15:53 -0800)]
Change rpc_nfs_readdir to rpc_nfs3_readir
Ronnie Sahlberg [Tue, 31 Dec 2013 23:46:32 +0000 (15:46 -0800)]
Change rpc_nfs_readlink to rpc_nfs3_readlink
Ronnie Sahlberg [Tue, 31 Dec 2013 23:44:15 +0000 (15:44 -0800)]
Change rpc_nfs_symlink to rpc_nfs3_symlink
Ronnie Sahlberg [Tue, 31 Dec 2013 23:43:00 +0000 (15:43 -0800)]
Chane rpc_nfs_link to rpc_nfs3_link
Ronnie Sahlberg [Tue, 31 Dec 2013 23:37:40 +0000 (15:37 -0800)]
Change rpc_nfs_rename to rpc_nfs3_rename
Ronnie Sahlberg [Tue, 31 Dec 2013 23:33:36 +0000 (15:33 -0800)]
Change rpc_nfs_mknod to rpc_nfs3_mknod
Ronnie Sahlberg [Tue, 31 Dec 2013 23:23:44 +0000 (15:23 -0800)]
Change rpc_nfs_remove to rpc_nfs3_remove
Ronnie Sahlberg [Tue, 31 Dec 2013 23:21:20 +0000 (15:21 -0800)]
Change rpc_nfs_create to rpc_nfs3_create
Ronnie Sahlberg [Tue, 31 Dec 2013 23:20:28 +0000 (15:20 -0800)]
Change rpc_nfs_rmdir to rpc_nfs3_rmdir
Ronnie Sahlberg [Tue, 31 Dec 2013 23:17:16 +0000 (15:17 -0800)]
Change rpc_nfs_mkdir to rpc_nfs3_mkdir
Ronnie Sahlberg [Tue, 31 Dec 2013 23:16:02 +0000 (15:16 -0800)]
Change rpc_nfs_commit to rpc_nfs3_commit
Ronnie Sahlberg [Tue, 31 Dec 2013 23:12:32 +0000 (15:12 -0800)]
Change rpc_nfs_setattr to rpc_nfs3_setattr
Ronnie Sahlberg [Tue, 31 Dec 2013 23:08:11 +0000 (15:08 -0800)]
Change all calls to rpc_nfs_fsstat to rpc_nfs3_fsstat
Ronnie Sahlberg [Tue, 31 Dec 2013 23:06:25 +0000 (15:06 -0800)]
Change all calls to rpc_nfs_fsinfo to rpc_nfs3_fsinfo
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
Ronnie Sahlberg [Thu, 26 Dec 2013 18:52:43 +0000 (10:52 -0800)]
Create SOCURRENT/SOREVISION/SOAGE in lib/Makefile.am
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()
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.
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.
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>
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>
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>
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>
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>
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
Ronnie Sahlberg [Thu, 26 Dec 2013 00:29:00 +0000 (16:29 -0800)]
Add the url parsing functions to libnfs-win32.def
Ronnie Sahlberg [Thu, 26 Dec 2013 00:27:10 +0000 (16:27 -0800)]
Document the URL syntax
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
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.
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
Ronnie Sahlberg [Tue, 24 Dec 2013 20:20:41 +0000 (12:20 -0800)]
MOUNT: Add RPC support for MOUNTv1
Ronnie Sahlberg [Tue, 24 Dec 2013 19:28:56 +0000 (11:28 -0800)]
Add NFSv2 RPC support
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.
Ronnie Sahlberg [Tue, 24 Dec 2013 16:54:28 +0000 (08:54 -0800)]
Add missing symbols to libnfs-win32.def and make them EXTERN
Ronnie Sahlberg [Tue, 24 Dec 2013 16:34:38 +0000 (08:34 -0800)]
NFS: Update compile_rpc and regenerate the nfs marshalling/unmarshalling code
We had some manual changes to the nfs code to handle ANDROID and WIN32.
Update the rpc generation target to add these extra define.
Peter Lieven [Mon, 23 Dec 2013 14:12:50 +0000 (15:12 +0100)]
examples/nfs-ls: add discovery mode
this adds the ability for nfs-ls to discover
a) local NFS servers
examples/nfs-ls -D nfs://
b) NFS shares on a server
examples/nfs-ls -D nfs://10.0.0.1
c) all shares on local NFS servers
examples/nfs-ls -D -R nfs://
Enjoy!
Signed-off-by: Peter Lieven <pl@kamp.de>
Peter Lieven [Mon, 23 Dec 2013 13:50:09 +0000 (14:50 +0100)]
examples: add nfs-io example
this simple example tool allows to
- creat and unlink files
- mkdir and rmdir directories
- stat
Signed-off-by: Peter Lieven <pl@kamp.de>
Peter Lieven [Mon, 23 Dec 2013 13:07:01 +0000 (14:07 +0100)]
examples/nfs-cp: use nfs_parse_url_full
Signed-off-by: Peter Lieven <pl@kamp.de>
Peter Lieven [Mon, 23 Dec 2013 12:35:31 +0000 (13:35 +0100)]
add uid and gid URL param to specify alternate uid and/or gid
This allows to connect with an alternate uid or gid than that
of the current user.
Example:
examples/nfs-ls nfs://10.0.0.1/export?uid=1000&gid=33
Signed-off-by: Peter Lieven <pl@kamp.de>
Peter Lieven [Mon, 23 Dec 2013 12:12:28 +0000 (13:12 +0100)]
add tcp-syncnt URL param to adjust TCP_SYNCNT sockopt
This allows indirect support for a configurable connect timeout.
Linux uses a exponential backoff for SYN retries starting
with 1 second.
This means for a value n for TCP_SYNCNT, the connect will
effectively timeout after 2^(n+1)-1 seconds.
Example:
examples/nfs-ls nfs://10.0.0.1/export?tcp-syncnt=1
Signed-off-by: Peter Lieven <pl@kamp.de>
Peter Lieven [Mon, 23 Dec 2013 13:03:00 +0000 (14:03 +0100)]
add URL parsing functions
this adds the following 4 functions. see libnfs.h for details.
struct nfs_url *nfs_parse_url_full(struct nfs_context *nfs, char *url);
struct nfs_url *nfs_parse_url_dir(struct nfs_context *nfs, char *url);
struct nfs_url *nfs_parse_url_incomplete(struct nfs_context *nfs, char *url);
void nfs_destroy_url(struct nfs_url *url);
Signed-off-by: Peter Lieven <pl@kamp.de>
Peter Lieven [Fri, 20 Dec 2013 14:37:17 +0000 (15:37 +0100)]
libnfs_zdr_opaque: make valgrind happy
valgrind complains about unitialized memory
Signed-off-by: Peter Lieven <pl@kamp.de>
Peter Lieven [Fri, 20 Dec 2013 14:08:04 +0000 (15:08 +0100)]
examples/nfs-ls: recursion and summary support
this adds recusrion and summary support, fixes some compiler warnings,
fixes exit codes and avoids a possible sprintf buffer overflow.
Signed-off-by: Peter Lieven <pl@kamp.de>
Ronnie Sahlberg [Tue, 17 Dec 2013 14:34:23 +0000 (06:34 -0800)]
Merge pull request #40 from plieven/master
minor fixes
Peter Lieven [Tue, 17 Dec 2013 11:06:29 +0000 (12:06 +0100)]
libnfs.pc.in: fix pkg-config --cflags
pkg-config --cflags libnfs returns an error with
this line:
$ pkg-config --cflags libnfs
Package @LIBNFS_PC_REQ_PRIVATE@ was not found in the pkg-config search path.
Perhaps you should add the directory containing `@LIBNFS_PC_REQ_PRIVATE@.pc'
to the PKG_CONFIG_PATH environment variable
Package '@LIBNFS_PC_REQ_PRIVATE@', required by 'libnfs', not found
Signed-off-by: Peter Lieven <pl@kamp.de>
Peter Lieven [Tue, 17 Dec 2013 10:50:00 +0000 (11:50 +0100)]
nfs_creat1_cb: fix memleak
data is not freed in case of a failure.
Signed-off-by: Peter Lieven <pl@kamp.de>
Peter Lieven [Tue, 17 Dec 2013 10:47:59 +0000 (11:47 +0100)]
libnfs_authunix_create: make valgrind happy
valgrind complains about uninitialized memory.
Signed-off-by: Peter Lieven <pl@kamp.de>
Ronnie Sahlberg [Wed, 6 Nov 2013 14:56:44 +0000 (06:56 -0800)]
Finish the NSM support
Ronnie Sahlberg [Wed, 6 Nov 2013 01:40:31 +0000 (17:40 -0800)]
Remove some residuals from the nlm.c->nsm.c copy
Ronnie Sahlberg [Wed, 6 Nov 2013 01:37:16 +0000 (17:37 -0800)]
Initial support for NSM
Ronnie Sahlberg [Mon, 4 Nov 2013 14:36:50 +0000 (06:36 -0800)]
Remove some debug residuals from fuse_nfs
Ronnie Sahlberg [Mon, 4 Nov 2013 05:01:11 +0000 (21:01 -0800)]
We don't need -odebug for the fuse nfs client anymore
Ronnie Sahlberg [Mon, 4 Nov 2013 03:36:57 +0000 (19:36 -0800)]
Add a simple FUSE filesystem based on libnfs.
Ronnie Sahlberg [Thu, 31 Oct 2013 01:17:49 +0000 (18:17 -0700)]
New version 1.8
Fix nasty memory leak
Ronnie Sahlberg [Thu, 31 Oct 2013 01:15:03 +0000 (18:15 -0700)]
Dont leak every single buffer we read from the socket.
Ronnie Sahlberg [Sat, 26 Oct 2013 20:16:09 +0000 (13:16 -0700)]
Add an async helper function to connect an rpc context to a program/version
Ronnie Sahlberg [Sat, 26 Oct 2013 14:44:29 +0000 (07:44 -0700)]
Add a mechanism to control what the next XID value on a session will be.
This makes it possible for multiple processes/contexts to use the same
target and (with some synchronization) avoid XID collissions across processes/contexts.
Ronnie Sahlberg [Fri, 25 Oct 2013 23:16:43 +0000 (16:16 -0700)]
Mix in the pid in the top 16 bits for the initial xid.
This helps for users which rapidly fork a lot of processes that then
immediately create a new context (I am looking at you dbench)
to awoid having lots of processes starting and using overlapping xid values.
Ronnie Sahlberg [Thu, 24 Oct 2013 02:18:41 +0000 (19:18 -0700)]
Don't clamp write3 max to 32k
We use our own XDR and RPC layer nowadays and do not have
any external dependencies to XDR or RPC.
As such we no longer need to clamp the write size to max 32kb
since we never link to the system rpc/xdr libraries.
(and thus dont have to clamp in case the system library is broken for
pdu's > 32k)
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Volker Lendecke [Wed, 23 Oct 2013 19:43:24 +0000 (21:43 +0200)]
Fix typos
Ronnie Sahlberg [Tue, 22 Oct 2013 02:15:11 +0000 (19:15 -0700)]
Make xid be a uint32_t and not either unsigned long or unsigned int
Ronnie Sahlberg [Sun, 20 Oct 2013 23:31:32 +0000 (16:31 -0700)]
New version 1.7
- Allow nested eventloops so that a sync function can be called from a callback.
- Fix a bug in unmarshalling a uint64.
- Add PATHCONF support.
- WIN32/64 updates
- AROS updates
Ronnie Sahlberg [Sun, 20 Oct 2013 20:16:45 +0000 (13:16 -0700)]
Reset the receive buffer processing the received PDU.
This allows us to have recursive eventloops and do synchronous
rpc calls from a callback.
Ronnie Sahlberg [Sun, 20 Oct 2013 19:41:56 +0000 (12:41 -0700)]
Make sure the the value is unsigned before we OR it into the uint64_t
or else the sign might be extended.
Ronnie Sahlberg [Sun, 20 Oct 2013 17:07:19 +0000 (10:07 -0700)]
Add support for NFS/PATHCONF
Ronnie Sahlberg [Wed, 10 Jul 2013 18:39:05 +0000 (11:39 -0700)]
Merge pull request #36 from Memphiz/win32fix2
[win32] - fix missing preprocessor define for using 32bit time_t in
Memphiz [Wed, 10 Jul 2013 17:53:54 +0000 (19:53 +0200)]
[win32] - fix missing preprocessor define for using 32bit time_t in
release target of vs project (fixes crashing with xbmc)
Ronnie Sahlberg [Sat, 8 Jun 2013 20:06:17 +0000 (13:06 -0700)]
AROS: Add an install target to the makefile
Copy libnfs.a to GCC:lib and the header files to
INCLUDE:nfsc
Ronnie Sahlberg [Fri, 31 May 2013 00:59:24 +0000 (17:59 -0700)]
Merge branch 'master' of github.com:sahlberg/libnfs
Ronnie Sahlberg [Fri, 31 May 2013 00:58:29 +0000 (17:58 -0700)]
On Windows, use 65534/65534 instead of 65535/65535 for the default uid/gid
Ronnie Sahlberg [Thu, 30 May 2013 02:28:27 +0000 (19:28 -0700)]
Merge pull request #34 from Memphiz/win32fix2
Win32fix2
Memphiz [Wed, 29 May 2013 09:05:54 +0000 (11:05 +0200)]
[win32] - add projects for examples to the solution and make them compile (all compile but nfsclient-bcast)
Memphiz [Wed, 29 May 2013 08:27:31 +0000 (10:27 +0200)]
[win32] - include time.h through win32_compat.h for getting rid of undefined symbol warnings
Memphiz [Wed, 29 May 2013 08:26:55 +0000 (10:26 +0200)]
[cosmetics] - removed trailing semicolon
Memphiz [Wed, 29 May 2013 08:26:28 +0000 (10:26 +0200)]
[win32] - fix visual studio project for allowing compilation for windows
Ronnie Sahlberg [Wed, 29 May 2013 05:49:19 +0000 (22:49 -0700)]
More AROS fixes. AROS compiles and works again.
Ronnie Sahlberg [Wed, 29 May 2013 05:41:54 +0000 (22:41 -0700)]
Aros fixes
Ronnie Sahlberg [Wed, 29 May 2013 05:13:08 +0000 (22:13 -0700)]
AROS fixes
Ronnie Sahlberg [Wed, 29 May 2013 04:25:08 +0000 (21:25 -0700)]
Add configure test for arpa/inet.h
Ronnie Sahlberg [Wed, 29 May 2013 04:20:00 +0000 (21:20 -0700)]
Include ifdef cleanup
Ronnie Sahlberg [Wed, 29 May 2013 01:08:02 +0000 (18:08 -0700)]
Configure check for sys/time.h
Ronnie Sahlberg [Wed, 29 May 2013 00:54:12 +0000 (17:54 -0700)]
Some more configure checks for headers
Ronnie Sahlberg [Wed, 29 May 2013 00:43:47 +0000 (17:43 -0700)]
Add configure checks for sys/socket.h
Ronnie Sahlberg [Wed, 29 May 2013 00:38:37 +0000 (17:38 -0700)]
Add configure checks for whether netinet/in.h is available or not
Ronnie Sahlberg [Wed, 29 May 2013 00:22:28 +0000 (17:22 -0700)]
Try making the initial port used a little more random
Ronnie Sahlberg [Tue, 28 May 2013 23:15:16 +0000 (16:15 -0700)]
WIN32 fixes
Ronnie Sahlberg [Tue, 28 May 2013 04:50:24 +0000 (21:50 -0700)]
READE update the location of the tarballs
Ronnie Sahlberg [Tue, 28 May 2013 04:35:26 +0000 (21:35 -0700)]
New version 1.6
Add AROS/Amiga support
Chose initial XID value better to reduce probability for collissions
Fix bug in the initial default credentials and use getgid() instead of -1