mat/samba.git
12 years agoConvert smbclient to using NtCreateX by preference, fall back to openX on
Jeremy Allison [Fri, 2 Dec 2011 18:11:17 +0000 (10:11 -0800)]
Convert smbclient to using NtCreateX by preference, fall back to openX on
'not implemented' or similar error.

12 years agos3: Fix some nonblank line endings
Volker Lendecke [Fri, 2 Dec 2011 16:40:33 +0000 (17:40 +0100)]
s3: Fix some nonblank line endings

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Dec  2 20:39:33 CET 2011 on sn-devel-104

12 years agos3: Remove unused dbwrap_record_get_private_data
Volker Lendecke [Fri, 2 Dec 2011 16:39:13 +0000 (17:39 +0100)]
s3: Remove unused dbwrap_record_get_private_data

db_record->private_data is for backends which can include dbwrap_private.h
anyway.

12 years agos3-winbind: Remove unused keys from list.
Andreas Schneider [Fri, 2 Dec 2011 14:44:02 +0000 (15:44 +0100)]
s3-winbind: Remove unused keys from list.

DR and DE have been removed with
0834574fdd6b469797b3b6a4edd45f321b9b9971.

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Fri Dec  2 19:02:45 CET 2011 on sn-devel-104

12 years agoAdd the "backup" toggle command to smbclient. In order for this to be
Jeremy Allison [Thu, 1 Dec 2011 21:47:12 +0000 (13:47 -0800)]
Add the "backup" toggle command to smbclient. In order for this to be
really useful we need to change to using NTCreateX opens by default in
cli_open() and fall back to old OpenX calls instead of doing it the
other way around.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Dec  2 00:23:13 CET 2011 on sn-devel-104

12 years agoAfter a discussion with Volker, sdd a backup_intent state to the client struct.
Jeremy Allison [Thu, 1 Dec 2011 21:24:22 +0000 (13:24 -0800)]
After a discussion with Volker, sdd a backup_intent state to the client struct.

This causes the backup_intent flags to be added to findfirst/findnext
and ntcreate/nttrans_create calls.

cli_set_backup_intent() sets the flag and returns the old value of
its state.

12 years agos4-ntvfs: added allow_override check based on use of NT ACL
Andrew Tridgell [Thu, 1 Dec 2011 02:40:49 +0000 (13:40 +1100)]
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

12 years agos4-ntvfs: fixed a unix ACL mapping bug
Andrew Tridgell [Thu, 1 Dec 2011 01:59:23 +0000 (12:59 +1100)]
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

12 years agoselftest: Fix typo in socket wrapper test.
Jelmer Vernooij [Wed, 30 Nov 2011 21:57:18 +0000 (22:57 +0100)]
selftest: Fix typo in socket wrapper test.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Dec  1 00:30:00 CET 2011 on sn-devel-104

12 years agoselftest: Drop broken and unused Kvm target.
Jelmer Vernooij [Wed, 30 Nov 2011 19:42:58 +0000 (20:42 +0100)]
selftest: Drop broken and unused Kvm target.

12 years agoselftest: Don't acquire target when --list was specified.
Jelmer Vernooij [Wed, 30 Nov 2011 19:42:14 +0000 (20:42 +0100)]
selftest: Don't acquire target when --list was specified.

12 years agoUpdate ldb API sigs.
Jelmer Vernooij [Wed, 30 Nov 2011 19:22:47 +0000 (20:22 +0100)]
Update ldb API sigs.

12 years agoBump ldb version to 1.1.4 after introduction of ldb_module_error.
Jelmer Vernooij [Wed, 30 Nov 2011 17:46:31 +0000 (18:46 +0100)]
Bump ldb version to 1.1.4 after introduction of ldb_module_error.

12 years agoselftest: Don't generate subunit file when writing subunit to stdout.
Jelmer Vernooij [Sun, 27 Nov 2011 20:50:23 +0000 (21:50 +0100)]
selftest: Don't generate subunit file when writing subunit to stdout.

12 years agoselftest: Prevent error about unfinished test command when using --list.
Jelmer Vernooij [Sun, 27 Nov 2011 20:07:07 +0000 (21:07 +0100)]
selftest: Prevent error about unfinished test command when using --list.

12 years agos4-tests: Use long option names in test list script, to prevent 'eating' --list argum...
Jelmer Vernooij [Sun, 27 Nov 2011 20:05:09 +0000 (21:05 +0100)]
s4-tests: Use long option names in test list script, to prevent 'eating' --list argument when e.g.  is not set.

12 years agotestr: Use test lists.
Jelmer Vernooij [Sun, 27 Nov 2011 18:59:01 +0000 (19:59 +0100)]
testr: Use test lists.

12 years agos4-testlist: Write diagnostic info to stderr, and purely test info to stdout.
Jelmer Vernooij [Sun, 27 Nov 2011 18:58:30 +0000 (19:58 +0100)]
s4-testlist: Write diagnostic info to stderr, and purely test info to stdout.

12 years agoselftest: Don't use fancy subunit formatters when generating a test list.
Jelmer Vernooij [Sun, 27 Nov 2011 18:57:53 +0000 (19:57 +0100)]
selftest: Don't use fancy subunit formatters when generating a test list.

12 years agoselftest: Don't write subunit output in --list mode.
Jelmer Vernooij [Sun, 27 Nov 2011 18:53:35 +0000 (19:53 +0100)]
selftest: Don't write subunit output in --list mode.

12 years agoselftesthelpers: write warnings to stderr rather than stdout.
Jelmer Vernooij [Sun, 27 Nov 2011 18:52:57 +0000 (19:52 +0100)]
selftesthelpers: write warnings to stderr rather than stdout.

12 years agos3: Attempt to fix the vfs_commit module
Volker Lendecke [Wed, 30 Nov 2011 17:51:27 +0000 (18:51 +0100)]
s3: Attempt to fix the vfs_commit module

This bug went in in 2007. I wonder how much this module is actually used....

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Nov 30 21:46:09 CET 2011 on sn-devel-104

12 years agos4:lib/tls - call "gnutls_transport_set_lowat" only on GNUTLS < 3.0
Matthias Dieter Wallnöfer [Mon, 28 Nov 2011 19:55:37 +0000 (20:55 +0100)]
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

12 years agos3-waf: fix the build with CTDB_CONTROL_CHECK_SRVIDS.
Günther Deschner [Wed, 30 Nov 2011 15:34:52 +0000 (16:34 +0100)]
s3-waf: fix the build with CTDB_CONTROL_CHECK_SRVIDS.

Volker, Michael, please check.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Nov 30 18:37:29 CET 2011 on sn-devel-104

12 years agos4:gensec/spnego: only try the mechs that match the client given ones
Stefan Metzmacher [Wed, 30 Nov 2011 14:17:05 +0000 (15:17 +0100)]
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

12 years agos4:libcli/raw: implement on top of smbXcli_conn/req
Stefan Metzmacher [Fri, 23 Sep 2011 06:35:17 +0000 (08:35 +0200)]
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

12 years agos4:libcli: do the nbss session request within smbcli_sock_connect_*()
Stefan Metzmacher [Wed, 30 Nov 2011 07:50:11 +0000 (08:50 +0100)]
s4:libcli: do the nbss session request within smbcli_sock_connect_*()

metze

12 years agos4:libcli/raw: remove unused functions
Stefan Metzmacher [Wed, 30 Nov 2011 07:35:33 +0000 (08:35 +0100)]
s4:libcli/raw: remove unused functions

metze

12 years agos4:libcli: use smbcli_sock_connect() in smbcli_socket_connect()
Stefan Metzmacher [Wed, 30 Nov 2011 07:33:29 +0000 (08:33 +0100)]
s4:libcli: use smbcli_sock_connect() in smbcli_socket_connect()

metze

12 years agos4:libcli: move smbcli_transport_establish() logic into smbcli_socket_connect()
Stefan Metzmacher [Wed, 30 Nov 2011 06:17:31 +0000 (07:17 +0100)]
s4:libcli: move smbcli_transport_establish() logic into smbcli_socket_connect()

metze

12 years agos4:libcli: convert smbcli_transport_connect_* to tevent_req
Stefan Metzmacher [Tue, 29 Nov 2011 10:57:11 +0000 (11:57 +0100)]
s4:libcli: convert smbcli_transport_connect_* to tevent_req

metze

12 years agos4:lib/socket: add socket_connect_multi_ex_*
Stefan Metzmacher [Tue, 29 Nov 2011 15:25:03 +0000 (16:25 +0100)]
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

12 years agos3-ctdb: Make use of CTDB_CONTROL_CHECK_SRVIDS
Volker Lendecke [Mon, 31 Oct 2011 15:30:38 +0000 (16:30 +0100)]
s3-ctdb: Make use of CTDB_CONTROL_CHECK_SRVIDS

This should be a lot quicker than PROCESS_EXISTS followed by looking at
serverid.tdb

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Nov 30 12:47:27 CET 2011 on sn-devel-104

12 years agoFix bug 8636 - When returning an ACL without SECINFO_DACL requested, we still set...
Jeremy Allison [Wed, 30 Nov 2011 00:31:18 +0000 (16:31 -0800)]
Fix bug 8636 - When returning an ACL without SECINFO_DACL requested, we still set SEC_DESC_DACL_PRESENT in the type field.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Nov 30 04:59:07 CET 2011 on sn-devel-104

12 years agos4-kdc: Add hdb plugin for samba4, to allow kadmin to work
Andrew Bartlett [Tue, 29 Nov 2011 20:45:25 +0000 (07:45 +1100)]
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

12 years agos3:dbwrap_tdb: pass NTSTATUS code further up from db_tdb_fetch_parse in db_tdb_fetch()
Michael Adam [Tue, 29 Nov 2011 21:36:48 +0000 (22:36 +0100)]
s3:dbwrap_tdb: pass NTSTATUS code further up from db_tdb_fetch_parse in db_tdb_fetch()

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Nov 30 01:46:31 CET 2011 on sn-devel-104

12 years agobuild: TDB_ERR_NESTING is used unconditionally
Andrew Bartlett [Thu, 24 Nov 2011 12:07:21 +0000 (23:07 +1100)]
build: TDB_ERR_NESTING is used unconditionally

Therefore, do not bother doing an autoconf test looking for it.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Nov 30 00:08:18 CET 2011 on sn-devel-104

12 years agoFix bug 8631 - POSIX ACE x permission becomes rx following mapping to and from a...
Jeremy Allison [Tue, 29 Nov 2011 19:55:39 +0000 (11:55 -0800)]
Fix bug 8631 - POSIX ACE x permission becomes rx following mapping to and from a DACL
Reported by David Disseldorp. Fix based on a patch by David.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Nov 29 22:32:27 CET 2011 on sn-devel-104

12 years agos3:net registry check: adapt to new semantic of dbwrap_fetch with rbt
Gregor Beck [Thu, 3 Nov 2011 13:57:52 +0000 (14:57 +0100)]
s3:net registry check: adapt to new semantic of dbwrap_fetch with rbt

Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Nov 29 19:53:30 CET 2011 on sn-devel-104

12 years agos3:net registry check: adapt to new semantic of dbwrap_fetch
Gregor Beck [Mon, 24 Oct 2011 08:25:29 +0000 (10:25 +0200)]
s3:net registry check: adapt to new semantic of dbwrap_fetch

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:dbwrap: turn the fetch dbwrap method to NTSTATUS return code.
Michael Adam [Thu, 10 Nov 2011 23:49:11 +0000 (00:49 +0100)]
s3:dbwrap: turn the fetch dbwrap method to NTSTATUS return code.

This implement more correct NTSTATUS handling inside the backends.
This ensures that data.dptr != NULL if return code is NT_STATUS_OK.

12 years agos3:dbwrap_ctdb: re-use map_nt_error_from_tdb() in local tdb_error_to_ntstatus()
Michael Adam [Tue, 29 Nov 2011 14:57:10 +0000 (15:57 +0100)]
s3:dbwrap_ctdb: re-use map_nt_error_from_tdb() in local tdb_error_to_ntstatus()

12 years agos3:net registry check: handle missing version info
Gregor Beck [Mon, 24 Oct 2011 12:29:45 +0000 (14:29 +0200)]
s3:net registry check: handle missing version info

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:dbwrap_torture: code cleanup
Gregor Beck [Thu, 20 Oct 2011 08:18:24 +0000 (10:18 +0200)]
s3:dbwrap_torture: code cleanup

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos4:libcli/raw: copy smbcli_transport_connect_* to clisocket.c
Stefan Metzmacher [Tue, 29 Nov 2011 11:21:48 +0000 (12:21 +0100)]
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

12 years agos4:libcli/raw: add transport->ev as copy of transport->socket->event.ctx
Stefan Metzmacher [Tue, 22 Nov 2011 08:36:30 +0000 (09:36 +0100)]
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

12 years agos4:torture: use tctx->ev as event context for polling
Stefan Metzmacher [Thu, 22 Sep 2011 19:30:13 +0000 (21:30 +0200)]
s4:torture: use tctx->ev as event context for polling

metze

12 years agosmbXcli: add support for SMBreadBraw
Stefan Metzmacher [Fri, 25 Nov 2011 13:49:24 +0000 (14:49 +0100)]
smbXcli: add support for SMBreadBraw

metze

12 years agosmbXcli: add smb1cli_conn_server_{readbraw,writebraw,lockread,writeunlock}()
Stefan Metzmacher [Fri, 25 Nov 2011 14:13:38 +0000 (15:13 +0100)]
smbXcli: add smb1cli_conn_server_{readbraw,writebraw,lockread,writeunlock}()

metze

12 years agos4:gentest: get the tid from the smbcli_tree struct
Stefan Metzmacher [Mon, 28 Nov 2011 19:46:19 +0000 (20:46 +0100)]
s4:gentest: get the tid from the smbcli_tree struct

metze

12 years agos4:libcli/smb2: make sure only one idle event runs at a time
Stefan Metzmacher [Tue, 22 Nov 2011 09:10:30 +0000 (10:10 +0100)]
s4:libcli/smb2: make sure only one idle event runs at a time

metze

12 years agosmb1cli_trans: add support for tevent_req_cancel()
Stefan Metzmacher [Mon, 28 Nov 2011 09:41:25 +0000 (10:41 +0100)]
smb1cli_trans: add support for tevent_req_cancel()

metze

12 years agosmb1cli_trans: return the status from the server if possible
Stefan Metzmacher [Mon, 28 Nov 2011 08:15:11 +0000 (09:15 +0100)]
smb1cli_trans: return the status from the server if possible

metze

12 years agosmbXcli: rebuild smb1.recv_iov array if we expect more than one response
Stefan Metzmacher [Mon, 28 Nov 2011 16:48:44 +0000 (17:48 +0100)]
smbXcli: rebuild smb1.recv_iov array if we expect more than one response

metze

12 years agosmbXcli: allow up to 10 iovec elements for the bytes in smb1cli_req_create()
Stefan Metzmacher [Mon, 28 Nov 2011 14:28:31 +0000 (15:28 +0100)]
smbXcli: allow up to 10 iovec elements for the bytes in smb1cli_req_create()

The smb1cli_trans_* code uses up to 6 elements, which was too much for
the current limit of 5.

metze

12 years agosmbXcli: s/smb2cli_writev_done/smb2cli_req_writev_done
Stefan Metzmacher [Mon, 28 Nov 2011 09:24:18 +0000 (10:24 +0100)]
smbXcli: s/smb2cli_writev_done/smb2cli_req_writev_done

This is a better name and it matches smb1cli_req_writev_done

metze

12 years agosmbXcli: call tevent_queue_stop() for the outgoing queue on disconnect
Stefan Metzmacher [Mon, 28 Nov 2011 09:23:23 +0000 (10:23 +0100)]
smbXcli: call tevent_queue_stop() for the outgoing queue on disconnect

metze

12 years agosmbXcli: use talloc_stackframe() instead of talloc_tos() in smb1cli_conn_signv()
Stefan Metzmacher [Fri, 25 Nov 2011 12:12:35 +0000 (13:12 +0100)]
smbXcli: use talloc_stackframe() instead of talloc_tos() in smb1cli_conn_signv()

metze

12 years agolibcli/smb: remove unused smb_signing_set_bsrspyl() prototype
Stefan Metzmacher [Wed, 23 Nov 2011 07:47:31 +0000 (08:47 +0100)]
libcli/smb: remove unused smb_signing_set_bsrspyl() prototype

metze

12 years agos3-passdb: make pdb_password_change_time_max static.
Günther Deschner [Tue, 29 Nov 2011 12:38:59 +0000 (13:38 +0100)]
s3-passdb: make pdb_password_change_time_max static.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue Nov 29 15:16:51 CET 2011 on sn-devel-104

12 years agos3-rpcclient: add tool to call lsa_SetInformationTrustedDomain.
Günther Deschner [Tue, 22 Nov 2011 17:38:52 +0000 (18:38 +0100)]
s3-rpcclient: add tool to call lsa_SetInformationTrustedDomain.

"lsasettrustdominfo S-1-5-21-123456-123456-123456 13 1"

currently you only can set the encryption type field.

Guenther

12 years agos3: Remove some false/superfluous translations
Volker Lendecke [Tue, 29 Nov 2011 09:27:26 +0000 (10:27 +0100)]
s3: Remove some false/superfluous translations

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Nov 29 12:39:45 CET 2011 on sn-devel-104

12 years agoselftest/Samba4: pass '--machinepass' to 'samba-tool domain join'
Stefan Metzmacher [Mon, 28 Nov 2011 18:34:52 +0000 (19:34 +0100)]
selftest/Samba4: pass '--machinepass' to 'samba-tool domain join'

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Nov 29 11:00:42 CET 2011 on sn-devel-104

12 years agos4:python: add --machinepass option to 'samba-tool domain join'
Stefan Metzmacher [Wed, 16 Nov 2011 14:32:47 +0000 (15:32 +0100)]
s4:python: add --machinepass option to 'samba-tool domain join'

metze

12 years agos4:python/samba/join.py: add optional 'machinepass' parameter to join_*()
Stefan Metzmacher [Mon, 28 Nov 2011 19:03:11 +0000 (20:03 +0100)]
s4:python/samba/join.py: add optional 'machinepass' parameter to join_*()

metze

12 years agos4:python/samba/join.py: add optional 'machinepass' parameter to class dc_join
Stefan Metzmacher [Mon, 28 Nov 2011 19:03:11 +0000 (20:03 +0100)]
s4:python/samba/join.py: add optional 'machinepass' parameter to class dc_join

metze

12 years agos4:py_net: add optional 'machinepass' parameter to py_net_join_member()
Stefan Metzmacher [Mon, 28 Nov 2011 18:49:54 +0000 (19:49 +0100)]
s4:py_net: add optional 'machinepass' parameter to py_net_join_member()

metze

12 years agos4:libnet: make it possible to join with a given machine password
Stefan Metzmacher [Wed, 16 Nov 2011 12:06:19 +0000 (13:06 +0100)]
s4:libnet: make it possible to join with a given machine password

metze

12 years agos4:libnet/py_net: ZERO_STRUCT() struct libnet_Join_member in py_net_join_member()
Stefan Metzmacher [Wed, 16 Nov 2011 14:30:48 +0000 (15:30 +0100)]
s4:libnet/py_net: ZERO_STRUCT() struct libnet_Join_member in py_net_join_member()

metze

12 years agos4:torture/rpc: use talloc_zero() in torture_join_domain()
Stefan Metzmacher [Wed, 16 Nov 2011 14:29:03 +0000 (15:29 +0100)]
s4:torture/rpc: use talloc_zero() in torture_join_domain()

metze

12 years agos4:libnet: use talloc_zero(struct libnet_JoinDomain) in libnet_Join_member()
Stefan Metzmacher [Wed, 16 Nov 2011 14:28:20 +0000 (15:28 +0100)]
s4:libnet: use talloc_zero(struct libnet_JoinDomain) in libnet_Join_member()

metze

12 years agos4-samba-tool: Add --principal argument to samba-tool domain exportkeytab
Andrew Bartlett [Tue, 29 Nov 2011 01:47:40 +0000 (12:47 +1100)]
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

12 years agos4-provision: Fix the security ace for DnsAdmins group on DNS records
Amitay Isaacs [Mon, 28 Nov 2011 03:18:31 +0000 (14:18 +1100)]
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

12 years agos4-repl: Check if GC SPN exists before using it for replication
Amitay Isaacs [Sun, 27 Nov 2011 23:33:53 +0000 (10:33 +1100)]
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>

12 years agos4-provision: Make BIND9_DLZ as the default backend for DNS
Amitay Isaacs [Fri, 25 Nov 2011 04:43:53 +0000 (15:43 +1100)]
s4-provision: Make BIND9_DLZ as the default backend for DNS

12 years agodlz_bind9: Added access check to verify dynamic update
Amitay Isaacs [Wed, 2 Nov 2011 03:32:37 +0000 (14:32 +1100)]
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>

12 years agodlz_bind9: Use the sam database in dns/ as default
Amitay Isaacs [Thu, 15 Sep 2011 22:54:05 +0000 (08:54 +1000)]
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.

12 years agos4-provision: Create a samdb copy for access by dlz_bind9 module
Amitay Isaacs [Mon, 19 Sep 2011 23:58:42 +0000 (09:58 +1000)]
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.

12 years agos4-provision: Extract security descriptors in separate file
Amitay Isaacs [Wed, 23 Nov 2011 04:10:58 +0000 (15:10 +1100)]
s4-provision: Extract security descriptors in separate file

Need to use domain security descriptor from sambadns.py also.

12 years agos4-test: Remove metadata and ldb.d directory on clean up
Amitay Isaacs [Tue, 29 Nov 2011 00:15:05 +0000 (11:15 +1100)]
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.

12 years agos4-samdb: seqence_number() operation must be in a transaction
Amitay Isaacs [Mon, 28 Nov 2011 06:19:50 +0000 (17:19 +1100)]
s4-samdb: seqence_number() operation must be in a transaction

12 years agos4-dsdb: Added metadata to partition module for global sequence number
Amitay Isaacs [Mon, 14 Nov 2011 06:38:04 +0000 (17:38 +1100)]
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>
12 years agos4-dsdb: use dsdb_module_extended instead of duplicate code
Amitay Isaacs [Mon, 14 Nov 2011 03:14:58 +0000 (14:14 +1100)]
s4-dsdb: use dsdb_module_extended instead of duplicate code

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos4-dsdb: Return ldb_result context in dsdb_module_extended
Amitay Isaacs [Mon, 14 Nov 2011 02:52:34 +0000 (13:52 +1100)]
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>
12 years agos4-dsdb: Remove LDB_SEQ_HIGHEST_TIMESTAMP sequence number support
Amitay Isaacs [Tue, 22 Nov 2011 05:51:04 +0000 (16:51 +1100)]
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>
12 years agos3: Use tevent_req_simple_recv_ntstatus
Volker Lendecke [Thu, 24 Nov 2011 09:55:30 +0000 (10:55 +0100)]
s3: Use tevent_req_simple_recv_ntstatus

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Nov 28 17:14:27 CET 2011 on sn-devel-104

12 years agoFix Coverity ID 2638: OVERRUN_STATIC
Volker Lendecke [Mon, 28 Nov 2011 13:50:03 +0000 (14:50 +0100)]
Fix Coverity ID 2638: OVERRUN_STATIC

12 years agoFix Coverity ID 2639: UNUSED_VALUE
Volker Lendecke [Mon, 28 Nov 2011 13:34:00 +0000 (14:34 +0100)]
Fix Coverity ID 2639: UNUSED_VALUE

12 years agos3: Fix a crash in group_mapping.ldb->tdb conversion
Volker Lendecke [Mon, 28 Nov 2011 09:44:42 +0000 (10:44 +0100)]
s3: Fix a crash in group_mapping.ldb->tdb conversion

When we find a group_mapping.ldb entry without a comment, the upgrade code
would have crashed with a NULL dereference

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Nov 28 12:24:08 CET 2011 on sn-devel-104

12 years agos4:torture/ldap/cldap.c - remove the "test_cldap_netlogon_flag_ds_dns_forest" test
Matthias Dieter Wallnöfer [Thu, 24 Nov 2011 08:31:42 +0000 (09:31 +0100)]
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

12 years agos4:selftest/test_samba_tool.sh - add a basic unit test for the new "domain info"...
Matthias Dieter Wallnöfer [Wed, 23 Nov 2011 20:05:54 +0000 (21:05 +0100)]
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>
12 years agosamba-tool: domain info - add basic exception handling
Matthias Dieter Wallnöfer [Wed, 23 Nov 2011 20:29:18 +0000 (21:29 +0100)]
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>
12 years agosamba-tool: add a domain info command to get basic info
Matthieu Patou [Wed, 28 Sep 2011 00:46:14 +0000 (17:46 -0700)]
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>
12 years agos4:netlogon RPC server - DsRGetDcNameEx - set the DNS name flags correctly
Matthias Dieter Wallnöfer [Wed, 23 Nov 2011 19:32:57 +0000 (20:32 +0100)]
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>
12 years agos4-netlogon: return WERR_NO_SUCH_DOMAIN instead of WERR_DS_UNAVAILABLE if we are...
Matthieu Patou [Tue, 27 Sep 2011 19:11:36 +0000 (15:11 -0400)]
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>
12 years agos4:cldap_server/netlogon.c - DS_SERVER_CLOSEST handling
Matthias Dieter Wallnöfer [Thu, 24 Nov 2011 08:25:35 +0000 (09:25 +0100)]
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>
12 years agos4:netcmd/common.py: add a "netcmd" function to do a cldap netlogon request
Matthias Dieter Wallnöfer [Tue, 22 Nov 2011 21:26:38 +0000 (22:26 +0100)]
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>
12 years agos4:libnet/py_net.c: "py_net_finddc" - add an "address" parameter
Matthias Dieter Wallnöfer [Tue, 22 Nov 2011 21:26:06 +0000 (22:26 +0100)]
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>
12 years agos4:libnet/py_net.c - initialise optional keyword arguments
Matthias Dieter Wallnöfer [Tue, 22 Nov 2011 21:06:15 +0000 (22:06 +0100)]
s4:libnet/py_net.c - initialise optional keyword arguments

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos4:libcli/finddcs_cldap.c - let "finddcs_cldap" work either with the IP address or...
Matthias Dieter Wallnöfer [Wed, 23 Nov 2011 08:45:31 +0000 (09:45 +0100)]
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>