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

586 Commits

Author SHA1 Message Date
Stefan Metzmacher
0610f547aa s3:torture/nbio: use timeval_current/timeval_elapsed instead of start_timer/end_timer
metze
2009-11-24 11:49:01 +01:00
Michael Adam
a46b63fd98 s3:fix the merged build of bin/smbtorture4
Michael
2009-11-24 11:47:30 +01:00
Michael Adam
63a801e5c9 s3:torture: move the torture-specific headers to new torture/torture.h
Michael
2009-11-23 23:51:07 +01:00
Volker Lendecke
37e4e387db s3: Convert cli_get_fs_attr_info to the async API 2009-11-21 14:01:56 +01:00
Volker Lendecke
f668e4104f s3: Convert cli_set_unix_extensions_capabilities_send to async 2009-11-14 11:03:28 +01:00
Volker Lendecke
f9ad5cd133 s3: Convert cli_unix_extensions_version to async 2009-11-13 09:30:30 +01:00
Günther Deschner
f35a1b95aa s3-gencache: restore gencache_get behavior with NULL args (with torture test).
Without this, we panic in wins_srv_is_dead() and fail to start nmbd with
wins support.

Volker, please check.

Guenther
2009-11-02 13:04:26 +01:00
Jeremy Allison
49b23fe248 Fix comments on new test.
Jeremy
2009-10-20 17:41:27 -07:00
Jeremy Allison
e58f880381 Add local (or NFS) lock test to smbtorture. Checks that local locks
conflict with CIFS locks (see bug 6868).
Jeremy.
2009-10-20 17:37:43 -07: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
76d95b9a2d s3:gencache: Add a "was_expired" argument to gencache_get_data_blob
This is set to true if the routine returns failure due to an existing but
expired entry.
2009-09-23 18:50:33 +02:00
Matt Kraai
f6a29f7dd3 Port the Samba 3 shm_setup to QNX. 2009-09-13 12:55:26 +02:00
Volker Lendecke
a95955f285 s3:nsstest: Fix a very confusing behaviour in nsstest
Testing getgrent I thought I get the offset calculations wrong whereas
it was only nsstest printing stuff with spaces...
2009-08-29 19:43:33 +02:00
Volker Lendecke
1a22baa817 s3: Add talloc_dict.[ch] 2009-08-16 12:38:19 +02:00
Jeremy Allison
5d05d22999 Added prefer_ipv4 bool parameter to resolve_name().
W2K3 DC's can have IPv6 addresses but won't serve
krb5/ldap or cldap on those addresses. Make sure when
we're asking for DC's we prefer IPv4.
If you have an IPv6-only network this prioritizing code
will be a no-op. And if you have a mixed network then you
need to prioritize IPv4 due to W2K3 DC's.
Jeremy.
2009-07-28 11:51:58 -07:00
Volker Lendecke
be5cf23696 Fix the chain2 test 2009-07-24 17:17:08 +02:00
Tim Prouty
c9b8a01714 s3: Finish plumbing the fsp->fsp_name smb_fname conversion through the modules. 2009-07-20 17:26:57 -07:00
Jeremy Allison
1f5aec877f Make cli_unlock and cli_unlock64 async. Fix POSIX lock test.
Jeremy.
2009-07-15 11:49:33 -07:00
Volker Lendecke
3edcd55bf1 Remove gencache_init/shutdown
gencache_get/set/del/iterate call gencache_init() internally anyway. And we've
been very lazy calling gencache_shutdown, so this seems not really required.
2009-07-15 10:55:20 +02:00
Günther Deschner
9f15ef11bd s3-account_policy: add pdb_policy_type enum.
Guenther
2009-07-14 12:12:18 +02:00
Jeremy Allison
e67de63ba6 Make cli_posix_lock/unlock asynchronous.
Jeremy.
2009-07-13 18:43:10 -07:00
Volker Lendecke
3969f65aaa Fix&Run local-gencache 2009-07-10 18:16:46 +02:00
Volker Lendecke
0a0bff353e Fix our base64 implementation for blobs of length 4....
The additional length check bit us exactly at 4, removing it. The
torture test survives valgrind up to 2000 bytes :-)
2009-07-10 18:16:46 +02:00
Tim Prouty
161e182b65 s3: Remove is_ntfs_stream_name() and split_ntfs_stream_name()
Actually I moved split_ntfs_stream_name into torture.c which is the one
consumer of it.  This could probably be changed at some point.
2009-07-08 21:36:04 -07:00
Tim Prouty
3cb0e521e1 s3: Plumb smb_filename through SMB_VFS_NTIMES 2009-07-06 15:38:42 -07:00
Tim Prouty
258952aa85 s3: Plumb smb_filename through SMB_VFS_UNLINK 2009-07-06 15:38:36 -07:00
Tim Prouty
5a09ba460c s3: Plumb smb_filename through SMB_VFS_RENAME 2009-07-06 15:38:29 -07:00
Volker Lendecke
520b6c0d50 Fix two pointless statics 2009-07-03 23:20:57 +02:00
Volker Lendecke
56ae65ad5c Test error codes on popular streams 2009-07-03 23:20:56 +02:00
Tim Prouty
e129384d7c s3: Plumb smb_filename through SMB_VFS_STAT and SMB_VFS_LSTAT
This patch introduces two new temporary helper functions
vfs_stat_smb_fname and vfs_lstat_smb_fname.  They basically allowed me
to call the new smb_filename version of stat, while avoiding plumbing
it through callers that are still too inconvenient.  As the conversion
moves along, I will be able to remove callers of this, with the goal
being to remove all callers.

There was also a bug in create_synthetic_smb_fname_split (also a
temporary utility function) that caused it to incorrectly handle
filenames with ':'s in them when in posix mode.  This is now fixed.
2009-06-24 21:15:25 -07:00
Volker Lendecke
4aade2768b Add tldap paged searches, together with two helper routines 2009-06-20 18:54:07 +02:00
Volker Lendecke
756f83796f Add tiny tldap test 2009-06-19 14:28:22 +02:00
Tim Prouty
4e3656b8d1 s3: Change SMB_VFS_OPEN to take an smb_filename struct
This was a little messy because of all of the vfs modules I had to
touch.  Most of them were pretty straight forward, but the streams
modules required a little attention to handle smb_filename.  Since the
use of smb_filename enables the vfs modules to access the raw,
over-the-wire stream, a little bit of the handling that was being done
by split_ntfs_stream_name has now been shifted into the individual
stream modules.  It may be a little more code, but overall it gives
more flexibility to the streams modules, while also allowing correct
stream handling.
2009-06-17 20:11:53 -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
Slava Semushin
ecd1fe2456 source3/torture/vfstest.c(process_file): fixed file descriptor leak.
Found by cppcheck:
[./source3/torture/vfstest.c:400]: (error) Resource leak: file
2009-06-05 10:17:09 +02:00
Stefan Metzmacher
c862018008 s3:smbd: move tcon specific globals to struct smbd_server_connection
metze
2009-06-03 17:54:38 +02:00
Kai Blin
bb9103d9c4 libwbclient: Store the winbind socket dir to use in the wb_context 2009-05-30 09:17:37 +02:00
Kai Blin
57ea909b32 libwbclient: Add async call framework. 2009-05-30 09:17:37 +02:00
Jeremy Allison
684d3dddd6 Make cli_nt_delete_on_close() async.
Jeremy.
2009-05-29 14:58:34 -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
Slava Semushin
5d2cd81645 source{3,4}/torture/smbiconv.c(main): fixed file descriptor leak.
File descriptor leaks only when we use file instead of stdout.

Found by cppcheck:
[./source3/torture/smbiconv.c:219]: (error) Resource leak: out
[./source4/torture/smbiconv.c:211]: (error) Resource leak: out
2009-05-25 16:18:48 +02:00
Volker Lendecke
e744b0af68 use epoll for local-wbclient test 2009-05-24 13:51:32 +02:00
Jeremy Allison
e3851a9110 Test that POSIX open of a directory returns NT_STATUS_FILE_IS_A_DIRECTORY (ERRDOS, EISDIR).
Jeremy.
2009-05-22 15:21:55 -07:00
Tim Prouty
96ede10cfb s3 torture: Fix warning 2009-05-21 12:17:53 -07:00
Jeremy Allison
000da55dd9 Make cli_posix_open() and cli_posix_mkdir() async.
Jeremy.
2009-05-20 18:31:36 -07:00
Volker Lendecke
3fbc871f70 Demonstrate a bug we have when dealing with real os-level share modes
Another one of those where you stare at logfiles for hours, and when you found
it, it's absolutely obvious what is happening...
2009-05-20 14:58:37 +02:00
Volker Lendecke
ae386415b6 Make local-wbclient flexible in # of connections and ops 2009-05-19 23:09:26 +02:00
Jeremy Allison
f61959e87a Make error message clearer on fail.
Jeremy.
2009-05-14 16:30:11 -07:00
Jeremy Allison
41aa7d790a Add a test showing what ascii values cause an NTFS volume to
create a mangled name. We don't pass this yet, but it's not
run by default.
Jeremy.
2009-05-14 16:03:31 -07:00
Stefan Metzmacher
ca6ec5ecd7 s3:libsmb: let cli_smb_chain_send() also return NTSTATUS
metze
2009-05-13 18:27:50 +02:00
Jeremy Allison
b4c9cfb2af Fix a bunch of compiler warnings about wrong format types.
Should make Solaris 10 builds look cleaner.
Jeremy.
2009-05-11 21:56:57 -07:00
Volker Lendecke
efbc4315d2 Fix the mangle1 test 2009-05-09 14:09:42 +02:00
Volker Lendecke
5c43bc616a Fix a typo 2009-05-07 16:37:55 +02:00
Volker Lendecke
1b75345a9a Add simple test chaining up sesssetup and tcon 2009-05-07 16:37:54 +02:00
Jeremy Allison
606edf0f35 Make cli_setatr async.
Jeremy.
2009-05-06 16:13:42 -07:00
Jeremy Allison
4cbd0c77e4 Make cli_getatr() async.
Jeremy.
2009-05-05 20:59:22 -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
Tim Prouty
1b223eeb59 s3 torture: Only close if open was successful 2009-05-04 13:26:27 -07:00
Jeremy Allison
5dae04e055 Torture test for bug #6315 - smbd crashes doing vfs_full_audit on IPC$ close event.
Shows that doing a tdis with invalid uid succeeds.
Jeremy.
2009-05-04 10:40:57 -07:00
Tim Prouty
1b2c65ff8d s3 torture: Fix comparison is always true warning 2009-05-04 08:52:26 -07:00
Volker Lendecke
2fe79f7584 Fix an invalid type warning 2009-05-03 22:48:31 +02:00
Volker Lendecke
4949a2cfaa Fix some warnings due to uint16_t!=-1 always being true 2009-05-03 22:48:31 +02:00
Volker Lendecke
e2052f128f Attempt to fix the build on SerNet-sles8
That compiler does not like #if embedded into the macro NT_STATUS_IS_OK.
2009-05-02 19:11:52 +02:00
Volker Lendecke
5b7b47f015 Add getaddrinfo_send/recv 2009-05-01 12:30:59 +02: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
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
Volker Lendecke
546d16500d Fix a pointless static 2009-04-23 13:46:29 +02:00
Jeremy Allison
502f47c7c0 Make cli_chkpath async.
Jeremy
2009-04-22 06:46:42 -07:00
Volker Lendecke
a3efd9d797 Fix some nonempty blank lines 2009-04-22 11:52:07 +02:00
Volker Lendecke
e77c17ec3e Remove some shadowed definition warnings 2009-04-22 11:19:13 +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
Volker Lendecke
a6cb470892 Reproduce a bug with a custom GET_REAL_FILENAME 2009-04-20 15:17:35 +02:00
Jeremy Allison
37b1b9cfe9 Add torture tester to ensure we don't regress the ulogoff bug.
Jeremy.
2009-04-16 16:22:37 -07:00
Andrew Bartlett
fca02c9154 s3:smbtorture Convert charcnv torture suite to use push_ucs2_talloc()
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-07 12:54:59 +02:00
Volker Lendecke
3084d49cc0 Add a bad hack to enable level 2 oplocks in torture_open_connection_share 2009-04-06 21:32:08 +02:00
Volker Lendecke
86b09e84ae Re-add the CHAIN1 test 2009-04-06 21:32:07 +02:00
Volker Lendecke
dec928e884 Convert cli_echo to tevent_req 2009-04-06 21:32:06 +02:00
Volker Lendecke
0a4cdad324 Remove the CHAIN1 test -- will come back later 2009-04-06 21:32:06 +02:00
Volker Lendecke
4b8e4ea728 Fix a debug msg typo 2009-03-29 00:53:04 +01:00
Jeremy Allison
c5394cd7cf Modify simple POSIX open test to use filenames containing a ':'
character. Should stop regressions of bug #6196.
Jeremy.
2009-03-18 21:49:32 -07:00
Volker Lendecke
05b49fd4c8 Convert wb_trans to tevent_req 2009-03-16 20:45:55 +01:00
Jeremy Allison
f48a345e4a Remove pwd_cache.c, it was doing nothing. Make user_name, domain, and
password talloc'ed strings within the cli_struct.
Jeremy.
2009-03-13 17:49:24 -07:00
Tim Prouty
bace42d586 s3 torture: Fix unitialized variable to avoid closing a random fnum 2009-03-12 16:51:20 -07:00
Stefan Metzmacher
2fdbafbf54 Revert "s3:libsmb: add an option to cli_push to let the caller provide the buffers"
This reverts commit 9579a6f193.

It's confusing to have a boolean to alter the behavior of cli_push
and as the new feature isn't used yet I revert it.

We can readd a extra function later.

metze
2009-03-12 11:03:50 +01:00
Jeremy Allison
c260bfa5d7 Add simple POSIX open, mkdir and rmdir test.
Jeremy.
2009-03-11 14:28:47 -07:00
Tim Prouty
2bfd2c58f8 s3 torture: Simple warning fix 2009-03-11 13:09:24 -07:00
Stefan Metzmacher
9579a6f193 s3:libsmb: add an option to cli_push to let the caller provide the buffers
metze
2009-03-10 14:07:56 +01:00
Volker Lendecke
0844cca1d5 Replace get_myname() with the talloc version from v3-3-test 2009-02-13 12:15:03 +01:00
Tim Prouty
abec7cfa16 s3: Remove some unused vars 2009-02-10 22:18:35 -08:00
Steven Danneman
af0e199b31 Add an optional SMB_STRUCT_SMB parameter to VFS_OP_READDIR
* this allows VFS implementations that prefetch stat information on
  readdir to return it through one VFS call
* backwards compatibility is maintained by passing in NULL
* if the system readdir doesn't return stat info, the stat struct is
  set to invalid
2009-02-09 23:56:16 -08:00
Kai Blin
c3b9b6c8aa async_sock: Use unix errnos instead of NTSTATUS
This also switches wb_reqtrans to use wbcErr instead of NTSTATUS as it would
be pointless to convert to errno first and to wbcErr later.
2009-02-09 08:36:08 +01:00
Volker Lendecke
0bd92281e4 Make cli_tcon_andx async 2009-01-30 12:47:59 +01:00
Stefan Metzmacher
c2a2006f8a s3:torture: support SMB_CONF_PATH envvar in smbtorture
metze
2009-01-28 10:59:17 +01:00