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

91946 Commits

Author SHA1 Message Date
Andreas Schneider
69b3a0cb3f testsuit: Fix fprintf format.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-11-15 11:07:40 -08:00
Andreas Schneider
f8ab594d02 s3-libsmb: Use the right macro to set uint16_t attr.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-11-15 11:07:23 -08:00
Christof Schmitt
f77195ace7 winbind: Make centry_start static
centry_start is only used in winbindd_cache.c

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Fri Nov 15 18:05:41 CET 2013 on sn-devel-104
2013-11-15 18:05:41 +01:00
David Disseldorp
fca52bdcad docs: remove ATM Machine terminology from smbcacls man page
An Access Control List (ACL) is comprised of one or more Access Control
Entries (ACEs). The existing smbcacls documentation confusingly uses the
terms ACL list and ACL to refer to both respectively.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Nov 15 01:50:32 CET 2013 on sn-devel-104
2013-11-15 01:50:32 +01:00
Andreas Schneider
af69cb2a78 util: Remove 32bit macros breaking strict aliasing.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10269

These macros might have worked but they break strict aliasing in the
meantime and so the compiler is not able to optimize the relevant code.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Nov 14 23:16:45 CET 2013 on sn-devel-104
2013-11-14 23:16:45 +01:00
Jeremy Allison
4ee4a7e96e s3-client: smbclient shows no error if deleting a directory with del failed
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10260

In SMB1 the server filters by attribute requested, in SMB2 there is
no attribute sent. Emulate this on the client to provide the same
ABI to callers.

In SMB1 the server returns NT_STATUS_NO_SUCH_FILE if FindFirst
finds no files. Emulate this on the client.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Nov 14 21:23:07 CET 2013 on sn-devel-104
2013-11-14 21:23:07 +01:00
Jeremy Allison
fc611dd6e8 s3-lib: smbclient shows no error if deleting a directory with del failed
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10260

Move dir_check_ftype() to util.c

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-14 19:29:00 +01:00
Jeremy Allison
7d8e22c7c1 s3-smbd: smbclient shows no error if deleting a directory with del failed
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10260

Remove unneeded conn argument to dir_check_ftype().
Move to correct uint32_t types.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-14 19:29:00 +01:00
Volker Lendecke
0d5f217cfe heimdal: Fix CID 745516 Use after free
If the loop is exited normally, i.e. we did not find anything proper
within DH_NUM_TRIES, we try to BN_free a second time.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Thu Nov 14 19:17:06 CET 2013 on sn-devel-104
2013-11-14 19:17:06 +01:00
Scott Lovenberg
671a2fa3f8 docs: Fix typo in "max open files" description
Removed extra word "The" from parameter description.

Signed-off-by: Scott Lovenberg <scott.lovenberg@gmail.com>
[ddiss@samba.org: removed white space damage]
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-11-14 17:21:27 +01:00
Volker Lendecke
72b240fa18 autorid: Correctly init range_index for "delete range"
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Nov 14 15:55:54 CET 2013 on sn-devel-104
2013-11-14 15:55:54 +01:00
Günther Deschner
944e9fbc20 s3-winbindd: Fix #10264, cache_traverse_validate_fn failure for NDR cache entries.
We need to increase the keysize limit for NDR queries. A wbint_LookupSids query
for just 20 sids already hits the older limit.

Guenther

https://bugzilla.samba.org/show_bug.cgi?id=10264
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Nov 13 19:33:46 CET 2013 on sn-devel-104
2013-11-13 19:33:46 +01:00
Michael Adam
06be5962ab random-sleep: add possiblity to override via environment variable
set AUTOBUILD_RANDOM_SLEEP_OVERRIDE=<x>

to the number x of seconds that you want to sleep.
This is added to make it possible to run one autobuild
target without having to wait for several minutes.

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2013-11-13 14:53:45 +01:00
Michael Adam
c4214a7942 autobuild: extend samba-ctdb target to build ctdb, too
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-11-13 14:42:35 +01:00
Michael Adam
1da294a7eb autobuild: add a "ctdb" target
For a start, this just builds and installs the integrated ctdb copy.
It does not run "make test" in ctdb. This is time consuming and
too flakey for now.

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2013-11-13 14:37:57 +01:00
Stefan Metzmacher
f087a8e2b8 Merge branch 'master' of ctdb into 'master' of samba
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
2013-11-13 14:18:52 +01:00
Stefan Metzmacher
e80a5aba3d script: add ctdb-import.* scripts
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-11-13 14:12:51 +01:00
Stefan Metzmacher
6142bce0cd remove partial ctdb/ import
In preparation of moving ctdb code into the samba repository.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
2013-11-13 14:04:35 +01:00
Michael Adam
1c9c2e3b65 s4:rpc-server: fix lsa_lookupsids return value for the domain sid
We currently return type UNKNOWN and copy the domain sid to the name.
Instead we should return type DOMAIN and return NULL as name.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Nov 13 13:34:16 CET 2013 on sn-devel-104
2013-11-13 13:34:16 +01:00
Michael Adam
29d8edfe43 s4:rpc-server: fix use after free in dcesrv_lsa_lookup_sid()
Authority name may be accessed after
state has gone away and take domain_name with it.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-13 11:40:28 +01:00
Michael Adam
00c674985f wbinfo: fix output of wbinfo --sid-to-name for sids of type DOMAIN
to print only the domain name and not "DOMIN\<SID>".

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-13 11:40:28 +01:00
Michael Adam
f7240932af wbinfo: fix output of "--lookup-sids" to use the configured winbind separator
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-13 11:40:28 +01:00
Michael Adam
fdf28f0898 wbinfo: fix ouptput of --lookup-sids for sids of type DOMAIN
To print only the domain name and not "DOMIN\<SID>".

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-13 11:40:28 +01:00
Michael Adam
f23fbbf735 rpcclient: fix output of lsalookupsids for sids of type DOMAIN
For domain sids, don't print NAME\*unknown* but print NAME instead.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-13 11:40:28 +01:00
Volker Lendecke
55b3d87036 heimdal: Fix CID 240779 Allocation size mismatch
The error Coverity complains about is in the malloc. krb5_enctypes is
an enum, so it is usually smaller than the size of a pointer. So we
overallocate, but in the memcpy further down we copy from potentially
invalid memory.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Nov 13 11:05:44 CET 2013 on sn-devel-104
2013-11-13 11:05:44 +01:00
Volker Lendecke
91b04f708f tls: Fix CID 242014 Uninitialized scalar variable
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-13 09:01:55 +01:00
Volker Lendecke
2be1eeab7f tls: Fix some noblank line endings
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-13 09:01:55 +01:00
Volker Lendecke
2e6862e9c5 heimdal: Fix CID 241943 Uninitialized pointer read
In the error case without EXTRA_ADDRESSES we access ignore_addresses
without initialization

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-13 09:01:55 +01:00
Volker Lendecke
7039c627c5 libsmb: Fix CID 242665 Out-of-bounds access
Coverity is confused by the dual-use of "pss" as an array of size 1. This
is not strictly a bug here, but it is admittedly a small subtlety. It
should fix a whole bunch of Coverity issues. Normally I would resist to
change our code in response to a deficient static checker, but here I
would vote for this compromise.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-13 09:01:55 +01:00
Andreas Schneider
744abc8822 s4-dsdb: Fix a use after free segfault.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Nov 12 19:22:28 CET 2013 on sn-devel-104
2013-11-12 19:22:28 +01:00
Andreas Schneider
4cf8f10500 s4-torture: Relax time checking in CHECK_NTTIME.
NTTIME has a nanosecond resolution. We should be tolerate if the system
is busy writing and reading the value. To reproduce this problem just
run the test under valgrind.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-11-12 17:33:12 +01:00
Andreas Schneider
654b784e9c s3-vfs: Fix stream_depot vfs module on btrfs.
Checking if the directory is empty using 'nlink == 2' only checks if
there are no subdirectories. It doesn't indicate if there are files in
the directory. However checking link count for no subdirectories is
wrong and applications shouldn't rely on it, see:

https://lkml.org/lkml/2012/2/1/756

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-11-12 17:33:12 +01:00
David Disseldorp
2405e7906c Revert "s3-vfs: Fix stream_depot vfs module on btrfs."
This reverts commit 29f12e7d59.

The wrong patch was pushed, according to Andreas:
	I sent a second version cause the first was not complete. I've
	discussed with Volker after I sent the patch and then sent a new
	patch which

	a) also does the right thin in the unlink case
	b) only tried to remove the server is the deletion of the file
	   was successful.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-12 17:33:12 +01:00
Günther Deschner
25be92b925 s3-libnetjoin: Fix Bug #10262: use upper-case realm when composing default upn.
In case we are about to generate a keytab during the join make sure the default
upn we create is usable with kinit -k.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10262

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Nov 12 16:39:03 CET 2013 on sn-devel-104
2013-11-12 16:39:03 +01:00
Benjamin Franzke
0dd512eead s4:torture/netlogon: Test netlogon with additional attrs
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>

se enter the commit message for your changes. Lines starting

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Nov 12 00:57:19 CET 2013 on sn-devel-104
2013-11-12 00:57:19 +01:00
Benjamin Franzke
767bd6a4d4 s4:torture/ldap: Add test for netlogon over tcp
This patch moves the udp netlogon tests from cldap.c
to netlogon.c and passes a generic netlogon-send
function as parameter.

Therefore a tcp replacement for cldap_netlogon is also added.
The two variants tcp and udp are added as 2 new torture tests:

ldap.netlogon-udp & ldap.netlogon-tcp
Both tests succeed.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-11-11 23:00:55 +01:00
Benjamin Franzke
e306250a25 libcli/cldap: Add utility to create netlogon filter
This utility is splitted of from cldap_netlogon_send.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-11-11 23:00:55 +01:00
Benjamin Franzke
68ebb09193 s4:dsdb: Move cldap netlogon functions into samdb/ldb_modules
As netlogon is handled by the samdb now,
the corresponding functions should live there as well.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-11-11 23:00:54 +01:00
Benjamin Franzke
7106dcf2b8 s4:cldap_server: Do not handle netlogon ourself anymore
Netlogon is now handled by the ldb rootdse module.

The netlogon files will be moved to dsdb in the next commit.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-11-11 23:00:54 +01:00
Benjamin Franzke
0620c79d76 s4:dsdb/rootdse: Support netlogon request
This patch adds support for a netlogon ldap style request
over the tcp socket.  This is available since win2k3+ [1].

The automatic client join & configuration daemon "realmd" makes
use of this ability.
Realmd can now be used to join a computer to a samba 4 domain.
(See also:
https://lists.samba.org/archive/samba-technical/2013-October/095606.html)

Tested with:
ldapsearch -h samba-srv -x -b '' -s base "(&(NtVer=\06\00\00\00)(AAC=\00\00\00\00))" NetLogon

And compared the result in wireshark with cldap request issued by
examples/misc/cldap.pl.

[1]: http://wiki.wireshark.org/MS-CLDAP?action=recall&rev=8

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-11-11 23:00:54 +01:00
Benjamin Franzke
7a5a62547b s4:dsdb/rootdse: Pass rootdse context to rootdse_add_dynamic
This replaced the *module parameter, and uses ac->module in the function
instead, same for *req and *attrs.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-11-11 23:00:54 +01:00
Benjamin Franzke
3721274168 s4:cldap_server: Move netlogon parsing into utility function
To be used later by netlogon-request over ldap.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-11-11 23:00:54 +01:00
Benjamin Franzke
ca8acb681a provision: Fix string replacement ordering
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-11-11 23:00:54 +01:00
Benjamin Franzke
32ee231da5 s4:torture/cldap: Fix a typo
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-11-11 23:00:54 +01:00
Volker Lendecke
490418d636 gpo: Fix CID 1034880 Resource leak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>

Autobuild-User(master): Ira Cooper <ira@samba.org>
Autobuild-Date(master): Mon Nov 11 22:59:10 CET 2013 on sn-devel-104
2013-11-11 22:59:10 +01:00
Volker Lendecke
4d97b5dcca gpo: Fix CID 1034881 Resource leak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2013-11-11 21:04:09 +01:00
Volker Lendecke
b7420e44b1 ntvfs: Fix CID 1034883 Resource leak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2013-11-11 21:04:09 +01:00
Volker Lendecke
144428058a backupkey: Fix CID 1034885 Resource leak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2013-11-11 21:04:09 +01:00
Volker Lendecke
0e19812782 smbd: Fix CID 1035365 Buffer not null terminated
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2013-11-11 21:04:09 +01:00
Volker Lendecke
2a73a4985e smbd: Fix CID 1035366 Buffer not null terminated
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2013-11-11 21:04:09 +01:00