summaryrefslogtreecommitdiff
path: root/source3/smbd
AgeCommit message (Collapse)AuthorFilesLines
2010-12-19s3: Reply correctly to FSCTL_IS_VOLUME_DIRTYVolker Lendecke1-0/+9
2010-12-19s3: Fix some nonempty blank linesVolker Lendecke1-22/+22
2010-12-19s3: re-add some debugs to check_reduced_nameVolker Lendecke1-0/+2
2010-12-19s3: Fix some typosVolker Lendecke2-4/+4
2010-12-18Rename vfs operation posix_fallocate to just fallocate and add the ↵Jeremy Allison1-9/+12
vfs_fallocate_mode parameter. It turns out we need the fallocate operations to be able to both allocate and extend filesize, and to allocate and not extend filesize, and posix_fallocate can only do the former. So by defining the vfs op as posix_fallocate we lose the opportunity to use any underlying syscalls (like Linux fallocate) that can do the latter as well. We don't currently use the non-extending filesize call, but now I've changed the vfs op definition we can in the future. For the moment simply map the fallocate op onto posix_fallocate for the VFS_FALLOCATE_EXTEND_SIZE case and return ENOSYS for the VFS_FALLOCATE_KEEP_SIZE case. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Dec 18 08:59:27 CET 2010 on sn-devel-104
2010-12-17Move checks inside file_set_sparse() to allow it to be called from anywhere.Jeremy Allison2-19/+21
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Dec 17 21:56:38 CET 2010 on sn-devel-104
2010-12-17file_set_sparse needs to be a handle based call.Jeremy Allison2-11/+9
2010-12-17s3:smbd: implement FSCTL_SET_SPARSE more correctlyBjörn Jacke1-5/+43
this is a port of a patch from metze for 3.3: We don't do the "strict allocation" when the sparse bit isn't set, but that shouldn't matter. We now allow windows applications to set and unset the sparse bit. Note that in order to implement this 100% like described in [MS-FSA], we'd have to change our data model and support the sparse flag per stream.
2010-12-17s3:smbd: add file_set_sparse() functionBjörn Jacke1-0/+49
this is based on a patch for 3.3 from metze
2010-12-17s3: remove set_sparse_flagBjörn Jacke1-15/+1
we need to determine sparseness from the sparse flag we store not from the allocation size on the POSIX filesystem. This is how Windows works - in the first place sparseness is a file flag, not the allocation state of the file Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-12-17s3: add FILE_ATTRIBUTE_SPARSE to get_stat_dos_flagsBjörn Jacke1-0/+2
2010-12-16Fix old bug in openX code, exposed when "strict allocate" is set to true.Jeremy Allison1-5/+9
We need to return the file size here, not the allocation size, but we were not updating the stat struct after the vfs_set_filesize() call. Ensure we always use fresh data in openX replies. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Dec 16 02:37:58 CET 2010 on sn-devel-104
2010-12-15Implement "use sendfile = yes" for SMB2. (cherry picked from commit ↵Jeremy Allison3-3/+159
95cb7adcd03a1abbd0af395b6c96dd8e0eebd3d1) Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Dec 15 02:24:08 CET 2010 on sn-devel-104
2010-12-15Change interface of schedule_smb2_aio_read() to allocate the return DATA_BLOB.Jeremy Allison2-9/+25
Change smb2_read code to allocate return DATA_BLOB just before the read. Preparing for SMB2 sendfile change which will not need to allocate return buffer. Jeremy
2010-12-14Ensure we use vfs_fsp_stat(), not VFS_STAT directly, and store into ↵Jeremy Allison1-19/+20
fsp->fsp_name->st instead of a SMB_STRUCT_STAT on the stack. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Dec 14 05:05:50 CET 2010 on sn-devel-104
2010-12-14Change crediting so that the credits are returned on the interim async response.Jeremy Allison1-4/+7
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Dec 14 01:09:05 CET 2010 on sn-devel-104
2010-12-13As we handle missing sendfile() inside lib/sendfile.c, remove the ↵Jeremy Allison1-7/+0
WITH_SENDFILE ifdefs. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Dec 13 23:47:07 CET 2010 on sn-devel-104
2010-12-13We need to start off with smb2.credits_granted == 0. That wayJeremy Allison1-2/+3
when processing the faked up SMB2 NegProt from the SMB1 packet we always allocate one credit on reply. Jeremy.
2010-12-13Remove extra unused credit arg. to smbd_smb2_request_setup_out()Jeremy Allison1-3/+3
2010-12-10Add a SMB2 crediting algorithm, by default the same as Windows. Defaults to ↵Jeremy Allison2-24/+136
128 credits. Jeremy.
2010-12-10s3-smbd Don't send SPNEGO principal (rfc4178 hint) by defaultAndrew Bartlett1-0/+3
This patch, based on the suggestion by Goldberg, Neil R. <ngoldber@mitre.org> turns off the sending of the principal in the negprot by default, matching Windows 2008 behaviour. This slowly works us back from this hack, which from an RFC perspective was never the right thing to do in the first place, but we traditionally follow windows behaviour. It also discourages client implmentations from relying on it, as if they do they are more open to man-in-the-middle attacks. Andrew Bartlett
2010-12-03Merge the two conflicting allocation codes into one function, ↵Jeremy Allison1-34/+45
vfs_slow_fallocate() and use that from both the truncate and fill_sparse functions. Jeremy.
2010-12-02Move posix_fallocate into the VFS where it belongs.Jeremy Allison1-2/+11
Jeremy.
2010-12-02Fix bug #7835 - vfs_fill_sparse() doesn't use posix_fallocate when strict ↵Jeremy Allison1-2/+30
allocate is on Tries posix_fallocate() and then falls back to old code. Jeremy.
2010-12-01Fix a typo - should be '&&' not '&' when checking for privileges.Jeremy Allison1-1/+1
Jeremy.
2010-12-02s3:smbd: remove some commented out legacy codeMichael Adam1-5/+0
Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Thu Dec 2 01:18:19 CET 2010 on sn-devel-104
2010-11-29Fix bug discovered with "encryped passwords = no".Jeremy Allison1-8/+1
message_push_string() and message_push_blob() both update the bcc value, so we don't need the old code that tries to do it manually. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Nov 29 22:24:01 CET 2010 on sn-devel-104
2010-11-24Add in fsp->access_mask checks. Not required (underlying system does this)Jeremy Allison2-2/+42
but makes logic cleaner. Pointed out by Metze. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Nov 24 01:47:13 CET 2010 on sn-devel-104
2010-11-20Move the uglyness of #ifdef REALPATH_TAKES_NULL into the vfs_defaultJeremy Allison2-52/+11
module, change the signature of VFS_REALPATH to always return a malloc'ed string. Needed to make some privileges work I plan on doing shortly easier to code. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Nov 20 02:15:50 CET 2010 on sn-devel-104
2010-11-14Move error reporting of messaging context creation fail intoJeremy Allison1-1/+5
the daemons themselves. Allows client utilities to silently fail to create a messaging context due to access denied on the messaging tdb (which I need for the following patch). Jeremy.
2010-11-12s3: Rename GIT_COMMIT_{TIME,DATE} to COMMIT_{TIME,DATE}.Jelmer Vernooij1-2/+2
This avoids some special casing in the waf code.
2010-11-10Fix bug 7781 - Samba transforms ShareName to lowercase (sharename) when ↵Jeremy Allison4-45/+92
adding new share via MMC Change the find_service() interface to not depend on fstring, and create a useable talloc-based interface. Jeremy.
2010-11-10Remove fstring from map_username. Create a more sane interface than the ↵Jeremy Allison4-11/+25
called-parameter-is-modified. Jeremy.
2010-11-05s3: Allow disabling of mdns registrationsVolker Lendecke1-1/+1
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Fri Nov 5 11:24:41 UTC 2010 on sn-devel-104
2010-11-04s3: Remove an unused prototypeVolker Lendecke1-17/+0
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Thu Nov 4 17:44:09 UTC 2010 on sn-devel-104
2010-11-03s3: Align nttrans replies the same way Windows does itVolker Lendecke1-1/+1
If you look at traces of "smbcacls" reading a secdesc from Samba and from W2k3 shows this difference in the querysecdesc nttrans reply. This patch is necessary to enable viewing previous versions via the shadow copy modules from Windows 2008. The other client versions seem not to care, but W2k8 does. Signed-off-by: Michael Adam <obnox@samba.org> Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Nov 3 17:04:28 UTC 2010 on sn-devel-104
2010-11-02s3-debug Move 'load_case_tables()' before lp_set_cmdline() and popt callsAndrew Bartlett1-2/+2
The problem here is that we cannot run lp_set_cmdline() (directly or indirectly via the popt helpers) until load_case_tables() has been run. However, load_case_tables does not have auto-initialisation, so we must init it once, and once only. Andrew Bartlett
2010-11-02s3-debug Impove setup_logging() to specify logging to stderrAndrew Bartlett1-1/+5
This change improves the setup_logging() API so that callers which wish to set up logging to stderr can simply ask for it, rather than directly modify the dbf global variable. Andrew Bartlett
2010-10-27s3-smbd Remove manual override of DEBUGELVEL during exitAndrew Bartlett1-5/+0
This code, originally added at the dawn of time (the import into CVS) does not seem to be required any more, as all the DEBUG() statements in the intermediate functions are at level 0. Andrew Bartlett
2010-10-26s3: Fix some DEBUG msgsVolker Lendecke1-5/+5
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Tue Oct 26 15:20:01 UTC 2010 on sn-devel-104
2010-10-22Revert "Wrap security_token_has_privilege() with a check for ↵Jeremy Allison2-4/+4
lp_enable_privileges(). Needed" Not needed - privileges code prevents "enable privileges = no" from adding privileges anyway. This reverts commit a8b95686a7bde3f96f141b6938e24e101567ef54. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Oct 22 23:41:36 UTC 2010 on sn-devel-104
2010-10-22Wrap security_token_has_privilege() with a check for lp_enable_privileges(). ↵Jeremy Allison2-4/+4
Needed to maintain compatibility with smb.conf manpage. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Oct 22 18:15:48 UTC 2010 on sn-devel-104
2010-10-21Add code to implement SeSecurityPrivilege in net rpc rights, and in theJeremy Allison2-21/+18
open and get/set NT security descriptor code. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Oct 21 00:15:57 UTC 2010 on sn-devel-104
2010-10-20Make getpwnam_alloc() static to lib/username.c, and ensure all username ↵Jeremy Allison2-2/+2
lookups go through Get_Pwnam_alloc(), which is the correct wrapper function. We were using it *some* of the time anyway, so this just makes us properly consistent. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Oct 20 16:02:12 UTC 2010 on sn-devel-104
2010-10-20s3: Add some DEBUGVolker Lendecke1-0/+2
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Oct 20 11:58:20 UTC 2010 on sn-devel-104
2010-10-20s3: Cope with EINTR in smbd_[un]lock_socketVolker Lendecke1-2/+10
2010-10-19Add deadtime detection for SMB2. Correctly update lastused timestamp across ↵Jeremy Allison2-30/+76
all active tcons. Should fix dfree cache not updating bug.
2010-10-19Add SMB2 paths to smbd/conn.c. Except for conn_idle_all(), to be cleaned up ↵Jeremy Allison1-32/+105
next.
2010-10-19Copyright/whitespace/comment cleanup in preparation for adding SMB2 paths.Jeremy Allison1-20/+27
2010-10-19Move tcons.num_open from smb1 to sconn->num_tcons_open as this is needed for ↵Jeremy Allison4-7/+11
SMB2 also.