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

28292 Commits

Author SHA1 Message Date
Kai Blin
c191ad7e13 s4 dns: Implement RFC-compatible update prescan 2011-12-17 02:46:08 +01:00
Kai Blin
02c9e18094 s4 dns: Update prerequisite checking conforming to RFC 2011-12-17 02:46:08 +01:00
Kai Blin
589d995276 s4 dns: Give better test output on RCODE mismatch 2011-12-17 02:46:08 +01:00
Kai Blin
8b82bad006 s4 dns: Move record lookup to dns_utils.c 2011-12-17 02:46:08 +01:00
Kai Blin
0922953b10 s4 dns: Implement dns record comparison function 2011-12-17 02:46:08 +01:00
Kai Blin
db2573eadf s4 dns: Implement dns name equality check 2011-12-17 02:46:08 +01:00
Kai Blin
a00709eff1 s4 dns: Fix some typos in comments and a whitespace 2011-12-17 02:46:08 +01:00
Stefan Metzmacher
714954c16f s4:torture/rap/printing: check smbcli_rap_netprintqgetinfo() WERR status
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Dec 17 01:09:32 CET 2011 on sn-devel-104
2011-12-17 01:09:32 +01:00
Stefan Metzmacher
35605fa0a3 s4:libcli/rap: the caller should get talloc children from call->ndr_pull_{param,data}
This should fix the flakey 'rap.printing.rap_printq_getinfo' test,
see https://git.samba.org/autobuild.flakey/2011-12-16-0022/samba4.stdout

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Dec 16 13:11:42 CET 2011 on sn-devel-104
2011-12-16 13:11:42 +01:00
Stefan Metzmacher
0e04cc2ea4 s4:libcli/rap: call->ndr_push_{param,data} can be talloc childs of 'call'
metze
2011-12-16 11:31:48 +01:00
Stefan Metzmacher
17781b1c86 s4:libcli/rap: use talloc_zero() and initialize everything
metze
2011-12-16 11:31:48 +01:00
Stefan Metzmacher
850b374ded s4:libcli/rap: remove unused members from struct rap_call
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Dec 16 10:53:42 CET 2011 on sn-devel-104
2011-12-16 10:53:42 +01:00
Stefan Metzmacher
d0ff10d40c s4:libcli/rap: initialize call->rcv_datalen
metze
2011-12-16 09:20:08 +01:00
Andrew Tridgell
fae42c1f41 pidfile: use set_close_on_exec()
this prevents a fd leak to child processes
2011-12-15 23:36:22 +01:00
Andrew Tridgell
9f4c3da734 s4-socket: use set_close_on_exec()
this prevents a fd leak to child processes
2011-12-15 23:36:22 +01:00
Günther Deschner
030ccc42b9 s4-smbtorture: make sure we can successfully run the schannel test against windows.
lsa lookupsids3/lookupnames4 is only available over schannel sealed
ncacn_ip_tcp.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Dec 14 17:28:29 CET 2011 on sn-devel-104
2011-12-14 17:28:29 +01:00
Andreas Schneider
be288b0c82 s4-torture: LookupSids3 is only available over NCACN_IP_TCP.
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Dec 14 15:39:58 CET 2011 on sn-devel-104
2011-12-14 15:39:58 +01:00
Andreas Schneider
e917c7b0ee s4-torture: Fix schannel test against win2k8. 2011-12-14 13:41:28 +01:00
Andreas Schneider
17d124490b s4-librpc: Fix NETLOGON credential chain with Windows 2008.
Windows Server 2008 returns NT_STATUS_DOWNGRADE_DETECTED if you call
netrServerAuthenticate2 during a domain join without setting the strong
keys flag (128bit crypto).

Only for NT4 we need to do a downgrade to the returned negotiate flags.

See also 0970369ca0.
2011-12-14 13:41:28 +01:00
Amitay Isaacs
010d6003e3 s4-netlogon: Revert patch f02e4ebfaf
DS_DNS_CONTROLLER bit is set if DC's domain name is dns name.

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Wed Dec 14 07:31:05 CET 2011 on sn-devel-104
2011-12-14 07:31:05 +01:00
Amitay Isaacs
0cee9b01d9 samba-tool: Fix DN for GPO entries 2011-12-14 15:57:32 +11:00
Amitay Isaacs
8b94a34bac samba-tool: gpo: fix a typo 2011-12-14 15:57:32 +11:00
Amitay Isaacs
d8bed322fc samba-tool: Remove duplicate code of dsacl to fsacl conversion
Use samba.ntacls.dsacl2fsacl() instead.
2011-12-14 15:57:32 +11:00
Amitay Isaacs
0a10b32602 setup: Fix phpldapadmin configuration for version 1.2.x 2011-12-14 15:57:32 +11:00
Günther Deschner
19411c9953 s4-smbtorture: fix some typos in schannel test.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Dec 14 02:52:54 CET 2011 on sn-devel-104
2011-12-14 02:52:54 +01:00
Günther Deschner
87be316c57 s4-smbtorture: avoid printf(); in schannel test.
Guenther
2011-12-14 01:18:04 +01:00
Günther Deschner
b550ead171 s4-smbtorture: remove trailing whitespace from schannel test.
Guenther
2011-12-14 01:18:04 +01:00
Andrew Bartlett
079d1572c2 s4-resolv: fix dns_ex so as to fail correctly when a name does not exist
Without this, netbios name lookups do not work, as we never fall back to them.

This caused segfaults from e38d97e042 to
251209bd6f and then name lookup failure
or timeouts until this patch.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Dec 14 01:16:37 CET 2011 on sn-devel-104
2011-12-14 01:16:37 +01:00
Andrew Bartlett
8a4b5cdfea s4-selftest: Add test of RPC to a netbios alias
This tries to ensure our netbios lookup code is still run.

Andrew Bartlett
2011-12-13 23:42:05 +01:00
Andrew Bartlett
abed96535e s4-selftest Give local.resolve a real name to look up 2011-12-13 23:42:05 +01:00
Stefan Metzmacher
fbcdaa6a45 s4:pydsdb: remove unused variable from py_dsdb_am_pdc()
metze
2011-12-13 12:36:34 +01:00
Amitay Isaacs
21424056bb s4-provision: Do not guess partition file names, use @PARTITION record
This is to avoid duplicating the logic of generating partition file
names. (partition file names are encoded partially as per RFC1738).

Also, use tdb_copy() instead of filesystem copy function to copy
database files, which guarantees correct database copy.

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Tue Dec 13 03:28:03 CET 2011 on sn-devel-104
2011-12-13 03:28:03 +01:00
Amitay Isaacs
7f50890cd6 s4-param: Added bin_dir(),sbin_dir() methods to get compiled in dirs 2011-12-13 00:55:32 +11:00
Amitay Isaacs
a648563cb7 s4-provision: Extract common utility routines in separate file 2011-12-13 00:55:32 +11:00
Amitay Isaacs
eee2191076 s4-provision: CN=MicrosoftDNS,CN=System container is in forest and not domain 2011-12-13 00:55:32 +11:00
Amitay Isaacs
f02e4ebfaf s4-cldap: Set DS_DNS_CONTROLLER bit if we are running RPC dnsserver
Till we have internal DNS server which appears in services, use
endpoint services to find out if we are running dns server.
2011-12-13 00:55:32 +11:00
Stefan Metzmacher
162975a6f3 s4:python/samba/join: set msDS-Behavior-Version to '4' 2008_R2 on the nTDSA object
This matches the values we set in provision.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Dec 12 19:16:13 CET 2011 on sn-devel-104
2011-12-12 19:16:13 +01:00
Andrew Bartlett
8581f0b429 HEIMDAL: Supply krb5_context to _krb5_internal_hmac to allow logging
Without this, log messages from any abort are not printed to
the samba logs.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Dec 12 14:34:16 CET 2011 on sn-devel-104
2011-12-12 14:34:16 +01:00
Andrew Bartlett
47a4388b91 s4-torture Do not use a fixed password for forest trust tests
It is much better to always use random passwords.

Andrew Bartlett
2011-12-12 12:57:08 +01:00
Andrew Bartlett
29635c93d7 s4-torture cope with servers earlier than Windows 2008
Only Win2008 started to support new encryption types.

Andrew Bartlett
2011-12-12 12:57:08 +01:00
Andrew Bartlett
8d3e86d6ae s4-torture Modify rpc.lsa.forest.trust test to progress further FL Win2003 R2
This modification is required to pass against a domain in functional
level Windows 2003 or later.

Andrew Bartlett
2011-12-12 12:57:08 +01:00
Andrew Bartlett
5ae24e1cc0 s4-torture: Fix comment 2011-12-12 12:57:08 +01:00
Andrew Bartlett
c9d929af8b s4-lsarpc handle more info levels in SetInfoTrustedDomain calls
This uses the very helpful conversion functions written for the s3 lsa server
and places these in common.

Andrew Bartlett
2011-12-12 12:57:07 +01:00
Andrew Bartlett
c79db40040 torture: do not reuse bindings between pipes
This avoids connecting to the netlogon server over \pipe\lsarpc

This works against windows because all pipes are implemented in the same
process, but not Samba4, and relying on this is not recommended in the WSPP docs.

Andrew Bartlett
2011-12-12 12:57:07 +01:00
Andrew Bartlett
e42e1ac089 s4-lsarpc Fix segfaults found by the samba4.rpc.lsa.forest test
This allows us to move this test to knownfail from skip
2011-12-12 12:57:07 +01:00
Rusty Russell
08019a0973 tdb2: don't use TDB2 versions of test tdb files.
Now tdb2 handles tdb1 files, we don't need most of commit
5eecc85423 which added TDB2 versions of
all the testing tdbs.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Mon Dec 12 06:33:44 CET 2011 on sn-devel-104
2011-12-12 06:33:44 +01:00
Stefan Metzmacher
4e57bb0b36 s4:libcli/smb2: mark a request as error if we can't ship it
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Dec  9 15:13:11 CET 2011 on sn-devel-104
2011-12-09 15:13:11 +01:00
Stefan Metzmacher
4486336bd8 s4:libcli/raw: mark a request as error if we can't ship it
metze
2011-12-09 13:38:37 +01:00
Matthias Dieter Wallnöfer
1b741b2bcc s4:dsdb/common/util.c - test LDB result against LDB_SUCCESS as we are always doing
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Dec  9 12:00:03 CET 2011 on sn-devel-104
2011-12-09 12:00:03 +01:00
Kai Blin
c01efc1207 s4 dns: Update requests with QCLASS != IN or ALL trigger NOTIMPLEMENTED errors
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Fri Dec  9 03:32:28 CET 2011 on sn-devel-104
2011-12-09 03:32:28 +01:00
Kai Blin
358a81eff5 s4 dns: Add test to prove two updates in one packet are a FORMERR 2011-12-09 01:59:28 +01:00
Kai Blin
509acc71dd s4 dns: More explicitly use the first question of an update packet only 2011-12-09 01:59:28 +01:00
Kai Blin
3fbb76c119 s4 dns: Get rid of const qualifier for prereqs, we do need to allocate those 2011-12-09 01:59:28 +01:00
Jelmer Vernooij
85f8d97f51 Revert "Install (platform-independent) python scripts to the PYTHONDIR rather than PYTHONARCHDIR."
This reverts commit de4b8943bf.

PYTHONDIR and PYTHONARCHDIR are both incorrect - they're the
distribution's python locations, rather than the python locations for
third party applications. For the moment, using PYTHONARCHDIR seems
better though, because it works around an issue on Fedora/RedHat.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Fri Dec  9 01:58:50 CET 2011 on sn-devel-104
2011-12-09 01:58:50 +01:00
Jelmer Vernooij
31eba612f4 Add test for PEP8 - currently all errors are ignored, but we warn about them - and can ratchet if we want to.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Dec  8 23:44:10 CET 2011 on sn-devel-104
2011-12-08 23:44:10 +01:00
Jelmer Vernooij
e76c981c80 samba.drs_utils: Use new style classes and exceptions, fix formatting of docstrings to make pydoctor happy. 2011-12-08 20:36:07 +01:00
Jelmer Vernooij
452d1ef8ef samba.kcc_utils: Fix formatting to match PEP8, make pydoctor happy. 2011-12-08 20:36:07 +01:00
Jelmer Vernooij
a47970cae6 Add tests for srvsvc python interface. Thanks Dhananjay Sathe
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Dec  8 04:57:52 CET 2011 on sn-devel-104
2011-12-08 04:57:52 +01:00
Jelmer Vernooij
8878949ff5 selftest: Some extra assertions. 2011-12-08 03:24:27 +01:00
Andrew Tridgell
86338ab551 dbcheck: cope with objects disappearing during checking
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Dec  8 03:23:49 CET 2011 on sn-devel-104
2011-12-08 03:23:49 +01:00
Dave Craft
819f11285d samba_kcc NTDSConnection translation
This is an advancement of samba_kcc to compute and
commit the modification of a repsFrom on an NC Replica.
The repsFrom is computed according to the MS tech spec
for implied replicas of NTDSConnections.  Proper maintenance
of (DRS options, schedules, etc) from a NTDSConnection are now
all present.  New classes for inter-site transports, sites,
and repsFrom) are now present in kcc_utils.py.  Substantively
this gets intra-site topology generation functional by committing
the repsFrom that were computed from the DSA graph implemented in
prior drops of samba_kcc

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-12-08 11:48:17 +11:00
Dave Craft
0a4746a200 Invocation of samba_kcc from KCC task
Modification to periodic and explicit invocation
paths of the KCC topology generation code.  Managed
via samba_runcmd_send() API.  The samba_kcc script
is invoked if (kccsrv:samba_kcc = true) appears in smb.conf

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-12-08 11:48:17 +11:00
Dave Craft
0a181217bd Add subreq and status to kcc_service struct
The subreq and status fields in the kcc_service struct
are added for execution management of the external samba_kcc
python script.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-12-08 11:48:17 +11:00
Andrew Bartlett
2da506ee66 s4-selftest re-enable nsstest on libnss_winbind.so 2011-12-07 03:09:08 +01:00
Andrew Bartlett
8d3e92d043 s4-kdc: only build hdb plugin if we build against system Heimdal
It is not safe to have a system kadmin use our plugin if we do not
share the same libkrb5.

Andrew Bartlett
2011-12-07 03:09:08 +01:00
Andrew Bartlett
650bd5e718 s4-dnsupdate: Do not attempt to add the PDC names if we are not a PDC 2011-12-07 03:09:08 +01:00
Andrew Bartlett
d8f98933fd pydsdb: provide a am_pdc hook like am_rodc to python scripts 2011-12-07 03:09:08 +01:00
Andrew Bartlett
dbbb626dc0 s4-dns Use match-by-key in GSSAPI server if principal is not specified
This allows dlz_bind9 to match on exactly the same key as bind9 itself

Andrew Bartlett

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Wed Dec  7 02:20:10 CET 2011 on sn-devel-104
2011-12-07 02:20:10 +01:00
Andrew Bartlett
0344e7278b auth: Allow a NULL principal to be obtained from the credentials
This is important when trying to let GSSAPI search the keytab.

Andrew Bartlett
2011-12-07 10:43:52 +11:00
Amitay Isaacs
b9f4febd40 dlz_bind9: Add command line options for URL and debug
To specify debug level, use -d <level> in named.conf.
To specify sam db, use -H <path/to/sam.ldb> in named.conf.

The default log level is set to 0. The log level specified in smb.conf
is not used. To set log level, use -d option.
2011-12-07 10:43:52 +11:00
Amitay Isaacs
de9a4ca831 dlz_bind9: Set debugging output to stderr 2011-12-07 10:43:52 +11:00
Amitay Isaacs
ce19bfcc6b dlz_bind9: Use client supplied credentials for DNS record update
This creates the DNS records with correct owner and group settings.
2011-12-07 10:43:31 +11:00
Amitay Isaacs
d3d365daab dlz_bind9: For creating a child entry, use only SEC_ADS_CREATE_CHILD
The member servers in AD do not have access to modify the parent, but
do have access to create child DNS records.
2011-12-07 10:41:26 +11:00
Jelmer Vernooij
de4b8943bf Install (platform-independent) python scripts to the PYTHONDIR rather than PYTHONARCHDIR. 2011-12-06 21:08:15 +01:00
Matthieu Patou
5bfd6251eb s4-drs: do not try to contact for replication servers that are not anymore in reps*
Servers connection can be removed from repsTo and respFrom either due to
DC demote or topology change by the KCC, if a server is removed from the
reps* it must be effectivly removed from the list of server that we will
contact for getNcChanges and for replicaSync.

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Mon Dec  5 19:56:09 CET 2011 on sn-devel-104
2011-12-05 19:56:09 +01:00
Matthieu Patou
059523e203 s4-resolver: do not use all the A and AAAA records, those after a NS are not the one we want to use 2011-12-05 18:23:08 +01:00
Matthieu Patou
2f8a84bb7b s4-drs: mark WERR_DS_DRA_BUSY as a non error in DsReplicaUpdateRefs 2011-12-05 18:23:07 +01:00
Matthieu Patou
105d388c9b s4: add blackbox test for the demote function 2011-12-05 18:23:07 +01:00
Matthieu Patou
a8c89fa7d2 samba-tool: refuse to demote if the current DC has still roles 2011-12-05 18:23:07 +01:00
Matthieu Patou
f44e1a753a samba-tool: add a function to cleanly demote a DC
samba-tool domain demote allow the local DC to properly demote against
Microsoft and Samba DC.
2011-12-05 18:23:07 +01:00
Matthieu Patou
fc42b0ab41 s4-python: factorize the definition of get_dsServiceName 2011-12-05 18:23:07 +01:00
Matthieu Patou
093dac4331 s4-python: externalize some function to the drs_utils module so that they can be reused 2011-12-05 18:23:07 +01:00
Matthieu Patou
9e3ee2bf6a s4-python: rename conflicting variable with the import option 2011-12-05 18:23:06 +01:00
Kai Blin
c326b37358 s4 dns: Test SOA queries
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Sat Dec  3 20:52:51 CET 2011 on sn-devel-104
2011-12-03 20:52:51 +01:00
Jelmer Vernooij
05bc4de083 Revert making public of the samba-module library.
This library was tiny - containing just two public functions than were
themselves trivial. The amount of overhead this causes isn't really worth the
benefits of sharing the code with other projects like OpenChange. In addition, this code
isn't really generically useful anyway, as it can only load from the module path
set for Samba at configure time.

Adding a new library was breaking the API/ABI anyway, so OpenChange had to be
updated to cope with the new situation one way or another. I've added a simpler
(compatible) routine for loading modules to OpenChange, which is less than 100 lines of code.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Dec  3 08:36:33 CET 2011 on sn-devel-104
2011-12-03 08:36:30 +01:00
Andrew Tridgell
3c4af39aa5 s4-ntvfs: added allow_override check based on use of NT ACL
This disables the posix permission override if the calculated
permissions did not come from a NT ACL.

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Dec  1 05:14:49 CET 2011 on sn-devel-104
2011-12-01 05:14:49 +01:00
Andrew Tridgell
d1274f7f62 s4-ntvfs: fixed a unix ACL mapping bug
the ACL mapping code was incorrectly allowing creation of directories
in some situations where it should be denied by the unix permissions
2011-12-01 13:40:54 +11:00
Jelmer Vernooij
7c1a884396 s4-tests: Use long option names in test list script, to prevent 'eating' --list argument when e.g. is not set. 2011-11-30 22:58:04 +01:00
Jelmer Vernooij
64cfb79cd5 s4-testlist: Write diagnostic info to stderr, and purely test info to stdout. 2011-11-30 22:58:04 +01:00
Matthias Dieter Wallnöfer
456c69f95e s4:lib/tls - call "gnutls_transport_set_lowat" only on GNUTLS < 3.0
This function call together with the lowat feature has been removed in release
3.0 as described in this mailing list post:
http://old.nabble.com/gnutls_transport_set_lowat-deprecated-td32554230.html.

Since we do not make any use of lowat (esprimed by each function call)
we are free to simply omit it on v3.0 and later.

This addresses bug #8537.

Reviewed by: abartlet + metze

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Wed Nov 30 20:11:14 CET 2011 on sn-devel-104
2011-11-30 20:11:14 +01:00
Stefan Metzmacher
de553b52f2 s4:gensec/spnego: only try the mechs that match the client given ones
Windows-Members of NT4/Samba3 domains, send

MechTypes:
1.3.6.1.4.1.311.2.2.10 [NTLMSSP]
1.2.840.48018.1.2.2    [krb5 broken]
1.2.840.113554.1.2.2   [krb5]

MechToken for NTLMSSP.

This patch makes sure we start NTLMSSP with the given MechToken,
instead of trying to pass the NTLMSSP MechToken to the krb5 backend
first. As that would fail the authentication with an error
instead of trying fallbacks.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Nov 30 17:03:29 CET 2011 on sn-devel-104
2011-11-30 17:03:29 +01:00
Stefan Metzmacher
4afbda221c s4:libcli/raw: implement on top of smbXcli_conn/req
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Nov 30 15:13:36 CET 2011 on sn-devel-104
2011-11-30 15:13:36 +01:00
Stefan Metzmacher
99ef6a4bec s4:libcli: do the nbss session request within smbcli_sock_connect_*()
metze
2011-11-30 13:41:09 +01:00
Stefan Metzmacher
52dd549eb6 s4:libcli/raw: remove unused functions
metze
2011-11-30 13:41:08 +01:00
Stefan Metzmacher
b21f344079 s4:libcli: use smbcli_sock_connect() in smbcli_socket_connect()
metze
2011-11-30 13:41:08 +01:00
Stefan Metzmacher
4877be53df s4:libcli: move smbcli_transport_establish() logic into smbcli_socket_connect()
metze
2011-11-30 13:41:08 +01:00
Stefan Metzmacher
b51c92a903 s4:libcli: convert smbcli_transport_connect_* to tevent_req
metze
2011-11-30 13:41:08 +01:00
Stefan Metzmacher
706e10820d s4:lib/socket: add socket_connect_multi_ex_*
This add an async establish hook, that gets called
before a connection success is detected.

This can be used to do a NBT session request
and it makes sure that we don't cancel the connection
on port 445, just because the tcp connect on port
139 worked.

metze
2011-11-30 13:41:08 +01:00
Andrew Bartlett
12ce07e53b s4-kdc: Add hdb plugin for samba4, to allow kadmin to work
This will help users who are used to the kadmin interface, and could
be extended to import existing MIT or Heimdal keys into a Samba4 AD
domain.

To use, add to your krb5.conf

[kdc]

database = {
   dbname = samba4:
}

or

[kdc]

database = {
   dbname = samba4:/usr/local/samba/etc/smb.conf
}

And copy hdb_samba4.so from PREFIX/modules/hdb to your Heimdal lib directory

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Nov 30 03:22:11 CET 2011 on sn-devel-104
2011-11-30 03:22:11 +01:00
Stefan Metzmacher
6b5cfa39f2 s4:libcli/raw: copy smbcli_transport_connect_* to clisocket.c
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Nov 29 17:34:52 CET 2011 on sn-devel-104
2011-11-29 17:34:52 +01:00
Stefan Metzmacher
b3d3395e01 s4:libcli/raw: add transport->ev as copy of transport->socket->event.ctx
We'll remove transport->socket soon, but removing transport->ev
will take a bit longer.

metze
2011-11-29 16:00:08 +01:00
Stefan Metzmacher
511dc9358d s4:torture: use tctx->ev as event context for polling
metze
2011-11-29 16:00:08 +01:00
Stefan Metzmacher
46f0b73c8a s4:gentest: get the tid from the smbcli_tree struct
metze
2011-11-29 16:00:08 +01:00
Stefan Metzmacher
04fa5b4957 s4:libcli/smb2: make sure only one idle event runs at a time
metze
2011-11-29 16:00:08 +01:00
Stefan Metzmacher
f9f261cb60 s4:python: add --machinepass option to 'samba-tool domain join'
metze
2011-11-29 09:21:25 +01:00
Stefan Metzmacher
4edbc719e5 s4:python/samba/join.py: add optional 'machinepass' parameter to join_*()
metze
2011-11-29 09:21:25 +01:00
Stefan Metzmacher
948f091a22 s4:python/samba/join.py: add optional 'machinepass' parameter to class dc_join
metze
2011-11-29 09:21:25 +01:00
Stefan Metzmacher
f8fbc4163b s4:py_net: add optional 'machinepass' parameter to py_net_join_member()
metze
2011-11-29 09:21:25 +01:00
Stefan Metzmacher
fe69c589e8 s4:libnet: make it possible to join with a given machine password
metze
2011-11-29 09:21:25 +01:00
Stefan Metzmacher
677f5246f1 s4:libnet/py_net: ZERO_STRUCT() struct libnet_Join_member in py_net_join_member()
metze
2011-11-29 09:21:25 +01:00
Stefan Metzmacher
1764607150 s4:torture/rpc: use talloc_zero() in torture_join_domain()
metze
2011-11-29 09:21:25 +01:00
Stefan Metzmacher
5baa44345f s4:libnet: use talloc_zero(struct libnet_JoinDomain) in libnet_Join_member()
metze
2011-11-29 09:21:25 +01:00
Andrew Bartlett
2bff209128 s4-samba-tool: Add --principal argument to samba-tool domain exportkeytab
This allows only a particular principal to be exported to the keytab.
This is useful when setting up unix servers in a Samba controlled
domain.

Based on a request by Gémes Géza <geza@kzsdabas.hu>

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Nov 29 09:20:55 CET 2011 on sn-devel-104
2011-11-29 09:20:54 +01:00
Amitay Isaacs
8eef716598 s4-provision: Fix the security ace for DnsAdmins group on DNS records
Find the objectSid for DnsAdmins group and use that instead of a fixed sid.

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Tue Nov 29 07:38:06 CET 2011 on sn-devel-104
2011-11-29 07:38:05 +01:00
Amitay Isaacs
2e4bf8bfcd s4-repl: Check if GC SPN exists before using it for replication
Sometimes windows DC will set up dNSHostname before setting up
GC SPN and that causes replication errors since samba tries to
use GC SPN, which does not yet exist locally.

Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2011-11-29 16:00:36 +11:00
Amitay Isaacs
1e935d1bdc s4-provision: Make BIND9_DLZ as the default backend for DNS 2011-11-29 16:00:36 +11:00
Amitay Isaacs
7ac5c5061e dlz_bind9: Added access check to verify dynamic update
This creates session info from kerberos ticket and verifies if
the signer has write access to a particular DN corresponding
to the name in dynamic update.

Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2011-11-29 16:00:36 +11:00
Amitay Isaacs
dcc5a7e1f2 dlz_bind9: Use the sam database in dns/ as default
This change is introduced to access samdb copy directly, rather
than over ildap. The advantage is that the samba server does not
need to be running for bind9 to start.
2011-11-29 16:00:36 +11:00
Amitay Isaacs
341979cc9a s4-provision: Create a samdb copy for access by dlz_bind9 module
This creates a copy of rootdse, configuration and schema partitions
for dlz_bind9 use in dns/ directory.  Since dlz_bind9 requires write
access to DNS partitions (DomainDnsZones and ForestDnsZones), those
partitions are hard-linked (or symlinked) to the actual partitions.
An empty domain partition is created so samdb layer can work.
2011-11-29 16:00:36 +11:00
Amitay Isaacs
6822eae323 s4-provision: Extract security descriptors in separate file
Need to use domain security descriptor from sambadns.py also.
2011-11-29 16:00:36 +11:00
Amitay Isaacs
5184fc8893 s4-test: Remove metadata and ldb.d directory on clean up
When using partitions, metadata.tdb automatically gets created in
${prefix}ldb.d/ directory. To correctly clean up check if metadata.tdb
exists, then remove metadata.tdb and directory.
2011-11-29 16:00:36 +11:00
Amitay Isaacs
13545d781b s4-samdb: seqence_number() operation must be in a transaction 2011-11-29 16:00:36 +11:00
Amitay Isaacs
49926a2ac6 s4-dsdb: Added metadata to partition module for global sequence number
This adds support for global sequence number which is independent of
partition information.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-11-29 16:00:35 +11:00
Amitay Isaacs
349c54528b s4-dsdb: use dsdb_module_extended instead of duplicate code
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-11-29 16:00:35 +11:00
Amitay Isaacs
422fcbbe72 s4-dsdb: Return ldb_result context in dsdb_module_extended
The result of the extended operation is now available in the calling
routine.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-11-29 16:00:35 +11:00
Amitay Isaacs
c199b35dd4 s4-dsdb: Remove LDB_SEQ_HIGHEST_TIMESTAMP sequence number support
This was a hack for LDAP backends to store a sequence number as a
timestamp. It is still supported in standalone ldb tdb backend.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-11-29 16:00:35 +11:00
Matthias Dieter Wallnöfer
0e526062a4 s4:torture/ldap/cldap.c - remove the "test_cldap_netlogon_flag_ds_dns_forest" test
The test is wrong since the DNS_* (DS_DNS_CONTROLLER, DS_DNS_DOMAIN,
DS_DNS_FOREST_ROOT) flags are never set on the plain CLDAP pipe. They
get added only over the DsRGetDCName* calls over NETLOGON RPC.

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

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Nov 27 16:23:27 CET 2011 on sn-devel-104
2011-11-27 16:23:27 +01:00
Matthias Dieter Wallnöfer
6b63d7e618 s4:selftest/test_samba_tool.sh - add a basic unit test for the new "domain info" command
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-11-27 12:51:57 +01:00
Matthias Dieter Wallnöfer
f57f009bc6 samba-tool: domain info - add basic exception handling
It is nicer to get an error message rather than a stacktrace on wrong IP
addresses.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-11-27 12:51:57 +01:00
Matthieu Patou
08ca7d1634 samba-tool: add a domain info command to get basic info
Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-11-27 12:51:56 +01:00
Matthias Dieter Wallnöfer
521c708fe4 s4:netlogon RPC server - DsRGetDcNameEx - set the DNS name flags correctly
The rules are explained in MS-NRPC 2.2.1.2.1.

Patch inspired by Matthieu Patou.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-11-27 12:51:54 +01:00
Matthieu Patou
1770dafafd s4-netlogon: return WERR_NO_SUCH_DOMAIN instead of WERR_DS_UNAVAILABLE if we are unable to translate the domain to a dn
Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-11-27 12:50:49 +01:00
Matthias Dieter Wallnöfer
b89374934f s4:cldap_server/netlogon.c - DS_SERVER_CLOSEST handling
DS_SERVER_CLOSEST is only set when the client and server site coincide.

MS-NRPC 2.2.1.2.1

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-11-27 12:50:48 +01:00
Matthias Dieter Wallnöfer
fc26e29f8e s4:netcmd/common.py: add a "netcmd" function to do a cldap netlogon request
This is useful for a new "samba-tool domain info" command.

Patch inspired by Matthieu Patou.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-11-27 12:50:06 +01:00
Matthias Dieter Wallnöfer
179bf9b51c s4:libnet/py_net.c: "py_net_finddc" - add an "address" parameter
This is useful for a new "samba-tool domain info" command.

Patch inspired by Matthieu Patou.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-11-26 10:34:58 +01:00
Matthias Dieter Wallnöfer
dec1435a42 s4:libnet/py_net.c - initialise optional keyword arguments
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-11-26 10:32:59 +01:00
Matthias Dieter Wallnöfer
ad19aa6331 s4:libcli/finddcs_cldap.c - let "finddcs_cldap" work either with the IP address or the domain name
This will be useful for a new "samba-tool domain info" command.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-11-26 10:26:52 +01:00
Matthieu Patou
9e6c88bda5 smbtorture: avoid sigsev if the password is not correct
Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-11-26 10:17:39 +01:00
Matthias Dieter Wallnöfer
83c039378b s4:update_keytab LDB module - no need to filter for the DN
We launch a search request with base scope on exactly the same DN (see
downwards).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-11-26 10:17:18 +01:00
Stefan Metzmacher
4958d7cb44 s4:libcli/smb2: use talloc_zero() in smb2_request_init()
metze
2011-11-24 19:02:33 +01:00
Stefan Metzmacher
f132ad32cc s4:libcli/smb2: fix compiler warning in smb2_push_o16s16_string()
metze
2011-11-24 19:02:33 +01:00
Stefan Metzmacher
300343d16c s4:libcli/smb2: implement on top of smbXcli_conn/req
metze
2011-11-24 19:02:33 +01:00
Stefan Metzmacher
378c21a72a s4:torture/smb2: use tctx->ev as event context for polling
metze
2011-11-24 19:02:33 +01:00
Kai Blin
9f1eb8ab8e s4 dns: Test QCLASS_NONE query
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Thu Nov 24 14:10:45 CET 2011 on sn-devel-104
2011-11-24 14:10:44 +01:00
Kai Blin
8685a35e9c s4 dns: Test QTYPE_ALL query 2011-11-24 12:35:08 +01:00
Kai Blin
16d9ebb396 s4 dns: Check more of the returned values for the A query 2011-11-24 12:35:08 +01:00
Kai Blin
1a599da550 s4 dns: Move dns_transaction_udp to other helper functions 2011-11-24 12:35:08 +01:00
Andrew Tridgell
b16f539e0e s4-dns: added --no-credentials option to samba_dnsupdate
this is for a user who is doing DNS updates via key files rather than
GSSAPI. This allows the update to go through without a kerberos error

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Nov 22 06:34:59 CET 2011 on sn-devel-104
2011-11-22 06:34:59 +01:00
Jeremy Allison
3e6e1aed94 Fix a bunch of "warning: variable ‘XXXX’ set but not used [-Wunused-but-set-variable]" warnings from the new gcc.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Nov 21 23:39:08 CET 2011 on sn-devel-104
2011-11-21 23:39:08 +01:00
Günther Deschner
1781415196 s4-smbtorture: add ndr test for nbt_netlogon_packet to avoid future regressions.
Guys, we really should make sure to always add ndr tests like this whenever we
change some sensitive libndr or handmarshalling bits.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Sun Nov 20 23:10:39 CET 2011 on sn-devel-104
2011-11-20 23:10:39 +01:00