Commit Graph

1194 Commits (master)

Author SHA1 Message Date
Damian Parrino 5f74b69624 Rename to avoid linking issues 2020-08-17 11:15:07 -03:00
Ronnie Sahlberg da61d648e6
Merge pull request #328 from bucanero/master
PlayStation 3 port
2020-08-16 04:02:18 +10:00
Damian 0df1d4beac include clean-up 2020-08-15 11:35:55 -03:00
Damián Parrino ef0056cd13
Update README 2020-08-15 11:31:11 -03:00
Damian 1bafddb264 Include clean-up 2020-08-15 11:28:04 -03:00
Damian c14a5acb51 Porting to PS3 2020-08-14 19:30:00 -03:00
Damian c7ad0762d8 Porting library to PS3 (psl1ght) 2020-08-14 11:47:39 -03:00
Ronnie Sahlberg ef0ca03565
Merge pull request #326 from asomers/u_int
Don't define u_int
2020-08-01 07:19:41 +10:00
Ronnie Sahlberg 8cf8c620f3
Merge pull request #325 from asomers/gitignore
Remove .c and .h from .gitignore
2020-08-01 07:18:09 +10:00
Alan Somers 172f46756e Don't define u_int
It's usually defined by the platform in types.h or sys/types.h.
The compiler complains if libnfs redefines it.
2020-07-26 15:13:13 -06:00
Alan Somers 2b3e8f450b Remove .c and .h from .gitignore
I think these were accidentally included in revision
6c437065d3
2020-07-26 15:12:42 -06:00
Ronnie Sahlberg cf47ea7e6a
Merge pull request #324 from adamyi/master
Fix seekdir
2020-06-23 08:35:35 +10:00
Adam Yi dfa85d4c36 Fix seekdir
The previous implementation doesn't actually update dir->current but
resets dir->current to dir->entries
2020-06-23 02:11:33 +10:00
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