Commit Graph

1131 Commits (17f882fbdbe7f739d1285f173781c1525a29a7fa)

Author SHA1 Message Date
Ronnie Sahlberg 17f882fbdb tests: disable test 0101
Modern versions of portmapper/mount daemon no longer respond to
broadcast rpc so nfs server discovery no longer works.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-06-09 13:44:49 +10:00
Ronnie Sahlberg c5d022b638 nfsv4.1 Add SECINFO[_NO_NAME] operations
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-06-08 14:42:16 +10:00
Ronnie Sahlberg da2a3dd9d3 nfsv4.1 Add RECLAIM_COMPLETE operation
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-06-08 14:29:17 +10:00
Ronnie Sahlberg ff73bb6cc3 nfsv4.1 Add DESTROY_CLIENTID operation
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-06-08 14:26:42 +10:00
Ronnie Sahlberg de3d1e5f3f nfsv4.1 Add WANT_DELEGATION operation
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-06-08 14:24:09 +10:00
Ronnie Sahlberg d690031049 nfsv4.1 Add TEST_STATEID operation
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-06-08 14:18:26 +10:00
Ronnie Sahlberg 523df1eee4 nfsv4.1 Add SET_SSV operation
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-06-08 14:16:01 +10:00
Ronnie Sahlberg 52f905291c nfsv4.1 Add SEQUENCE operation
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-06-08 14:12:19 +10:00
Ronnie Sahlberg a45799ca50 nfsv4.1 Add LAYOUTRETURN operation
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-06-08 14:07:14 +10:00
Ronnie Sahlberg 61d235ae44 nfsv4.1 Add LAYOUTGET operation
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-06-08 14:03:11 +10:00
Ronnie Sahlberg f7b6bef8ef nfsv4.1 Add LAYOUTCOMMIT operation
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-06-08 13:49:33 +10:00
Ronnie Sahlberg af97775bfc nfsv4.1: Add GETDEVICELIST operation
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-06-08 13:43:39 +10:00
Ronnie Sahlberg 0b4c428ed3 nfsv4.1: Add GETDEVICEINFO operation
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-06-08 13:41:01 +10:00
Ronnie Sahlberg b994dd08a3 nfsv4.1 Add GET_DIR_DELEGATION operation
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-06-08 13:20:00 +10:00
Ronnie Sahlberg a18aff5e7a nfsv4.1 Add FREE_STATEID operation
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-06-08 13:14:21 +10:00
Ronnie Sahlberg 0971e9531f nfsv4.1 Add DESTROY_CONTEXT operation
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-06-08 12:45:23 +10:00
Ronnie Sahlberg 03a47809cb nfs4.1: add marshalling of CREATE_SESSION command
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-06-08 12:34:22 +10:00
Ronnie Sahlberg be084815fa Update nfsv4 makefile to match new size of dot-x header boilerplate
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-06-08 12:29:02 +10:00
Ronnie Sahlberg edce6654a3 fix return value for mount_getexports
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-06-05 06:58:42 +10:00
Ronnie Sahlberg 4f1925c280
Merge pull request #323 from peak3d/timeout
Implement mount_getexports_timeout
2020-06-05 06:56:57 +10:00
peak3d 74ac9b5e11 Implement mount_getexports_timeout 2020-06-04 16:42:48 +02:00
Ronnie Sahlberg 3fbec953e6 mount: add a 2 second timeout for getting the export list.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-06-03 19:02:36 +10:00
Ronnie Sahlberg 46c8a3006a
Merge pull request #312 from AlwinEsch/fix-cmake
fix libnfs cmake build as static
2020-05-20 07:35:49 +10:00
Ronnie Sahlberg f79745d281
Merge pull request #319 from dmeister/large_write
Allocate larger buffer for write operations in NFS4
2020-05-20 07:32:57 +10:00
Ronnie Sahlberg 4dd823b4a1
Merge pull request #318 from dmeister/chown
Fix NFS4 behavior of chmod/chown/utimes
2020-05-20 07:29:19 +10:00
Dirk Meister 483be177fe Allocate larger buffer for write operations in NFS4
The NFS4 pwrite operations contains a memory corruption if a write
is large than 4KB. The reason is that the buffer allocated within
nfs4_compund_async has a size of 4K and it does not account
for the size of the write buffer. To fix this the patch
padds a rpc_allocate_ndu2 function which an additional parameter
as an extra hint for the allocation.
2020-05-18 20:57:06 -07:00
Dirk Meister 1336b5280e Fix NFS4 behavior of chmod/chown/utimes
This patch fixes various issues around chmod/chown/utimes:
- The chmod/chown/utimes approach uses open_async_internal, which only works
  for files. This patch uses lookup_path so that chmod/chown is also
  possible on directories.
- Implements SET_TO_SERVER for utimes

I never succeeded in getting all tests passing even without
these changes. Nor did I succeed in getting the CMake compilation to
work. Sorry. The patch includes extra unit tests for these calls.
We use the libary as part of a test harness to test an NFS server
implementation, so I am reasonably confident that the changes work.
They are also manually tested against the Linux Kernel NFS Server.
2020-05-18 20:50:01 -07:00
Ronnie Sahlberg 12b56b8f52
Merge pull request #316 from DetlefGolze/master
Update libnfs-zdr.c
2020-05-06 18:55:20 +10:00
DetlefGolze b9c85afc4f
Update libnfs-zdr.c
libnfs_zdr_array() needs to determine element count before calculating size to allocate.
2020-05-06 10:51:39 +02:00
Alwin Esch b2fd0fe140 fix libnfs cmake build as static
Before was by them as static all other parts not included, as they also
static libraries.

This change to create them as objects where then also included in a static and only `nfs.lib` is present.

Brought before on install by Windows:
```
  Performing install step for 'nfs'
  Microsoft (R)-Build-Engine, Version 15.9.21+g9802d43bc3 für .NET Framework
  Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

    nfs_mount.vcxproj -> D:\Dev\Kodi64-UWP\vfs.nfs\build\build\nfs\src\nfs-build\mount\Release\nfs_mount.lib
    nfs_nfs.vcxproj -> D:\Dev\Kodi64-UWP\vfs.nfs\build\build\nfs\src\nfs-build\nfs\Release\nfs_nfs.lib
    nfs_nfs4.vcxproj -> D:\Dev\Kodi64-UWP\vfs.nfs\build\build\nfs\src\nfs-build\nfs4\Release\nfs_nfs4.lib
    nfs_nlm.vcxproj -> D:\Dev\Kodi64-UWP\vfs.nfs\build\build\nfs\src\nfs-build\nlm\Release\nfs_nlm.lib
    nfs_nsm.vcxproj -> D:\Dev\Kodi64-UWP\vfs.nfs\build\build\nfs\src\nfs-build\nsm\Release\nfs_nsm.lib
    nfs_portmap.vcxproj -> D:\Dev\Kodi64-UWP\vfs.nfs\build\build\nfs\src\nfs-build\portmap\Release\nfs_portmap.lib
    nfs_rquota.vcxproj -> D:\Dev\Kodi64-UWP\vfs.nfs\build\build\nfs\src\nfs-build\rquota\Release\nfs_rquota.lib
    nfs_win32.vcxproj -> D:\Dev\Kodi64-UWP\vfs.nfs\build\build\nfs\src\nfs-build\win32\Release\nfs_win32.lib
    nfs.vcxproj -> D:\Dev\Kodi64-UWP\vfs.nfs\build\build\nfs\src\nfs-build\lib\Release\nfs.lib
    -- Install configuration: "Release"
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/lib/cmake/libnfs/libnfs-config.cmake
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/lib/cmake/libnfs/libnfs-config-release.cmake
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/lib/cmake/libnfs/FindNFS.cmake
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/lib/cmake/libnfs/libnfs-config-version.cmake
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/lib/pkgconfig/libnfs.pc
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/include/nfsc
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/include/nfsc/libnfs-raw.h
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/include/nfsc/libnfs-zdr.h
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/include/nfsc/libnfs.h
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/include/nfsc/libnfs.h.orig
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/include/nfsc/libnfs-raw-mount.h
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/include/nfsc/libnfs-raw-nfs.h
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/include/nfsc/libnfs-raw-nlm.h
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/include/nfsc/libnfs-raw-nsm.h
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/include/nfsc/libnfs-raw-portmap.h
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/include/nfsc/libnfs-raw-rquota.h
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/lib/nfs_win32.lib
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/lib/nfs_mount.lib
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/lib/nfs_nfs.lib
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/lib/nfs_nfs4.lib
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/lib/nfs_nlm.lib
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/lib/nfs_nsm.lib
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/lib/nfs_portmap.lib
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/lib/nfs_rquota.lib
    -- Installing: D:/Dev/Kodi64-UWP/vfs.nfs/build/build/depends/lib/nfs.lib
```
2020-02-25 00:12:10 +00:00
Ronnie Sahlberg 394b185486 Try to invoke the connect callback if we shutdown while connect is in progress
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2019-12-17 08:50:23 +10:00
Ronnie Sahlberg 548fa961a8 Return "" instead of NULL for empty errors in nfs_get_error()
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2019-12-16 13:21:27 +10:00
Ronnie Sahlberg 33a5d08b05 Update to INSTALL
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2019-12-10 16:47:39 +10:00
Ronnie Sahlberg 4c20a3f8eb Add INSTALL file
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2019-12-10 16:45:27 +10:00
Volker Lendecke 338837f6de Simplify range check in libnfs_zdr_array
Signed-off-by: Volker Lendecke <vl@samba.org>
2019-11-19 14:15:33 +10:00
Ronnie Sahlberg a7b9994971
Merge pull request #300 from crusader-mike/master
fix for find_package from downstream clients
2019-10-22 23:10:56 +10:00
crusader-mike 4b12b5e005 fixed compilation of utils 2019-10-11 13:29:52 -05:00
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