Ronnie Sahlberg
dd97d43aad
Reset the receive buffer processing the received PDU.
...
This allows us to have recursive eventloops and do synchronous
rpc calls from a callback.
2013-10-20 13:16:45 -07:00
Ronnie Sahlberg
c81e7d8921
Make sure the the value is unsigned before we OR it into the uint64_t
...
or else the sign might be extended.
2013-10-20 12:41:56 -07:00
Ronnie Sahlberg
6f914247fb
Add support for NFS/PATHCONF
2013-10-20 10:07:19 -07:00
Ronnie Sahlberg
6683cec917
Merge pull request #36 from Memphiz/win32fix2
...
[win32] - fix missing preprocessor define for using 32bit time_t in
2013-07-10 11:39:05 -07:00
Memphiz
584346331d
[win32] - fix missing preprocessor define for using 32bit time_t in
...
release target of vs project (fixes crashing with xbmc)
2013-07-10 19:53:54 +02:00
Ronnie Sahlberg
6061db5800
AROS: Add an install target to the makefile
...
Copy libnfs.a to GCC:lib and the header files to
INCLUDE:nfsc
2013-06-08 13:06:17 -07:00
Ronnie Sahlberg
7e66b28947
Merge branch 'master' of github.com:sahlberg/libnfs
2013-05-30 17:59:24 -07:00
Ronnie Sahlberg
4e019b25b5
On Windows, use 65534/65534 instead of 65535/65535 for the default uid/gid
2013-05-30 17:58:29 -07:00
Ronnie Sahlberg
fc0da5c64c
Merge pull request #34 from Memphiz/win32fix2
...
Win32fix2
2013-05-29 19:28:27 -07:00
Memphiz
292e2d9097
[win32] - add projects for examples to the solution and make them compile (all compile but nfsclient-bcast)
2013-05-29 18:41:31 +02:00
Memphiz
21eeb9f5e3
[win32] - include time.h through win32_compat.h for getting rid of undefined symbol warnings
2013-05-29 18:41:23 +02:00
Memphiz
e7b4eb0a33
[cosmetics] - removed trailing semicolon
2013-05-29 18:41:17 +02:00
Memphiz
067ece8bf2
[win32] - fix visual studio project for allowing compilation for windows
2013-05-29 18:41:10 +02:00
Ronnie Sahlberg
c5e346e15c
More AROS fixes. AROS compiles and works again.
2013-05-28 22:49:19 -07:00
Ronnie Sahlberg
0556ee05e1
Aros fixes
2013-05-28 22:41:54 -07:00
Ronnie Sahlberg
265276038a
AROS fixes
2013-05-28 22:13:08 -07:00
Ronnie Sahlberg
c022471e52
Add configure test for arpa/inet.h
2013-05-28 21:25:08 -07:00
Ronnie Sahlberg
833d5b9da1
Include ifdef cleanup
2013-05-28 21:20:00 -07:00
Ronnie Sahlberg
2384420387
Configure check for sys/time.h
2013-05-28 18:08:02 -07:00
Ronnie Sahlberg
bff8fe460d
Some more configure checks for headers
2013-05-28 17:54:12 -07:00
Ronnie Sahlberg
7057e733c1
Add configure checks for sys/socket.h
2013-05-28 17:43:47 -07:00
Ronnie Sahlberg
728970051c
Add configure checks for whether netinet/in.h is available or not
2013-05-28 17:38:37 -07:00
Ronnie Sahlberg
cb5b8be2eb
Try making the initial port used a little more random
2013-05-28 17:22:28 -07:00
Ronnie Sahlberg
67a9f57e67
WIN32 fixes
2013-05-28 16:15:16 -07:00
Ronnie Sahlberg
e083c2a090
READE update the location of the tarballs
2013-05-27 21:50:24 -07:00
Ronnie Sahlberg
a60caa0945
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
2013-05-27 21:35:26 -07:00
Ronnie Sahlberg
43e0e7a7e6
On unix systems, when creating the default authentication token
...
use getgid() as the group instead of -1.
Recent linux knfsd do not allow grp==-1
On windows there are no uid/gids in the traditional sense so there I still specify a default credential of uid==gid==-1 :
rpc->auth = authunix_create("LibNFS", 65535, 65535, 0, NULL);
This is I think the sanest/safest thing to do since most servers will have
special handing of -1 meaning 'nobody' or similar.
This should work on many/most servers and give the user the minimum available
access allowed for 'nobody'.
I think on windows (or AROS for that matter) applications will probably have
to invoke and set the credentials themself explicitely.
Those apps probably, unfortunately, also need to have a configuration
setting to select which uid/gid to use when talking to the server.
(or they could hardcode it)
rpc_set_auth(rpc, libnfs_authunix_create("hostname", uid, gid, 0, NULL))
should do the trick if they call immediately after creating the rpc/nfs context.
But dont set it to 0,0 root/root for uid/gid.
First of all, most servers have root-squash so they will re-map this uid/gid
to 'nobody' internally.
But, if the user uses a server that does not do root-squash, then setting this to 0,0 would mean that your app now access the nfs share as root which is probably not what you want.
2013-05-25 06:24:15 -07:00
Ronnie Sahlberg
3d574b1eab
Change nfs-cp.c example to use lseek+read/write instead of pread/pwrite since some platforms (==amiga) dont have pread/pwrite
...
Build nfs-ls and nfs-cp for amiga/aros
2013-04-16 18:28:50 -07:00
Ronnie Sahlberg
a6bc1707f7
Add two more examples: nfs-ls and nfs-cp
2013-04-15 21:41:38 -07:00
Ronnie Sahlberg
0c1a9d7a6b
Fix a bug when returning the filehandle in creat() and return the filehandle
...
of the object we created and not the filehandle of the parent directory
2013-04-15 21:37:03 -07:00
Ronnie Sahlberg
73f4ae7cca
Allow nfs_lookuppath_async to have path[0]=='\0' this happens when we
...
want to create an object straight under the root directory of what we
mounted.
As always, the actual object to create is then a string starting after the \0 byte
2013-04-15 20:42:44 -07:00
Ronnie Sahlberg
c40efafc33
remove obsolete comment
2013-04-14 10:46:08 -07:00
Ronnie Sahlberg
ece9f02c59
Dont include config.h from libnfs-zdr.h
2013-04-14 10:44:14 -07:00
Ronnie Sahlberg
4945f30750
we can always include netinet/in.h all platforms have it
2013-04-14 10:34:33 -07:00
Ronnie Sahlberg
108c622a95
more include cleanups it starts to look almost decent now
2013-04-14 10:32:01 -07:00
Ronnie Sahlberg
00748f36c5
more header include cleanups
2013-04-14 10:11:48 -07:00
Ronnie Sahlberg
2142af5d47
WIN32: More ifdef cleanups
2013-04-14 09:02:23 -07:00
Ronnie Sahlberg
622489d36e
WIN32: get rid of some ifdefs
2013-04-14 08:50:38 -07:00
Ronnie Sahlberg
099be710b6
SOCKET: Use recv/send for all socket io on all platforms
...
instead of only on windows and aros and read/write on the others
2013-04-14 08:43:59 -07:00
Ronnie Sahlberg
18337b7151
AROS: we dont need to protect aros_compat.c with an ifdef
2013-04-13 08:13:31 -07:00
Ronnie Sahlberg
a41dbfe25a
AROS: Add an example for using the SYNC API to AROS
...
While the ASYNC API is probably always preferable, the SYNC API is easier
to use. The SYNC API is probably what most users want.
2013-04-13 08:01:05 -07:00
Ronnie Sahlberg
9a9126c3d9
AROS: add inet_pton emulation and make sure we use recv/send and not read/write
2013-04-13 07:40:46 -07:00
Ronnie Sahlberg
03aea5e929
AROS: Add copyright boilerplate for aros_compat.c
2013-04-13 04:20:57 -07:00
Ronnie Sahlberg
f95e1d1108
AROS: implement their weird errno handling
2013-04-13 04:13:05 -07:00
Ronnie Sahlberg
e267bb128c
AROS: Update README and list AROS as supported and provide build instruction for it
2013-04-13 03:49:15 -07:00
Ronnie Sahlberg
a7954132ce
AROS: We have to provide the correct nfds to WaitSelect
...
When copying the poll() compatibility function from win32 to AROS
we need to update it to set nfds correctly.
While win32 does not care what nfds is set to and works even if nfds is always
0, other platforms, like AROS do care.
2013-04-13 03:39:12 -07:00
Ronnie Sahlberg
0f9fe7c64d
SOCKADDR_STORAGE: it is called HAVE_SOCKADDR_LEN not HAVE_SA_LEN
2013-04-12 19:13:11 -07:00
Ronnie Sahlberg
5c9c5f15f1
AROS: we need htons to convert socket port to network order
2013-04-12 18:12:56 -07:00
Ronnie Sahlberg
f69bd55482
AROS more stuff. The listservers example now compiles and links
...
it sends packets to the host but something is still not working.
2013-04-12 17:38:44 -07:00
Ronnie Sahlberg
2cdf4fcb07
AROS: it is called IoctlSocket/CloseSocket and WaitSelect on AROS.
...
Additionally add a aros_init_socket() function to open the bsd socket library and set up networking
2013-04-12 06:12:58 -07:00