summaryrefslogtreecommitdiffstats
path: root/source/smbd
Commit message (Collapse)AuthorAgeFilesLines
* Modify a comment to make things clearer.Jeremy Allison2008-09-121-1/+3
| | | | Jeremy.
* Fix bug #5052 - not work cancel inheritance on share. We wereJeremy Allison2008-09-101-3/+10
| | | | | | using the parent security descriptor type and flags instead of using the passed in SD. Jeremy.
* When requesting UNIX info levels on findfirst/findnext, don't play games ↵Jeremy Allison2008-09-101-1/+5
| | | | | | | with write time, just return what the underlying filesystem says. Trying not to confuse UNIX apps any more than necessary. Jeremy.
* Add some debug to reply_nttransVolker Lendecke2008-09-091-0/+11
|
* Fix calculation of useable_space for trans2 and nttrans repliesVolker Lendecke2008-09-082-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.
* smbd: some write time fixesStefan Metzmacher2008-09-081-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
* Write times code update.Jeremy Allison2008-09-054-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.
* Slightly simplify logic: remove an else branchVolker Lendecke2008-09-011-14/+11
|
* Fix Coverity ID 587Volker Lendecke2008-09-011-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
* Add st_birthtime and friends for accurate create times on systems that ↵Jeremy Allison2008-08-271-3/+4
| | | | | | | support it (*BSD and MacOSX). Should have done this ages ago, sorry. Jeremy.
* EINVAL is also a valid error return, meaning "this filesystemAndrew Tridgell2008-08-261-2/+3
| | | | cannot do sendfile for this file"
* become root for AIO operationsAndrew Tridgell2008-08-261-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
* Don't re-initialize a token when we already have one. This fixes the build ↵Jeremy Allison2008-08-221-10/+13
| | | | | | | farm failures when winbindd connects as guest. This one took a *lot* of tracking down :-). Jeremy.
* smbd: fix the handling of create_options to pass RAW-OPENStefan Metzmacher2008-08-202-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
* Fix for bug #5688 from SATOH Fumiyasu <fumiyas@osstech.co.jp>. LPQ process ↵Jeremy Allison2008-08-141-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.
* Fix for bug #5617, reported and patched by Bartosz Antosik antosik@gmail.com.Jeremy Allison2008-08-141-0/+2
| | | | | | xp/2003 explorer freezes browsing shares on samba ipv6 hosts. Caused by missing reply packet to SMB printclose packet. Jeremy
* smbd: prevent smbd from panicing with "clustering = no" but ↵Michael Adam2008-08-131-1/+3
| | | | | | --with-cluster-support Michael
* added a explanatory comment on tcon checkAndrew Tridgell2008-08-131-0/+4
|
* ensure we exit with non-zero status on EOF on socket, so the parentAndrew Tridgell2008-08-132-5/+13
| | | | can trigger a brlock db cleanup
* fixed child exit handling and IP release handlingAndrew Tridgell2008-08-131-1/+3
|
* log unclean shutdownsAndrew Tridgell2008-08-131-0/+1
|
* register the ctdbd reconfigure messageAndrew Tridgell2008-08-131-0/+4
|
* first cut at adding full transactions for ctdb to samba3Andrew Tridgell2008-08-131-7/+0
|
* Make sure to always set errno on error path in OpenDir (and hence ↵Michael Adam2008-08-121-0/+1
| | | | | | scan_directory). Michael
* Fix unix_convert() for "*" after changing map_nt_error_from_unix().Michael Adam2008-08-121-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
* I found lots of places where we assume error will be set when callingAndrew Tridgell2008-08-121-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)
* fix smb_len calculation for chained requestsVolker Lendecke2008-08-101-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.
* Fix andx offset calculation for more than 2 chained requestsVolker Lendecke2008-08-101-1/+7
| | | | | Untested code is broken code.... Test follows later, it's quite an intrusive change to libsmb/
* Fix a debug messageVolker Lendecke2008-07-271-1/+1
|
* Remove a pointless CONST_DISCARDVolker Lendecke2008-07-271-1/+1
|
* Make create_conn_struct() publicVolker Lendecke2008-07-271-1/+1
|
* Fix bug creating files using DOS clients with mixedJeremy Allison2008-07-251-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.
* If we're not allowing streams on this conn ptr,Jeremy Allison2008-07-241-0/+5
| | | | | | then don't allow create_file() to call down to create_file_unixpath() with a stream name. Jeremy.
* Fix various build warningsZach Loafman2008-07-221-1/+2
| | | | | This fixes various build warnings on our platform. I'm sure I haven't caught them all, but it's a start.
* Refactoring: Change calling conventions for cli_rpc_pipe_open_noauthVolker Lendecke2008-07-201-2/+3
| | | | Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS
* Introduce is_known_pipenameVolker Lendecke2008-07-192-46/+2
| | | | | This scans the list of pipes registered via rpc_pipe_register_commands instead of using static tables.
* Patch from SATOH Fumiyasu <fumiyas@osstech.co.jp> for bug #5202. Re-activate ↵Jeremy Allison2008-07-031-14/+26
| | | | | | | "acl group control" parameter and make it only apply to owning group. Also added man page fix. Jeremy.
* Two more fixes from Jim Brown <jim.brown@miami.edu> for SGI compiler warnings.Jeremy Allison2008-07-011-1/+1
| | | | Jeremy.
* Let send_trans_reply work on only the inbufVolker Lendecke2008-06-282-53/+56
| | | | It does not really need the whole smb_request
* Factor out create_outbuf, creating an outbuf just given an inbufVolker Lendecke2008-06-281-9/+20
|
* Fix a debug messageVolker Lendecke2008-06-261-1/+1
|
* Remove current_user reference from printfsp.cVolker Lendecke2008-06-262-2/+2
|
* remove unused extern current_user from lanman.cVolker Lendecke2008-06-261-2/+0
|
* Change print_access_check to take auth_serversupplied_info instead of ↵Volker Lendecke2008-06-261-6/+12
| | | | | | current_user Reason: This is the main user of p->current_user which I would like to remove
* smbd: untangle logic in smbd_messaging_context() slightly.Michael Adam2008-06-261-2/+5
| | | | Michael
* smbd: don't panic if messaging_init() fails but return NULLMichael Adam2008-06-261-1/+1
| | | | | | | | | leaving panic or more appropriate action to callers. This can for instance happen in a clustered setup, when ctdb is not running. This allows for a more defined behaviour, reducing chicken-egg-problems. Michael
* Move the responsibility to keep the cwd from srv_dfs_nt to msdfs.cVolker Lendecke2008-06-241-17/+53
|
* Remove the "exists" parameter from create_msdfs_linkVolker Lendecke2008-06-221-11/+11
| | | | | | | | | | Jeremy, setting "exists" to True in _dfs_Add prevented the initial creation of a new symlink for me, because the SMB_VFS_UNLINK failed. This also exists in 3.2. I only check it into 3.3 as I would like you to look at it first. Thanks, Volker
* Reduce memory usage in form_junctions() a little bitVolker Lendecke2008-06-221-0/+1
|
* Fix an abort in junction_to_local_pathVolker Lendecke2008-06-221-1/+1
|