1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

469 Commits

Author SHA1 Message Date
Michael Adam
0b5c4a601a s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
2011-07-29 13:34:22 +02:00
Michael Adam
1abdd9b2bb s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.
Also start new folder lib/dbwrap/ where dbwrap_open.c is stored and
make the fallbacke implementation functoins non-static and create a
dbwrap_private.h header file that contains their prototypes.
2011-07-29 12:23:13 +02:00
Jeremy Allison
73bfd16bd5 Fix bug #8307 - brl_close_fnum does not call SMB_VFS_BRL_UNLOCK_WINDOWS on all locks
Reported by herb@samba.org. Remove the (premature) optimization
on file close.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Jul 16 02:32:02 CEST 2011 on sn-devel-104
2011-07-16 02:32:02 +02:00
Rusty Russell
d925b327f4 tdb_compat: Higher level API fixes.
My previous patches fixed up all direct TDB callers, but there are a
few utility functions and the db_context functions which are still
using the old -1 / 0 return codes.

It's clearer to fix up all the callers of these too, so everywhere is
consistent: non-zero means an error.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Andrew Bartlett
16b1c77644 lib/util Bring procid_str() into lib/util as server_id_string()
This is needed for OpenChange, which prints Samba struct server_id
values in debug messages.

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
8d4a8389bb s3-talloc Change TALLOC_MEMDUP() to talloc_memdup()
Using the standard macro makes it easier to move code into common, as
TALLOC_MEMDUP isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
ad0a07c531 s3-talloc Change TALLOC_ZERO_P() to talloc_zero()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
d5e6a47f06 s3-talloc Change TALLOC_P() to talloc()
Using the standard macro makes it easier to move code into common, as
TALLOC_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
3d15137653 s3-talloc Change TALLOC_ARRAY() to talloc_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Michael Adam
ff82f77796 s3:locking/proto.h: add _LOCKING_PROTO_H_ guard 2011-05-31 01:44:27 +02:00
Michael Adam
93b8e90b5b s3:locking/proto.h: add GPL/Copyright header 2011-05-31 01:44:27 +02:00
Volker Lendecke
9e05d3430f s3: Fix a tiny memleak in copy_unix_token
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat May 28 11:47:11 CEST 2011 on sn-devel-104
2011-05-28 11:47:11 +02:00
Volker Lendecke
77ce431fdb s3: Use talloc_memdup in copy_unix_token 2011-05-28 10:39:48 +02:00
Volker Lendecke
4586f5176b s3: Fix some nonempty blank lines 2011-05-28 10:29:54 +02:00
Günther Deschner
d8cfca3a9b s3: only include tdb headers where needed.
Guenther
2011-05-06 10:48:10 +02:00
Jeremy Allison
02af307585 More simple const fixes. 2011-05-05 23:56:07 +02:00
Jeremy Allison
e4667926ce Fix the only place we reply on the NULL handling for the source in safe_strcpy. 2011-05-04 12:12:14 -07:00
Andrew Bartlett
7f66ebde2e s3-smb Use FILE_ATTRIBUTE_READONLY intead of aRONLY
This means we use just one constant for this file attribute.

Andrew Bartlett
2011-04-29 16:38:12 +10:00
Jeremy Allison
82fdad8a4c Trying to track down the SMB2 error. Add an invariant test.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Apr 16 02:15:38 CEST 2011 on sn-devel-104
2011-04-16 02:15:38 +02:00
Günther Deschner
ab36d597e7 s3-messages: make ndr_messaging.h part of messages.h.
Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
b2af281e50 s3-messages: only include messages.h where needed.
Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
2377039738 s3-locking: move locking prototypes out of proto.h.
Will later become part of locking.h

Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
0e771263ee s3-includes: only include system/filesys.h when needed.
Guenther
2011-03-30 01:13:07 +02:00
Stefan Metzmacher
2f048e458b s3:locking: simplify the non cluster case of brl_get_locks_readonly()
Pair-Programmed-With: Michael Adam <obnox@samba.org>

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Mar 18 13:00:51 CET 2011 on sn-devel-104
2011-03-18 13:00:51 +01:00
Stefan Metzmacher
e8411d6f9f s3:locking: brl_get_locks_internal() should not expose a write lock if the caller wants read_only
This triggered deadlocks in the cluster case of brl_get_locks_readonly().

Pair-Programmed-With: Michael Adam <obnox@samba.org>

metze
2011-03-18 07:51:46 +01:00
Jeremy Allison
fdb98fbdd8 Nulling out the op_mid is never the right thing to do. We depend on
this value when searching for specific share mode entries.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Mar 17 19:59:51 CET 2011 on sn-devel-104
2011-03-17 19:59:51 +01:00
Günther Deschner
8643683dd8 s3-server_id: only include server_id where needed.
Guenther
2011-03-02 12:12:31 +01:00
Andrew Bartlett
04f5ef83b9 s3-auth struct security_unix_token replaces UNIX_USER_TOKEN 2011-03-01 06:29:04 +01:00
Jeremy Allison
3272e16846 Missed one debug printf of name_hash. Ensure always use %x.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Jan 26 00:46:28 CET 2011 on sn-devel-104
2011-01-26 00:46:27 +01:00
Jeremy Allison
44732734cc Fix bug #7863 - Unlink may unlink wrong file when hardlinks are involved.
Do this by keeping a linked list of delete on close tokens, one for
each filename that identifies a path to the dev/inode. Use the
jenkins hash of the pathname to identify the correct token.
2011-01-25 14:23:19 -08:00
Jeremy Allison
a65bce4e38 Add uint32_t name_hash argument (currently unused) to get_file_infos().
Will be used when we store more than one delete on close token.
2011-01-25 14:02:18 -08:00
Jeremy Allison
b97f1ce68a Add name_hash into the share mode entry struct (as yet only use for renames to identify a specific path). 2011-01-25 14:01:52 -08:00
Andrew Bartlett
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
Jeremy Allison
f98d217514 Change to using TDB_INCOMPATIBLE_HASH (the jenkins hash) on all
TDB_CLEAR_IF_FIRST tdb's. For tdb's like gencache where we open
without CLEAR_IF_FIRST and then with CLEAR_IF_FIRST if corrupt
this is still safe to use as if opening an existing tdb the new
hash will be ignored - it's only used on creating a new tdb not
opening an old one.

Jeremy.
2010-09-27 17:18:54 -07:00
Günther Deschner
7a05ca2c9c s3-build: use dbwrap.h only where needed.
Guenther
2010-08-26 00:25:55 +02:00
Volker Lendecke
c9b654f581 s3: Remove smbd_messaging_context() from send_stat_cache_delete_message() 2010-08-07 13:16:48 +02:00
Volker Lendecke
390c3ffc2a s3: Remove procid_self() from brl_close_fnum() 2010-07-05 11:06:31 +02:00
Volker Lendecke
e168b85f00 s3: Remove procid_self() from fill_deferred_open_entry() 2010-07-05 11:06:31 +02:00
Volker Lendecke
aa217afc46 s3: Remove procid_self() from do_lock_cancel() 2010-07-05 11:06:31 +02:00
Volker Lendecke
1af668df02 s3: Remove procid_self() from do_unlock() 2010-07-05 11:06:31 +02:00
Volker Lendecke
471a47a1de s3: Remove procid_self() from do_lock() 2010-07-05 11:06:31 +02:00
Volker Lendecke
b485c1917f s3: Remove procid_self() from query_lock() 2010-07-05 11:06:30 +02:00
Volker Lendecke
50db5cb0df s3: Remove procid_self() from fill_share_mode_entry() 2010-07-05 11:06:26 +02:00
Volker Lendecke
b903297878 s3: Remove procid_self() from init_strict_lock_struct() 2010-07-05 11:06:26 +02:00
Jeremy Allison
adf4833792 This patch looks bigger than it is. It does 2 things. 1). Renames smbpid -> smblctx in our locking code. 2). Widens smblctx to 64-bits internally. Preparing to use the SMB2 handle as the locking context.
Jeremy.
2010-05-07 06:20:50 -07:00
Jeremy Allison
4ad1943d29 Make us pass all SMB2 lock tests except MULTIPLE-UNLOCK and CONTEXT. Them next :-).
Jeremy.
2010-05-07 01:20:26 -07:00
Jeremy Allison
516f7c571e Fix SMB2 lock tests up to cancel-by-close.
Jeremy.
2010-05-06 09:07:49 -07:00
Jeremy Allison
d58b795587 Move to MS-FSA algorithm when checking for invalid lock range.
Satisfies SMB and SMB2.

Jeremy.
2010-05-05 15:57:57 -07:00
Günther Deschner
c6ebab846d s3: only include gen_ndr headers where needed.
This shrinks include/includes.h.gch by the size of 7 MB and reduces build time
as follows:

ccache build w/o patch
real    4m21.529s
ccache build with patch
real    3m6.402s

pch build w/o patch
real    4m26.318s
pch build with patch
real    3m6.932s

Guenther
2010-05-06 00:22:59 +02:00
Simo Sorce
dffeb12f3d smbd: move printfile_offset() within write_file() 2010-04-30 11:52:39 -07:00