Commit Graph

1194 Commits (master)

Author SHA1 Message Date
crusader-mike 70801203e2 fixed cmake files to support package export 2019-10-11 13:12:02 -05:00
Ronnie Sahlberg ac60feabf0
Merge pull request #297 from crusader-mike/master
fixing cmake build on windows
2019-10-10 08:27:55 +10:00
crusader-mike 9d5427bbd4 fixed few MSVC warnings; fixed missing exports 2019-10-09 17:08:10 -05:00
Ronnie Sahlberg e4fa3b5bcb make LGTM.com happy and squash a false warning
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2019-09-27 20:48:58 -07:00
Ronnie Sahlberg c635cae6f6 remove obsolete FIXME comment
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2019-09-27 20:48:49 -07:00
crusader-mike 4da7bb4fec Windows: dll (built with cmake) will contain proper file version info 2019-09-13 12:46:19 -05:00
crusader-mike 3cd06883e0 cmake fix for Linux 2019-09-12 15:17:47 -05:00
crusader-mike 6564abaa1f fixed CMake build on windows, few trivial fixes 2019-09-12 15:07:35 -05:00
Ronnie Sahlberg 4de9fb8ff8
Merge pull request #296 from plieven/vc
add LIBNFS_FEATURE_UMOUNT macro
2019-09-03 07:18:19 +10:00
Peter Lieven 68faa72c85 add LIBNFS_FEATURE_UMOUNT macro
Signed-off-by: Peter Lieven <pl@kamp.de>
2019-09-02 15:49:26 +02:00
Ronnie Sahlberg ca939ba918
Merge pull request #283 from rbalint/master
Really skip test building rpm package in not rpm-based systems
2019-05-08 21:32:03 +10:00
Volker Lendecke 4bd145ba44 Prevent integer overflow in rpc_process_pdu
Signed-off-by: Volker Lendecke <vl@samba.org>
2019-03-11 11:26:04 +10:00
Volker Lendecke dfca3e447d Replace explicit memset by calloc
Signed-off-by: Volker Lendecke <vl@samba.org>
2019-03-11 11:25:37 +10:00
Ronnie Sahlberg 030814506e new version 4.0.0
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>
2019-02-13 07:38:04 +10:00
Ronnie Sahlberg f141b31c59 Fix memory leak in nfs_close for NFSv3
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2019-02-13 07:38:04 +10:00
Ronnie Sahlberg f8b06ead8e use "git desribe --tags" in makerpms.sh
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2019-02-13 06:15:44 +10:00
Ronnie Sahlberg 9e031df11d check return for write() in one of the test tools
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2019-02-05 13:18:11 +10:00
Balint Reczey d214e3376b Really skip test building rpm package in not rpm-based systems 2019-01-07 17:37:01 +07:00
Ronnie Sahlberg 38b62bcf87 nfsv3: skip commit if the file has not changed
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2019-01-05 06:53:33 +10:00
Ronnie Sahlberg 9e63589591 add nfs_umount() which will unregister the client from the mount daemon
This is only implemented for v3 since there is no mount protocol in v4.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2018-12-29 13:56:29 +10:00
Ronnie Sahlberg 56287de123 nfs_statvfs64() initialize/clear the nfs_statvs_64 structure.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2018-12-28 07:10:52 +10:00
Ronnie Sahlberg 48a559cb47 Add nfs_statvfs64()
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>
2018-12-26 13:33:38 +10:00
Ronnie Sahlberg d21b48256e
Merge pull request #279 from david-y-lam/master
Fix invalid left-shift of pid_t type by casting to large enough type
2018-12-26 12:41:21 +10:00
David Lam 71ef9e3ee0 Fix invalid left-shift of pid_t type by casting to large enough type 2018-12-18 15:50:21 -08:00
Ronnie Sahlberg 84a4d97026
Merge pull request #275 from david-y-lam/master
Define MSG_NOSIGNAL to 0 on Mac OSX
2018-12-18 18:24:15 +10:00
David Lam b59ab34168 Define MSG_NOSIGNAL to 0 on Mac OSX 2018-12-17 23:34:53 -08:00
Ronnie Sahlberg 6dfc87d688
Merge pull request #271 from snoe925/master
Avoid redefinition of EXTERN macro
2018-10-11 05:52:16 +10:00
snoe925 f1ba956a77
Avoid redefinition of EXTERN macro
If an EXTERN macro is present then use it.
2018-10-10 10:32:31 -05:00
Ronnie Sahlberg 9454d9f4c1 Implement O_EXCL for NFSv4
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2018-09-15 08:42:44 +10:00
Ronnie Sahlberg 273182748d
Merge pull request #267 from hdornemann/master
fix for dup2 on windows
2018-09-14 14:40:30 +10:00
Hdornemann 6c6a640aef fix for dup2 on windows 2018-09-13 09:09:08 -04:00
Ronnie Sahlberg d86d5d1851 README: NFSv4 actually works now, update README to reflect this
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2018-09-04 18:12:20 +10:00
Ronnie Sahlberg 322148b016
Merge pull request #263 from pingerino/timeh
libnfs.c: include <time.h> in libnfs.c
2018-07-12 18:58:29 +10:00
Ronnie Sahlberg 2b93fcf28a Merge branch 'master' of github.com:sahlberg/libnfs 2018-07-12 18:43:47 +10:00
Ronnie Sahlberg 21e208b092 fix bug in nfsv4 opendir where it stripped off the final path component
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2018-07-12 18:42:44 +10:00
Anna Lyons 794a29f01f libnfs.c: include <time.h> in libnfs.c
time() is used in this file, which is from time.h. Fixes a warning.
2018-07-12 17:45:23 +10:00
Ronnie Sahlberg 3ba7c537c7
Merge pull request #261 from Polynomial-C/utils
configure.ac: fix --enable-utils
2018-07-07 18:44:31 +10:00
Lars Wendler 5a5a5c1e70
configure.ac: fix --enable-utils
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.
2018-07-06 11:54:54 +02:00
Ronnie Sahlberg 37d49807ba Merge branch 'master' of github.com:sahlberg/libnfs 2018-07-03 18:58:50 +10:00
Ronnie Sahlberg 5c1444f391 conditionally include sys/time.h from libnfs.c
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2018-07-03 18:58:15 +10:00
Ronnie Sahlberg 9b5bb0b2f8
Merge pull request #260 from pingerino/sock_cloexec
Wrap use of SOCK_CLOEXEC with __linux__
2018-07-03 18:38:44 +10:00
Anna Lyons 118bee287c Wrap use of SOCK_CLOEXEC with __linux__
This guards against the case where your clibrary defines SOCK_CLOEXEC
but the underlying network library does not support it.
2018-07-03 09:08:22 +10:00
Ronnie Sahlberg fa6d63c936
Merge pull request #258 from pingerino/cmake-include
cmake: add include headers to libnfs
2018-06-25 12:41:39 +10:00
Anna Lyons ae6e708bf9 cmake: add include headers to libnfs
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.
2018-06-25 09:58:31 +10:00
Ronnie Sahlberg 695ac3b77b New version: 3.0.0
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>
2018-06-24 08:53:52 +10:00
Ronnie Sahlberg 6a33413b0f
Merge pull request #253 from Daniel-Abrecht/master
Define MSG_NOSIGNAL in windows if it doesn't exist
2018-04-30 06:24:19 +10:00
Daniel Abrecht eab4eac275 Define MSG_NOSIGNAL in windows if it doesn't exist. Windows doesn't have signals like SIGPIPE, so defining the flag as 0 is probably fine. 2018-04-29 12:02:08 +00:00
Ronnie Sahlberg 456e52507b Don't use portmapper to discover the port for NFSv4
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>
2018-04-29 13:46:22 +10:00
Ronnie Sahlberg 9edb1078e6
Merge pull request #249 from shreyassiravara/nfs_opendir_cb_bug
nfs_opendir_cb should not queue a READDIR on error
2018-04-29 10:28:23 +10:00
Ronnie Sahlberg 63ba842be9
Merge pull request #252 from shreyassiravara/nfs-pagecache-export
Add & export a call to initialize the pagecache
2018-04-29 10:26:31 +10:00