summaryrefslogtreecommitdiff
path: root/source3
AgeCommit message (Collapse)AuthorFilesLines
2009-05-05s3:onefs.so Change system function namesSteven Danneman1-4/+4
Addendum to c49730e1. Use newer cookie conversion names.
2009-05-05Fix bug 6302: Give the VFS a chance to read from 0-byte filesVolker Lendecke1-8/+9
2009-05-05s3-ldap: fix more callers of smbldap_dn_talloc() that were passing a NULL ↵Günther Deschner2-2/+2
context. Guenther
2009-05-05s3-ldapsam: Fix Bug #6313: ldapsam_update_sam_account() crashes while doing ↵Günther Deschner1-1/+1
talloc_free on malloced memory. Guenther
2009-05-05s3:loadparm: use the returnvalue of service_ok() in process_smbconf_service().Michael Adam1-1/+1
Michael
2009-05-04Turn on POSIX test (small test) on buildfarm.Jeremy Allison1-1/+1
Jeremy.
2009-05-04Fix the async calls for the posix_unlink and posix_rmdir.Jeremy Allison2-14/+50
Jeremy.
2009-05-04s3:onefs.so fix issue with missing entries when enumerating directoriesSteven Danneman1-130/+75
This bug prompted several, fairly large changes to the of OneFS's readdirplus() within Samba. One fundamental problem is that we kept our cache cursor pointed at the next entry to be returned from onefs_readdir(), while the resume cookie needed to refill the cache such that our cursor would be on this entry, was located in the previous cache entry. This meant that to correctly handle seekdir() cases which could be found within the existing cache, and cases where a cache reload was needed, required that the cache always hold at least two entries: the entry we wished to return, and the previous entry which held the resume cookie. Since the readdirplus() syscall gives us no guarantee that it will always return these two direntries, there was a fundamental problem with this design. To fix this problem, I have rearchitected the onefs_readdir() path to keep its pointer on the entry which contains the resume_cookie, not the entry which will be returned next. Essentially, I changed onefs_readdir() from a "return an entry then increment the cursor" model to "increment the cursor then return an entry". By doing this, we only require that a single entry be within the cache: the entry containing the resume cookie. Second, there have been numerous off-by-one bugs in my implementation of onefs_seekdir() which did a mapping between the 64-bit resume cookie returned by readdirplus() and its own monotonically increasing "location" offset. Furthermore, this design caused a somewhat frequent waste of cycles, as in some cases we'd need to re-enumerate the entire directory to recover the current "location" from an old resume cookie. As this code was somewhat difficult to understand, prone to bugs, and innefficient in some cases I decided it was better to wholesale replace it now, rather than later. It is possible to algorithmically map the 64-bit resume cookies from readdirplus() into 32-bit offset values which SMB requires. The onefs.so module now calls into a system library to do this conversion. This greatly simplifies both the seekdir() and telldir() paths and is more efficient.
2009-05-04s3 torture: Only close if open was successfulTim Prouty1-4/+12
2009-05-04Ensure we use UID-REGRESSION-TEST. It's a very short test.Jeremy Allison1-1/+1
Jeremy.
2009-05-04Torture test for bug #6315 - smbd crashes doing vfs_full_audit on IPC$ close ↵Jeremy Allison1-2/+28
event. Shows that doing a tdis with invalid uid succeeds. Jeremy.
2009-05-04s3 torture: Fix comparison is always true warningTim Prouty1-2/+2
2009-05-04Fix bug #6315 smbd crashes doing vfs_full_audit on IPC$ close event.Jeremy Allison1-3/+44
The underlying problem is that once SMBulogoff is called, all server_info contexts associated with the vuid should become invalid, even if that's the context being currently used by the connection struct (tid). When the SMBtdis comes in it doesn't need a valid vuid value, but the code called inside vfs_full_audit always assumes that there is one (and hence a valid conn->server_info pointer) available. This is actually a bug inside the vfs_full_audit and other code inside Samba, which should only indirect conn->server_info on calls which require AS_USER to be set in our process table. I could fix all these issues, but there's no guarentee that someone might not add more code that fails this assumption, as it's a hard assumption to break (it's usually true). So what I've done is to ensure that on SMBulogoff the previously used conn->server_info struct is kept around to be used for print debugging purposes (it won't be used to change to an invalid user context, as such calls need AS_USER set). This isn't strictly correct, as there's no association with the (now invalid) context being freed and the call that causes conn->server_info to be indirected, but it's good enough for most cases. The hard part was to ensure that once a valid context is used again (via new sessionsetupX calls, or new calls on a still valid vuid on this tid) that we don't leak memory by simply replacing the stored conn->server_info pointer. We would never actually leak the memory (as all conn->server_info pointers are talloc children of conn), but with the previous patch a malicious client could cause many server_info structs to be talloced by the right combination of SMB calls. This new patch introduces free_conn_server_info_if_unused(), which protects against the above. Jeremy.
2009-05-04Do not crash in ctdbd_traverse if ctdbd is not aroundVolker Lendecke1-0/+5
2009-05-04Increase debug level of "create_connection_server_info failed" messageVolker Lendecke1-1/+1
I don't think we should unconditionally send every refused connection attempt to a share to syslog, that's where all debug level 0 messages end up.
2009-05-04s3-printing: Fix driver upload for Xerox 4110 PS printer driver.Günther Deschner1-0/+2
We need to allow to set filesystem capabilities from the default vfs in create_conn_struct() in order to find mixed-case filenames. Thanks Volker! This one was hard to find, so a little longer explanation: When a Windows client tries to upload e.g. the Xerox 4110 PS driver, the client first uploads the driver files to the [print$] share. Some of them (in this case the Windows Postscript drivers) are with uppercase filenames while some of them (like the PPD file) are in lowercase. After the driver upload the client issues the spoolss_AddPrinterDriverEx() call with level 6. There the client tries to add the PPD file with an uppercase filename (while having stored it in lowercase on the server). The internal spoolss add driver functions then could not find the appropriate filename while trying to move them to the version subdirectory (in this case W32X86/3) and fails then entire spoolss_AddPrinterDriverEx() call. With this fix, the convert_unix_name() name finds the correct file and the spoolss_AddPrinterDriverEx() succeeds. Guenther
2009-05-03Fix Coverity ID 913 (NEGATIVE_RETURNS) -- gd, please check!Volker Lendecke1-2/+2
2009-05-03Fix an invalid type warningVolker Lendecke1-1/+1
2009-05-03Fix some warnings due to uint16_t!=-1 always being trueVolker Lendecke3-6/+6
2009-05-03Fix a bunch of type-punned warnings -- gd, please fix properly :-)Volker Lendecke1-15/+30
2009-05-03Fix bug 6136: New AFS syscall conventionsGeza Gemes3-4/+24
Haven't checked this myself, but as I've already got several reports that Samba won't compile against current OpenAFS anymore, I just believe Geza Gemes. This patch only affects AFS code, so it should not hurt anything else. Volker
2009-05-02Attempt to fix the build on SerNet-sles8Volker Lendecke1-3/+6
That compiler does not like #if embedded into the macro NT_STATUS_IS_OK.
2009-05-02Explicitly link in pthreads for lib/pthreadpool if requiredVolker Lendecke1-0/+3
No idea why it works on my Linux without -lpthread ... :-)
2009-05-02Fix a malloc/talloc mixupVolker Lendecke1-1/+1
2009-05-01Many build farm boxes do not have clock_gettimeVolker Lendecke1-2/+2
2009-05-01tsocket: remove tsocket_context related stuffStefan Metzmacher1-4/+1
It will be replaced by tdgram_context and tstream_context. metze
2009-05-01Add getaddrinfo_send/recvVolker Lendecke4-0/+145
2009-05-01Add fncall_send/recvVolker Lendecke4-0/+375
2009-05-01Add thread poolVolker Lendecke4-2/+562
Included if pthreads are found, can be disabled with --enable-pthreadpool=no Tim, Steven, I haven't yet seen comments from you. You have been asking for such a thing at SambaXP. Do you like this? :-)
2009-04-30Cause cli_close to return an NTSTATUS.Jeremy Allison12-163/+84
Jeremy.
2009-05-01s3:config.sub: clean some space/tab mixup that git complains aboutMichael Adam1-1/+1
Michael
2009-05-01s3:config.sub: replace old FSF address by the web site url.Michael Adam1-3/+1
Michael
2009-05-01s3:config.sub: move to GPLv3Michael Adam1-1/+1
Michael
2009-05-01s3:update config.sub from gnu.org (2009-04-17)Michael Adam1-48/+157
as requested in bug #6292. This is taken from http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD Michael
2009-05-01s3:config.guess: clean some whitespace/tab mixtures that git complains aboutMichael Adam1-2/+2
Michael
2009-05-01s3:config.guess: replace old FSF address by the web site url.Michael Adam1-3/+1
Michael
2009-05-01s3:config.guess: move to GPLv3Michael Adam1-1/+1
2009-05-01s3:update config.guess form gnu.org (version 2009-04-27)Michael Adam1-27/+125
as requested in bug #6292. This is taken from http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD Michael
2009-04-30Get medieval on our ass about SMB1 file descriptors being 16 bits, not an int.Jeremy Allison29-599/+482
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-30s3-netapi: Fix Bug #6309: support remote unjoining of Windows 2003 or greater.Günther Deschner2-2/+4
Found by David Markey <admin@dmarkey.com>. Thanks! Guenther
2009-04-30s3-printing: rework move_driver_file_to_download_area() a bit for clarity.Günther Deschner1-32/+40
Guenther
2009-04-30s3-lsa: use LSA_POLICY_MODE flags in _lsa_GetSystemAccessAccount().Günther Deschner2-7/+2
Guenther
2009-04-30s3-nss_wins: Fix unresolved ldb symbols in libnss_wins.so.Günther Deschner1-1/+1
The objects for this module should probably be cleaned up once. Guenther
2009-04-30Re-import the v3-3 version of str_list_make().Volker Lendecke1-7/+59
The merged version behaves differently: "Domain Users" is parsed into two values, as it does not look at quotes. Samba3 users depend on the ability do say for example valid users = "domain users" which would not work anymore with the merged version. Thanks to Björn Jacke for testing this! Volker
2009-04-30Fix notify_onelevel: notify is not necessarily enabledVolker Lendecke1-0/+4
Thanks to Günther Deschner! Volker
2009-04-30s3-spoolss: avoid referring to uid 0 in spoolss server (use ↵Günther Deschner1-3/+3
sec_initial_uid() instead). Guenther
2009-04-30s3-printing: use move_driver_file_to_download_area() to avoid code duplication.Günther Deschner1-144/+54
Guenther
2009-04-30s3-printing: add move_driver_file_to_download_area().Günther Deschner1-0/+40
Guenther
2009-04-29Make cli_unlink async.Jeremy Allison13-140/+210
Jeremy.
2009-04-29More async calls in libsmb/clifile.cJeremy Allison3-53/+188
Jeremy.