Bo Yang
05379f0125
s3: return proper error code in cli_smb_req_send
...
Signed-off-by: Bo Yang <boyang@samba.org>
2009-05-13 18:47:00 +08:00
Jeremy Allison
ad9d64ee1b
Clean up assignments to iov_base, ensure it's always cast to void *. This should quieten some warnings with picky compilers on the buildfarm.
...
Jeremy.
2009-05-12 11:45:37 -07:00
Stefan Metzmacher
5c76472491
s3:libsmb: fix layering of cli_ntrename_internal and its callers
...
It's easier to have cli_ntrename_internal as a semetric async
tevent_req function. cli_ntrename() and cli_nt_hardlink() should
be callers on top of cli_ntrename_internal().
metze
2009-05-09 09:26:15 +02:00
Jeremy Allison
bb8aff6ffa
Async API needs all parameters to be kept around until sent,
...
ensure they're attached to the state structure. Thanks to Metze
for pointing this out.
Jeremy.
2009-05-07 10:01:28 -07:00
Jeremy Allison
606edf0f35
Make cli_setatr async.
...
Jeremy.
2009-05-06 16:13:42 -07:00
Jeremy Allison
512879a69b
Make cli_setattrE async.
...
Jeremy.
2009-05-06 15:07:05 -07:00
Jeremy Allison
4cbd0c77e4
Make cli_getatr() async.
...
Jeremy.
2009-05-05 20:59:22 -07:00
Jeremy Allison
e091fdc565
Make cli_getattrE async.
...
Jeremy.
2009-05-05 16:28:44 -07:00
Jeremy Allison
d34651f9d2
Fix the async calls for the posix_unlink and posix_rmdir.
...
Jeremy.
2009-05-04 15:50:35 -07:00
Jeremy Allison
f3af298e5b
Cause cli_close to return an NTSTATUS.
...
Jeremy.
2009-04-30 16:57:42 -07:00
Jeremy Allison
8cf78ff553
Get medieval on our ass about SMB1 file descriptors being 16 bits, not an int.
...
Convert all uses of cli_open(), cli_nt_createXXX to NTSTATUS versions.
This is smaller than it looks, it just fixes a lot of old code.
Next up, ensure all cli_XX functions return NTSTATUS.
Jeremy.
2009-04-30 15:26:43 -07:00
Jeremy Allison
370e7209db
Make cli_unlink async.
...
Jeremy.
2009-04-29 18:26:02 -07:00
Jeremy Allison
edd25980b0
More async calls in libsmb/clifile.c
...
Jeremy.
2009-04-29 10:48:16 -07:00
Jeremy Allison
c732e9446f
Doh ! Don't need "int dummy" when we have state :-).
...
Jeremy.
2009-04-28 16:45:13 -07:00
Jeremy Allison
bd6447dcf2
Convert cli_rename to async.
...
Jeremy.
2009-04-28 16:43:16 -07:00
Jeremy Allison
06e404f574
Convert cli_posix_unlink() and cli_posix_rmdir()
...
to async. First trans calls I've done.
Jeremy.
2009-04-28 13:18:51 -07:00
Jeremy Allison
bd5c2c7dc8
find/replace. Change uintX types to uintX_t types to tidy up the code.
...
Jeremy.
2009-04-24 07:06:48 -07:00
Jeremy Allison
455f2a4c65
Make dskattr async.
...
Jeremy.
2009-04-22 08:04:53 -07:00
Jeremy Allison
502f47c7c0
Make cli_chkpath async.
...
Jeremy
2009-04-22 06:46:42 -07:00
Stefan Metzmacher
14bbed1d67
s3:libsmb: always use the tevent_req_nomem() for checking allocation failures
...
This will also make sure we cleanup 'req' in case of an error.
metze
2009-04-21 17:42:39 +02:00
Jeremy Allison
5ccf58ff59
Make rmdir async.
...
Jeremy.
2009-04-21 06:52:54 -07:00
Jeremy Allison
dfc79de607
Make cli_mkdir async. Change it to return NTSTATUS.
...
Jeremy.
2009-04-21 05:52:34 -07:00
Andrew Bartlett
3b3e21bd9b
Convert Samba3 to use the common lib/util/charset API
...
This removes calls to push_*_allocate() and pull_*_allocate(), as well
as convert_string_allocate, as they are not in the common API
To allow transition to a common charcnv in future, provide Samba4-like
strupper functions in source3/lib/charcnv.c
(the actual implementation remains distinct, but the API is now shared)
Andrew Bartlett
2009-04-14 12:53:56 +10:00
Volker Lendecke
025eb40fbc
Convert cli_open to tevent_req
2009-04-06 21:32:07 +02:00
Volker Lendecke
31910810cf
Convert cli_close to tevent_req
2009-04-06 21:32:07 +02:00
Volker Lendecke
ca7cd350a6
Convert cli_ntcreate to tevent_req
2009-04-06 21:32:07 +02:00
Volker Lendecke
c14b7e648b
Split up async_req into a generic and a NTSTATUS specific part
2009-02-01 19:05:39 +01:00
Volker Lendecke
a0d52e7d54
Add async cli_ntcreate
2009-01-30 12:47:59 +01:00
Volker Lendecke
37da26a06e
Add the strlen to push to smb_bytes_push_str, return the converted size
...
The pushed strlen replaces the STR_TERMINATE flag which I personally always
find very confusing.
2009-01-29 21:38:06 +01:00
Volker Lendecke
7f25e0da73
Decouple clistr_pull from struct cli_state->inbuf
2009-01-26 05:39:34 +01:00
Volker Lendecke
6baf760d17
Fix an error path memleak
2009-01-25 20:52:42 +01:00
Volker Lendecke
28b7c44de8
Make smb_bytes_push_str deal with a NULL buf returning NULL
2009-01-25 20:52:39 +01:00
Volker Lendecke
4abdd3981e
Pass "bytes_alignment" up through cli_request_send
...
This parameter makes smb_spice_chain add padding before the bytes field
2008-12-19 14:53:29 +01:00
Volker Lendecke
7fbb64d726
Simplify async programming a bit with helper routines
...
Introduce async_req_is_error() and async_req_simple_recv()
2008-12-08 22:09:33 +01:00
Kai Blin
69debd45e5
libsmb: Fix up pointer passed to cli_send_trans in cli_link_internal
2008-11-18 11:25:14 -08:00
Jelmer Vernooij
4746f79d50
Use {u,}int64_t instead of SMB_BIG_{U,}INT.
2008-10-14 01:59:36 +02:00
Volker Lendecke
6344b8ec27
make smb_bytes_push_str public
...
(This used to be commit d611f599b45ad9dad1027a16a0e8da7d4b96e608)
2008-09-09 17:37:34 +02:00
Volker Lendecke
cad04676ca
Fix typo
...
(This used to be commit 544d1fd19a7e85af5f522c5b6b4b68c6beb093a6)
2008-09-01 23:31:42 +02:00
Volker Lendecke
128524930d
Add cli_pull_reply
...
Along the lines of cli_request_send this abstracts away the smb-level buffer
handling when parsing replies we got from the server.
(This used to be commit 253134d3aaa359fdfb665709dd5686f69af7f8fd)
2008-08-28 17:53:37 +02:00
Volker Lendecke
2650207d4a
Remove cli->event_ctx, pass it explicitly
...
Storing the event_context as permanent state in struct cli_state creates more
complex code than necessary IMO.
(This used to be commit debb37f703075008e5ea7d34d214cfa4d0f8f916)
2008-08-28 17:53:37 +02:00
Volker Lendecke
de9fcfc795
Add async open&x
...
(This used to be commit faf353edd60967efac4d5c222db14fa730866273)
2008-08-28 17:53:36 +02:00
Volker Lendecke
8f408a676e
Add async cli_close
...
(This used to be commit f84a2b5dbf8a072a9e356fa39523f65d042a2643)
2008-08-28 17:53:36 +02:00
Volker Lendecke
bf622cb876
Fix a typo
...
(This used to be commit 37bd2815c70176046bbe0232222b9f59dfa159c4)
2008-08-01 20:46:00 +02:00
Derrell Lipman
c58e7427bf
add a function to truncate a file to a specified size
...
(This used to be commit 7e5752812d6d9e3bcf9a545cbdcf3afe2175dbc4)
2008-02-26 21:42:26 -05:00
Tim Potter
441de75e58
Fix memory leaks on error path
...
(This used to be commit 47dd0700b4320bf5ac9a80e71ae82d82d4554e6a)
2008-02-20 18:27:40 -08:00
Jeremy Allison
afc93255d1
Add SMB encryption. Still fixing client decrypt but
...
negotiation works.
Jeremy.
(This used to be commit d78045601af787731f0737b8627450018902b104)
2007-12-26 17:12:36 -08:00
Volker Lendecke
1e26ecf666
Fix C++ warnings
...
(This used to be commit 01a5c3ea4bf18d99ca1c35e8c38367046e4c867b)
2007-12-08 09:39:36 -08:00
Jeremy Allison
1938e861d0
Remove arbitrary 1k limit on pathnames. Malloc them.
...
Jeremy.
(This used to be commit 71770b4c1d021d829deeb53a6ea3b747fce55c84)
2007-12-05 13:31:24 -08:00
Volker Lendecke
bbf2cb6da9
Fix some C++ warnings
...
(This used to be commit 156c7f10bb63a610f85b52242cfd1b67bfa73c29)
2007-12-01 10:43:35 -08:00
Jeremy Allison
5b184c3525
Remove pstrings from clifile.c.
...
Jeremy.
(This used to be commit d5658914c2d6ec878d9a11f8a1fa57f1697362e3)
2007-11-29 17:47:31 -08:00