samba.git
7 years agoInclude waf as an extracted source directory, rather than as a one-in-a-file script.
Jelmer Vernooij [Tue, 3 Jan 2012 23:31:27 +0000 (00:31 +0100)]
Include waf as an extracted source directory, rather than as a one-in-a-file script.

7 years agos4:pyrpc: add 'user_session_key' getter to the connection object
Stefan Metzmacher [Fri, 16 Dec 2011 09:55:46 +0000 (10:55 +0100)]
s4:pyrpc: add 'user_session_key' getter to the connection object

This gets the session key from gensec for usage in DRSUAPI.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jan  4 22:31:52 CET 2012 on sn-devel-104

7 years agos4:pygensec/tests: check that the client and server have the same session key
Stefan Metzmacher [Wed, 4 Jan 2012 19:49:08 +0000 (20:49 +0100)]
s4:pygensec/tests: check that the client and server have the same session key

metze

7 years agos4:pygensec: add session_key() method
Stefan Metzmacher [Fri, 16 Dec 2011 09:37:51 +0000 (10:37 +0100)]
s4:pygensec: add session_key() method

metze

7 years agoLDAP-CLDAP: demonstrate that pdc name is not an unc path
Stefan Metzmacher [Wed, 4 Jan 2012 10:46:47 +0000 (11:46 +0100)]
LDAP-CLDAP: demonstrate that pdc name is not an unc path

For LOGON_SAM_LOGON_RESPONSE_EX and LOGON_SAM_LOGON_USER_UNKNOWN_EX,
pdc name is not in unc path form.

[MS-ADTS] 7.3.1.* uses UnicodeLogonServer, which seems to be in unc form,
while NetbiosComputerName is not in unc form.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jan  4 20:06:14 CET 2012 on sn-devel-104

7 years agos4:torture/nbt/dgram.c - NBT samlogon requests don't return the PDC name as UNC path
Matthias Dieter Wallnöfer [Thu, 22 Dec 2011 16:05:29 +0000 (17:05 +0100)]
s4:torture/nbt/dgram.c - NBT samlogon requests don't return the PDC name as UNC path

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos4:cldap_server/netlogon.c: it is wrong to specify "\\" in front of the hostname
Stefan Metzmacher [Wed, 23 Nov 2011 09:09:51 +0000 (10:09 +0100)]
s4:cldap_server/netlogon.c: it is wrong to specify "\\" in front of the hostname

For LOGON_SAM_LOGON_RESPONSE_EX and LOGON_SAM_LOGON_USER_UNKNOWN_EX,
pdc name is not in unc path form.

[MS-ADTS] 7.3.1.* uses UnicodeLogonServer, which seems to be in unc form,
while NetbiosComputerName is not in unc form.

Bases on a patch from Matthias Dieter Wallnöfer <mdw@samba.org>.

metze

7 years agos3-winbind: Fix segfault if we can't map the last user.
Andreas Schneider [Tue, 3 Jan 2012 15:55:25 +0000 (16:55 +0100)]
s3-winbind: Fix segfault if we can't map the last user.

This fixes bug #8678.

The issue is caused by bug #8608.

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Jan  4 18:30:53 CET 2012 on sn-devel-104

7 years agos3-winbind: Move finding the domain to it's own function.
Andreas Schneider [Tue, 3 Jan 2012 15:54:39 +0000 (16:54 +0100)]
s3-winbind: Move finding the domain to it's own function.

This the first part to fix bug #8678.

7 years agos3-perfcount: fix incorrect array length calculations
David Disseldorp [Tue, 3 Jan 2012 09:14:23 +0000 (10:14 +0100)]
s3-perfcount: fix incorrect array length calculations

As reported by Ismail Doenmez (idonmez@suse.com), sizeof() is
incorrectly used by _reg_perfcount_init_data_block() in an attempt to
determine the length of a talloced array.

Signed-off-by: Günther Deschner <gd@samba.org>
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Jan  4 16:54:37 CET 2012 on sn-devel-104

7 years agos3-perfcount: fix build for example perfcount daemon
David Disseldorp [Tue, 3 Jan 2012 09:13:02 +0000 (10:13 +0100)]
s3-perfcount: fix build for example perfcount daemon

Signed-off-by: Günther Deschner <gd@samba.org>
7 years agos3: Check for the packet size before accessing it
Volker Lendecke [Tue, 3 Jan 2012 21:19:27 +0000 (22:19 +0100)]
s3: Check for the packet size before accessing it

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Jan  4 15:16:20 CET 2012 on sn-devel-104

7 years agoLDAP-CLDAP: demonstrate that pdc name is an unc path
Stefan Metzmacher [Wed, 4 Jan 2012 10:46:47 +0000 (11:46 +0100)]
LDAP-CLDAP: demonstrate that pdc name is an unc path

For LOGON_SAM_LOGON_RESPONSE and LOGON_SAM_LOGON_USER_UNKNOWN,
I assume all levels without _EX in the name, pdc name is
in unc path form.

[MS-ADTS] 7.3.1.* uses UnicodeLogonServer, which seems to be in unc form,
while NetbiosComputerName is not in unc form.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jan  4 13:37:42 CET 2012 on sn-devel-104

7 years agos4:torture/nbt/dgram.c: NBT samlogon requests without _EX return the PDC name as...
Stefan Metzmacher [Mon, 2 Jan 2012 14:51:35 +0000 (15:51 +0100)]
s4:torture/nbt/dgram.c: NBT samlogon requests without _EX return the PDC name as UNC path

metze

7 years agodlz_bind9: create session info from PAC using auth context
Amitay Isaacs [Tue, 3 Jan 2012 04:39:20 +0000 (15:39 +1100)]
dlz_bind9: create session info from PAC using auth context

This fixes the creation of session info from PAC, after changes
in gensec code.

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Wed Jan  4 01:59:09 CET 2012 on sn-devel-104

7 years agos3-cli: fix bug 563, >8GB tar on BE machines
Masafumi Nakayama [Wed, 2 Nov 2011 09:35:19 +0000 (10:35 +0100)]
s3-cli: fix bug 563, >8GB tar on BE machines

Borrows on existing patches proposed by Craig Barratt and Brad Ellis.

Signed-off-by: David Disseldorp <ddiss@suse.de>
Autobuild-User: David Disseldorp <ddiss@samba.org>
Autobuild-Date: Tue Jan  3 18:31:28 CET 2012 on sn-devel-104

7 years agos3: Fix a cut&paste error
Volker Lendecke [Tue, 3 Jan 2012 14:20:09 +0000 (15:20 +0100)]
s3: Fix a cut&paste error

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Jan  3 16:57:44 CET 2012 on sn-devel-104

7 years agos3: Fix a typo
Volker Lendecke [Tue, 3 Jan 2012 14:13:48 +0000 (15:13 +0100)]
s3: Fix a typo

7 years agos3: Remove the unused "file_existed" parameter from smbd_calculate_access_mask
Volker Lendecke [Fri, 16 Dec 2011 17:56:40 +0000 (18:56 +0100)]
s3: Remove the unused "file_existed" parameter from smbd_calculate_access_mask

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Jan  3 15:16:50 CET 2012 on sn-devel-104

7 years agos3: Avoid "file_existed" in smbd_calculate_maximum_allowed_access
Volker Lendecke [Fri, 16 Dec 2011 17:51:19 +0000 (18:51 +0100)]
s3: Avoid "file_existed" in smbd_calculate_maximum_allowed_access

We access the file by name anyway, so we can just try to access it. The file
system will for sure tell us if the file does not exist.

7 years agos3: Remove some else{} branches in smbd_calculate_maximum_allowed_access
Volker Lendecke [Fri, 16 Dec 2011 17:47:03 +0000 (18:47 +0100)]
s3: Remove some else{} branches in smbd_calculate_maximum_allowed_access

7 years agos3: Directly use *p_access_mask in smbd_calculate_maximum_allowed_access
Volker Lendecke [Fri, 16 Dec 2011 17:45:14 +0000 (18:45 +0100)]
s3: Directly use *p_access_mask in smbd_calculate_maximum_allowed_access

7 years agos3: Factor out smbd_calculate_maximum_allowed_access
Volker Lendecke [Fri, 16 Dec 2011 17:42:30 +0000 (18:42 +0100)]
s3: Factor out smbd_calculate_maximum_allowed_access

7 years agoupgradeprovision: do not hold references to messageElements
Matthieu Patou [Tue, 3 Jan 2012 03:27:48 +0000 (19:27 -0800)]
upgradeprovision: do not hold references to messageElements

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Tue Jan  3 08:20:02 CET 2012 on sn-devel-104

7 years agopyldb: raise an exception if we can't add the attribute
Matthieu Patou [Tue, 3 Jan 2012 03:25:56 +0000 (19:25 -0800)]
pyldb: raise an exception if we can't add the attribute

7 years agoupgradeprovision: treat provision without oem attribute as quite recent, it's provisi...
Matthieu Patou [Thu, 25 Aug 2011 16:05:28 +0000 (18:05 +0200)]
upgradeprovision: treat provision without oem attribute as quite recent, it's provision that comes from Windows replication

7 years agos4-provision: Fix the problem of DnsProperty values not being set correctly
Amitay Isaacs [Tue, 3 Jan 2012 02:51:00 +0000 (13:51 +1100)]
s4-provision: Fix the problem of DnsProperty values not being set correctly

DnsProperty can have empty 'data' member. To parse Dnsproperty with
empty data, dnsp.idl has a hack as follows:

  [switch_is(wDataLength?id:DSPROPERTY_ZONE_EMPTY)] dnsPropertyData data;

This implies, to set 'data' value, wDataLength has to be set to a non-zero
value first.

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Tue Jan  3 05:26:32 CET 2012 on sn-devel-104

7 years agos4:torture/rpc/netlogon.c - enhance the "DsRGetDCName*" tests
Matthias Dieter Wallnöfer [Thu, 24 Nov 2011 09:20:24 +0000 (10:20 +0100)]
s4:torture/rpc/netlogon.c - enhance the "DsRGetDCName*" tests

To check for the expected behaviour (DS_* flags). Always according to
MS-NRPC 2.2.1.2.1.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Jan  2 20:43:05 CET 2012 on sn-devel-104

7 years agoldb:ldb/common/ldb_controls.c - reference "err_string" variable correctly
Matthias Dieter Wallnöfer [Thu, 22 Dec 2011 10:47:44 +0000 (11:47 +0100)]
ldb:ldb/common/ldb_controls.c - reference "err_string" variable correctly

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos4-provision: Fix tdbdump path lookup in make test.
Andreas Schneider [Fri, 16 Dec 2011 18:03:54 +0000 (19:03 +0100)]
s4-provision: Fix tdbdump path lookup in make test.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agotalloc: Slightly simplify talloc_unlink
Volker Lendecke [Mon, 2 Jan 2012 13:56:04 +0000 (14:56 +0100)]
talloc: Slightly simplify talloc_unlink

Nested if's are hard to understand to me.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Jan  2 19:07:23 CET 2012 on sn-devel-104

7 years agotalloc: Fix a typo
Volker Lendecke [Mon, 2 Jan 2012 13:27:37 +0000 (14:27 +0100)]
talloc: Fix a typo

7 years agoFix the build without kerberos
Volker Lendecke [Sun, 1 Jan 2012 20:17:43 +0000 (21:17 +0100)]
Fix the build without kerberos

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jan  1 23:56:24 CET 2012 on sn-devel-104

7 years agoexamples: malloc is declared in <stdlib.h>
Volker Lendecke [Fri, 30 Dec 2011 08:55:55 +0000 (09:55 +0100)]
examples: malloc is declared in <stdlib.h>

7 years agos4: Happy New Year 2012
Stefan Metzmacher [Sun, 1 Jan 2012 19:45:48 +0000 (20:45 +0100)]
s4: Happy New Year 2012

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Jan  1 22:23:48 CET 2012 on sn-devel-104

7 years agos3: Happy New Year 2012
Stefan Metzmacher [Sun, 1 Jan 2012 19:45:37 +0000 (20:45 +0100)]
s3: Happy New Year 2012

metze

7 years agoFinal part of fix for bug #8679 - recvfile code path using splice() on Linux leaves...
Jeremy Allison [Sat, 31 Dec 2011 05:19:08 +0000 (21:19 -0800)]
Final part of fix for bug #8679 - recvfile code path using splice() on Linux leaves data in the pipe on short write.

The code to set a DOS error on short writeX return is amazingly
legacy code, and also breaks the reply as fixup_chain_error_packet()
enforces a 2-byte wct on any reply where smb_rcls != 0.

Found in testing by Andrew Bartlett. Thanks Andrew !

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Dec 31 08:05:35 CET 2011 on sn-devel-104

7 years agoThird part of fix for bug #8679 - recvfile code path using splice() on Linux leaves...
Jeremy Allison [Sat, 31 Dec 2011 04:45:10 +0000 (20:45 -0800)]
Third part of fix for bug #8679 - recvfile code path using splice() on Linux leaves data in the pipe on short write.

Fix default_sys_recvfile() to correctly cope with
short writes. Return the amount written. Return
-1 and set errno if no data could be written.

7 years agoSecond part of fix for bug #8679 - recvfile code path using splice() on Linux leaves...
Jeremy Allison [Sat, 31 Dec 2011 04:23:00 +0000 (20:23 -0800)]
Second part of fix for bug #8679 - recvfile code path using splice() on Linux leaves data in the pipe on short write.

Split out the functionality of drain_socket() into a separate
function from default_sys_recvfile().

7 years agopyregistry: Remove directory support.
Jelmer Vernooij [Thu, 29 Dec 2011 17:24:49 +0000 (18:24 +0100)]
pyregistry: Remove directory support.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Dec 29 19:59:57 CET 2011 on sn-devel-104

7 years agoRemove the 'dir' registry backend.
Jelmer Vernooij [Thu, 29 Dec 2011 15:45:23 +0000 (16:45 +0100)]
Remove the 'dir' registry backend.

This backend was incomplete, and we already have plenty of other backends.

7 years agos4-toture: Rename memory contexts in rpc.pac for greater clarity
Andrew Bartlett [Thu, 29 Dec 2011 11:36:14 +0000 (22:36 +1100)]
s4-toture: Rename memory contexts in rpc.pac for greater clarity

This should better follow the mem_ctx/tmp_ctx pattern used elsewhere in Samba.

Thankyou Simo for the suggestion.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Dec 29 14:14:06 CET 2011 on sn-devel-104

7 years agos4-gensec: Rename memory contexts in gensec_util for greater clarity
Andrew Bartlett [Thu, 29 Dec 2011 11:34:28 +0000 (22:34 +1100)]
s4-gensec: Rename memory contexts in gensec_util for greater clarity

This should better follow the mem_ctx/tmp_ctx pattern used elsewhere in Samba.

Thankyou Simo for the suggestion.

Andrew Bartlett

7 years agos4-gensec: Rename memory contexts in gensec_krb5 for greater clarity
Andrew Bartlett [Thu, 29 Dec 2011 11:33:27 +0000 (22:33 +1100)]
s4-gensec: Rename memory contexts in gensec_krb5 for greater clarity

This should better follow the mem_ctx/tmp_ctx pattern used elsewhere in Samba.

Thankyou Simo for the suggestion.

Andrew Bartlett

7 years agos4-gensec: Rename memory contexts in gensec_gssapi for greater clarity
Andrew Bartlett [Thu, 29 Dec 2011 11:31:36 +0000 (22:31 +1100)]
s4-gensec: Rename memory contexts in gensec_gssapi for greater clarity

This should better follow the mem_ctx/tmp_ctx pattern used elsewhere in Samba.

Thankyou Simo for the suggestion.

Andrew Bartlett

7 years agos4-auth: Rename memory contexts for greater clarity
Andrew Bartlett [Thu, 29 Dec 2011 11:30:07 +0000 (22:30 +1100)]
s4-auth: Rename memory contexts for greater clarity

This should better follow the mem_ctx/tmp_ctx pattern used elsewhere in Samba.

Thankyou Simo for the suggestion.

Andrew Bartlett

7 years agoauth/kerberos: Rename memory contexts for greater clarity
Andrew Bartlett [Thu, 29 Dec 2011 11:26:06 +0000 (22:26 +1100)]
auth/kerberos: Rename memory contexts for greater clarity

This should better follow the mem_ctx/tmp_ctx pattern used elsewhere in Samba.

Thankyou Simo for the suggestion.

Andrew Bartlett

7 years agos4-gensec remove auth_session dep from gensec_gssapi.c
Andrew Bartlett [Thu, 29 Dec 2011 01:15:42 +0000 (12:15 +1100)]
s4-gensec remove auth_session dep from gensec_gssapi.c

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Dec 29 05:37:11 CET 2011 on sn-devel-104

7 years agos4-gensec Remove fallback for simple privileges
Andrew Bartlett [Thu, 29 Dec 2011 01:00:21 +0000 (12:00 +1100)]
s4-gensec Remove fallback for simple privileges

This makes the dependencies simpler, as this code path is no longer
required.  (That is, it makes no sense to have an NTLM login without
an auth context, and the gensec_gssapi and gensec_krb5 modules call
the PAC blob function below instead).

Andrew Bartlett

7 years agos4-torture: Demonstrate handling of the PAC in a custom auth_context
Andrew Bartlett [Thu, 29 Dec 2011 00:46:41 +0000 (11:46 +1100)]
s4-torture: Demonstrate handling of the PAC in a custom auth_context

This demonstrates how a different function pointer can be supplied
to handle the PAC blob, without depending on the provisioned samdb etc.

Andrew Bartlett

7 years agos4-gensec: Pass the auth context in during gensec test
Andrew Bartlett [Thu, 29 Dec 2011 02:51:55 +0000 (13:51 +1100)]
s4-gensec: Pass the auth context in during gensec test

7 years agos4-pyauth: Make sure event context allows nesting
Andrew Bartlett [Thu, 29 Dec 2011 02:51:17 +0000 (13:51 +1100)]
s4-pyauth: Make sure event context allows nesting

7 years agos4-gensec: Move parsing of the PAC blob and creating the session_info into auth
Andrew Bartlett [Wed, 28 Dec 2011 06:48:45 +0000 (17:48 +1100)]
s4-gensec: Move parsing of the PAC blob and creating the session_info into auth

This uses a single callback to handle the PAC from the DATA_BLOB
format until it becomes a struct auth_session_info.

This allows a seperation between the GSS acceptor code and the PAC
interpretation code based on the supplied auth context.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Dec 29 01:10:59 CET 2011 on sn-devel-104

7 years agos4-gensec: fix cyrus sasl module after update() protype change
Andrew Bartlett [Wed, 28 Dec 2011 06:31:03 +0000 (17:31 +1100)]
s4-gensec: fix cyrus sasl module after update() protype change

7 years agoauth/kerberos: Make pac_data_out in kerberos_decode_pac() optional
Andrew Bartlett [Wed, 28 Dec 2011 05:01:38 +0000 (16:01 +1100)]
auth/kerberos: Make pac_data_out in kerberos_decode_pac() optional

7 years agos4-auth Remove unused auth_context_create_from_ldb()
Andrew Bartlett [Tue, 27 Dec 2011 23:38:52 +0000 (10:38 +1100)]
s4-auth Remove unused auth_context_create_from_ldb()

7 years agos4-gensec: Allow a PAC to be obtained from any GSS mech
Andrew Bartlett [Tue, 27 Dec 2011 11:02:16 +0000 (22:02 +1100)]
s4-gensec: Allow a PAC to be obtained from any GSS mech

This may allow Luke Howard's moonshot to work with a little less effort
at some point in the future.

Andrew Bartlett

7 years agoauth/kerberos: Move gssapi_parse.c to the top level
Andrew Bartlett [Tue, 27 Dec 2011 11:00:22 +0000 (22:00 +1100)]
auth/kerberos: Move gssapi_parse.c to the top level

This will help with writing a gensec module for the s3 gse layer.

Andrew Bartlett

7 years agocredentials: Always honour the return value of E_deshash()
Andrew Bartlett [Tue, 27 Dec 2011 10:30:49 +0000 (21:30 +1100)]
credentials: Always honour the return value of E_deshash()

When this returns false, the hash value is not correct as the password
could not be converted into an uppercase, 14 char or less ASCII string.

Andrew Bartlett

7 years agos4-ntlmssp Do not allow LM key without a LM password
Andrew Bartlett [Tue, 27 Dec 2011 08:50:36 +0000 (19:50 +1100)]
s4-ntlmssp Do not allow LM key without a LM password

7 years agos3-auth Fix talloc parent for s4 event context in auth_samba4
Andrew Bartlett [Mon, 26 Dec 2011 11:59:17 +0000 (22:59 +1100)]
s3-auth Fix talloc parent for s4 event context in auth_samba4

7 years agos3-auth: Remove protype for already-removed auth_ntlmssp_start
Andrew Bartlett [Mon, 26 Dec 2011 00:51:08 +0000 (11:51 +1100)]
s3-auth: Remove protype for already-removed auth_ntlmssp_start

7 years agogensec: Allow an alternate set of modules to be specified
Andrew Bartlett [Sun, 25 Dec 2011 23:53:56 +0000 (10:53 +1100)]
gensec: Allow an alternate set of modules to be specified

This will allow s3 to specify modules to use as a list, rather than
needing to start the individual module with gensec_start_mech_by_ops()

Andrew Bartlett

7 years agolib/charset: Remove an unused variable
Volker Lendecke [Sun, 25 Dec 2011 10:49:04 +0000 (11:49 +0100)]
lib/charset: Remove an unused variable

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Dec 25 15:07:56 CET 2011 on sn-devel-104

7 years agos3: Fix fn signatures in charset_macosx.c
Volker Lendecke [Sun, 25 Dec 2011 10:43:43 +0000 (11:43 +0100)]
s3: Fix fn signatures in charset_macosx.c

7 years agos3: Fix a 64-bit warning
Volker Lendecke [Sun, 25 Dec 2011 10:35:07 +0000 (11:35 +0100)]
s3: Fix a 64-bit warning

7 years agos3: Fix linking on Lion
Volker Lendecke [Sun, 25 Dec 2011 10:00:11 +0000 (11:00 +0100)]
s3: Fix linking on Lion

We are using CoreFoundation functions in charset_macosx.c. We need to link
against that.

7 years agotdb: Use tdb_parse_record in tdb_update_hash
Volker Lendecke [Mon, 19 Dec 2011 12:39:04 +0000 (13:39 +0100)]
tdb: Use tdb_parse_record in tdb_update_hash

This avoids a tdb_fetch, thus a malloc/memcpy/free in the tdb_store path

7 years agotdb: Use tdb_parse_record in tdb_update_hash
Volker Lendecke [Mon, 19 Dec 2011 12:39:04 +0000 (13:39 +0100)]
tdb: Use tdb_parse_record in tdb_update_hash

This avoids a tdb_fetch, thus a malloc/memcpy/free in the tdb_store path

7 years agolibreplace: Don't check for standards.h on darwin (Lion)
Volker Lendecke [Fri, 23 Dec 2011 20:37:57 +0000 (21:37 +0100)]
libreplace: Don't check for standards.h on darwin (Lion)

standards.h on Lion holds a #warning that standards.h will be removed. This is
annoying during the build.

7 years agoFix bug #8679 - recvfile code path using splice() on Linux leaves data in the pipe...
Jeremy Allison [Sun, 25 Dec 2011 05:12:09 +0000 (21:12 -0800)]
Fix bug #8679 - recvfile code path using splice() on Linux leaves data in the pipe on short write

Bug found and fix suggested by Andrew Bartlett.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sun Dec 25 07:46:38 CET 2011 on sn-devel-104

7 years agolib: Fix NT_STATUS_ALL_SIDS_FILTERED definition
Volker Lendecke [Fri, 23 Dec 2011 20:41:03 +0000 (21:41 +0100)]
lib: Fix NT_STATUS_ALL_SIDS_FILTERED definition

This seems to be more in line with all the other NT_STATUS definitions.

Metze, please check.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Dec 23 23:19:17 CET 2011 on sn-devel-104

7 years agos3:lib/ctdbd_conn: try ctdbd_init_connection() as root
Stefan Metzmacher [Fri, 23 Dec 2011 13:45:45 +0000 (14:45 +0100)]
s3:lib/ctdbd_conn: try ctdbd_init_connection() as root

ctdbd_traverse is only called if the main db_context is already
open. So if we could get to information via dbwrap_fetch,
we should also be able to traverse.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Dec 23 18:19:14 CET 2011 on sn-devel-104

7 years agos4:torture/rpc/netlogon.c - factor out the computer name check in an own test
Matthias Dieter Wallnöfer [Thu, 24 Nov 2011 16:38:14 +0000 (17:38 +0100)]
s4:torture/rpc/netlogon.c - factor out the computer name check in an own test

This check is by no ways specific to "DsRGetSiteName" and hence it should
be factored out in an own function.
Samba at the moment does not implement the expected behaviour so I have
added the "torture_skip" action.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Dec 23 12:17:48 CET 2011 on sn-devel-104

7 years agos4:netlogon RPC server - dcesrv_netr_DsRGetSiteName - add a small explaination
Matthias Dieter Wallnöfer [Thu, 24 Nov 2011 16:03:00 +0000 (17:03 +0100)]
s4:netlogon RPC server - dcesrv_netr_DsRGetSiteName - add a small explaination

NETLOGON pipe is only thought for DCs.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos4:libcli/finddcs_nbt.c - free "req" consistently with "finddcs_cldap.c"
Matthias Dieter Wallnöfer [Thu, 22 Dec 2011 15:49:48 +0000 (16:49 +0100)]
s4:libcli/finddcs_nbt.c - free "req" consistently with "finddcs_cldap.c"

It is more obvious to free where the context for the first time appears.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agoldb:ldb_tdb.c - fix warnings in "ltdb_init_rootdse"
Matthias Dieter Wallnöfer [Thu, 22 Dec 2011 10:50:49 +0000 (11:50 +0100)]
ldb:ldb_tdb.c - fix warnings in "ltdb_init_rootdse"

We should ignore the LDB result.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos4:drsuapi/getncchanges: the default for isRecycled is FALSE
Stefan Metzmacher [Tue, 15 Nov 2011 11:42:22 +0000 (12:42 +0100)]
s4:drsuapi/getncchanges: the default for isRecycled is FALSE

metze

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Fri Dec 23 09:30:09 CET 2011 on sn-devel-104

7 years agos4-drsuapi: we store boolean in upppercase so we need to test them in uppercase
Matthieu Patou [Mon, 14 Nov 2011 17:32:41 +0000 (18:32 +0100)]
s4-drsuapi: we store boolean in upppercase so we need to test them in uppercase

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos4-kcc: Remove also deleted objects that are not in the Deleted Object container
Matthieu Patou [Tue, 15 Nov 2011 11:38:51 +0000 (12:38 +0100)]
s4-kcc: Remove also deleted objects that are not in the Deleted Object container

For the configuration container we do a full scan at every run of the
kcc-delete service. For the base DN we introduce a new parameter that
avoid the full scan to kick just when samba starts.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos4-ldb: Add isRecycled when is defined in the schema
Matthieu Patou [Tue, 1 Nov 2011 22:12:47 +0000 (23:12 +0100)]
s4-ldb: Add isRecycled when is defined in the schema

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos4:rpc-dnsserver: Set the rank for the new DNS record correctly
Amitay Isaacs [Fri, 23 Dec 2011 05:15:26 +0000 (16:15 +1100)]
s4:rpc-dnsserver: Set the rank for the new DNS record correctly

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Fri Dec 23 07:56:34 CET 2011 on sn-devel-104

7 years agotest:dnsserver: Add zone creation and deletion test
Amitay Isaacs [Tue, 20 Dec 2011 03:41:43 +0000 (14:41 +1100)]
test:dnsserver: Add zone creation and deletion test

7 years agosamba-tool:dns: Fix a typo
Amitay Isaacs [Tue, 20 Dec 2011 01:07:11 +0000 (12:07 +1100)]
samba-tool:dns: Fix a typo

7 years agosamba-tool:dns: Add zone create/delete commands
Amitay Isaacs [Tue, 20 Dec 2011 01:06:47 +0000 (12:06 +1100)]
samba-tool:dns: Add zone create/delete commands

7 years agoldif-handler: Fix the case for attribute dnsproperty
Amitay Isaacs [Tue, 20 Dec 2011 01:05:49 +0000 (12:05 +1100)]
ldif-handler: Fix the case for attribute dnsproperty

7 years agos4:rpc-dnsserver: Add comments
Amitay Isaacs [Mon, 19 Dec 2011 01:16:45 +0000 (12:16 +1100)]
s4:rpc-dnsserver: Add comments

7 years agos4:rpc-dnsserver: Make sure that zone information is filled in
Amitay Isaacs [Fri, 16 Dec 2011 06:59:59 +0000 (17:59 +1100)]
s4:rpc-dnsserver: Make sure that zone information is filled in

This fixes the problem of NULL zone in zone operations when specific
zone is specified and no zone filter is specified.

7 years agos4:rpc-dnsserver: Implement zone management RPC operations
Amitay Isaacs [Fri, 16 Dec 2011 04:41:15 +0000 (15:41 +1100)]
s4:rpc-dnsserver: Implement zone management RPC operations

- ZoneCreate operation to create zone.
- DeleteZoneFromDs operation to delete zone

When a zone is deleted, all the records in that zone are also deleted.

7 years agos4:rpc-dnsserver: Add multiple DNS records in a single operation
Amitay Isaacs [Mon, 19 Dec 2011 01:13:46 +0000 (12:13 +1100)]
s4:rpc-dnsserver: Add multiple DNS records in a single operation

This allows to add dnsNode objectclass with multiple DNS records in a
single operation. Useful for creating @ record which has NS and SOA
records.

7 years agos4:rpc-dnsserver: Use handy macros for error checking
Amitay Isaacs [Fri, 16 Dec 2011 01:20:43 +0000 (12:20 +1100)]
s4:rpc-dnsserver: Use handy macros for error checking

7 years agos4:rpc-dnsserver: Implement DirectoryPartitionInfo RPC operation
Amitay Isaacs [Fri, 16 Dec 2011 01:11:42 +0000 (12:11 +1100)]
s4:rpc-dnsserver: Implement DirectoryPartitionInfo RPC operation

7 years agos4:rpc-dnsserver: Fix the enumeration of DNS records
Amitay Isaacs [Thu, 15 Dec 2011 08:45:22 +0000 (19:45 +1100)]
s4:rpc-dnsserver: Fix the enumeration of DNS records

If a node has data and children, do not return the children unless
the node is the top level node.

7 years agos4:rpc-dnsserver: Use cached zone information to get rootservers
Amitay Isaacs [Thu, 15 Dec 2011 08:45:10 +0000 (19:45 +1100)]
s4:rpc-dnsserver: Use cached zone information to get rootservers

This removes the hardcoded search for DC=RootDNSServers, and uses
the cached zone information.

7 years agoidl:dnsserver: Add DNS_DP_STATE enumeration for diretory partition state
Amitay Isaacs [Thu, 15 Dec 2011 07:52:21 +0000 (18:52 +1100)]
idl:dnsserver: Add DNS_DP_STATE enumeration for diretory partition state

7 years agos4:rpc-dnsserver: Implement EnumDirectoryPartition operation
Amitay Isaacs [Thu, 15 Dec 2011 07:27:39 +0000 (18:27 +1100)]
s4:rpc-dnsserver: Implement EnumDirectoryPartition operation

7 years agos4:rpc-dnsserver: Cache DNS partition information
Amitay Isaacs [Thu, 15 Dec 2011 06:44:32 +0000 (17:44 +1100)]
s4:rpc-dnsserver: Cache DNS partition information

This information will be used for the RPC calls for partition
information.

7 years agos4:rpc-dnsserver: If a zone is reverse zone, set the fReverse flag
Amitay Isaacs [Wed, 14 Dec 2011 05:17:31 +0000 (16:17 +1100)]
s4:rpc-dnsserver: If a zone is reverse zone, set the fReverse flag

And use fReverse flag in the enumeration of zones.

7 years agos4:rpc-dnsserver: For PTR records, use dns_name_equal instead of strcmp to compare
Amitay Isaacs [Wed, 14 Dec 2011 05:16:23 +0000 (16:16 +1100)]
s4:rpc-dnsserver: For PTR records, use dns_name_equal instead of strcmp to compare

7 years agosamba-tool:dns: Add support for reverse names (PTR records)
Amitay Isaacs [Wed, 14 Dec 2011 04:54:31 +0000 (15:54 +1100)]
samba-tool:dns: Add support for reverse names (PTR records)