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

27791 Commits

Author SHA1 Message Date
Andrew Bartlett
fe02752ed6 auth: move gensec_start.c to the top level
This does not change who uses gensec for now, but makes it possible to
write new gensec modules outside source4/

Andrew Bartlett
2011-10-11 13:41:36 +11:00
Andrew Bartlett
561d834123 auth: move credentials layer to the top level
This will allow gensec_start.c to move to the top level.  This does not change
what code uses the cli_credentials code, but allows the gensec code to be
more broadly.

Andrew Bartlett
2011-10-11 13:41:36 +11:00
Andrew Bartlett
1255383140 s4-s3-upgrade: Allow import (just without a uid mapping) where getpwnam fails
This allows the tests to pass on systems without a jelmer user :-)

Andrew Bartlett
2011-10-11 13:41:36 +11:00
Andrew Bartlett
b21b012756 lib/param move source4 param code to the top level
This is done so that the lpcfg_ functions are available across the whole
build, either with the struct loadparm_context loaded from an smb.conf directly
or as a wrapper around the source3 param code.

This is not the final, merged loadparm, but simply one step to make
it easier to solve other problems while we make our slow progress
on this difficult problem.

Andrew Bartlett
2011-10-11 13:41:34 +11:00
Simo Sorce
6bed57788c pac: Fix wrong memory allocation check
Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Tue Oct 11 01:18:22 CEST 2011 on sn-devel-104
2011-10-11 01:18:22 +02:00
Stefan Metzmacher
b787b6e1bd libcli/cldap: don't pass tevent_context to cldap_socket_init()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Oct 10 23:23:07 CEST 2011 on sn-devel-104
2011-10-10 23:23:07 +02:00
Stefan Metzmacher
5a7a1b35be libcli/cldap: pass tevent_context to cldap_search_send()
metze
2011-10-10 21:50:26 +02:00
Stefan Metzmacher
2cd76b0931 libcli/cldap: pass tevent_context to cldap_netlogon_send()
metze
2011-10-10 21:50:26 +02:00
Stefan Metzmacher
3ed85d7c69 libcli/cldap: pass tevent_context to cldap_set_incoming_handler()
metze
2011-10-10 21:50:26 +02:00
Jelmer Vernooij
1417ea1eed Remove pointless exception catching in tests.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct  9 00:00:26 CEST 2011 on sn-devel-104
2011-10-09 00:00:25 +02:00
Jelmer Vernooij
d7d5858b74 netcmd/domain: Remove unused imports. 2011-10-08 22:28:25 +02:00
Jelmer Vernooij
8111001977 netcmd: Avoid catching all exceptions, avoid using ';' at the end of lines.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Oct  8 15:46:46 CEST 2011 on sn-devel-104
2011-10-08 15:46:46 +02:00
Jelmer Vernooij
dc3df567be upgrade: Avoid catching all exceptions, just catch the ones we care about. 2011-10-08 14:15:11 +02:00
Matthias Dieter Wallnöfer
9c979e88dc s4:findprovisionusnranges - the default python path is detected over "env"
Reviewed-by: Jelmer

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Oct  8 13:06:20 CEST 2011 on sn-devel-104
2011-10-08 13:06:20 +02:00
Stefan Metzmacher
10fdc9ad68 s4:torture/smb2: avoid '//' comments
The compiler on openindiana doesn't like them.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Oct  8 08:56:10 CEST 2011 on sn-devel-104
2011-10-08 08:56:10 +02:00
Stefan Metzmacher
627f930100 s4:torture/drs: avoid '//' comments
The compiler on openindiana doesn't like them.

metze
2011-10-08 07:24:15 +02:00
Stefan Metzmacher
f007f68f70 s4:lib/wmi: avoid '//' comments
The compiler on openindiana doesn't like them.

metze
2011-10-08 07:24:14 +02:00
Andrew Bartlett
078db8f6c9 build: build wbinfo only once in the waf build
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sat Oct  8 04:52:03 CEST 2011 on sn-devel-104
2011-10-08 04:52:03 +02:00
Stefan Metzmacher
f0cd3f62d0 selftest: run dfs tests on plugin_s4_dc
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Oct  8 03:18:54 CEST 2011 on sn-devel-104
2011-10-08 03:18:54 +02:00
Stefan Metzmacher
cc17ac9bba s4:smb_server: implement dfs referral handing on top of dfs_server_ad_get_referrals()
metze
2011-10-08 01:43:38 +02:00
Stefan Metzmacher
bcb02129c3 s4:dsdb/password_hash: add DSDB_CONTROL_PASSWORD_BYPASS_LAST_SET_OID
Which allows the caller to pass a given 'pwdLastSet' value
(every useful for migrations).

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Oct  7 15:28:13 CEST 2011 on sn-devel-104
2011-10-07 15:28:13 +02:00
Stefan Metzmacher
c180feb16c s4:dbchecker: make use of local_oid controls for dsdb.DSDB_CONTROL_DBCHECK
metze
2011-10-07 12:20:49 +02:00
Stefan Metzmacher
ff1ce6521b s4:dsdb: fix the order of DSDB_CONTROL_* defines in samdb.h
This makes clear that struct dsdb_control_password_change
belongs to DSDB_CONTROL_PASSWORD_CHANGE_OID.

metze
2011-10-07 12:20:45 +02:00
Andrew Bartlett
556ef6ac90 s4-param copy print_parameter and equal_parameter in from source3
This will allow these functions to be put into lib/param shortly.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Oct  7 10:17:01 CEST 2011 on sn-devel-104
2011-10-07 10:17:00 +02:00
Andrew Bartlett
80e439453d param: Use a bool to hold boolean parameters
All three-state parameters invoking Auto (2) are already declared as integers, not
booleans.

Andrew Bartlett
2011-10-07 17:45:20 +11:00
Andrew Tridgell
83f0dc44a7 s4-dsdb: special case for deleted objects one way link
we show wellknown links to the deleted objects container

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

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Oct  7 07:58:08 CEST 2011 on sn-devel-104
2011-10-07 07:58:08 +02:00
Andrew Tridgell
9b981ff1e8 s4-dsdb: don't display links to deleted objects
unless the user asks for the display of deactivated links, we should
not display DNs that link to deleted objects

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-07 13:20:44 +11:00
Andrew Tridgell
a729dbb269 s4-dsdb: fixed one_way_link calculation
we need to check for the other end of the link, not the current linkID

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-07 13:20:44 +11:00
Andrew Tridgell
a5f311d469 s4-dsdb: fixed behaviour of show_deleted and show_recycled control
to correctly implement the show_deleted and show_recycled control we
need to know if the recyclebin is enabled. When not enabled, the
isRecycled attribute is ignored, and only isDeleted is used.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-07 13:20:44 +11:00
Andrew Tridgell
365f705345 s4-dsdb: fixed the check_optional_feature() call
the dsdb_check_optional_feature() call should look on our own NTDS DN
for the enabled feature. This should work for all features, not just
for forest wide fetaures.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-07 13:20:44 +11:00
Andrew Bartlett
f6b7bd4a01 lib/util: consolidate module loading
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Oct  6 08:52:30 CEST 2011 on sn-devel-104
2011-10-06 08:52:30 +02:00
Andrew Bartlett
7d33ec3dfe lib/util: consolidate module loading into common code
This creates a samba-modules private libary that handles the details.

Andrew Bartlett
2011-10-06 07:18:07 +02:00
Andrew Tridgell
3fca66e2b3 samba-tool: add support for fixing broken backlinks in dbcheck
this allows dangling backlinks to be removed

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

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Oct  6 07:08:35 CEST 2011 on sn-devel-104
2011-10-06 07:08:35 +02:00
Andrew Tridgell
d7f617e2e1 s4-dsdb: allow deletion of backlinks if DSDB_CONTROL_DBCHECK given
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-06 14:34:22 +11:00
Andrew Tridgell
c2d70af1a7 s4-dsdb: added DSDB_CONTROL_DBCHECK
this will be used for overrides by the dbcheck validator

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-06 14:34:22 +11:00
Andrew Tridgell
2d63789e48 s4-dsdb: allow groupType update on deleted objects
this allows dbcheck to fix groupType on objects that have been deleted

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-06 14:34:21 +11:00
Andrew Tridgell
8976e1d50d s4-rodc: use the rodc_replica flag on the partition
this sets DSDB_REPL_FLAG_PARTIAL_REPLICA when replicating a RODC
partition, which tells the replication code to map instanceType to
remove the INSTANCE_TYPE_WRITE bit

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-06 14:34:21 +11:00
Andrew Tridgell
2a2deeb3b4 s4-rodc: ensure we load replicated partitions for RODCs
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-06 14:34:21 +11:00
Andrew Bartlett
e717af0301 s4-dsdb: Do not assume that all deleted objects have an objectCategory and sAMAccountType
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Oct  6 03:43:13 CEST 2011 on sn-devel-104
2011-10-06 03:43:13 +02:00
Andrew Bartlett
f55328a295 dsdb: Do not attempt to resolve conflicts on an RODC 2011-10-06 02:11:34 +02:00
Andrew Bartlett
55054182b2 dsdb: fix double-free in replication failure case on RODC 2011-10-06 02:11:34 +02:00
Andrew Bartlett
5c5d869975 s4-dsdb Allow repl server to start even when no master NCs are present 2011-10-06 02:11:34 +02:00
Andrew Tridgell
63319c169f s4-auth: fixed formatting of some DEBUG() lines
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Oct  5 09:45:15 CEST 2011 on sn-devel-104
2011-10-05 09:45:15 +02:00
Andrew Tridgell
6b5d8e02f7 s4-subdomain: create trust record with forest root DC
when we create a sub-subdomain we need to use the forest naming master
to setup the partition changes for the new subdomain. We also need to
setup the trust with the forest root, as that allows us to create the
needed _msdcs DNS entries in the forest

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Oct  4 07:40:59 CEST 2011 on sn-devel-104
2011-10-04 07:40:59 +02:00
Andrew Tridgell
8905344bad s4-dsdb: fixed re-join of subdomain
if we repeat the join of a subdomain then we try to re-create the NC
for the subdomain during a DsAddEntry(). This allows that re-creation
to succeed if the NC already exists
2011-10-04 15:08:58 +11:00
Andrew Tridgell
28a6881d4f s4-lsa: fixed set of trust password with old password
the calculation of add_incoming and add_outgoing was not correct when
a trust was already in place

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:58 +11:00
Andrew Tridgell
e9758ef94d s4-dns: add all forest DCs to named.conf.update
this allows all DCs to update DNS entries
2011-10-04 15:08:58 +11:00
Andrew Tridgell
7244e254cc s4-ldap: added DSDB_CONTROL_NO_GLOBAL_CATALOG to ldap encoding list
also remove all the duplicated comments

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:58 +11:00
Andrew Tridgell
0ef8dca9fb s4-kdc: fixed handling of previous vs current trust password
This sorts out the correct handling for the 'kvno=255'
problem. Windows will use the previous trust password for 1 hour after
a password set, and indicates that the previous password is being used
by sending current_kvno-1. That maps to 255 if the trust password has
not actually been changed, so the initial trust password is being
used.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:57 +11:00
Andrew Tridgell
71f3a25ff7 s4-auth: rework map_user_info() to use cracknames
to properly support multi-domain forests we need to determine if an
incoming username is part of a known forest domain or not. To do this
for all possible SPN forms, we need to use CrackNames.

This changes map_user_info() to use CrackNames if a SAM context is
available, and asks the CrackNames services to parse the incoming
username and domain into a NT4 form, which can then be used in the
SAM.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:57 +11:00
Andrew Tridgell
0c944d07dc s4-sam: don't look in GC NCs for user accounts
We need to exclude GC partial replica naming contexts from SAM lookups

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:57 +11:00
Andrew Tridgell
aee896ad98 s4-kdc: don't look at global catalog NCs in the kdc
the kdc should not be looking for users in GC partial replicas, as
these users do not have all of the attributes needed for the KDC to
operate

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:57 +11:00
Andrew Tridgell
5717da34b9 s4-kdc: treat a kvno of 255 as unspecified
windows sometimes sends us a kvno of 255 for inter-domain trusts. We
don't yet know why it does this, but it seems that we need to treat
this as an unspecified kvno

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:57 +11:00
Andrew Tridgell
6356f4c255 s4-kcc: if we are a GC, auto-add partial replicas
when we are a global catalog server, the KCC needs to add partial
replicas for all domain partitions that we don't have copies of
2011-10-04 15:08:57 +11:00
Andrew Tridgell
278e44cf9f s4-dsdb: simplify samdb_is_gc()
we already have a function for returning the NTDS options
2011-10-04 15:08:57 +11:00
Andrew Tridgell
f469369fdf s4-dsdb: add the DSDB_CONTROL_PARTIAL_REPLICA when needed
when we are adding an object via DRS, we need to add the
DSDB_CONTROL_PARTIAL_REPLICA control if we are replicating a partial
replica, so ensure the partition module creates new NCs as partial
replicas
2011-10-04 15:08:57 +11:00
Andrew Tridgell
6b69ecd029 heimdal: handle referrals for 3 part DRSUAPI SPNs
This handles referrals for SPNs of the form
E3514235-4B06-11D1-AB04-00C04FC2DCD2/NTDSGUID/REALM, which are
used during DRS replication when we don't know the dnsHostName of the
target DC (which we don't know until the first replication from that
DC completes).

We use the 3rd part of the SPN directly as the realm name in the
referral.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:57 +11:00
Andrew Tridgell
b930b1e1fc s4-repl: try harder to find the right SPN in replication server
when doing DRS between domains, using the right SPN is essential so
the KDC can generate referrals to point us at the right DC.  We prefer
the GC/hostname/DNSDOMAIN form if possible, but if we can't find the
hostname then this changes the code that generates the target
principal name to use either the msDS-HasDomainNCs or hasMasterNCs
attributes to try to find the target DC domainname so we can use the
E3514235-4B06-11D1-AB04-00C04FC2DCD2/GUID/DNSDOMAIN SPN form.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:57 +11:00
Andrew Tridgell
60cbc98051 s4-dsdb: added new control DSDB_MODIFY_PARTIAL_REPLICA
this control tells the partition module that the DN being created is a
partial replica, so it should modify the @PARTITION object to add the
partialReplica attribute

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:57 +11:00
Andrew Tridgell
fb937afbec s4-join: enable cleanup on failed join
if a join fails, then cleanup the old records
2011-10-04 15:08:57 +11:00
Andrew Tridgell
efb3f45a81 s4-drs: added DSDB_REPL_FLAG_ADD_NCNAME to DsAddEntry call
we want new NCs to be created
2011-10-04 15:08:57 +11:00
Andrew Tridgell
1870fc49dd s4-dsdb: added DSDB_REPL_FLAG_ADD_NCNAME flag 2011-10-04 15:08:57 +11:00
Andrew Tridgell
50d6a76a14 s4-dsdb: fixed formatting of a debug message
another missing newline
2011-10-04 15:08:57 +11:00
Andrew Tridgell
d12309dc1a s4-partition: allow creation of uninstantiated partitions
this is needed for a subdomain join by a new NC. The NC is initially
uninstantiated
2011-10-04 15:08:56 +11:00
Andrew Tridgell
f52d8ca023 s4-dsdb: allow uninstantiated NC heads
this allows INSTANCE_TYPE_WRITE to be not set if
INSTANCE_TYPE_UNINSTANT is set
2011-10-04 15:08:56 +11:00
Andrew Tridgell
faf8581e38 s4-repl: support creation of new NCs via DsAddEntry
this adds a flag to dsdb_origin_objects_commit that tells it to create
a new NC based on the nCName in a crossRef object
2011-10-04 15:08:56 +11:00
Andrew Tridgell
df3cc35f74 s4-repl: fixed formatting of some debug messages 2011-10-04 15:08:56 +11:00
Andrew Tridgell
7d18241faa dns: added example python script for dnsserver protocol 2011-10-04 15:08:56 +11:00
Andrew Tridgell
57e30bc0cb dns: build python bindings for dnsserver RPC protocol 2011-10-04 15:08:56 +11:00
Andrew Tridgell
2fbdaab331 samba-tool: cope with GC compares in ldapcmp
the two base DNs do not need to match when doing GC replica compares
2011-10-04 15:08:56 +11:00
Andrew Tridgell
aed0d2e5eb samba-tool: added --full-sync and --sync-all options to samba-tool drs replicate 2011-10-04 15:08:56 +11:00
Andrew Tridgell
5d4f474b58 s4-dbchecker: fixed handling of DSDB DNs in dbcheck
we need to use the original value, as ldb.Dn() can't parse a DSDB
binary DN
2011-10-04 15:08:56 +11:00
Andrew Tridgell
ac581b3374 s4-dsdb: update callers to dsdb_convert_object_ex() 2011-10-04 15:08:56 +11:00
Andrew Tridgell
761fd4af2e s4-repl: update instanceType in partial_replica replication
when we receive objects to a partial replica, we need to change the
incoming instanceType to not include the INSTANCE_TYPE_WRITE
flag. Partial replicas unset this flag.
2011-10-04 15:08:56 +11:00
Andrew Tridgell
f37e81bbc5 s4-repl: add FULL_SYNC and PARTIAL_REPLICA flags
this sets the appropriate flags for replication with FULL_SYNC and
partial replica replications
2011-10-04 15:08:56 +11:00
Andrew Tridgell
bdc93190fe s4-dsdb: implement DSDB_REPL_FLAG_PRIORITISE_INCOMING
With this set, we accept changes even if they have the same tuple as
the local copy. This can be used by a FULL_SYNC replication to recover
a replica that is corrupt
2011-10-04 15:08:56 +11:00
Andrew Tridgell
f45147b2d9 s4-dsdb: disallow changes based on instanceType
if instanceType does not include INSTANCE_TYPE_WRITE, then disallow
changes to any replicated attributes. This ensures partial replicates
are not alterered
2011-10-04 15:08:56 +11:00
Andrew Tridgell
d3fa49663f s4-dsdb: added DSDB_REPL_FLAG* to replication
this allows the replication server to control replication via a set of
flags. Initial flags will allow control for partial replications and
full_sync support
2011-10-04 15:08:55 +11:00
Andrew Tridgell
0d2d6c94d2 s4-ldap-server: disallow all modifies on global catalog port 2011-10-04 15:08:55 +11:00
Kai Blin
5c890ad17f s4 provision: Set server role default when called from command line to 'dc' 2011-10-02 11:59:19 +02:00
Stefan Metzmacher
24d53ebe44 s4:smb_server/smb2: make sure we sign the final session setup
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Sep 29 18:59:54 CEST 2011 on sn-devel-104
2011-09-29 18:59:54 +02:00
David Disseldorp
08573c2b92 s4: add SMB2_FSCTL opcodes
Also, skip samba4.smb2.ioctl for now. Snapshots are not supported by
default.

Autobuild-User: David Disseldorp <ddiss@samba.org>
Autobuild-Date: Thu Sep 29 14:47:05 CEST 2011 on sn-devel-104
2011-09-29 14:47:05 +02:00
David Disseldorp
392fd0db38 s4-torture: add smb2 ioctl test suite
Currently only covers FSCTL_GET_SHADOW_COPY_DATA.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-09-29 13:14:21 +02:00
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
Stefan Metzmacher
b142c6a6e8 s4:selftest: skip flakey samba4.drs.repl_schema.python for now
UNEXPECTED(error): samba4.drs.repl_schema.python(vampire_dc).repl_schema.DrsReplSchemaTestCase.test_classWithCustomAttribute
REASON: _StringException: _StringException: Content-Type: text/x-traceback;charset=utf8,language=python
traceback
49F
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/testtools/runtest.py", line 128, in _run_user
    return fn(*args)
  File "/usr/lib/python2.6/dist-packages/testtools/testcase.py", line 368, in _run_test_method
    testMethod()
  File "/memdisk/autobuild/flakey/b12973/samba4/source4/torture/drs/python/repl_schema.py", line 179, in test_classWithCustomAttribute
    self._net_drs_replicate(DC=self.dnsname_dc2, fromDC=self.dnsname_dc1, nc_dn=self.schema_dn)
  File "/memdisk/autobuild/flakey/b12973/samba4/source4/torture/drs/python/drs_base.py", line 110, in _net_drs_replicate
    return self.check_output(cmd_line)
  File "bin/python/samba/tests/__init__.py", line 157, in check_output
    raise BlackboxProcessError(retcode, line, p.stdout.read(), p.stderr.read())
BlackboxProcessError: Command '/memdisk/autobuild/flakey/b12973/samba4/bin/samba-tool drs replicate -USAMBADOMAIN/Administrator%locDCpass1 --sync-forced LOCALVAMPIREDC.samba.example.com localdc.samba.example.com CN=Schema,CN=Configuration,DC=samba,DC=example,DC=com'; exit status 255; stdout: ''; stderr: 'ERROR(runtime): DsReplicaSync failed - (-1073741807, 'NT_STATUS_END_OF_FILE')
'
0

As this is an error, we have to skip it instead of adding it to the knowfail file

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Sep 17 08:43:31 CEST 2011 on sn-devel-104
2011-09-17 08:43:31 +02:00
Matthias Dieter Wallnöfer
4117c29138 s4:upgrade_from_s3 - old s3 versions < 3.4.x don't have a "state directory" param
Hence the "lock directory" path has to be used instead.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Sep 16 00:07:30 CEST 2011 on sn-devel-104
2011-09-16 00:07:30 +02:00
Günther Deschner
bd5445ee4f waf: restore libsmbclient handling.
This is a temporary solution to get libsmbclient installed properly as a library
(including symlinks and proper symbols). I was not able to make the old internal
library name 'libsmb/smbclient' work together with "realname" and/or "link_name".
Maybe one of the waf gurus has more ideas here.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Sep 15 15:31:59 CEST 2011 on sn-devel-104
2011-09-15 15:31:59 +02:00
Stefan Metzmacher
5879358437 s4:wrepl_server: return NT_STATUS_CONNECTION_DISCONNECTED
We should return the same in all places.

metze
2011-09-14 18:03:19 +02:00
Stefan Metzmacher
e6a2affe89 s4:libcli/wrepl: return NT_STATUS_CONNECTION_DISCONNECTED
We should return the same in all places.

metze
2011-09-14 18:03:19 +02:00
Stefan Metzmacher
af2e107d49 s4:lib/messaging: let irpc handles return NT_STATUS_CONNECTION_DISCONNECTED
We should return the same in all places.

metze
2011-09-14 18:03:18 +02:00
Stefan Metzmacher
afabf12251 s4:librpc/rpc: return NT_STATUS_CONNECTION_DISCONNECTED
We should return the same in all places.

metze
2011-09-14 18:03:18 +02:00
Andrew Bartlett
c6cf070df0 s4-s3-upgrade Improve samba-tool domain samba3upgrade behaviour
The --realm argument is again optional (the previous code would take the default
from the default smb.conf, not the one specified) and --targetdir is now a
named argument much like it is to provision.

We now test the --testparm option to ensure it behaves the way we expect.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Sep 13 16:30:31 CEST 2011 on sn-devel-104
2011-09-13 16:30:31 +02:00
Matthias Dieter Wallnöfer
4e87a8419c s4:upgrade_from_s3 - restore "get_testparm_var" method
This has accidentally been removed by commit 8268c2d4e2.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-13 14:53:24 +02:00
Andrew Bartlett
45c580575f script/librelease.sh: automate Samba4 alpha releases 2011-09-13 15:58:01 +10:00
Andrew Tridgell
94886797bc s4-subdomain: match windows form for trustAuthInOutBlob
Windows does not put a version element in the array

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-13 15:38:35 +10:00
Andrew Tridgell
588c50f11e s4-subdomain: fixed domain guid choice for subdomain join
We need to use the domain GUID that the server choose in the ncName
link

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-13 15:38:35 +10:00
Andrew Tridgell
877e48cac8 s4-subdomain: don't delete account DN not created in subdomain join
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-13 15:38:35 +10:00
Andrew Tridgell
b8c6e36b09 s4-subdomain: use a password length of 128
windows seems to use a fixed size for this password. It is possible
that windows servers can only handle one size, given we have observed
some strange behaviour from the windows kdc when we setup trusts

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-13 15:38:35 +10:00
Andrew Tridgell
4ff99264cb s4-join: fixed non-subdomain join
these two vars need to be initialised for general join

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-13 15:38:34 +10:00
Andrew Tridgell
eb0060766f s4-subdomain: fixed invocationID and hostIPs in subdomain join
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-13 15:38:34 +10:00
Andrew Bartlett
8c33036a37 s4-subdomain more work on sub-domain join
we can now create a subdomain of an existing windows domain using:

  samba-tool domain join sub.domain.dns.name subdomain

The ordering of the creation of the key records is quite tricky,
especially for the NTDSDSA object

Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2011-09-13 15:38:02 +10:00