1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-04 05:18:06 +03:00
Commit Graph

27608 Commits

Author SHA1 Message Date
David Disseldorp
bd5e9758f8 s4-torture: remove unchecked read from smb2 create
Add a corresponding test case to smb2.read.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-09-29 13:14:21 +02:00
Stefan Metzmacher
4732f5b210 s4:torture/smb2/lock: remove samba4 specific checks for NETWORK_NAME_DELETED/USER_SESSION_DELETED
Most Windows versions have a strange order to
verify the session id, tree id and file id.
(They should be checked in that order, but windows
seems to check the file id before the others).

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Sep 28 21:12:07 CEST 2011 on sn-devel-104
2011-09-28 21:12:07 +02:00
Stefan Metzmacher
1f4bf0fb0f s4:libcli/smb2: ignore SMB2_OP_CANCEL responses
If there're a problem with signing or the session doesn't exists
any more the server responses with a failure, instead of not
sending a response.

For now we ignore the reponse, as there's not much we could do with it
and it's not likely that we generate bad requests, which trigger
that behavior, except for testing.

metze
2011-09-28 17:29:12 +02:00
Stefan Metzmacher
caef1c7d21 s4:libcli/smb2: correctly sign SMB2_OP_CANCEL request if they belong to a session
metze
2011-09-28 17:29:11 +02:00
Stefan Metzmacher
28b48f8498 s4:libcli/smb2: don't try to check the signing if we got NT_STATUS_USER_SESSION_DELETED
metze
2011-09-28 17:29:11 +02:00
Jelmer Vernooij
f4fa725b95 libcli: Install libcli.h.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Wed Sep 28 14:19:20 CEST 2011 on sn-devel-104
2011-09-28 14:19:20 +02:00
Stefan Metzmacher
14c05cf93a s4:libcli/resolve: only try broadcast messages to ipv4 addresses
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Sep 28 05:10:53 CEST 2011 on sn-devel-104
2011-09-28 05:10:53 +02:00
Kai Blin
1210b8abe7 dns: Do as BIND and MS DNS and drop quries with qdcount != 1
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Wed Sep 28 03:37:22 CEST 2011 on sn-devel-104
2011-09-28 03:37:22 +02:00
Kai Blin
f98ebcf43f dns: The QCLASS is called IN, not IP 2011-09-28 02:02:36 +02:00
Andrew Bartlett
dce23151e0 s4-ldap_server: Fix segfault on startup failure of ldap server 2011-09-27 22:43:06 +02:00
Jelmer Vernooij
c74de09d81 libcliraw: Make smb_raw_write_recv public and include it in a public header.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Sep 25 17:12:05 CEST 2011 on sn-devel-104
2011-09-25 17:12:05 +02:00
Kai Blin
649bfc474d s4 winbind: Don't drop workgroup name for getpw*
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Sat Sep 24 22:49:50 CEST 2011 on sn-devel-104
2011-09-24 22:49:49 +02:00
Andrew Bartlett
d40fe50a67 build: avoid util.h as a public header name due to conflict with MacOS 2011-09-23 09:24:03 +02:00
Matthieu Patou
4383665101 python-s4: use PyErr_SetNTSTATUS instead of PyErr_NTSTATUS_IS_ERR_RAISE as it use NT_STATUS_IS_ERROR which is not completely the same as NT_STATUS_IS_OK
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Fri Sep 23 09:22:56 CEST 2011 on sn-devel-104
2011-09-23 09:22:56 +02:00
Matthieu Patou
766d43efde pys4: really return an exception if the status if not correct
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Fri Sep 23 06:06:57 CEST 2011 on sn-devel-104
2011-09-23 06:06:57 +02:00
Stefan Metzmacher
16fd935fc6 s4:selftest: skip flakey samba4.nbt.winsreplication for now
[825/1154 in 43m52s] samba4.nbt.winsreplication(dc)
 Test if we always get back the same assoc_ctx
 Setup wrepl connections
 Test one pull replication cycle
 Setup wrepl connections
 Setup wrepl conflict pull connection
 UNEXPECTED(error): samba4.nbt.winsreplication.replica
 REASON: _StringException: _StringException: Unknown error/failure

I don't have time to look into the problem currently.

metze
2011-09-22 22:30:22 +02:00
Andrew Tridgell
0921e75001 s4-dbcheck: fixed transaction nesting in dbcheck
ensure we don't cancel a transaction we didn't start

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Sep 22 03:39:59 CEST 2011 on sn-devel-104
2011-09-22 03:39:59 +02:00
Andrew Tridgell
4dbc604d9c samba-tool: use show_recycled in dbchecker
we need to use show_recycled instead of show_deleted in dbchecker to
allow us to see recycled objects
2011-09-22 10:00:49 +10:00
Andrew Tridgell
b92e0a232e s4-kdc: set NO_GLOBAL_CATALOG control in kdc
the kdc doesn't want to find users who are in partialReplica
partitions, as they won't have the needed secret info for the kdc to
operate. We need to generate referrals instead

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-22 10:00:49 +10:00
Andrew Tridgell
3e685f5995 s4-rpc: show binding string in failed rpc binds
this makes debugging some RPC auth issues easier
2011-09-22 10:00:49 +10:00
Andrew Tridgell
02872212eb s4-ldap-server: set the NO_GLOBAL_CATALOG control on non-GC operations
this makes us honor GC semantics on the two ldap ports
2011-09-22 10:00:49 +10:00
Andrew Tridgell
516f32654a s4-repl: remove unused principal_name element 2011-09-22 10:00:49 +10:00
Andrew Tridgell
aba856c666 s4-dsdb: load the partialReplica attribute in the @PARTITION object
this modifies the partition module to honor a partialReplica attribute
on the @PARTITION module, marking partiations as partial replicas so
the NO_GLOBAL_CATALOG control can be honoured
2011-09-22 10:00:49 +10:00
Andrew Tridgell
8c3d77d84c s4-repl: fill in GUID and SID from partition information
when we find a NC via a DN string, fill in the GUID and SID so the
caller can properly report them
2011-09-22 10:00:49 +10:00
Andrew Tridgell
783ff68628 s4-kcc: return partial replica NCs in drs showrepl
the showrepl operation should return all our replicated NCs, including
partial replicas
2011-09-22 10:00:48 +10:00
Andrew Tridgell
00ef18f19c s4-dsdb: added NO_GLOBAL_CATALOG control
this control is used to ask samdb to not return searches with a basedn
in partial repica partitions, which is needed to support the
difference between a search on the 3268 GC ldap port and the non-GC
389 port
2011-09-22 10:00:48 +10:00
Andrew Tridgell
73f2df6a37 s4-dns: started adding support for auto-creation of NS glue record
when we create a new subdomain we need to create a NS glue record in
the parent domain pointing at our subdomain
2011-09-22 10:00:48 +10:00
Andrew Tridgell
7da636f33a s4-dsdb: get GUID and SID for DSA from extended DN
this allows us to use the DN from a hasPartialReplicaNCs attribute to
create a reps1 object
2011-09-22 10:00:48 +10:00
Andrew Tridgell
2b929b0b51 s4-dsdb: enable initial replication of partitions via DsReplicaSync
we need to create a temporary dsa object to allow the replication task
to replicate a NC that is not listed in a repsFrom attribute
2011-09-22 10:00:48 +10:00
Andrew Tridgell
86f5ecdc0c s4-repl: get NCs to replicate from our NTDS object
we need to use the hasMasterNCs and hasPartialReplicaNCs attributes on
our NTDS object to get the list of NCs to replicate, instead of using
the rootDSE. This is needed to support replicating of GC partial
replicas, which are not listed in the rootDSE
2011-09-22 10:00:48 +10:00
Andrew Tridgell
4efb4ebe63 s4-dsdb: added support for replicating with GC partial attribute set
if we are replicating a partial replica, then we need to supply the
partial attribute set we want to replicate to the server
2011-09-22 10:00:48 +10:00
Andrew Tridgell
677600fb7f s4-dsdb: failing to find the object is not an error in dsdb_loadreps()
we may not have replicated the partition yet, so this should be
considered the same as having no repsFrom/repsTo
2011-09-22 10:00:48 +10:00
Matthias Dieter Wallnöfer
02a08d5cd5 s4:ntvfs common - remove two outdated function prototypes
The two functions don't exist anymore.

Reviewed-by: Jelmer

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Tue Sep 20 20:16:29 CEST 2011 on sn-devel-104
2011-09-20 20:16:29 +02:00
Matthias Dieter Wallnöfer
7c44039f48 s4:ntvfs common - add "UTIL_TDB" and "tdb-wrap" as internal build dependency
These modules are required for both header and source code files (see
bug #8468).

Reviewed-by: Jelmer
2011-09-20 18:43:06 +02:00
Matthias Dieter Wallnöfer
5347074c4e s4:param/pyparam.c - suppress "P_SEP" compilation warning
Reviewed-by: Jelmer
2011-09-20 18:43:06 +02:00
Andrew Tridgell
0167b0447f s4-drs: allow replication of the GC partial attribute set
when a DC has the GUID_DRS_GET_FILTERED_ATTRIBUTES right on a NC, we
need to allow it to replicate if all the attributes it is asking for
are in the GC partial attribute set

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Sep 20 13:47:38 CEST 2011 on sn-devel-104
2011-09-20 13:47:38 +02:00
Andrew Bartlett
f9acf770e9 lib/util/charset: remove charset module loading
Now that the 'table' modules are gone, there is no reason for there to
be charset modules at all.  This builds the macosxfs and weird modules
into the binary at the appropriate times, and changes the tests to
test instead the difference between the remaining internal handlers
and iconv().

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Sep 20 06:27:06 CEST 2011 on sn-devel-104
2011-09-20 06:27:06 +02:00
Andrew Tridgell
be4f188128 s4-client: added close command in smbclient
this matches the existing open command, and also gives you error codes
on both open and close

useful for testing share mode locking

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Sep 19 23:59:28 CEST 2011 on sn-devel-104
2011-09-19 23:59:28 +02:00
Matthias Dieter Wallnöfer
fcfde9ac86 s4:ntvfs/common/brlock.c - remove unnecessary include "tdb_compat.h"
Attempt to fix bug #8468
(https://bugzilla.samba.org/show_bug.cgi?id=8468).

Reviewed-by: Jelmer

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Mon Sep 19 18:03:24 CEST 2011 on sn-devel-104
2011-09-19 18:03:24 +02:00
Matthias Dieter Wallnöfer
b759dc9f39 s4:libnet/py_net.c - fix up includes (in order to find all "struct"s)
Reviewed-by: Jelmer
2011-09-19 16:31:07 +02:00
Matthias Dieter Wallnöfer
50310ad75d s4:auth - remove unused variables
Reviewed-by: Jelmer
2011-09-19 16:31:07 +02:00
Stefan Metzmacher
c033e634d7 s4:selftest: run the nbt tests before the smb tests
This hopefully avoids to run into problems with the
flakey error in the samba4.nbt.winsreplication test

 [1071/1154 in 58m58s] samba4.nbt.winsreplication(dc)
 Test if we always get back the same assoc_ctx
 Setup wrepl connections
 Test one pull replication cycle
 Setup wrepl connections
 Setup wrepl conflict pull connection
 UNEXPECTED(error): samba4.nbt.winsreplication.replica
 REASON: _StringException: _StringException: Unknown error/failure

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Sep 19 16:29:22 CEST 2011 on sn-devel-104
2011-09-19 16:29:22 +02:00
Andrew Tridgell
9d98461150 s4-dsdb: cope with out of sync replication attributes in partition module
if the @ATTRIBUTES or other objects which are replicated between
partions become out of sync, then the ldb would fail to open. This
changes ensures that we can always fix those records, by running the
operation in the top level partition, and replicating the result to
the other partitions

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Sep 19 04:31:48 CEST 2011 on sn-devel-104
2011-09-19 04:31:48 +02:00
Andrew Tridgell
966b5d5de2 pyldb: fixed places where we try to concatenate a Dn with a string
you need to either use str(dn) or use %s in a format string
2011-09-19 10:57:03 +10:00
Andrew Tridgell
f79d6ee929 s4-provision: use get_config_basedn() in DNS setup
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-19 10:57:03 +10:00
Andrew Tridgell
579fd43057 samba-tool: use get_config_basedn() to get configuration NC DN
this allows these commands to work for subdomains

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-19 10:57:03 +10:00
Andrew Tridgell
ee7cfcadc6 s4-kdc: default kvno for inter-domain trusts to zero
the exact value doesn't matter, as both Samba and windows check
against the latest password, but the old default of -1 caused ASN.1
parsing errors on windows, which prevented it answering TGS requests

thanks to Hongwei Sun for finding this from a ttt trace

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-19 10:57:03 +10:00
Andrew Tridgell
4577ee1f95 s4-dsdb: use get_config_basedn() in python tests
we can't just append CN=Configuration to the basedn, as that won't
give the right configuration DN for a subdomain of a forest

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-19 10:57:03 +10:00
Andrew Tridgell
cea37b0d6d s4-drs: cope with REPL_OBJ getncchanges call for new object
when we do a subdomain join we create a new object using a REPL_OBJ
getncchanges call for the partitions DN. This has a side effect of
creating that object. We need to skip the UDV update in that case

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-19 10:57:02 +10:00
Andrew Bartlett
aa960d8fa7 s4-provision Add initial support for joining as a new subdomain
To do this we need to reorganise a lot of the provision code, so that
we can create the framework for the inbound replicaton of the config
and schema partitions and then add in the new subdomain locally.

Andrew Bartlett
2011-09-19 10:57:02 +10:00