1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

179 Commits

Author SHA1 Message Date
Volker Lendecke
9851e1989a s3: Fix a structure mess-up
I wonder why the compiler did not complain -- maybe because
the structs have the same data members? No clue.
2010-07-26 09:51:36 +02:00
Volker Lendecke
cc8977b157 s3: Remove some unused struct members 2010-07-26 09:51:36 +02:00
Volker Lendecke
334d5bfe30 s3: Convert cli_get_ea_list_path to cli_qpathinfo_send 2010-07-25 22:29:44 +02:00
Volker Lendecke
5380f67730 s3: Factor out parse_ea_blob 2010-07-25 22:29:44 +02:00
Volker Lendecke
d5e285abae s3: Convert cli_posix_stat to cli_qpathinfo_send 2010-07-25 22:29:44 +02:00
Volker Lendecke
786e4cd098 s3: Convert cli_posix_getfacl to cli_qpathinfo_send 2010-07-25 22:29:43 +02:00
Volker Lendecke
cb9baa7c2c s3: Convert cli_posix_readlink to cli_qpathinfo_send 2010-07-25 22:29:43 +02:00
Volker Lendecke
535774d880 s3: Add async cli_qpathinfo 2010-07-25 22:29:43 +02:00
Volker Lendecke
b04eba165e s3: Fix cli_posix_stat
nlink seems to be defined as 8 bytes, not 4

Jeremy, please check!
2010-07-25 20:45:47 +02:00
Volker Lendecke
486f734fd8 s3: Explicitly handle inbuf in cli_message_start_done 2010-02-22 23:23:20 +01:00
Volker Lendecke
be62ca1403 s3: Explicitly handle inbuf in cli_dskattr_done 2010-02-22 23:23:20 +01:00
Volker Lendecke
327f93bf1c s3: Explicitly handle inbuf in cli_getatr_done 2010-02-22 23:23:20 +01:00
Volker Lendecke
41ebf583e8 s3: Explicitly handle inbuf in cli_getattrE_done 2010-02-22 23:23:20 +01:00
Volker Lendecke
409fd662b0 s3: Explicitly handle inbuf in cli_open_done 2010-02-22 23:23:19 +01:00
Volker Lendecke
12863ffa56 s3: Explicitly handle inbuf in cli_ntcreate_done 2010-02-22 23:23:19 +01:00
Volker Lendecke
d122bfc064 s3: Add a talloc_move for the inbuf to cli_smb_recv 2010-02-22 23:23:18 +01:00
Volker Lendecke
b69a74eeca s3: Convert cli_raw_ioctl to use cli_smb() 2010-02-20 18:59:29 +01:00
Volker Lendecke
b1ed9a8963 s3: Fix the build on Solaris 2009-11-17 15:16:28 +01:00
Stefan Metzmacher
0762893c48 s3:libsmb: avoid passing a function call as function parameter
Using a helper variable makes it easier to "step" into the desired function
within gdb.

metze
2009-11-16 10:13:05 +01:00
Volker Lendecke
f4cf1c56a2 s3: Add min_setup, min_param and min_data to cli_trans_recv
Every caller that expects to receive something needs to check if enough was
sent. Make this check mandatory for everyone.

Yes, this makes the parameter list for cli_trans a bit silly, but that's just
the way it is: A silly protocol request :-)

While there, convert some _done functions to tevent_req_simple_finish_ntstatus.
2009-11-14 12:20:12 +01:00
Volker Lendecke
94d5417d10 s3:torture: Add a notify-bench test
This is a test that creates and deletes files in a directory as fast as the
network allows it. At the same time, it opens a filechangenotify. This test is
done to just torture handling a single directory together with the notify
infrastructure.
2009-10-13 20:34:25 +02:00
Volker Lendecke
1302526a74 s3:libsmb: Add cli_notify 2009-10-13 20:34:25 +02:00
Jeremy Allison
f31138ecc7 Fix bug 6726 - Filename length overwrites oplock request field in cli_nt_create().
Jeremy.
2009-09-14 15:10:53 -07:00
Volker Lendecke
e8abc36d2a Fix a valgrind error in cli_ctemp_done
For performance reasons cli_smb_recv does not make copies of the buffers we
received from the client, so both "vwv" and "bytes" vanish with
TALLOC_FREE(subreq). I know this is a bit counter-intuitive, but I think in
this case it's justified not to make copies.

Comments?
2009-07-27 12:47:20 +02:00
Jeremy Allison
1f5aec877f Make cli_unlock and cli_unlock64 async. Fix POSIX lock test.
Jeremy.
2009-07-15 11:49:33 -07:00
Jeremy Allison
e67de63ba6 Make cli_posix_lock/unlock asynchronous.
Jeremy.
2009-07-13 18:43:10 -07:00
Jeremy Allison
dc5c7b7f98 Make ctemp async. Fix the test to pass against W2K3.
Jeremy.
2009-06-10 11:58:00 -07:00
Jeremy Allison
64a1f17aff Make cli_ftruncate async. Also add a simple test.
Jeremy.
2009-06-05 16:06:05 -07:00
Jeremy Allison
684d3dddd6 Make cli_nt_delete_on_close() async.
Jeremy.
2009-05-29 14:58:34 -07:00
Jeremy Allison
9df85a9374 Make cli_posix_chown()/cli_posix_chmod() async.
Jeremy.
2009-05-28 16:15:09 -07:00
Jeremy Allison
656e86d5fa Make cli_posix_stat() async.
Jeremy.
2009-05-28 13:32:00 -07:00
Jeremy Allison
d74e42e0ec Make getfacl async.
Jeremy.
2009-05-28 13:05:50 -07:00
Jeremy Allison
bccc7ee2c6 Add cli_posix_readlink() and a torture test for it.
Jeremy.
2009-05-27 21:51:15 -07:00
Jeremy Allison
f55c7614bd Add aync POSIX hardlink and symlink and torture test for them.
Missing call cli_readlink() is next.
Jeremy.
2009-05-27 17:28:23 -07:00
Volker Lendecke
49ca690b4b Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STAT
This patch introduces

struct stat_ex {
        dev_t           st_ex_dev;
        ino_t           st_ex_ino;
        mode_t          st_ex_mode;
        nlink_t         st_ex_nlink;
        uid_t           st_ex_uid;
        gid_t           st_ex_gid;
        dev_t           st_ex_rdev;
        off_t           st_ex_size;
        struct timespec st_ex_atime;
        struct timespec st_ex_mtime;
        struct timespec st_ex_ctime;
        struct timespec st_ex_btime; /* birthtime */
        blksize_t       st_ex_blksize;
        blkcnt_t        st_ex_blocks;
};
typedef struct stat_ex SMB_STRUCT_STAT;

It is really large because due to the friendly libc headers playing macro
tricks with fields like st_ino, so I renamed them to st_ex_xxx.

Why this change? To support birthtime, we already have quite a few #ifdef's at
places where it does not really belong. With a stat struct that we control, we
can consolidate the nanosecond timestamps and the birthtime deep in the VFS
stat calls.

At this moment it is triggered by a request to support the birthtime field for
GPFS. GPFS does not extend the system level struct stat, but instead has a
separate call that gets us the additional information beyond posix. Without
being able to do that within the VFS stat calls, that support would have to be
scattered around the main smbd code.

It will very likely break all the onefs modules, but I think the changes will
be reasonably easy to do.
2009-05-26 17:48:23 +02:00
Jeremy Allison
000da55dd9 Make cli_posix_open() and cli_posix_mkdir() async.
Jeremy.
2009-05-20 18:31:36 -07:00
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