samba.git
11 years agos3-netlogon: enumerate UPN suffixes from PASSDB when available
Alexander Bokovoy [Wed, 3 Apr 2013 13:52:45 +0000 (16:52 +0300)]
s3-netlogon: enumerate UPN suffixes from PASSDB when available

Optionally append list of UPN suffixes if PDB module returns non-empty one.

Refactor fill_forest_trust_array() in source3 to allow reuse of the code between
_netr_DsRGetForestTrustInformation() and _netr_GetForestTrustInformation()

Implement a special case of _netr_DsRGetForestTrustInformation in smbd
when trusted_domain_name is NULL (covered by test_DsrEnumerateDomainTrusts()
in rpc.netlogon torture tests, see comment in source4/torture/rpc/netlogon.c).

Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Apr  9 22:19:34 CEST 2013 on sn-devel-104

11 years agoPASSDB: add support to set and enumerate UPN suffixes associated with our forest
Alexander Bokovoy [Wed, 3 Apr 2013 13:37:00 +0000 (16:37 +0300)]
PASSDB: add support to set and enumerate UPN suffixes associated with our forest

Samba PDC may manage a forest containing DNS domains in addition to the primary one.
Information about them is advertised via netr_DsRGetForestTrustInformation when
trusted_domain_name is NULL, according to MS-NRPC and MS-LSAD, and
via netr_GetForestTrustInformation.

This changeset only expands PASSDB API; how suffixes are maintained is left
to specific PDB modules. Set function is added so that suffixes could be
managed through 'net' and other Samba utilities, if possible.

One possible implementation is available for ipasam module in FreeIPA:
http://git.fedorahosted.org/cgit/freeipa.git/commit/?id=cc56723151c9ebf58d891e85617319d861af14a4

Reviewed-by: Andreas Schneider <asn@samba.org>
11 years agos3-waf: filter out ldapsam internal init functions
Alexander Bokovoy [Wed, 3 Apr 2013 13:01:34 +0000 (16:01 +0300)]
s3-waf: filter out ldapsam internal init functions

pdb_ldapsam_init* functions (init and init_common) are used in
pdb_ipa.c and pdb_nds.c which are always linked together with
pdb_ldap.c where pdb_ldapsam_init* functions reside.

Tested with both ldapsam integrated (into libpdb) and as
a separate module.

Reviewed-by: Andreas Schneider <asn@samba.org>
11 years agowafsamba: fix samba_abi for default catch-all case
Alexander Bokovoy [Wed, 3 Apr 2013 12:52:06 +0000 (15:52 +0300)]
wafsamba: fix samba_abi for default catch-all case

Only filter out the symbol when positive match was not found and there is
negative match.

ABI signature file generator worked incorrectly for cases when mixture of
positive and negative matches were provided. This resulted in generating empty
signature file for libpdb since there was no catch-all positive match anymore.

Commit 9ba44cc610426fb558b49aa9680b5bdf55c29082 removed explicit '*' positive
match and corresponding vscript generator adds '*' by default if global match
list is empty, so this commit introduces feature parity into signature
generator.

Reviewed-by: Andreas Schneider <asn@samba.org>
11 years agowinbindd: Avoid a fd leak when we can not fork
Volker Lendecke [Tue, 9 Apr 2013 14:37:29 +0000 (16:37 +0200)]
winbindd: Avoid a fd leak when we can not fork

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Jim McDonough <jmcd@samba.org>
Autobuild-User(master): Jim McDonough <jmcd@samba.org>
Autobuild-Date(master): Tue Apr  9 20:27:27 CEST 2013 on sn-devel-104

11 years agopylibsmb: Avoid a segfault if no credentials are passed to libsmb.Conn()
Volker Lendecke [Tue, 9 Apr 2013 12:29:11 +0000 (14:29 +0200)]
pylibsmb: Avoid a segfault if no credentials are passed to libsmb.Conn()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Autobuild-User(master): Richard Sharpe <sharpe@samba.org>
Autobuild-Date(master): Tue Apr  9 18:30:06 CEST 2013 on sn-devel-104

11 years agoBUG 9766: Cache name_to_sid/sid_to_name correctly.
Andreas Schneider [Thu, 4 Apr 2013 10:18:25 +0000 (12:18 +0200)]
BUG 9766: Cache name_to_sid/sid_to_name correctly.

If there is no domain_name specified we still need to set to for
caching else we will not find the entry later if we lookup the entry
with the domain_name.

Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Apr  9 16:32:44 CEST 2013 on sn-devel-104

11 years agoBUG 9139: Fix the username map optimization.
Andreas Schneider [Fri, 5 Apr 2013 12:07:37 +0000 (14:07 +0200)]
BUG 9139: Fix the username map optimization.

If we successfully map a user. We call

set_last_from_to(user_in, unixname);

in the while loop reading the map file. After a successfull map we don't
stop and continue the loop to check all other mappings in the username
mapfile. But when we hit the end of the file and leave the loop we call:

set_last_from_to(user_in, user_in);

This overwrites the successful mapping, and the next time we call
map_username() we skip the username and no mapping is done.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agodoc: Document performance impact of "hide unxx" parameters
Volker Lendecke [Fri, 5 Apr 2013 14:44:08 +0000 (16:44 +0200)]
doc: Document performance impact of "hide unxx" parameters

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Apr  5 18:40:58 CEST 2013 on sn-devel-104

11 years agogetpass: Don't fail if stdin is not a tty
Stef Walter [Thu, 4 Apr 2013 13:55:10 +0000 (15:55 +0200)]
getpass: Don't fail if stdin is not a tty

We don't need to manipulate the tty state (such as turning off
echo) when prompting for passwords if we're not reading from a tty.

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Fri Apr  5 07:34:37 CEST 2013 on sn-devel-104

11 years agotevent: Only set poll_ev->delete=false if it was true
Volker Lendecke [Thu, 4 Apr 2013 08:23:02 +0000 (10:23 +0200)]
tevent: Only set poll_ev->delete=false if it was true

Might not be noticable, but I thought it would be an obvious tiny
optimization. Possibly the compiler already does this.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Apr  4 18:32:39 CEST 2013 on sn-devel-104

11 years agoBUG 9699: Fix adding case sensitive spn.
Andreas Schneider [Wed, 3 Apr 2013 13:46:00 +0000 (15:46 +0200)]
BUG 9699: Fix adding case sensitive spn.

We should be able to define the case of the spn cause it is important
for some services like nfs. 'net ads keytab add "nfs"' should not
result in an uppercase spn.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr  3 23:57:32 CEST 2013 on sn-devel-104

11 years agoccan: fix HAVE_BSWAP_64 for autoconf.
Rusty Russell [Tue, 2 Apr 2013 06:30:01 +0000 (17:00 +1030)]
ccan: fix HAVE_BSWAP_64 for autoconf.

Autoconf defines HAVE_BSWAP_64_DECL, we want HAVE_BSWAP_64.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibsmbclient: Fix cli_session_setup_guest_send
Volker Lendecke [Wed, 3 Apr 2013 11:24:53 +0000 (13:24 +0200)]
libsmbclient: Fix cli_session_setup_guest_send

This worked fine so far, but for the wrong reason: We only ever called
this through the sync wrapper. The tevent_req_nterror in the NT_STATUS_OK
case does not call tevent_req_finish. So the tevent_loop_poll did call
into the core send/receive smb code. This is a fix for the case when
smb1cli_req_chain_submit fails for some reason.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Apr  3 18:39:30 CEST 2013 on sn-devel-104

11 years agontvfs: support setfileinfo with FULL_EA_INFORMATION
David Disseldorp [Wed, 3 Apr 2013 12:01:00 +0000 (14:01 +0200)]
ntvfs: support setfileinfo with FULL_EA_INFORMATION

Use existing unmarshall and set helper functions. This allows the
smb2.setinfo.setinfo test to run against the ntvfs file server.

Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Apr  3 16:14:33 CEST 2013 on sn-devel-104

11 years agos3:wscript: change --with-dmapi to default=auto to match the autoconf build
Stefan Metzmacher [Fri, 22 Mar 2013 08:39:42 +0000 (09:39 +0100)]
s3:wscript: change --with-dmapi to default=auto to match the autoconf build

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Apr  3 11:45:12 CEST 2013 on sn-devel-104

11 years agowafsamba: display the default value in help for SAMBA3_ADD_OPTION
Stefan Metzmacher [Fri, 22 Mar 2013 08:37:09 +0000 (09:37 +0100)]
wafsamba: display the default value in help for SAMBA3_ADD_OPTION

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agos3:modules: fix the build of vfs_notify_fam (bug #9545)
Stefan Metzmacher [Fri, 22 Mar 2013 08:30:05 +0000 (09:30 +0100)]
s3:modules: fix the build of vfs_notify_fam (bug #9545)

This adds the --with-fam option and configure checks.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agos3:lib/server_mutex: open mutex.tdb with CLEAR_IF_FIRST
Stefan Metzmacher [Thu, 28 Mar 2013 10:04:31 +0000 (11:04 +0100)]
s3:lib/server_mutex: open mutex.tdb with CLEAR_IF_FIRST

/var/lock/samba is typically on tpmfs.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agos3:lib/gencache: place gencache.tdb into /var/cache/samba
Stefan Metzmacher [Thu, 28 Mar 2013 10:00:27 +0000 (11:00 +0100)]
s3:lib/gencache: place gencache.tdb into /var/cache/samba

/var/lock/samba is located on tmpfs on newer systems,
but we want to keep things like the server affinity cache
across reboots.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agoEnsure EA value is allocated on the right context.
Jeremy Allison [Thu, 28 Mar 2013 15:55:11 +0000 (08:55 -0700)]
Ensure EA value is allocated on the right context.

Ensure we free on error condition (tidyup, not a leak).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Apr  2 21:54:33 CEST 2013 on sn-devel-104

11 years agoFinal fix for bug #9130 - Certain xattrs cause Windows error 0x800700FF
Jeremy Allison [Wed, 27 Mar 2013 18:54:34 +0000 (11:54 -0700)]
Final fix for bug #9130 - Certain xattrs cause Windows error 0x800700FF

The spec lies when it says that NextEntryOffset is the only value
considered when finding the next EA. We were adding 4 more extra
pad bytes than needed (i.e. if the next entry already was on a 4
byte boundary, then we were adding 4 additional pad bytes).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
11 years agoEnsure we don't return uninitialized memory in the pad bytes.
Jeremy Allison [Tue, 26 Mar 2013 23:46:51 +0000 (16:46 -0700)]
Ensure we don't return uninitialized memory in the pad bytes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
11 years agoAdd a test to show that zero-length EA's are never returned over SMB2.
Jeremy Allison [Tue, 26 Mar 2013 20:26:49 +0000 (13:26 -0700)]
Add a test to show that zero-length EA's are never returned over SMB2.

Zero length EA's only delete an EA, never store. Proves we should
never return zero-length EA's even if they have been set on the
POSIX side.

ntvfs server doesn't implement the FULL_EA_INFORMATION setinfo
call, so add to selftest/knownfail.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
11 years agoFix bug #9130 - Certain xattrs cause Windows error 0x800700FF
Jeremy Allison [Tue, 26 Mar 2013 23:38:00 +0000 (16:38 -0700)]
Fix bug #9130 - Certain xattrs cause Windows error 0x800700FF

Ensure ntvfs server never returns zero length EA's.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
11 years agoFix bug #9130 - Certain xattrs cause Windows error 0x800700FF
Jeremy Allison [Tue, 26 Mar 2013 23:37:22 +0000 (16:37 -0700)]
Fix bug #9130 - Certain xattrs cause Windows error 0x800700FF

Ensure we never return any zero-length EA's.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
11 years agoChange estimate_ea_size() to correctly estimate the EA size over SMB2.
Jeremy Allison [Tue, 26 Mar 2013 22:54:31 +0000 (15:54 -0700)]
Change estimate_ea_size() to correctly estimate the EA size over SMB2.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
11 years agoModify fill_ea_chained_buffer() to be able to do size calculation only, no marshalling.
Jeremy Allison [Tue, 26 Mar 2013 22:46:06 +0000 (15:46 -0700)]
Modify fill_ea_chained_buffer() to be able to do size calculation only, no marshalling.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
11 years agoEnsure we can never return an uninitialized EA list.
Jeremy Allison [Fri, 29 Mar 2013 17:07:20 +0000 (10:07 -0700)]
Ensure we can never return an uninitialized EA list.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
11 years agoAdd a comment about why we are removing the INHERITED bit so people understand.
Richard Sharpe [Tue, 2 Apr 2013 13:48:03 +0000 (06:48 -0700)]
Add a comment about why we are removing the INHERITED bit so people understand.

Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Apr  2 20:05:13 CEST 2013 on sn-devel-104

11 years agoBUG 9758: Don't leak the epm_Map policy handle.
Andreas Schneider [Tue, 2 Apr 2013 11:08:19 +0000 (13:08 +0200)]
BUG 9758: Don't leak the epm_Map policy handle.

Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Tue Apr  2 17:16:56 CEST 2013 on sn-devel-104

11 years agoepm: Increase debug level for already registered endpoints.
Andreas Schneider [Tue, 2 Apr 2013 11:09:13 +0000 (13:09 +0200)]
epm: Increase debug level for already registered endpoints.

Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agoFix bad SMB2 opcode reading in server.
Jeremy Allison [Tue, 2 Apr 2013 03:11:26 +0000 (20:11 -0700)]
Fix bad SMB2 opcode reading in server.

SMB2 opcodes are 16-bit values. We should *never*
be reading them with IVAL(inhdr, SMB2_HDR_OPCODE),
it should always be SVAL(inhdr, SMB2_HDR_OPCODE).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Autobuild-User(master): Richard Sharpe <sharpe@samba.org>
Autobuild-Date(master): Tue Apr  2 07:28:48 CEST 2013 on sn-devel-104

11 years agoMake sure that we only propogate the INHERITED flag when we are allowed to.
Richard Sharpe [Thu, 28 Mar 2013 02:36:43 +0000 (19:36 -0700)]
Make sure that we only propogate the INHERITED flag when we are allowed to.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Mar 28 19:43:41 CET 2013 on sn-devel-104

11 years agoOptimization suggested by Volker. Don't do a stat system call on normal read path.
Jeremy Allison [Mon, 25 Mar 2013 16:54:50 +0000 (09:54 -0700)]
Optimization suggested by Volker. Don't do a stat system call on normal read path.

Only do it if we need it in the sendfile() path.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Mar 28 17:51:22 CET 2013 on sn-devel-104

11 years agolibcli/auth: avoid using transactions a chainlock is enough
Stefan Metzmacher [Wed, 27 Mar 2013 07:43:18 +0000 (08:43 +0100)]
libcli/auth: avoid using transactions a chainlock is enough

We're just writting a single record into a CLEAR_IF_FIRST|TDB_NOSYNC
tdb.

We just need to make sure we lock the record between reading and writting.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Mar 28 14:52:14 CET 2013 on sn-devel-104

11 years agoCall smb_panic when we try to exit the server uncleanly. This gives us the normal...
Richard Sharpe [Wed, 27 Mar 2013 03:17:11 +0000 (20:17 -0700)]
Call smb_panic when we try to exit the server uncleanly. This gives us the normal traceback and memory dump, but also runs the normal panic action.

Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Mar 27 22:58:37 CET 2013 on sn-devel-104

11 years agoauth/ntlmssp: Avoid use-after-free of user_info after logon failure at log level 5
Andrew Bartlett [Fri, 15 Mar 2013 02:00:55 +0000 (13:00 +1100)]
auth/ntlmssp: Avoid use-after-free of user_info after logon failure at log level 5

Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agodbwrap: Add a comment explaining a restriction
Volker Lendecke [Wed, 27 Mar 2013 09:23:50 +0000 (10:23 +0100)]
dbwrap: Add a comment explaining a restriction

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Mar 27 13:40:15 CET 2013 on sn-devel-104

11 years agosmbd: Remove an optimization that became unnecessary
Volker Lendecke [Wed, 31 Oct 2012 12:13:50 +0000 (13:13 +0100)]
smbd: Remove an optimization that became unnecessary

After we only collect nonlocal vnns in idx_state.vnns now, at this point
we *know* we have something to send to a remote node. The previous code
avoided the call to notify_push_remote_blob with an if-statement that
has now become unnecessary.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Mar 26 13:16:39 CET 2013 on sn-devel-104

11 years agosmbd: We don't collect our own vnn anymore
Volker Lendecke [Wed, 31 Oct 2012 12:11:19 +0000 (13:11 +0100)]
smbd: We don't collect our own vnn anymore

notify_trigger_index_parser will not anymore add ourselves into the vnn
list that it collects.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agosmbd: Slightly simplify notify_trigger
Volker Lendecke [Wed, 31 Oct 2012 12:10:12 +0000 (13:10 +0100)]
smbd: Slightly simplify notify_trigger

We have a good chance that we did not collect any remote vnns. This
avoids trying to walk the remote vnns altogether.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agosmbd: Slightly simplify notify_trigger
Volker Lendecke [Wed, 31 Oct 2012 12:08:18 +0000 (13:08 +0100)]
smbd: Slightly simplify notify_trigger

This straightens the for-loop walking the path components slightly

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agosmbd: Avoid some talloc_realloc in notify_internal
Volker Lendecke [Wed, 31 Oct 2012 12:02:19 +0000 (13:02 +0100)]
smbd: Avoid some talloc_realloc in notify_internal

For the nonclustered case we will only ever have one vnn in notify_index.tdb.
For this case, without this patch we did talloc_realloc when collecting vnns to
be able to do the memcpy instead of explicit copy with a for-loop. This new
code will partition the new vnns we see when parsing a notify_index.tdb record
into ourselves and all foreign vnns, only really collecting the foreign ones in
an array.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agodbwrap-ctdb: Avoid a talloc_stackframe()
Volker Lendecke [Sat, 24 Nov 2012 14:42:06 +0000 (14:42 +0000)]
dbwrap-ctdb: Avoid a talloc_stackframe()

We have only a single allocation in this routine, so I think we can live
without a stackframe.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agoctdb-conn: remove ctdbd_fetch
Volker Lendecke [Sat, 24 Nov 2012 14:15:38 +0000 (14:15 +0000)]
ctdb-conn: remove ctdbd_fetch

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agodbwrap-ctdb: Use ctdbd_parse in db_ctdb_parse_record
Volker Lendecke [Sat, 24 Nov 2012 14:14:37 +0000 (14:14 +0000)]
dbwrap-ctdb: Use ctdbd_parse in db_ctdb_parse_record

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agoctdb-conn: Add ctdbd_parse
Volker Lendecke [Fri, 23 Nov 2012 16:54:57 +0000 (17:54 +0100)]
ctdb-conn: Add ctdbd_parse

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agotdb: Fix blank line endings
Volker Lendecke [Mon, 18 Mar 2013 13:39:04 +0000 (14:39 +0100)]
tdb: Fix blank line endings

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agotdb: Little format change
Volker Lendecke [Mon, 18 Mar 2013 09:53:49 +0000 (10:53 +0100)]
tdb: Little format change

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agosmbd: Avoid sending 0-sized keys to dbwrap
Volker Lendecke [Mon, 25 Mar 2013 13:52:24 +0000 (14:52 +0100)]
smbd: Avoid sending 0-sized keys to dbwrap

Start the notification one level below /. Sharing and notifying / for changes
is broken at this moment anyway. When sharing / and someone wants to get
notified for changes under /usr, we store "//usr" as the notify_index key. So
this patch does not break anything that is not broken today, and it avoids a
bogus call to dbwrap_parse_records.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agodbwrap: Use tdb_null in db_ctdb_delete
Volker Lendecke [Sat, 24 Nov 2012 14:51:02 +0000 (14:51 +0000)]
dbwrap: Use tdb_null in db_ctdb_delete

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Mon Mar 25 19:42:30 CET 2013 on sn-devel-104

11 years agoscripting: Fill the ProvisionNames hash with strings, not ldb.MessageElement or Dn
Andrew Bartlett [Fri, 22 Mar 2013 10:58:25 +0000 (21:58 +1100)]
scripting: Fill the ProvisionNames hash with strings, not ldb.MessageElement or Dn

This avoids the need to fix it up again in samba_upgradedns.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Mar 25 13:25:30 CET 2013 on sn-devel-104

11 years agosamba-tool ldapcmp: Remove the GUID -> name mappings
Andrew Bartlett [Fri, 22 Mar 2013 10:36:49 +0000 (21:36 +1100)]
samba-tool ldapcmp: Remove the GUID -> name mappings

These mappings are very convenient, however because they are not
one-to-one, they lead to differences being reported when none exist,
dependent only on the order the schema searches return results in.

Sadly the time saved by the names is offset by the time wasted chasing
the 'differences' that don't exist.

This in turn fixes some tests that were previously knownfail

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agoselftest: Add tests for samba-tool dbcheck --reset-well-known-acls
Andrew Bartlett [Fri, 22 Mar 2013 06:12:43 +0000 (17:12 +1100)]
selftest: Add tests for samba-tool dbcheck --reset-well-known-acls

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agoscripting: Modify samba.descriptor.get_diff_sds() to cope with a missing reference...
Andrew Bartlett [Fri, 22 Mar 2013 11:16:03 +0000 (22:16 +1100)]
scripting: Modify samba.descriptor.get_diff_sds() to cope with a missing reference owner

This allows the reference SD not to have an owner specified, and still
have the comparison with a database SD that does have an owner pass.
(And the same for owning group).

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agosamba-tool dbcheck: Allow dbcheck to correct an nTSecurityDescriptor without an owner...
Andrew Bartlett [Mon, 11 Feb 2013 03:49:01 +0000 (14:49 +1100)]
samba-tool dbcheck: Allow dbcheck to correct an nTSecurityDescriptor without an owner or group

This is done by making a modification to the SD, which triggers it to be
filled in if we have the correct session_info established on the DB.

However, we normally want dbcheck running as system, so we wrap
the session_info set around this operation only.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agosamba-tool dbcheck: Add --reset-well-known-acls
Andrew Bartlett [Mon, 11 Feb 2013 03:49:01 +0000 (14:49 +1100)]
samba-tool dbcheck: Add --reset-well-known-acls

This will allow an upgrade from Samba 4.0.0 without needing to run
samba_upgradeprovision, which for now is not the preferred upgrade
tool.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agoscripting: Move get_diff_sds from samba.upgradehelpers to samba.descriptor
Andrew Bartlett [Fri, 22 Mar 2013 05:19:27 +0000 (16:19 +1100)]
scripting: Move get_diff_sds from samba.upgradehelpers to samba.descriptor

This helps avoid a dependency loop when we use get_diff_sds in dbcheck.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agoscripting: Modify samba.descriptor.get_wellknown_sds() use samdb calls only
Andrew Bartlett [Fri, 22 Mar 2013 00:15:38 +0000 (11:15 +1100)]
scripting: Modify samba.descriptor.get_wellknown_sds() use samdb calls only

We need this routine not to use the names context as this is tied to
provision, and we end up in a circular dependency if we use that in
dbcheck.

Andrew Bartlett

11 years agoscripting: Move samba.provision.descriptor to samba.descriptor
Andrew Bartlett [Thu, 21 Mar 2013 02:34:26 +0000 (13:34 +1100)]
scripting: Move samba.provision.descriptor to samba.descriptor

This will allow dbcheck to import it, without a cirucular dependency via
samba.provision importing dbcheck.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agoscripting: Make samba.provision.descriptor.get_wellknown_sds() return ldb.Dn objects
Andrew Bartlett [Thu, 21 Mar 2013 01:49:46 +0000 (12:49 +1100)]
scripting: Make samba.provision.descriptor.get_wellknown_sds() return ldb.Dn objects

As we look to use this function in more places, it does not make sense to constantly create
Dn objects from the strings.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agoscripting: Fix documentation comment on upgradehelpers.py:get_clean_sd
Andrew Bartlett [Wed, 20 Mar 2013 03:50:55 +0000 (14:50 +1100)]
scripting: Fix documentation comment on upgradehelpers.py:get_clean_sd

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agoscripting: Move the list of well known SDs to samba.provision.descriptor
Andrew Bartlett [Wed, 20 Mar 2013 03:12:26 +0000 (14:12 +1100)]
scripting: Move the list of well known SDs to samba.provision.descriptor

This will allow us to call this from dbcheck.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agobuild: Do not pass CPP="" to pidl, skip the env variable entirely
Andrew Bartlett [Fri, 22 Mar 2013 02:47:46 +0000 (13:47 +1100)]
build: Do not pass CPP="" to pidl, skip the env variable entirely

This will cause pidl to use $CC -E instead.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agobuild: Remove the forced use of only the first part of the compiler string
Andrew Bartlett [Fri, 22 Mar 2013 02:06:43 +0000 (13:06 +1100)]
build: Remove the forced use of only the first part of the compiler string

This corrects parts of 378295c3fe813c70815a14c7de608e4a859bd6cc and
301d59caf2ee6f49e108b748b0e38221dec9bb96.  This is seen if CC="ccache
gcc" and CPP isn't used for some reason.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agovfs-btrfs: Fix build on 32 bit platforms by using long long types
Andrew Bartlett [Wed, 20 Mar 2013 01:46:22 +0000 (12:46 +1100)]
vfs-btrfs: Fix build on 32 bit platforms by using long long types

Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date(master): Sun Mar 24 06:17:55 CET 2013 on sn-devel-104

11 years agoRevert "vfs_btrfs: fix compile on 32-bit platforms."
Rusty Russell [Sun, 24 Mar 2013 03:28:02 +0000 (13:58 +1030)]
Revert "vfs_btrfs: fix compile on 32-bit platforms."

This reverts commit fd6d0361d6fef5f8175967ddbae4a2b1d79dfcad.

Unreviewed, and Andrew has a better fix.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agontdb: don't call open hook when re-opening an existing database.
Rusty Russell [Sat, 23 Mar 2013 06:57:57 +0000 (17:27 +1030)]
ntdb: don't call open hook when re-opening an existing database.

In particular, the Samba dbwrap wrapper can do this for schannel_store,
with the openhook set to clear the database if it can get the lock
(which, being in the same process, it can).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date(master): Sat Mar 23 09:39:50 CET 2013 on sn-devel-104

11 years agovfs_btrfs: fix compile on 32-bit platforms.
Rusty Russell [Sat, 23 Mar 2013 06:56:57 +0000 (17:26 +1030)]
vfs_btrfs: fix compile on 32-bit platforms.

uint64_t are not unsigned longs on 32-bit platforms:

[3265/3996] Compiling source3/modules/vfs_btrfs.c
../source3/modules/vfs_btrfs.c: In function ‘btrfs_copy_chunk_send’:
../source3/modules/vfs_btrfs.c:118:3: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ [-Werror=format]
../source3/modules/vfs_btrfs.c:118:3: error: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘int64_t’ [-Werror=format]
../source3/modules/vfs_btrfs.c:118:3: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint64_t’ [-Werror=format]
../source3/modules/vfs_btrfs.c:118:3: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘uint64_t’ [-Werror=format]
../source3/modules/vfs_btrfs.c: In function ‘btrfs_copy_chunk_recv’:
../source3/modules/vfs_btrfs.c:180:2: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘off_t’ [-Werror=format]
cc1: some warnings being treated as errors

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agosmbd: Tune "dir" a bit.
Volker Lendecke [Thu, 21 Mar 2013 21:00:06 +0000 (22:00 +0100)]
smbd: Tune "dir" a bit.

for i in $(seq 1 20000) ; do echo dir ; done | smbclient //127.0.0.1/tmp -U%

without and with this patch:

$ time bin/smbd -d0 -i
smbd version 4.1.0pre1-GIT-1f139ae started.
Copyright Andrew Tridgell and the Samba Team 1992-2013
Beendet

real    0m28.342s
user    0m10.249s
sys     0m10.513s

$ time bin/smbd -d0 -i
smbd version 4.1.0pre1-GIT-1f139ae started.
Copyright Andrew Tridgell and the Samba Team 1992-2013
Beendet

real    0m27.348s
user    0m9.089s
sys     0m10.853s

The "real" timestamp is irrelevant, this also contains the time between
starting smbd and the smbclient job. It's the "user" time. The result that this
patch improves the time spent in user space by 10% is consistent.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Mar 22 22:10:57 CET 2013 on sn-devel-104

11 years agoFix bug #9733 - smbcontrol close-share is not working.
Jeremy Allison [Thu, 21 Mar 2013 20:47:07 +0000 (13:47 -0700)]
Fix bug #9733 - smbcontrol close-share is not working.

As part of forcibly disconnecting a client from a share,
smbd must atomically call reload_services() to ensure that
the entry in the ServicePtrs[] array corresponding to
that share is removed if the share was removed from
the smb.conf or registry entries.

Otherwise the ServicePtrs[] array entry for the share
remains active and the client races to auto-reconnect to
the share before a second message to reload the smb.conf
file can be sent.

This has to be done as part of the close-share message
processing, as removing the share from the smb.conf file
first, then telling the smbd to reload followed by the
forcible disconnect message doesn't work as in this
sequence of events when the reload message is received
the client is still connected to the share, so the
ServicePtrs[] entry is still left active.

The forcible-disconnect + service reload has to be done
together as an atomic operation in order for this to work.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Mar 22 20:10:11 CET 2013 on sn-devel-104

11 years agoFix tevent testsuite issue on Solaris.
Jeremy Allison [Fri, 8 Mar 2013 21:44:08 +0000 (13:44 -0800)]
Fix tevent testsuite issue on Solaris.

On Solaris/Nexenta/Illumos once a pipe is full it will not be reported
as writable until PIPE_BUF (actually on Solaris 4096, which is less than
PIPE_BUF) bytes have been read from it.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Mar 22 18:16:45 CET 2013 on sn-devel-104

11 years agoSolaris/Illumos/Nexenta creates pipes that are bi-directional by default.
Jeremy Allison [Fri, 8 Mar 2013 18:09:01 +0000 (10:09 -0800)]
Solaris/Illumos/Nexenta creates pipes that are bi-directional by default.

Ensure the test code will pass against such a system (allow writes/reads
going both ways).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
11 years agoBUG 9735: Fix winbind seperator in upn to username conversion.
Andreas Schneider [Fri, 22 Mar 2013 13:15:57 +0000 (14:15 +0100)]
BUG 9735: Fix winbind seperator in upn to username conversion.

Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Mar 22 16:18:06 CET 2013 on sn-devel-104

11 years agos3:waf fix build on AIX
Stefan Metzmacher [Mon, 18 Mar 2013 11:52:50 +0000 (11:52 +0000)]
s3:waf fix build on AIX

AIX acl code needs to be built by default on AIX,
otherwise smbd will fail to start because of missing symbols

This fixes Bug 9557 - build succeeds, but binaries don't run

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Thu Mar 21 16:31:19 CET 2013 on sn-devel-104

11 years agos4:torture: let raw.read accept larger reads than 0x10000
Stefan Metzmacher [Wed, 20 Mar 2013 07:49:20 +0000 (08:49 +0100)]
s4:torture: let raw.read accept larger reads than 0x10000

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Mar 20 21:53:20 CET 2013 on sn-devel-104

11 years agos4:torture: raw.read fix large reads against windows
Stefan Metzmacher [Tue, 19 Mar 2013 16:11:03 +0000 (17:11 +0100)]
s4:torture: raw.read fix large reads against windows

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agos3:selftest: Add LARGE_READX test into our make test infrastructure.
Jeremy Allison [Wed, 13 Mar 2013 22:45:12 +0000 (15:45 -0700)]
s3:selftest: Add LARGE_READX test into our make test infrastructure.

Tested against non-encrypted and encrypted connections.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:torture: Add new LARGE_READX test to investigate large SMBreadX behavior.
Jeremy Allison [Wed, 13 Mar 2013 22:43:21 +0000 (15:43 -0700)]
s3:torture: Add new LARGE_READX test to investigate large SMBreadX behavior.

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agos4:smb_server: fix large read_andx requests
Stefan Metzmacher [Mon, 18 Mar 2013 18:50:38 +0000 (19:50 +0100)]
s4:smb_server: fix large read_andx requests

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agos3:smbd: Add functions calc_max_read_pdu()/calc_read_size() to work out the length...
Jeremy Allison [Fri, 15 Mar 2013 18:57:48 +0000 (11:57 -0700)]
s3:smbd: Add functions calc_max_read_pdu()/calc_read_size() to work out the length we should return.

LARGE_READX test shows it's always safe to return a short read.
Windows does so. Do the calculations to return what will fit
in a read depending on what the client negotiated.

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd: Remove server_will_accept_large_read() and erroneous comment.
Jeremy Allison [Fri, 15 Mar 2013 18:53:04 +0000 (11:53 -0700)]
s3:smbd: Remove server_will_accept_large_read() and erroneous comment.

We're going to replace this with a function that calculates
the max PDU to return on a read and supports short reads.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd: Fix off-by 4 error in wrap protection code in create_outbuf()
Jeremy Allison [Mon, 18 Mar 2013 22:05:24 +0000 (15:05 -0700)]
s3:smbd: Fix off-by 4 error in wrap protection code in create_outbuf()

Subtract 4 from smb_size (39) here as the length
of the SMB reply following the 4 byte type+length
field can be up to 0xFFFFFF bytes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd: add some const to req_is_in_chain()
Stefan Metzmacher [Mon, 18 Mar 2013 11:36:30 +0000 (12:36 +0100)]
s3:smbd: add some const to req_is_in_chain()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agos3:smbd: remove silly (SMB_OFF_T_BITS == 64) checks
Stefan Metzmacher [Tue, 19 Mar 2013 12:24:46 +0000 (13:24 +0100)]
s3:smbd: remove silly (SMB_OFF_T_BITS == 64) checks

configure will abort if sizeof(off_t) is not 8.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agos3:smbd: keep global_client_caps and max_send from the first successful session setup
Stefan Metzmacher [Mon, 18 Mar 2013 09:10:25 +0000 (10:10 +0100)]
s3:smbd: keep global_client_caps and max_send from the first successful session setup

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agos3:libsmb: let cli_read_andx_create() accept any length
Stefan Metzmacher [Mon, 18 Mar 2013 08:33:00 +0000 (09:33 +0100)]
s3:libsmb: let cli_read_andx_create() accept any length

It's up to the server to decide the allowed length.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibcli/smb: smb1cli_inbuf_parse_chain() and smb1cli_conn_dispatch_incoming() should...
Jeremy Allison [Wed, 13 Mar 2013 22:23:52 +0000 (15:23 -0700)]
libcli/smb: smb1cli_inbuf_parse_chain() and smb1cli_conn_dispatch_incoming() should use smb_len_tcp.

They have to cope with large READX call replies that have
a length greater than smb_len_nbt() can handle.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agolibcli/smb: defer failing for missing NEGOTIATE_SECURITY_SIGNATURES_ENABLED
Stefan Metzmacher [Mon, 18 Mar 2013 14:02:55 +0000 (15:02 +0100)]
libcli/smb: defer failing for missing NEGOTIATE_SECURITY_SIGNATURES_ENABLED

Windows servers take a look at the FLAGS2_SMB_SECURITY_SIGNATURES_REQUIRED
flag during a session setup and turn on signing if the client requires it.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agos3:libsmb: make use of SMB_CAP_LEGACY_CLIENT_MASK instead of SMB_CAP_CLIENT_MASK
Stefan Metzmacher [Tue, 19 Mar 2013 08:03:38 +0000 (09:03 +0100)]
s3:libsmb: make use of SMB_CAP_LEGACY_CLIENT_MASK instead of SMB_CAP_CLIENT_MASK

This should allow smbclient to keep using large reads against older Samba versions
(<= 3.6.x) and other servers that may also require this.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agolibcli/smb: add SMB_CAP_LEGACY_CLIENT_MASK define
Stefan Metzmacher [Tue, 19 Mar 2013 08:02:52 +0000 (09:02 +0100)]
libcli/smb: add SMB_CAP_LEGACY_CLIENT_MASK define

Older Samba releases (<= 3.6.x)
expect the client to send CAP_LARGE_READX
in order to let the client use large reads.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agos3:registry accept windows like long hivenames
Gregor Beck [Wed, 20 Mar 2013 12:00:26 +0000 (13:00 +0100)]
s3:registry accept windows like long hivenames

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Wed Mar 20 17:08:52 CET 2013 on sn-devel-104

11 years agos3:include bump profile memory area version number
Christian Ambach [Thu, 14 Mar 2013 22:19:25 +0000 (23:19 +0100)]
s3:include bump profile memory area version number

forgot to bump this earlier when removing the counters for setdir

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agowkssvc: Fix bug 9727, NULL pointer dereference
Volker Lendecke [Mon, 18 Mar 2013 08:36:17 +0000 (09:36 +0100)]
wkssvc: Fix bug 9727, NULL pointer dereference

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Mar 18 11:39:27 CET 2013 on sn-devel-104

11 years agosamba-tool group list: add more info to samba-tool group list
Ricky Nance [Mon, 11 Mar 2013 19:47:19 +0000 (14:47 -0500)]
samba-tool group list: add more info to samba-tool group list

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Mar 17 12:56:47 CET 2013 on sn-devel-104

11 years agoFix bug #9724 - is_encrypted_packet() function incorrectly used inside server.
Jeremy Allison [Fri, 15 Mar 2013 22:05:31 +0000 (15:05 -0700)]
Fix bug #9724 - is_encrypted_packet() function incorrectly used inside server.

The is_encrypted_packet() function should only be used on the raw received data
to determine if a packet came in encrypted. Once we're inside the SMB1
processing code in smbd/reply.c we should be looking at the
smb1request->encrypted field to determine if a packet was really encrypted or
not.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Mar 16 12:44:44 CET 2013 on sn-devel-104

11 years agoexamples/libsmbclient: Cast mode_t to unsigned int for GNU/Solaris build
Andrew Bartlett [Thu, 14 Mar 2013 23:14:35 +0000 (10:14 +1100)]
examples/libsmbclient: Cast mode_t to unsigned int for GNU/Solaris build

Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Mar 15 20:22:08 CET 2013 on sn-devel-104

11 years agos3-lsad: Cast getpid() result to unsigned int for GNU/Solaris build
Andrew Bartlett [Thu, 14 Mar 2013 23:06:10 +0000 (10:06 +1100)]
s3-lsad: Cast getpid() result to unsigned int for GNU/Solaris build

Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agos3-epmd: Cast getpid() result to unsigned int for GNU/Solaris build
Andrew Bartlett [Thu, 14 Mar 2013 23:02:53 +0000 (10:02 +1100)]
s3-epmd: Cast getpid() result to unsigned int for GNU/Solaris build

Reviewed-by: Jeremy Allison <jra@samba.org>