summaryrefslogtreecommitdiff
path: root/source3/smbd/files.c
AgeCommit message (Collapse)AuthorFilesLines
2013-01-16smbd: split out file_fsp_get from file_fsp_smb2David Disseldorp1-10/+24
Obtain the files_struct from smb2req, persistent_id and volatile_id. Reviewed by: Jeremy Allison <jra@samba.org>
2012-09-08s3:smbd: also close durable file handles in a tdisMichael Adam1-2/+9
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-07-23s3:smbd: if a fsp has fsp->deferred_close, clients shouldn't be able to use itStefan Metzmacher1-2/+18
metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Mon Jul 23 16:22:03 CEST 2012 on sn-devel-104
2012-06-30Add uint64_t mid field to the files_struct.Jeremy Allison1-0/+1
Ensure it is initialized so we know what mid created this file.
2012-06-29s3:smbd: make use of smbXsrv_open for smb1/2/3Stefan Metzmacher1-128/+44
This makes sure we generate unique persistent file ids, which are stored in smbXsrv_open_global.tdb. Pair-Programmed-With: Michael Adam <obnox@samba.org> metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Jun 29 21:01:11 CEST 2012 on sn-devel-104
2012-06-28s3:smbd/files: fsp->fnum is uint64_t not int!Stefan Metzmacher1-3/+3
metze
2012-06-25s3:smbd: make use of smbXsrv_tcon and smbXsrv_session for smb2Stefan Metzmacher1-2/+6
The removes the protocol specific smbd_smb2_session and smbd_smb2_tcon. Pair-Programmed-With: Michael Adam <obnox@samba.org> metze
2012-06-15s3:smbd: change files.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam1-2/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15s3:smbd: use FNUM_FIELD_INVALID instead of literal -1Michael Adam1-2/+2
This is in preparation of changing fnum to uint64_t Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15s3:files: factor fsp_free() out of file_free()Michael Adam1-20/+27
To be reused in the durable reconnect code. Pair-Programmed-With: Volker Lendecke <vl@samba.org>
2012-06-15s3:files: reorder file_free() a bitMichael Adam1-16/+18
Pair-Programmed-With: Volker Lendecke <vl@samba.org> Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-06-15s3:smbd: refactor fsp_new() out of file_new()Michael Adam1-34/+55
Pair-Programmed-With: Volker Lendecke <vl@samba.org> Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-06-14s3:smbd: use fsp_persistent_id() as persistent_file_id part for SMB2 (bug #8995)Stefan Metzmacher1-4/+6
It seems to be important to have unique persistent file ids, because windows clients seem to index files by server_guid + persistent_file_id. Which may break, if we just have a 16-bit range per connection and the client connects multiple times. Based on code from Ira Cooper. Use fsp->fh->gen_id as the persistent fileid in SMB2. metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Jun 14 22:04:13 CEST 2012 on sn-devel-104
2012-06-14s3:smbd: add a fsp_persistent_id() functionStefan Metzmacher1-0/+24
This calculates a 64-bit value that most likely uniquely identifies the files_struct globally to the server. * 32-bit random gen_id * 16-bit truncated open_time * 16-bit fnum (valatile_id) Based on code from Ira Cooper. Use fsp->fh->gen_id as the persistent fileid in SMB2. Pair-Programmed-With: Michael Adam <obnox@samba.org> metze
2012-06-14s3:smbd: only set fsp->fh->gen_id for a client connectionStefan Metzmacher1-1/+2
For faked connections, like dfs and printing, we leave it as 0. metze
2012-06-14s3:smbd: try to make fsp->fh->gen_id as globally unique as possibleStefan Metzmacher1-1/+19
This makes sure the value is never 0, it's between 1 and UINT32_MAX. While fsp->fh->gen_id is 'unsigned long' currently (which might by 8 bytes), there's some oplock code which truncates it to uint32_t (using IVAL()). Which means we could reuse fsp->fh->gen_id as persistent file id until we have a final fix, which uses database. See bug #8995 for more details. Based on code from Ira Cooper. Ensure fsp->fh->gen_id starts from a random point. We will use this as the SMB2 persistent_id. metze
2012-06-10Revert "s3:smbd: set req->smb2req->compat_chain_fsp in file_fsp()"Stefan Metzmacher1-3/+0
This reverts commit c2716a7d5ccf78f9716b703c22e6cf4d4f179656. This is not needed anymore, as we have file_fsp_smb2() now. metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sun Jun 10 18:04:21 CEST 2012 on sn-devel-104
2012-06-09s3:smbd: add file_fsp_smb2()Stefan Metzmacher1-0/+43
metze
2012-06-09s3:smbd: set req->smb2req->compat_chain_fsp in file_fsp()Stefan Metzmacher1-0/+3
metze
2012-06-08s3: Replace an if with a boolean short circuitVolker Lendecke1-5/+3
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-08s3: Assigning ?True:False to a bool is a bit pointlessVolker Lendecke1-2/+2
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-08s3: Remove unnecessary ()Volker Lendecke1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-06s3:smbd: let file_close_pid/file_close_user take a uint64_t vuidStefan Metzmacher1-2/+2
metze
2012-06-06s3:smbd: dup_file_fsp() never gets called for print filesStefan Metzmacher1-8/+3
metze
2012-06-06s3:smbd: make use of vfs_remove_all_fsp_extensions() in file_free()Stefan Metzmacher1-3/+1
metze
2012-05-24s3:smbd/files: split file_init_global() out of file_init()Stefan Metzmacher1-13/+34
metze
2012-05-24s3:smbd/files: work without sconn->file_bmap and assign fsp->fnum = -1Stefan Metzmacher1-23/+39
For faked connection_structs we do not need valid fnum values, e.g. in the dfs and printing code. metze
2012-05-24s3:smbd/files: fix error path and correctly cleanupStefan Metzmacher1-7/+7
metze
2012-05-23s3:smbd/files: remove unused VALID_FNUM()Stefan Metzmacher1-2/+0
metze
2012-04-26s3: oplock_timeout is a talloc child of fspVolker Lendecke1-3/+0
Jeremy, I know you like it explicit, but I stumbled across this explicit TALLOC_FREE and asked myself about a potentially wrong talloc hierarchy. Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Thu Apr 26 23:00:03 CEST 2012 on sn-devel-104
2012-04-17s3: New notify implementationVolker Lendecke1-4/+0
From notify_internal.c: /* * The notify database is split up into two databases: One * relatively static index db and the real notify db with the * volatile entries. */ This change is necessary to make notify scale better in a cluster
2012-04-10s3: Use talloc_get_size instead of strlenVolker Lendecke1-1/+1
We've just talloc_asprintf'ed the fullpath, so talloc_get_size knows the strlen. Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Tue Apr 10 13:20:22 CEST 2012 on sn-devel-104
2012-03-24lib/util: Remove obsolete sys_getpid() and sys_fork().Jelmer Vernooij1-1/+1
The performance of these is minimal (these days) and they can return invalid results when used as part of applications that do not use sys_fork(). Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Mar 24 21:55:41 CET 2012 on sn-devel-104
2012-03-21s3: Move the notify_ctx to the smbd_server_connectionVolker Lendecke1-2/+4
We only need one notify_ctx per smbd. The notify_array can become quite large. It's based on absolute paths, so there's no point in having a copy of the complete array in memory multiple times. Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Wed Mar 21 14:26:07 CET 2012 on sn-devel-104
2012-03-06s3:smbd: keep 'num_files' and 'files' directly under smbd_server_connectionStefan Metzmacher1-7/+7
The plan is to have files_struct as some kind of low level abstraction for a smb1/smb2 opens, that can be used by SMB_VFS modules. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Mar 6 23:04:01 CET 2012 on sn-devel-104
2012-02-14s3: files_struct->mode is only written, remove itVolker Lendecke1-1/+0
Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Tue Feb 14 19:14:29 CET 2012 on sn-devel-104
2011-07-08lib/util Move bitmap.c to lib/utilAndrew Bartlett1-0/+1
2011-06-20source3/smdb/files.c: file_name_hash to use Jenkins hash from CCAN.Rusty Russell1-3/+2
Rather than tdb's internal one.
2011-05-06s3: only include tdb headers where needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3: include smbd/smbd.h where needed.Günther Deschner1-0/+1
Guenther
2011-01-25Add name_hash to files_struct. Set within fsp_set_smb_fname().Jeremy Allison1-1/+32
2010-10-12libcli/security Provide a common, top level libcli/security/security.hAndrew Bartlett1-0/+1
This will reduce the noise from merges of the rest of the libcli/security code, without this commit changing what code is actually used. This includes (along with other security headers) dom_sid.h and security_token.h Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-09-28s3: Remove some remaining files.c globals to sconnVolker Lendecke1-33/+41
2010-09-28s3: Remove talloc_autofree_context() from files.cVolker Lendecke1-4/+4
2010-09-28s3: Lift smbd_server_conn from file_find_fdVolker Lendecke1-3/+3
2010-09-28s3: Remove smbd_server_conn from file_fspVolker Lendecke1-1/+1
2010-09-28s3: Slightly simplify file_fnumVolker Lendecke1-2/+15
req==NULL should never happen, see the comment
2010-09-28s3: Remove smbd_server_conn from file_sync_allVolker Lendecke1-1/+1
2010-09-28s3: Remove smbd_server_conn from file_find_subpathVolker Lendecke1-1/+1
2010-09-28s3: Lift smbd_server_conn from file_find_di_firstVolker Lendecke1-2/+3