1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-17 15:17:09 +03:00

380 Commits

Author SHA1 Message Date
Jeremy Allison
7eeed8bb41 Allow server manager to close open files selected by id.
Jeremy.
2008-05-27 11:25:46 -07:00
Jeremy Allison
6bfb06ad95 Remove the "stat_open()" function, flag, and all associated code. It was only
being (correctly) used in the can_read/can_write checks for hide unreadable/unwritable
and this is more properly done using the functions in smbd/file_access.c.
Preparing to do NT access checks on all file access.
Jeremy.
2008-05-02 17:22:10 -07:00
Michael Adam
74ed53a115 Slight reformatting of fd_close_posix(), while I'm at it.
Wrap lines and remove trailing space.

Michael
2008-04-21 00:21:24 +02:00
Michael Adam
d928e6648d Change fd_close_posix() to return int instead of NTSTATUS.
The errno is handed up through the VFS layer to the callers.

Michael
2008-04-21 00:21:24 +02:00
Michael Adam
df264bf3e0 Don't modify the fsp in fd_close_posix() anymore.
Now that it is inside the vfs layer, this function should
not alter the fsp (i.e. set fsp->fh->fd = -1) anymore.
That belongs above the vfs layer.

Michael
2008-04-21 00:21:24 +02:00
Michael Adam
3cf56b124a Move the posix pending close functionality down into the VFS layer.
This hides the pending close fds from the outside. Call order
of SMB_VFS_CLOSE is reversed. Originally, it was:

fd_close -> fd_close_posix -> SMB_VFS_CLOSE -> close

And now it is:

fd_close -> SMB_VFS_CLOSE -> fd_close_posix -> close

This is in preparation of removing the fd parameter
from the SMB_VFS_CLOSE function. But it is also the right
place for the pending close calls anyways.

Michael
2008-04-21 00:21:23 +02:00
Jeremy Allison
43b0254d93 Quieten valgrind message on make valgrindtest. This doesn't
seem to be valid (vl - feel free to confirm).
Jeremy.
2008-04-11 17:23:48 -07:00
Stefan Metzmacher
4130b87329 locking: combine get_delete_on_close_flag() and get_write_time() into get_file_infos()
This means we need to fetch the record only once.

metze
2008-04-07 12:29:29 +02:00
Stefan Metzmacher
6aaa2ce0ee locking: store the write time in the locking.tdb
This is needed to implement the strange write time update
logic later. We need to store 2 time timestamps to
distinguish between the time the file system had before
the first client opened the file and a forced timestamp update.

metze
2008-04-07 12:29:25 +02:00
Volker Lendecke
64b1625f8e Merge leftovers of 0e1a86bc845 in 3-0-ctdb 2008-03-17 14:56:45 +01:00
Volker Lendecke
4a6dadc517 Fix some "set but never used" warnings 2008-01-20 17:44:40 +01:00
Alexander Bokovoy
0c8e23afbb Merge CTDB-related fixes from samba-ctdb 3.0 branch (http://samba.org/~tridge/3_0-ctdb)
Signed-off-by: Alexander Bokovoy <ab@samba.org>
2008-01-16 12:09:48 +03:00
Volker Lendecke
71de4946cf Don't early delete the share mode tdb data
We now refer directly to the file name in the tdb data, so don't delete it.
2008-01-12 23:57:12 +01:00
Volker Lendecke
616bc34744 Trivial simplification 2008-01-12 23:57:11 +01:00
Volker Lendecke
444e35e7df Some more talloc_tos() 2008-01-10 13:19:58 +01:00
Volker Lendecke
65dd869bea use talloc_tos in a few more places 2008-01-10 13:19:58 +01:00
Michael Adam
ee5a20becd Remove redundant parameter fd from SMB_VFS_GETLOCK().
Michael
2008-01-07 22:18:50 +01:00
Volker Lendecke
66be770993 Do not talloc_strdup filename and servicepath 2008-01-07 21:18:20 +01:00
Michael Adam
4f3ab2c406 Remove redundant parameter fd from SMB_VFS_LOCK().
Michael
2008-01-07 16:38:23 +01:00
Volker Lendecke
a98693bfa7 allocate share_mode_str only when needed 2008-01-04 23:32:24 +01:00
Michael Adam
f3365b74ac Remove redundant connection_struct from fd_close_posix() parameter list.
Michael
2007-12-22 02:01:32 +01:00
Volker Lendecke
841f4ccbfb Convert the posix_pending_close_db to dbwrap_rbt 2007-12-11 16:16:54 +01:00
Volker Lendecke
2f3c865707 Tiny simplifications
locking.c:open_read_only was unused

don't export the silly boolean flag locking_init(bool read_only)
2007-12-10 12:22:01 +01:00
Volker Lendecke
1f317f471a Remove a static 2007-12-10 12:22:01 +01:00
Volker Lendecke
8ee502e1e5 Remove two statics 2007-12-10 12:22:01 +01:00
Volker Lendecke
144014096a Add a comment 2007-11-18 15:08:54 -08:00
Volker Lendecke
b82120f9b7 Fix a valgrind error 2007-11-18 15:08:52 -08:00
Jeremy Allison
a1725f4ff7 Add MAX_DNS_NAME_LENGTH, remove more pstrings.
Jeremy.
2007-11-15 18:27:26 -08:00
Jeremy Allison
f35a266b3c RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
2007-10-18 17:40:25 -07:00
Volker Lendecke
638c848c9a r25055: Add file_id_string_tos
This removes file_id_string_static and file_id_string_static2
2007-10-10 12:30:36 -05:00
Volker Lendecke
888e657d75 r24571: Only look at errno if the close call actually failed
Patch from Ofir Azoulay <Ofir.Azoulay@expand.com> -- thanks
2007-10-10 12:30:06 -05:00
Volker Lendecke
df40d336af r24266: Remove the "open files database hash size" parameter
This has been superseded by the "tdb_hashsize:<tdbname>" parameter
2007-10-10 12:29:22 -05:00
Stefan Metzmacher
a7449e4ab3 r24117: use locking_key() instead of forming the TDB_DATA key
by hand

metze
2007-10-10 12:29:08 -05:00
Volker Lendecke
ff1996ce4b r24034: Print the full cluster pid in print_lock_struct 2007-10-10 12:28:58 -05:00
Stefan Metzmacher
044ac6afa7 r23956: merge from 3_2-ctdb-tridge:
fixed a bug with dead share mode entries

jra: please tell me if it's ok to merge this to 3_2_0.

metze
2007-10-10 12:28:49 -05:00
Jeremy Allison
a48e4a29e6 r23908: Fix bug with interaction of optimization with
POSIX locking. We can't do lock counts with POSIX,
so stop counting if we get a POSIX lock request.
Jeremy.
2007-10-10 12:28:40 -05:00
Volker Lendecke
b2adb28808 r23885: Fix make test on opi. 2007-10-10 12:28:38 -05:00
Volker Lendecke
9b8f2d8bd1 r23882: Fix Coverity id 389 -- finally (I hope) 2007-10-10 12:28:38 -05:00
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Volker Lendecke
cbbc70604e r23759: Fix make test -- sorry 2007-10-10 12:23:53 -05:00
Volker Lendecke
ebb410ca1e r23755: Fix Coverity id 384 2007-10-10 12:23:52 -05:00
Jeremy Allison
cbf0829abc r23516: Fix bug found & fixed by Doug Rudoff (doug_rudoff@isilon.com)
- when cleaning up invalid locks make sure we mark the lck
struct as modified so it'll get saved back correctly (that
was the original intent).
Jeremy.
2007-10-10 12:23:24 -05:00
James Peach
171dc060e2 r23510: Tidy calls to smb_panic by removing trailing newlines. Print the
failed expression in SMB_ASSERT.
2007-10-10 12:23:23 -05:00
Volker Lendecke
575e594e93 r23486: Ok, this time with a hopefully successful make test in the right place:
Remove two local variables
2007-10-10 12:23:21 -05:00
Volker Lendecke
ca1d0ff03d r23316: Ouch... This would not have run in production without cluster code
anyway.
2007-10-10 12:23:06 -05:00
Volker Lendecke
40991badef r23222: share_mode_forall() is only for counting and status display stuff, so
traverse_read is enough here
2007-10-10 12:22:56 -05:00
Volker Lendecke
7e39d77c1f r23204: Add MSG_SMB_BRL_VALIDATE. Tridge, this is a bit different from your bzr
branch, please check if it fulfils your needs.

Two changes: The validation is not done inside the brlock.c traverse_fn,
it's done as a separate routine.

Secondly, this patch does not call the checker routines in smbcontrol
directly but depends on a running smbd.
2007-10-10 12:22:53 -05:00
Volker Lendecke
c91b2bdc16 r23195: Add void *private_data to brl_forall 2007-10-10 12:22:53 -05:00
Volker Lendecke
9b10dbbd5d r23183: Check in a change made by Tridge:
This replaces the internal explicit dev/ino file id representation by a
"struct file_id". This is necessary as cluster file systems and NFS
don't necessarily assign the same device number to the shared file
system. With this structure in place we can now easily add different
schemes to map a file to a unique 64-bit device node.

Jeremy, you might note that I did not change the external interface of
smb_share_modes.c.

Volker
2007-10-10 12:22:52 -05:00