samba.git
7 years agos3-selftst Add encrypted CIFS testing with kerberos
Andrew Bartlett [Sun, 8 Jan 2012 23:49:49 +0000 (10:49 +1100)]
s3-selftst Add encrypted CIFS testing with kerberos

7 years agos3-libsmb: match the rest of Samba3 in kerberos name selection in smb sealing
Andrew Bartlett [Sun, 8 Jan 2012 23:30:47 +0000 (10:30 +1100)]
s3-libsmb: match the rest of Samba3 in kerberos name selection in smb sealing

This mirrors 860ad734ba77238d187520f72afcbdc1c73d94ef which in turn
mirrors the behaviour of the libsmb client code at session setup time.

Andrew Bartlett

7 years agos3-selftest: Add test for smbclient kerberos support
Andrew Bartlett [Sun, 8 Jan 2012 23:18:37 +0000 (10:18 +1100)]
s3-selftest: Add test for smbclient kerberos support

7 years agos3-build SMBTORTRUE4 variable is unused in make test
Andrew Bartlett [Fri, 6 Jan 2012 08:16:32 +0000 (19:16 +1100)]
s3-build SMBTORTRUE4 variable is unused in make test

7 years agos3-build SAMBA4SHAREDIR is unused in make test
Andrew Bartlett [Fri, 6 Jan 2012 08:14:33 +0000 (19:14 +1100)]
s3-build SAMBA4SHAREDIR is unused in make test

7 years agos3-build: smbtorture4 can be built regardless of use_ads
Andrew Bartlett [Fri, 6 Jan 2012 08:12:08 +0000 (19:12 +1100)]
s3-build: smbtorture4 can be built regardless of use_ads

7 years agos3-selftest: remove smb4torture_possible and add have_ads_support
Andrew Bartlett [Sun, 8 Jan 2012 22:47:47 +0000 (09:47 +1100)]
s3-selftest: remove smb4torture_possible and add have_ads_support

The smb4torture_possible check has already been hidden in
plansmbtorturetestsuite to reduce extra complexity and indentation.

The have_ads_support check will allow ADS tests to be run when we
do not have the ability to run smbtorture4

Andrew Bartlett

7 years agos3-selftest Hide smb4torture_possible inside plansmbtorturetestsuite()
Andrew Bartlett [Sun, 8 Jan 2012 22:26:57 +0000 (09:26 +1100)]
s3-selftest Hide smb4torture_possible inside plansmbtorturetestsuite()

7 years agoAdd "repack" command to tdbtool.
Ira Cooper [Fri, 6 Jan 2012 23:45:06 +0000 (15:45 -0800)]
Add "repack" command to tdbtool.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Jan  7 02:18:41 CET 2012 on sn-devel-104

7 years agoRemove the commented out code.
Jeremy Allison [Fri, 6 Jan 2012 22:56:36 +0000 (14:56 -0800)]
Remove the commented out code.

7 years agoComment out sys_get_number_of_cores() as we're no longer using this.
Jeremy Allison [Fri, 6 Jan 2012 22:55:30 +0000 (14:55 -0800)]
Comment out sys_get_number_of_cores() as we're no longer using this.

7 years agoAdd "aio num threads" parameter to allow manual configuration of
Jeremy Allison [Fri, 6 Jan 2012 22:33:56 +0000 (14:33 -0800)]
Add "aio num threads" parameter to allow manual configuration of
threads via smb.conf if required. Ignore the number of cores. See
comments inline.

7 years agoFix format warning message.
Jeremy Allison [Fri, 6 Jan 2012 22:25:06 +0000 (14:25 -0800)]
Fix format warning message.

7 years agos3: Avoid a potential alignment requirement issue
Volker Lendecke [Fri, 6 Jan 2012 15:42:08 +0000 (16:42 +0100)]
s3: Avoid a potential alignment requirement issue

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Jan  6 18:58:11 CET 2012 on sn-devel-104

7 years agos3: Avoid a potential alignment requirement issue
Volker Lendecke [Fri, 6 Jan 2012 15:38:44 +0000 (16:38 +0100)]
s3: Avoid a potential alignment requirement issue

7 years agos3: Use DELETE_ON_CLOSE instead of unlink
Volker Lendecke [Fri, 6 Jan 2012 13:28:55 +0000 (14:28 +0100)]
s3: Use DELETE_ON_CLOSE instead of unlink

7 years agos3: No value change, just use the correct enum value
Volker Lendecke [Fri, 6 Jan 2012 13:21:37 +0000 (14:21 +0100)]
s3: No value change, just use the correct enum value

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Jan  6 16:33:42 CET 2012 on sn-devel-104

7 years agos3-ntlmssp Remove unused ntlmssp_set_hashes() and do not set an invalid LM hash
Andrew Bartlett [Tue, 27 Dec 2011 08:39:32 +0000 (19:39 +1100)]
s3-ntlmssp Remove unused ntlmssp_set_hashes() and do not set an invalid LM hash

When E_deshash() returns false, it indicates that the password is either > 14 chars
in length, or could not be represented as an LM hash value for some other
reason.  In this case, we should not regard the LM hash being missing
as an error or a no-password situation.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jan  6 14:59:13 CET 2012 on sn-devel-104

7 years agontlmssp: merge initial packet implementations
Andrew Bartlett [Tue, 27 Dec 2011 08:16:14 +0000 (19:16 +1100)]
ntlmssp: merge initial packet implementations

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-winbindd: convert cached credentials to use auth_generic/gensec for NTLMSSP
Andrew Bartlett [Tue, 27 Dec 2011 03:59:17 +0000 (14:59 +1100)]
s3-winbindd: convert cached credentials to use auth_generic/gensec for NTLMSSP

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-torture convert smb2 test to use auth_generic/gensec for NTLMSSP
Andrew Bartlett [Tue, 27 Dec 2011 02:27:45 +0000 (13:27 +1100)]
s3-torture convert smb2 test to use auth_generic/gensec for NTLMSSP

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jan  6 12:09:12 CET 2012 on sn-devel-104

7 years agos3:SMB2-SESSION-RECONNECT: also expect NETWORK_NAME_DELETED is signing isn't used
Stefan Metzmacher [Fri, 6 Jan 2012 07:31:16 +0000 (08:31 +0100)]
s3:SMB2-SESSION-RECONNECT: also expect NETWORK_NAME_DELETED is signing isn't used

metze

7 years agos3-libads Use NTLMSSP via auth_generic/gensec
Andrew Bartlett [Tue, 27 Dec 2011 01:27:11 +0000 (12:27 +1100)]
s3-libads Use NTLMSSP via auth_generic/gensec

This allows us to use the shared gensec_wrap() implementation already used by the
smb sealing code, as well as making this code more generic.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-libsmb Make auth_ntlmssp client more generic
Andrew Bartlett [Mon, 26 Dec 2011 23:25:55 +0000 (10:25 +1100)]
s3-libsmb Make auth_ntlmssp client more generic

As well as renaming, this allows us to start the mech by DCE/RPC auth
type or OID.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-libsmb Use gensec_settings to set s3 ntlmssp client backend
Andrew Bartlett [Mon, 26 Dec 2011 23:33:36 +0000 (10:33 +1100)]
s3-libsmb Use gensec_settings to set s3 ntlmssp client backend

This prepares us for making the code generic to multiple mechansims

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-auth Rename make_auth_ntlmssp() -> make_auth_gensec()
Andrew Bartlett [Mon, 26 Dec 2011 04:58:11 +0000 (15:58 +1100)]
s3-auth Rename make_auth_ntlmssp() -> make_auth_gensec()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agoFix compile when TDB_TRACE is enabled.
Ira Cooper [Fri, 6 Jan 2012 01:13:27 +0000 (17:13 -0800)]
Fix compile when TDB_TRACE is enabled.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Jan  6 04:16:41 CET 2012 on sn-devel-104

7 years agoAdd a sys_get_number_of_cores() function that calls sysconf or sysctl
Jeremy Allison [Thu, 5 Jan 2012 23:48:24 +0000 (15:48 -0800)]
Add a sys_get_number_of_cores() function that calls sysconf or sysctl
and tunes the aio threads.

7 years agosamba-tool:dns: Check through all the DNS records for a match
Amitay Isaacs [Thu, 5 Jan 2012 23:28:52 +0000 (10:28 +1100)]
samba-tool:dns: Check through all the DNS records for a match

There can be multiple dns records for a specified record type.

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Fri Jan  6 02:41:22 CET 2012 on sn-devel-104

7 years agos4-rpc:dnsserver: Do not replace @ with zone_name in update operation
Amitay Isaacs [Thu, 5 Jan 2012 22:26:49 +0000 (09:26 +1100)]
s4-rpc:dnsserver: Do not replace @ with zone_name in update operation

This fixes the problem when updating DNS record for '@' or domain name.

7 years agoFix bug #8687 - net memberships usage info is wrong
Jeremy Allison [Thu, 5 Jan 2012 21:54:29 +0000 (13:54 -0800)]
Fix bug #8687 - net memberships usage info is wrong

Typo in usage.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Jan  6 00:30:20 CET 2012 on sn-devel-104

7 years agoFix the local-memcache test for 64-bit
Volker Lendecke [Thu, 5 Jan 2012 12:12:26 +0000 (13:12 +0100)]
Fix the local-memcache test for 64-bit

The memcache test walks the purge functionality. The maximum memcache size also
takes all memcache internal headers into account. Those headers contain
pointers, so on 64-bit they take more space...

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Jan  5 22:01:00 CET 2012 on sn-devel-104

7 years agos3: Run the CLEANUP2 test
Volker Lendecke [Thu, 5 Jan 2012 16:47:16 +0000 (17:47 +0100)]
s3: Run the CLEANUP2 test

7 years agos3: Add a test for proper brlock cleanup
Volker Lendecke [Thu, 5 Jan 2012 16:44:44 +0000 (17:44 +0100)]
s3: Add a test for proper brlock cleanup

We need to improve the server here.

Maybe we should validate the brlock entry whenever we detect a read/write being
blocked from locking? This is not our hot code path anyway, and it would gain
us significant robustness. The code might become quite a bit simpler as well.

7 years agos3: Clarify what CLEANUP1 does
Volker Lendecke [Thu, 5 Jan 2012 14:46:22 +0000 (15:46 +0100)]
s3: Clarify what CLEANUP1 does

7 years agoAdd some debug to vfs_aio_pthread so I can see when jobs start and stop.
Jeremy Allison [Thu, 5 Jan 2012 01:02:21 +0000 (17:02 -0800)]
Add some debug to vfs_aio_pthread so I can see when jobs start and stop.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Jan  5 20:28:00 CET 2012 on sn-devel-104

7 years agos3-auth remove outdated comment
Andrew Bartlett [Mon, 26 Dec 2011 04:52:59 +0000 (15:52 +1100)]
s3-auth remove outdated comment

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Jan  5 18:51:47 CET 2012 on sn-devel-104

7 years agos3-librpc remove unused headers
Andrew Bartlett [Mon, 26 Dec 2011 04:21:23 +0000 (15:21 +1100)]
s3-librpc remove unused headers

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-auth Remove more unused headers
Andrew Bartlett [Mon, 26 Dec 2011 04:02:50 +0000 (15:02 +1100)]
s3-auth Remove more unused headers

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-auth remove unused ntlmssp.h
Andrew Bartlett [Mon, 26 Dec 2011 04:01:41 +0000 (15:01 +1100)]
s3-auth remove unused ntlmssp.h

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-auth Remove ntlmssp_wrap.h which is no longer required
Andrew Bartlett [Mon, 26 Dec 2011 03:57:02 +0000 (14:57 +1100)]
s3-auth Remove ntlmssp_wrap.h which is no longer required

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-auth use gensec directly rather than via auth_generic_state
Andrew Bartlett [Mon, 26 Dec 2011 03:23:15 +0000 (14:23 +1100)]
s3-auth use gensec directly rather than via auth_generic_state

This is possible because the s3 gensec modules are started as
normal gensec modules, so we do not need a wrapper any more.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-auth Set remote address for both AD and s3 gensec modes
Andrew Bartlett [Mon, 26 Dec 2011 02:42:37 +0000 (13:42 +1100)]
s3-auth Set remote address for both AD and s3 gensec modes

7 years agos3-auth re-create the auth context in the s3 ntlmssp server module
Andrew Bartlett [Mon, 26 Dec 2011 01:26:43 +0000 (12:26 +1100)]
s3-auth re-create the auth context in the s3 ntlmssp server module

This removes the abstraction violation in auth_generic.c.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-auth Add TALLOC_CTX * to auth_generic_prepare()
Andrew Bartlett [Mon, 26 Dec 2011 01:13:21 +0000 (12:13 +1100)]
s3-auth Add TALLOC_CTX * to auth_generic_prepare()

This makes the long term owner of this memory more clear.  So far only the
clear cases have been moved from NULL however.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-auth supply s3 ntlmssp module via gensec_settings
Andrew Bartlett [Mon, 26 Dec 2011 00:39:29 +0000 (11:39 +1100)]
s3-auth supply s3 ntlmssp module via gensec_settings

This will allow the supply of multiple modules in future
without duplicating the module selection logic.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-selftest: Add test for rpcclient, including kerberos authentication
Andrew Bartlett [Tue, 3 Jan 2012 04:57:40 +0000 (15:57 +1100)]
s3-selftest: Add test for rpcclient, including kerberos authentication

Some knownfail entries are added for things the currently fail.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3:gse: MIT krb5 1.8.1 has a bug in gss_wrap_iov()
Stefan Metzmacher [Thu, 5 Jan 2012 13:59:20 +0000 (14:59 +0100)]
s3:gse: MIT krb5 1.8.1 has a bug in gss_wrap_iov()

gss_krb5int_make_seal_token_v3_iov() doesn't set '*conf_state'.

metze

7 years agos3-librpc store the sign/seal flags we got in the gssapi client
Andrew Bartlett [Tue, 3 Jan 2012 04:48:01 +0000 (15:48 +1100)]
s3-librpc store the sign/seal flags we got in the gssapi client

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-libads Factor out a new routine kerberos_get_principal_from_service_hostname()
Andrew Bartlett [Wed, 4 Jan 2012 00:39:38 +0000 (11:39 +1100)]
s3-libads Factor out a new routine kerberos_get_principal_from_service_hostname()

This is now used in the GSE GSSAPI client, so that when we connect to
a target server at the CIFS level, we use the same name to connect
at the DCE/RPC level.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-librpc Use gsskrb5_get_subkey() where available to get the session key
Andrew Bartlett [Mon, 2 Jan 2012 11:17:06 +0000 (22:17 +1100)]
s3-librpc Use gsskrb5_get_subkey() where available to get the session key

This allows gse_get_session_key() to work against Heimdal.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3: Remove some redundant code
Volker Lendecke [Thu, 5 Jan 2012 14:41:50 +0000 (15:41 +0100)]
s3: Remove some redundant code

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Jan  5 17:16:45 CET 2012 on sn-devel-104

7 years agos3: Run the CLEANUP1 test
Volker Lendecke [Thu, 5 Jan 2012 11:25:39 +0000 (12:25 +0100)]
s3: Run the CLEANUP1 test

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Jan  5 14:42:43 CET 2012 on sn-devel-104

7 years agos3: Add a test excercising the share mode cleanup routine
Volker Lendecke [Thu, 5 Jan 2012 08:23:42 +0000 (09:23 +0100)]
s3: Add a test excercising the share mode cleanup routine

7 years agolibcli/smb: Add smbXcli_conn_samba_suicide
Volker Lendecke [Wed, 4 Jan 2012 12:28:07 +0000 (13:28 +0100)]
libcli/smb: Add smbXcli_conn_samba_suicide

This is a pure test tool against Samba servers

7 years agos3: Move basic SMB checking to a much earlier point
Volker Lendecke [Thu, 5 Jan 2012 10:58:17 +0000 (11:58 +0100)]
s3: Move basic SMB checking to a much earlier point

7 years agos3: Add a suicide mode to smbd
Volker Lendecke [Tue, 3 Jan 2012 21:30:09 +0000 (22:30 +0100)]
s3: Add a suicide mode to smbd

To test our cleanup code paths properly, we need a way to make smbd exit hard
without cleaning up

7 years agos3: Fix some nonempty blank lines
Volker Lendecke [Mon, 2 Jan 2012 12:06:10 +0000 (13:06 +0100)]
s3: Fix some nonempty blank lines

7 years agos4:repl_meta_data LDB module - set "isRecycled" time correctly
Matthias Dieter Wallnöfer [Wed, 4 Jan 2012 15:17:24 +0000 (16:17 +0100)]
s4:repl_meta_data LDB module - set "isRecycled" time correctly

"unix_to_nt_time()" which is based on "time_t" behaves differently for
literals > 32 bit on 32 and 64 bit platforms.

Reviewed-by: ekacnet
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Thu Jan  5 11:59:20 CET 2012 on sn-devel-104

7 years agoAdd S3 vfs_aio_pthread module to replace broken glibc aio code.
Jeremy Allison [Wed, 4 Jan 2012 20:54:16 +0000 (12:54 -0800)]
Add S3 vfs_aio_pthread module to replace broken glibc aio code.

Compiles but not yet tested.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Jan  5 01:43:51 CET 2012 on sn-devel-104

7 years agowaf: Use git repository.
Jelmer Vernooij [Wed, 4 Jan 2012 20:00:42 +0000 (21:00 +0100)]
waf: Use git repository.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Jan  5 00:10:24 CET 2012 on sn-devel-104

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().