summaryrefslogtreecommitdiff
path: root/source3/smbd
AgeCommit message (Collapse)AuthorFilesLines
2008-10-09Remove SEC_ACCESS. It's a uint32_t.Jeremy Allison1-19/+7
Jeremy.
2008-10-09Remove a pointless level of indirectionVolker Lendecke2-11/+1
2008-10-09Fix a typoVolker Lendecke1-1/+1
2008-10-08For the vfs_acl_xattr.c module, make sure we map GENERIC file and directory bitsJeremy Allison2-0/+9
to specific bits every time a security descriptor is set. The S4 torture suite proves that generic bits are not returned when querying an ACL set using them (ie. only the specific bits are stored on disk). Jeremy.
2008-10-08Deal with inheritance from parent directory when setting WindowsJeremy Allison1-1/+1
ACLs. Jeremy.
2008-10-08Remove unused CHECK_FSP macroVolker Lendecke1-3/+2
2008-10-07Update vfs version as I've added a const to the security_descriptor paramter ↵Jeremy Allison1-25/+26
in fset_nt_acl(). Need to watch the build farm to make sure I haven't broken the AIX or Solaris ACL modules. Jeremy.
2008-10-03Simply our main loop processing. A lot :-). Correctly use events for all the ↵Jeremy Allison3-187/+40
previous "special" cases. A step on the way to adding signals to the events and being able to merge the S3 event system with the S4 one. Jeremy.
2008-10-01Fix use of DLIST_REMOVE as spotted by Constantine Vetoshev <gepardcv@gmail.com>.Jeremy Allison1-1/+1
This API is unusual in that if used to remove a non-list head it nulls out the next and prev pointers. This is what you want for debugging (don't want an entry removed from the list to be still virtually linked into it) but means there is no consistent idiom for use as the next and prev pointers get trashed on removal from the list, meaning you must save them yourself. You can use it one way when deleting everything via the head pointer, as this preserves the next pointer, but you *must* use it another way when not deleting everything via the head pointer. Fix all known uses of this (the main one is in conn_free_internal() and would not free all the private data entries for vfs modules. The other changes in web/statuspage.c and winbindd_util.c are not strictly neccessary, as the head pointer is being used, but I've done them for consistency. Long term we must revisit this as this API is too hard to use correctly. Jeremy.
2008-09-30Fix the make test problem Karolin reported. Now rename_open_files actually ↵Jeremy Allison1-2/+2
works correctly we must emit the change notify before we change the name, not before. Jeremy.
2008-09-26Second part of the fix for bug #5790 - samba returns ↵Jeremy Allison1-4/+6
STATUS_OBJECT_NAME_NOT_FOUND on set file disposition call. This was my fault. I use a singleton cache (positive and negative) to speed up pathname based qfileinfo/setfileinfo lookups for alternate fsp's open on the same path. I only invalidated the negative cache on adding a new file fsp, as I incorrectly imagined the new fsp was put at the *end* of the open files list. DLIST_ADD puts it at the start, meaning any subsequent open wasn't seen once the cache was set. Doh ! Jeremy.
2008-09-26Fix bug #5797 - Moving readonly files fails. Reported by infomail@lordb.de.Jeremy Allison1-3/+1
We don't need to deny a DELETE open on a readonly file (I'm also adding a s4 torture test for this), the set_file_disposition call will return NT_STATUS_CANNOT_DELETE if the delete-on-close bit is set on a readonly file (and we already do this). Jeremy.
2008-09-24Fix bug #5790 samba returns STATUS_OBJECT_NAME_NOT_FOUND on set file ↵Jeremy Allison1-4/+2
disposition. We were checking that fd != -1 in file_find_di_XXX calls which is no longer needed due to a change in internal semantics. Jeremy.
2008-09-23Fix bug #5783 FindFirst fails where search pattern == mangled filename.Jeremy Allison2-8/+8
That was an old and subtle bug. Jeremy.
2008-09-23s3: use samba4 prototype for ndr_push/pull_struct_blob.Günther Deschner1-4/+4
Guenther
2008-09-15Fix aio on FreeBSD.Timur1-1/+16
2008-09-15Fix cut and paste error in quota code.Timur1-2/+2
2008-09-15Fix bug 5761 "open of mangled directory name results in 'is a stream name'"Jeremy Allison1-3/+7
reported by Regan Heath <Regan.Heath@BridgeHeadSoftware.com>. Jeremy.
2008-09-12Modify a comment to make things clearer.Jeremy Allison1-1/+3
Jeremy. (This used to be commit 9d55ca85ffc73e3fa5fb9895fbcb1ee22f4e320d)
2008-09-10Fix bug #5052 - not work cancel inheritance on share. We wereJeremy Allison1-3/+10
using the parent security descriptor type and flags instead of using the passed in SD. Jeremy. (This used to be commit 0d824d7188518aaa7b4e890885e6bc42e94397c5)
2008-09-10When requesting UNIX info levels on findfirst/findnext, don't play games ↵Jeremy Allison1-1/+5
with write time, just return what the underlying filesystem says. Trying not to confuse UNIX apps any more than necessary. Jeremy. (This used to be commit b81a4dd003957a611ea190979d828b75d07a1f80)
2008-09-09Add some debug to reply_nttransVolker Lendecke1-0/+11
(This used to be commit 23e9fed28cf9998534b3c55f4b20a562da507552)
2008-09-08Fix calculation of useable_space for trans2 and nttrans repliesVolker Lendecke2-18/+19
When alignment was in place, we pretended to send more data/params according to the param_offset/param_length and data_offset/data_length parameters than would actually fit into the SMB according to the NBSS length field. (This used to be commit ef3c132b8455c6fe4d0bb9f0be881040a806a4ed)
2008-09-08smbd: some write time fixesStefan Metzmacher1-8/+7
- only the first non truncating write causes the write time update with 2 seconds delay. It's not enough to check for an existing update event as it will be NULL after the event was triggered. - SMBwrite truncates always update the write time unless the sticky write time is set. - SMBwrite truncates don't trigger a write time update on close. metze (This used to be commit 3d17089b6dc773303c8c553f3f6140e60e348fb7)
2008-09-05Write times code update.Jeremy Allison4-35/+82
Ok, here's the fix for the write times breakage with the new tests in S4 smbtorture. The key is keeping in the share mode struct the "old_file_time" as the real write time, set by all the write and allocation calls, and the "changed_write_time" as the "sticky" write time - set by the SET_FILE_TIME calls. We can set them independently (although I kept the optimization of not setting the "old_file_time" is a "changed_write_time" was already set, as we'll never see it. This allows us to update the write time immediately on the SMBwrite truncate case, SET_END_OF_FILE and SET_ALLOCATION_SIZE calls, whilst still have the 2 second delay on the "normal" SMBwrite, SMBwriteX calls. I think in a subsequent patch I'd like to change the name of these from "old_file_time" to "write_time" and "changed_write_time" to "sticky_write_time" to make this clearer. I think I also fixed a bug in Metze's original code in that once a write timestamp had been set from a "normal" SMBwriteX call the fsp->update_write_time_triggered variable was set and then never reset - thus meaning the write timestamp would never get updated again on subsequent SMBwriteX's. The new code checks the update_write_time_event event instead, and doesn't update is there's an event already scheduled. Metze especially, please check this over for your understanding. Jeremy. (This used to be commit 6f20585419046c4aca1f7d6c863cf79eb6ae53b0)
2008-09-01Slightly simplify logic: remove an else branchVolker Lendecke1-14/+11
(This used to be commit 56ecec50130aa948a431427285aed4b28a5647e8)
2008-09-01Fix Coverity ID 587Volker Lendecke1-1/+1
The following test program prints "8" on 64-bit :-) static void print_size(const char lenbuf[4]) { printf("sizeof(lenbuf) = %d\n", (int)sizeof(lenbuf)); } int main(void) { const char lenbuf[4]; print_size(lenbuf); return 0; } Jeremy, please check :-) Volker (This used to be commit 9daea0ccfdda58450be3c9a9a94c016f5900c319)
2008-08-27Add st_birthtime and friends for accurate create times on systems that ↵Jeremy Allison1-3/+4
support it (*BSD and MacOSX). Should have done this ages ago, sorry. Jeremy. (This used to be commit 4c3a9558906f213948c3bdc081be73f8fed148cb)
2008-08-26EINVAL is also a valid error return, meaning "this filesystemAndrew Tridgell1-2/+3
cannot do sendfile for this file" (This used to be commit 737f664604b28f230be63bfc2f3d516fd9eb1c63)
2008-08-26become root for AIO operationsAndrew Tridgell1-1/+7
We need to become root for AIO read and write to allow the AIO thread to send a completion signal to the parent process when the IO completes (This used to be commit c548e5c69f9d8bc85a654f4d29d64c735a5e780b)
2008-08-22Don't re-initialize a token when we already have one. This fixes the build ↵Jeremy Allison1-10/+13
farm failures when winbindd connects as guest. This one took a *lot* of tracking down :-). Jeremy. (This used to be commit dca827791276906436452c650062164eb819dfe0)
2008-08-20smbd: fix the handling of create_options to pass RAW-OPENStefan Metzmacher2-0/+17
Some of the bits generate INVALID_PARAMETER and some bits are ignored when they come from a client, that's why we need to use bits from the ignored range for our internal usage. metze (This used to be commit 7b4c8a4e39f310eb450918fa841b0ea1b4af19f7)
2008-08-14Fix for bug #5688 from SATOH Fumiyasu <fumiyas@osstech.co.jp>. LPQ process ↵Jeremy Allison1-1/+2
is orphaned if socket address parameter is invalid. If the "socket address" parameter is a null string that is an invalid value for Samba 3.2 but valid for Samba 3.0. Jeremy. (This used to be commit c65726d418601cdc86202c0371615e4f7f3d843c)
2008-08-14Fix for bug #5617, reported and patched by Bartosz Antosik antosik@gmail.com.Jeremy Allison1-0/+2
xp/2003 explorer freezes browsing shares on samba ipv6 hosts. Caused by missing reply packet to SMB printclose packet. Jeremy (This used to be commit ecf2b906f476e4a764d0e53eed84b9b75a2062c0)
2008-08-13smbd: prevent smbd from panicing with "clustering = no" but ↵Michael Adam1-1/+3
--with-cluster-support Michael (This used to be commit a687949d19ba9690f96e7869aa22e4d87840640e)
2008-08-13added a explanatory comment on tcon checkAndrew Tridgell1-0/+4
(This used to be commit f2ab2cebb9b81453dc0b6370288b85909182ae49)
2008-08-13ensure we exit with non-zero status on EOF on socket, so the parentAndrew Tridgell2-5/+13
can trigger a brlock db cleanup (This used to be commit bbd49f9e1c4b50c4a596fb991f3306e1e90c0177)
2008-08-13fixed child exit handling and IP release handlingAndrew Tridgell1-1/+3
(This used to be commit 6fe27d296c389473c24e8c627a61bd56b364ad9f)
2008-08-13log unclean shutdownsAndrew Tridgell1-0/+1
(This used to be commit 30b83245a22ebd5e4fa4739dd2aa1805373a7eb2)
2008-08-13register the ctdbd reconfigure messageAndrew Tridgell1-0/+4
(This used to be commit 9d3217bb28765e107c230fb90b578dcc6f5d4375)
2008-08-13first cut at adding full transactions for ctdb to samba3Andrew Tridgell1-7/+0
(This used to be commit f91a3e0f7b7737c1d0667cd961ea950e2b93e592)
2008-08-12Make sure to always set errno on error path in OpenDir (and hence ↵Michael Adam1-0/+1
scan_directory). Michael (This used to be commit 15fc2427f91da697e0e91f7f34b0f0c6e230a9a5)
2008-08-12Fix unix_convert() for "*" after changing map_nt_error_from_unix().Michael Adam1-1/+1
map_nt_error_from_unix() now assumes that it is called in an error path and returns an error even for a given errno == 0. The original behaviour of unix_convert() used the mapping of errno == 0 ==> NT_STATUS_OK to return success through an error path. I think this must have been an oversight, and unix_convert() worked only by coincidence (or because explicitly using the knowledge of the conceptually wrong working of map_nt_error_from_unix(). This patch puts this straight by not interpreting errno == 0 as an error condition and proceeding in that case. Jeremy - please check! Michael (This used to be commit ec5956ab0df1b3f567470b2481b73da9c3c67371)
2008-08-12I found lots of places where we assume error will be set when callingAndrew Tridgell1-2/+2
one of our virtualised functions, such as db_open(), but error is only set when a system call fails, and it is not uncommon for us to fail a function internally without ever making a system call. That led to us passing back success when a function had in fact failed. I found two places where we relied on map_nt_error_from_unix() returning success when errno==0, but lots and lots of places where we relied on the reverse, so I fixed those two places. map_nt_error_from_unix() will now always return an error, returning NT_STATUS_UNSUCCESSFUL if errno is 0 (cherry picked from commit 69d40ca4c1af925d4b0e59ddc69ef8c26e6501d1) (This used to be commit 834684a524a24bb4eb46b4af583d39947dc87d95)
2008-08-10fix smb_len calculation for chained requestsVolker Lendecke1-3/+5
I think chain_reply() is one of the most tricky parts of Samba. This recursion needs to go away, we need to sequentially walk the chain list. (This used to be commit af2b01d85188d2301580643f7e862e3e3988aadc)
2008-08-10Fix andx offset calculation for more than 2 chained requestsVolker Lendecke1-1/+7
Untested code is broken code.... Test follows later, it's quite an intrusive change to libsmb/ (This used to be commit 0ff16e8573f3c312f10fc723648319fa1f514ac0)
2008-07-27Fix a debug messageVolker Lendecke1-1/+1
(This used to be commit 1970eed1b79a5d9dc45eb96098d653ad62a20871)
2008-07-27Remove a pointless CONST_DISCARDVolker Lendecke1-1/+1
(This used to be commit c63cb78b4c8a283c0eebe37ff2f60ddbfbfaac4a)
2008-07-27Make create_conn_struct() publicVolker Lendecke1-1/+1
(This used to be commit e115e2582256c34e6905afc8c2929efd6ea61088)
2008-07-25Fix bug creating files using DOS clients with mixedJeremy Allison1-1/+1
case files. Reported by Daniel Johnson <Progman2000@usa.net>. The smb_set_file_time() call to set the filetimes is failing because it's using the unmodified name passed in by the client, not the modified name (matching case on the disk) that comes out from create_file(). Jeremy. (This used to be commit 1706a33e78347d14a8b09fd21b87d57bad543bcd)