1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
Commit Graph

84624 Commits

Author SHA1 Message Date
Volker Lendecke
542400a966 tdb: Use tdb_null in freelistcheck
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-19 15:46:45 +01:00
Volker Lendecke
68559b787e tdb: Enhance lock tracking a bit
lock-tracking.c mirrors the in-kernel fcntl structures to detect
unexpected use of fcntl calls. During my mutex work I changed our fcntl
use so that we unlock the allrecord_lock in two pieces: The range covering
the hash locks and the range covering the data area for the individual
traverse record locks. Splitting locks is not covered by lock-tracking.c.

This patch extends lock-tracking.c with this little piece. It's still
far from complete to track the full range of fcntl semantics. It is not
strictly needed right now, but it does not hurt either.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-19 15:46:45 +01:00
Michael Adam
31e4d6d2c7 s3:smbd: preserve file type mode bits in file_set_dosmode()
When translating between dos modes and unix modes, these bits were dropped from
the stat->st_ex_mode field.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Feb 19 15:45:31 CET 2013 on sn-devel-104
2013-02-19 15:45:31 +01:00
Michael Adam
f211b57dd2 gencache: fix an extra newline in a DEBUG message in gencache_set_data_blob()
by using timestring() instead of ctime()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-19 13:58:11 +01:00
Michael Adam
86d78dfa83 gencache: fix an extra newline in a DEBUG message in gencache_iterate_fn()
by using timestring() instead of ctime()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-19 13:58:10 +01:00
Michael Adam
f7525abf3b gencache: fix an extra newline in a DEBUG message in gencache_iterate_blobs_fn()
by using timestring() instead of ctime()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-19 13:58:09 +01:00
Michael Adam
762dd3cf29 lib/util/time: strip a potential trailing newline in the asctime case.
If strftime() is not available, asctime() is used, and this usually
appends a newline character to the result. This is not desired for
timestamp().

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-19 13:58:08 +01:00
Michael Adam
4d3928a8f4 gencache: unify a DEBUG message in gencache_set_data_blob()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-19 13:58:06 +01:00
Michael Adam
56ee82e8a0 gencache: unify a DEBUG message in gencache_iterate_fn()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-19 13:58:05 +01:00
Michael Adam
ddf2aa3340 gencache: unify a DEBUG message in gencache_iterate_blobs_fn()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-19 13:58:04 +01:00
Michael Adam
7e36b1b8cb gencache: unify a DEBUG message in gencache_del()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-19 13:58:03 +01:00
Michael Adam
c1d58f222f packaging(RHEL-CTDB): remove unpackaged manpages (samba and samba-tool)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-19 13:58:02 +01:00
Michael Adam
ed28246c25 packaging(RHEL-CTDB): package the fake-acls vfs module
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-19 13:58:00 +01:00
Gregor Beck
5ab7725974 s3:net: new implementation of "servid wipedbs" with smbXsrv_*
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Feb 19 13:56:57 CET 2013 on sn-devel-104
2013-02-19 13:56:57 +01:00
Gregor Beck
d8dd0ecc48 lib/util_tdb: factor out tdb_data_talloc_copy()
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-19 12:10:24 +01:00
Gregor Beck
d23f19ab00 s3:smbXsrv_open: add smbXsrv_open_global_traverse()
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-19 12:10:23 +01:00
Gregor Beck
60721a3782 s3:smbXsrv_tcon: pass record in smbXsrv_tcon_global_traverse()
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-19 12:10:22 +01:00
Gregor Beck
93e22bb1c4 s3:smbXsrv_session: pass record in smbXsrv_session_global_traverse()
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-19 12:10:21 +01:00
Michael Adam
bdb80aeb11 s3:smbd:smb2: fix segfault (access after free) in durable disconnect code
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Feb 19 11:12:01 CET 2013 on sn-devel-104
2013-02-19 11:12:01 +01:00
Andrew Bartlett
2cf83f7c64 samba_upgradeprovision: Use tdb_util.tdb_copy not shutil.copy2
This is really important, because copying a file will both ignore
locks held by another process and break any locks we hold (due to
POSIX brain-damage regarding multiple fds on one file in a process).

By leaving this to tdbbackup in a child, both of these issues are avoided.

Andrew Bartlett

Reviewed-by: Matthieu Patou <mat@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Feb 19 07:48:18 CET 2013 on sn-devel-104
2013-02-19 07:48:18 +01:00
Andrew Bartlett
3c51e18a0c samba_upgradeprovision: Do not update privileges.ldb any more (unchanged since 2009)
This update was only a total oblitoration of the existing database
and not a merge, and the shutil.copy would both disregard and break
locks on the database that are held at this point.

Andrew Bartlett

Reviewed-by: Matthieu Patou <mat@samba.org>
2013-02-19 06:08:19 +01:00
Andrew Bartlett
396df64ef6 scripting: Make tdb_copy a common util function in samba.tdb_util
This will allow samba_upgradeprovision to also call it.

Andrew Bartlett

Reviewed-by: Matthieu Patou <mat@samba.org>
2013-02-19 06:08:19 +01:00
Andrew Bartlett
2c2759e408 scripting: Make tdb_copy use the python subprocess module
This makes the code more robust to spaces in the file names (etc).

Andrew Bartlett

Reviewed-by: Matthieu Patou <mat@samba.org>
2013-02-19 06:08:19 +01:00
Andrew Bartlett
06780ae822 samba_upgradeprovision: Remove options to fix FS ACLs
samba-tool ntacl sysvolreset handles this better, and makes this tool
much less confusing internally.

Andrew Bartlett

Reviewed-by: Matthieu Patou <mat@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Feb 19 06:06:41 CET 2013 on sn-devel-104
2013-02-19 06:06:40 +01:00
Michael Adam
cfebce3c56 s3:smbd: add debugging to close code (regarding disconnect of a durable)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Feb 18 17:42:45 CET 2013 on sn-devel-104
2013-02-18 17:42:45 +01:00
Stefan Metzmacher
295444266d s4:torture: fix segfault in test_durable_open_open2_oplock()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-18 15:56:20 +01:00
Michael Adam
2f8a033bf2 s4:torture:smb2: fix segfault on error condition in the durable-open.delete_on_close2 test
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-18 15:56:04 +01:00
Michael Adam
1d3bd45d61 s4:torture:smb2: fix segfault on error condition in the durable-open.delete_on_close1 test
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-18 15:55:52 +01:00
Michael Adam
98b0e909b7 s4:torture:smb2: fix segfault on error condition in the durable-open.reopen4 test
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-18 15:55:41 +01:00
Michael Adam
10fcbc6869 s4:torture:smb2: fix segfault on error condition in the durable-open.reopen3 test
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-18 15:55:30 +01:00
Michael Adam
cb9b8975e5 s4:torture:smb2: fix segfault on error condition in the durable-open.reopen2a test
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-18 15:55:18 +01:00
Michael Adam
6385f750f1 s4:torture:smb2: fix segfault on error condition in durable-open.reopen2 test
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-18 15:55:06 +01:00
Michael Adam
6240a7d11e s4:torture:smb2:durable: make test functions static
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-18 15:54:38 +01:00
Michael Adam
42bf98d54c s4:torture: add a durable-open-disconnect test (suite)
this opens a durable, disconnects it and exits

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-18 15:54:20 +01:00
Stefan Metzmacher
f0e6a9be00 s3:smbd: use smbXsrv_open_close() instead of smbXsrv_open_update()
This makes sure we store the correct disconnect_time for disconnected
durable handles.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-18 15:53:36 +01:00
Karolin Seeger
8adbd1cf75 srv_epmapper.c: Fix typo.
priviledge -> privilege

Signed-off-by: Karolin Seeger <kseeger@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Feb 18 13:57:40 CET 2013 on sn-devel-104
2013-02-18 13:57:39 +01:00
Karolin Seeger
240df6c7b0 wb_samba3_cmd.c: Fix typo in comment.
redundent -> redundant

Signed-off-by: Karolin Seeger <kseeger@samba.org>
2013-02-18 22:07:39 +11:00
Karolin Seeger
b22b22dcca brlock_tdb.c: Fix typo in comment.
redundent -> redundant

Signed-off-by: Karolin Seeger <kseeger@samba.org>
2013-02-18 22:07:39 +11:00
Karolin Seeger
75ca814f1e srv_netlog_nt.c: Fix typo in comment.
redundent -> redundant

Signed-off-by: Karolin Seeger <kseeger@samba.org>
2013-02-18 22:07:39 +11:00
Karolin Seeger
6eb59eb388 brlock.c: Fix typo in comment.
redundent -> redundant

Signed-off-by: Karolin Seeger <kseeger@samba.org>
2013-02-18 22:07:39 +11:00
Karolin Seeger
38cb1410f5 vfs_gpfs: Fix typos in comments.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
2013-02-18 22:07:39 +11:00
Karolin Seeger
2ed035b5a0 fault.c: Fix typo in comment.
redundent -> redundant

Signed-off-by: Karolin Seeger <kseeger@samba.org>
2013-02-18 22:07:39 +11:00
Karolin Seeger
68b2e30ae6 docs: Fix typo.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
2013-02-18 22:07:39 +11:00
Andrew Bartlett
dcc94f0933 s4-nbt: Ensure source4/ nbt client and server honour 'disable netbios'
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Feb 17 11:25:34 CET 2013 on sn-devel-104
2013-02-17 11:25:34 +01:00
Landon Fuller
6dfb35f3ff Fallback to the internal resolver on EAI_FAIL.
On Linux, non-RFC 1034-complaint names (such as gc._msdsc.example.org)
will result in the resolver returning the non-POSIX EAI_NODATA. In that
case, the case statement here would fall back on the internal resolver,
allowing resolution to complete successfully.

On FreeBSD, the libc resolver uses the same validation code, but
the POSIX result of EAI_FAIL is returned instead of EAI_NODATA. Since
there was no case for this error code, no fallback to the internal
resolver would occur. This led to replication failing on FreeBSD.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Feb 17 07:06:36 CET 2013 on sn-devel-104
2013-02-17 07:06:36 +01:00
Volker Lendecke
05235d5b44 tdb: Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Simo Sorce <idra@samba.org>
Autobuild-Date(master): Sat Feb 16 17:13:32 CET 2013 on sn-devel-104
2013-02-16 17:13:32 +01:00
Richard Sharpe
10b96e3ffe Fix the maxfids test so that it does not fork lots of processes and so that it works for all cases of maxfids.
Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Feb 15 07:09:59 CET 2013 on sn-devel-104
2013-02-15 07:09:59 +01:00
Jeremy Allison
daada84920 tevent: Remove the previous "standard" tevent backend implementation.
This was a horrible hybrid of duplicated epoll and select()
code.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Feb 14 22:40:30 CET 2013 on sn-devel-104
2013-02-14 22:40:30 +01:00
Jeremy Allison
16f57076b1 tevent: Add in the new implementation of "standard" tevent backend.
Falls back cleanly from epoll -> poll, or uses poll if
epoll not available.

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-14 10:19:38 -08:00
Jeremy Allison
203f85c25e tevent: Add a private function tevent_poll_event_add_fd_internal().
Not yet used, but will be called by the "standard"
fallback from epoll -> poll backends.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-14 10:19:38 -08:00