summaryrefslogtreecommitdiff
path: root/source3/libsmb
AgeCommit message (Collapse)AuthorFilesLines
2009-07-16More conversions of NULL -> talloc_autofree_context()Jeremy Allison3-19/+24
so we at least know when we're using a long-lived context. Jeremy.
2009-07-16Replace more long-lived contexts with talloc_autofree_context().Jeremy Allison1-1/+1
Jeremy.
2009-07-15s3:libsmb: we need to include "includes.h" as first header to let code build ↵Stefan Metzmacher1-1/+1
on all platforms This should fix the Tru64 build. metze
2009-07-15Make cli_unlock and cli_unlock64 async. Fix POSIX lock test.Jeremy Allison1-64/+206
Jeremy.
2009-07-15Consolidate string and data_blob routines in gencacheVolker Lendecke1-8/+7
2009-07-15Remove gencache_init/shutdownVolker Lendecke5-93/+0
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-15Fix some nonempty blank linesVolker Lendecke1-21/+20
2009-07-15Remove gencache_[un]lock_keyVolker Lendecke1-6/+0
2009-07-13Make cli_posix_lock/unlock asynchronous.Jeremy Allison1-58/+215
Jeremy.
2009-07-07s3: QNX doesn't know uint - replace with uint_tBjörn Jacke1-4/+4
2009-06-30Fix bug #6496 - MS-DFS: cannot follow multibyte char link name.SATOH Fumiyasu1-14/+38
consumed_ucs is the number of bytes of the UCS2 path consumed not counting any terminating null. We need to convert back to unix charset and count again to get the number of bytes consumed from the incoming path.
2009-06-17s3/libsmb: Fix typo in error message.Karolin Seeger1-1/+1
Thanks to Herb Lewis <hlewis [at] panasas.com> for noticing! Karolin
2009-06-15s3/libsmb: Fix debug message.Karolin Seeger1-1/+1
This fixes bug #6472. Karolin Signed-off-by: Volker Lendecke <vl@samba.org>
2009-06-10Make ctemp async. Fix the test to pass against W2K3.Jeremy Allison1-36/+135
Jeremy.
2009-06-05Make cli_ftruncate async. Also add a simple test.Jeremy Allison2-73/+117
Jeremy.
2009-06-04clikrb5: Prefer krb5_free_keytab_entry_contents to krb5_kt_free_entry.Jelmer Vernooij1-3/+8
Both functions exist in MIT Kerberos >= 1.7, but only krb5_free_keytab_entry_contents has a prototype.
2009-06-01Fix bug #6419 - smbclient -L 127.0.0.1" displays "netbios name" instead of ↵Jeremy Allison1-3/+26
"workgroup" Unify the handling of the sessionsetup parsing so we don't get different results when parsing a guest reply than an ntlmssp reply. Jeremy.
2009-05-29Make cli_nt_delete_on_close() async.Jeremy Allison1-0/+130
Jeremy.
2009-05-29libsmbclient: make SMBC_module_terminate() static.Michael Adam1-1/+1
Michael
2009-05-29s3/getdcname: Fix 'net' crash.Kumar Thangavelu1-2/+2
'net' command crashed when attempting to join a domain. This occurred in a very specific case where the DC had multiple IPs and one of the IPs was invalid. Signed-off-by: Volker Lendecke <vl@samba.org>
2009-05-28Make cli_posix_chown()/cli_posix_chmod() async.Jeremy Allison1-47/+213
Jeremy.
2009-05-28Make cli_posix_stat() async.Jeremy Allison1-52/+143
Jeremy.
2009-05-28Make getfacl async.Jeremy Allison1-40/+130
Jeremy.
2009-05-27Add cli_posix_readlink() and a torture test for it.Jeremy Allison1-1/+183
Jeremy.
2009-05-27Add aync POSIX hardlink and symlink and torture test for them.Jeremy Allison1-151/+300
Missing call cli_readlink() is next. Jeremy.
2009-05-26Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STATVolker Lendecke3-23/+23
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-24Add "err_on_readability" to writev_sendVolker Lendecke1-2/+2
A socket where the other side has closed only becomes readable. To catch errors early when sitting in a pure writev, we need to also test for readability.
2009-05-20Make cli_posix_open() and cli_posix_mkdir() async.Jeremy Allison1-56/+217
Jeremy.
2009-05-18Fix broken pipe handlingVolker Lendecke1-2/+2
Metze is right: If we have *any* error at the socket level, we just can not continue. Also, apply some defensive programming: With this async stuff someone else might already have closed the socket.
2009-05-19s3: tevent_req_poll() loops forever when pipe is brokenBo Yang1-0/+8
Signed-off-by: Bo Yang <boyang@samba.org>
2009-05-13What to do about debugging in a multi-threaded application?Derrell Lipman1-7/+10
- For now, punt. Any thread that requests debug to stderr will establish that for all threads. Derrell
2009-05-13Thread-safe protection: libsmbclient initializationDerrell Lipman1-94/+133
- Begin converting init functions to use SMB_THREAD_ONCE. libsmbclient module-wide initialization is now moved into a separate function and called via SMB_THREAD_ONCE. - libsmbclient counts users (contexts) so that it can release global resources when the last context is closed. That count of contexts is now protected by a mutex. Derrell
2009-05-13s3:libsmb: move read_smb_send/recv() static in async_smb.cStefan Metzmacher1-0/+87
metze
2009-05-13s3:libsmb: let cli_smb_chain_send() also return NTSTATUSStefan Metzmacher1-9/+12
metze
2009-05-13s3:libsmb: return NT_STATUS_CONNECTION_INVALID if the fd is -1Bo Yang1-5/+7
This way we can destinguish between requests which failed because the connection broke after they were triggered and the requests which are started on an already broken connection. This also moves the check to cli_smb_req_iov_send() where it really belongs. metze
2009-05-13s3: return proper error code in cli_smb_req_sendBo Yang5-38/+82
Signed-off-by: Bo Yang <boyang@samba.org>
2009-05-12Clean up assignments to iov_base, ensure it's always cast to void *. This ↵Jeremy Allison6-18/+18
should quieten some warnings with picky compilers on the buildfarm. Jeremy.
2009-05-10Provide a libsmbclient interface for programs requiring threadsDerrell Lipman2-0/+176
- This adds two functions: smbc_thread_posix() which provides access to the internal threading implementation using pthread; and smbc_thread_impl() where the user provides each of the functions required by Samba, to give access to the thread implementation's native capabilities. Derrell
2009-05-09s3:libsmb: fix layering of cli_ntrename_internal and its callersStefan Metzmacher1-29/+35
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-07Async API needs all parameters to be kept around until sent,Jeremy Allison1-55/+15
ensure they're attached to the state structure. Thanks to Metze for pointing this out. Jeremy.
2009-05-07Make cli_tcon_andx chainableVolker Lendecke1-15/+42
2009-05-07Make cli_session_setup_guest chainableVolker Lendecke1-9/+31
2009-05-07s3-credentials: protect netlogon_creds_server_step() against NULL creds.Günther Deschner1-0/+4
Found by SCHANNEL torture tests. Guenther
2009-05-06Make cli_setatr async.Jeremy Allison3-2/+129
Jeremy.
2009-05-06Make cli_setattrE async.Jeremy Allison2-26/+98
Jeremy.
2009-05-05Make cli_getatr() async.Jeremy Allison2-27/+126
Jeremy.
2009-05-05Make cli_getattrE async.Jeremy Allison3-33/+132
Jeremy.
2009-05-04Fix the async calls for the posix_unlink and posix_rmdir.Jeremy Allison1-13/+49
Jeremy.
2009-04-30Cause cli_close to return an NTSTATUS.Jeremy Allison2-81/+4
Jeremy.
2009-04-30Get medieval on our ass about SMB1 file descriptors being 16 bits, not an int.Jeremy Allison10-73/+72
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.