1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-09 20:59:11 +03:00
Commit Graph

195 Commits

Author SHA1 Message Date
97f0a3675f s3:smbd/files: remove unused VALID_FNUM()
metze
2012-05-23 20:03:09 +02:00
54a6d7b3b8 s3: oplock_timeout is a talloc child of fsp
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-26 23:00:03 +02:00
843432d56f s3: New notify implementation
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-17 10:21:02 +02:00
3cca094514 s3: Use talloc_get_size instead of strlen
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-04-10 13:20:22 +02:00
c0288e0612 lib/util: Remove obsolete sys_getpid() and sys_fork().
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-24 21:55:40 +01:00
f3fe53668f s3: Move the notify_ctx to the smbd_server_connection
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-21 14:26:06 +01:00
68b840726b s3:smbd: keep 'num_files' and 'files' directly under smbd_server_connection
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-03-06 23:04:01 +01:00
740d4d7550 s3: files_struct->mode is only written, remove it
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Tue Feb 14 19:14:29 CET 2012 on sn-devel-104
2012-02-14 19:14:29 +01:00
6e6aaacedb lib/util Move bitmap.c to lib/util 2011-07-08 11:23:23 +02:00
eb8cb4f548 source3/smdb/files.c: file_name_hash to use Jenkins hash from CCAN.
Rather than tdb's internal one.
2011-06-20 11:18:34 +02:00
d8cfca3a9b s3: only include tdb headers where needed.
Guenther
2011-05-06 10:48:10 +02:00
8c24ebf371 s3: include smbd/smbd.h where needed.
Guenther
2011-03-30 01:13:08 +02:00
76418e23bc Add name_hash to files_struct. Set within fsp_set_smb_fname(). 2011-01-25 13:49:01 -08:00
f768b32e37 libcli/security Provide a common, top level libcli/security/security.h
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-10-12 05:54:10 +00:00
49b4d2e652 s3: Remove some remaining files.c globals to sconn 2010-09-28 07:36:18 +02:00
d26d79b640 s3: Remove talloc_autofree_context() from files.c 2010-09-28 07:36:18 +02:00
eadc4b5b78 s3: Lift smbd_server_conn from file_find_fd 2010-09-28 07:36:18 +02:00
54f7b70212 s3: Remove smbd_server_conn from file_fsp 2010-09-28 07:36:18 +02:00
3009178ee5 s3: Slightly simplify file_fnum
req==NULL should never happen, see the comment
2010-09-28 07:36:18 +02:00
e57811440a s3: Remove smbd_server_conn from file_sync_all 2010-09-28 07:36:17 +02:00
e2222fc19c s3: Remove smbd_server_conn from file_find_subpath 2010-09-28 07:36:17 +02:00
75c6e0e5c7 s3: Lift smbd_server_conn from file_find_di_first 2010-09-28 07:36:17 +02:00
b448e42de4 s3: Lift smbd_server_conn from file_find_dif 2010-09-28 07:36:16 +02:00
fb8686962a s3: Remove smbd_server_conn from files_forall 2010-09-28 07:36:16 +02:00
9fc9ff9bfa s3: Remove smbd_server_conn from file_close_user 2010-09-28 07:36:16 +02:00
25ca1cd1a8 s3: Remove smbd_server_conn from file_close_pid 2010-09-28 07:36:16 +02:00
6a1c4bad13 s3: Remove smbd_server_conn from file_close_conn 2010-09-28 07:36:16 +02:00
c5d2799543 s3: Remove smbd_server_conn from file_new and file_free 2010-09-28 07:36:15 +02:00
5276608151 s3: Lift smbd_server_conn from file_fnum 2010-09-28 07:36:15 +02:00
5e26e4d30f s3: Move "Files" to smbd_server_connection 2010-09-28 07:36:15 +02:00
3235f44ac4 s3: Make file_fnum static 2010-09-27 18:14:47 +02:00
f1c1959f13 s3: Remove some unused code 2010-09-27 18:14:47 +02:00
6319e0da10 s3: Fix some comments 2010-09-27 18:14:47 +02:00
9ab62b774f s3-smbd: Fixed indent.
Signed-off-by: Simo Sorce <idra@samba.org>
2010-08-13 12:20:10 -04:00
34a8324409 Fix a valgrind error found by SMB2-COMPOUND test.
If a file is closed we must also NULL out all chained_fsp
pointers when the fsp is freed to prevent invalid pointer
access.

Jeremy.
2010-06-08 21:20:07 -07:00
168b86c384 s3-smbd: group print relate data in own structure 2010-04-23 14:26:33 -07:00
30c708b902 s3: Use bitmap_talloc in files.c 2010-03-28 15:25:17 +02:00
8195832c6c s3: file_walk_table -> files_forall
This is more in line with the rest of the Samba code, like connections_forall
etc.
2010-03-22 09:30:51 +01:00
678815081d s3: Fix some nonempty blank lines 2010-03-22 09:30:51 +01:00
b6fdecd112 Fix bug #6837 - "Too many open files" when trying to access large number of files
from Windows 7. Original patch by me fixed up with the correct open files number
by jmaggard10@hotmail.com.
Jeremy.
2009-12-02 10:01:14 -08:00
14dc32a4f5 Oops. Don't break the build..
Jeremy.
2009-10-07 15:43:43 -07:00
94ce06f01d Make the logic a lot clearer and fix the comment to match.
Jeremy
2009-10-07 15:39:38 -07:00
746fb5aa4f Correct fix for bug 6781 - Cannot rename subfolders in Explorer view with recent versions of Samba.
Without this fix, renaming a directory ./a to ./b, whilst a directory ./aa was already open
would fail.
Jeremy.
2009-10-07 15:14:50 -07:00
457191e9f3 s3: Fix a bug in renames of directories
Recently code was added to match windows semantics of denying the
rename of a directory if there are open files underneath it.  This
does partly match windows semantics, but it turns out the rename
should be allowed if the open file handle is for the directory being
renamed, or for a stream on the directory being renamed.  This patch
refines the check to better follow these rename semantics.
2009-08-06 17:07:50 -07:00
841efce8b5 s3: Separate out a new file: filename_utils.c
This is to ease the linking pain of everything that links LOCKING_OBJ
2009-07-20 17:26:57 -07:00
5a8d70d465 s3: Change fsp->fsp_name to be an smb_filename struct! 2009-07-20 17:26:56 -07:00
12a5db45e2 s3: Change file_structs to be allocated with talloc instead of malloc 2009-07-20 17:26:56 -07:00
22085c59cb Add "file_walk_table" to do stuff with all open files 2009-05-18 10:42:22 +02:00
32a36e4703 Add notify_onelevel.tdb
This optimizes non-recursive notifys. For non-recursive notifies we can use a
per-directory file-id indexed notify record. This matters for the Windows
Explorer and IIS cases which do not use recursive notifies. In these cases, we
do not have to shuffle around the whole notify record on every change.

For the cluster case, this improves correctness of the notifies, ctdb only
distributes the tdb seqnum once a second, so we can lose notifies.
2009-04-16 15:07:06 +02:00
3121249243 Make us pass the RAW-RENAME torture test I just added.
Inside a directory, keep a file open and then renaming
the directory should fail with ACCESS_DENIED.

Jeremy.
2009-02-26 11:42:23 -08:00