1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-31 17:18:04 +03:00
Commit Graph

1058 Commits

Author SHA1 Message Date
Jeremy Allison
2ac579ca76 Add a SMB2 crediting algorithm, by default the same as Windows. Defaults to 128 credits.
Jeremy.
2010-12-10 15:46:41 -08:00
Andrew Bartlett
635fbf2b54 s3-client Use NTLMv2 by default in the Samba client
This matches the improved security measures of Windows Vista.

Andrew Bartlett
2010-12-10 16:08:30 +11:00
Andrew Bartlett
b3c2df5e0d s3-smbd Don't send SPNEGO principal (rfc4178 hint) by default
This patch, based on the suggestion by Goldberg, Neil R. <ngoldber@mitre.org>
turns off the sending of the principal in the negprot by default, matching
Windows 2008 behaviour.

This slowly works us back from this hack, which from an RFC
perspective was never the right thing to do in the first place, but we
traditionally follow windows behaviour.  It also discourages client
implmentations from relying on it, as if they do they are more open to
man-in-the-middle attacks.

Andrew Bartlett
2010-12-10 16:08:30 +11:00
Andrew Bartlett
bb7806283e s3-libads Default to NOT using the server-supplied principal from SPNEGO
This principal is not supplied by later versions of windows, and using
it opens up some oportunities for man in the middle attacks.  (Becuase
it isn't the name being contacted that is verified with the KDC).

This adds the option 'client use spnego principal' to the smb.conf (as
used in Samba4) to control this behaivour.  As in Samba4, this
defaults to false.

Against 2008 servers, this will not change behaviour.  Against earlier
servers, it may cause a downgrade to NTLMSSP more often, in
environments where server names are not registered with the KDC as
servicePrincipalName values.

Andrew Bartlett
2010-12-10 16:08:30 +11:00
Andrew Bartlett
1e96da556a s3-param Fix lp_set_cmdline() to set the flag on alias values too
Otherwise, -d10 would be overridden by 'debug level = 1', because
debug level is an alias of 'log level' which -d was setting.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sat Nov 27 01:02:40 CET 2010 on sn-devel-104
2010-11-27 01:02:40 +01:00
Jeremy Allison
f0dcc90f72 Fix bug 7781 - Samba transforms ShareName to lowercase (sharename) when adding new share via MMC
Change the find_service() interface to not depend on fstring, and
create a useable talloc-based interface.

Jeremy.
2010-11-10 01:14:17 +00:00
Volker Lendecke
f2456cd542 s3: Allow disabling of mdns registrations
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Nov  5 11:24:41 UTC 2010 on sn-devel-104
2010-11-05 11:24:41 +00:00
Andrew Bartlett
b717ec26d9 s3-param Fix up lp_set_cmdline() not to re-store cmdline options on each reload
The previous code was buggy in that it did not honour the 'store'
argument to lp_set_cmdline_helper(), and would use the stored
parameter after freeing it when handling overwritten values.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Nov  2 05:19:17 UTC 2010 on sn-devel-104
2010-11-02 05:19:17 +00:00
Andrew Bartlett
cf4de8ec2c s3-debug Remove 'AllowDebugChange' and use lp_set_cmdline() instead
By removing this global variable, the API between the two different
debug systems is made more similar.  Both s3 and s4 now have
lp_set_cmdline() which ensures that the smb.conf cannot overwrite
these the user-specified log level.

Andrew Bartlett
2010-11-02 04:36:04 +00:00
Andrew Bartlett
9da4ace1d9 s3-debug Impove setup_logging() to specify logging to stderr
This change improves the setup_logging() API so that callers which
wish to set up logging to stderr can simply ask for it, rather than
directly modify the dbf global variable.

Andrew Bartlett
2010-11-02 04:36:04 +00:00
Jeremy Allison
272feb7bd1 Revert "Wrap security_token_has_privilege() with a check for lp_enable_privileges(). Needed"
Not needed - privileges code prevents "enable privileges = no" from adding privileges
anyway.

This reverts commit a8b95686a7.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 22 23:41:36 UTC 2010 on sn-devel-104
2010-10-22 23:41:36 +00:00
Jeremy Allison
a8b95686a7 Wrap security_token_has_privilege() with a check for lp_enable_privileges(). Needed
to maintain compatibility with smb.conf manpage.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 22 18:15:48 UTC 2010 on sn-devel-104
2010-10-22 18:15:48 +00:00
Jeremy Allison
83871d2642 Don't arbitrarily clean all parametric options in add_a_service(),
that is called from many places, not just smb.conf processing. Only
clean parametric options when doing actual smb.conf reading (or
registry equivalent).

Michael Adams, Volker, Metze, please check.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Oct 16 06:46:19 UTC 2010 on sn-devel-104
2010-10-16 06:46:19 +00:00
Volker Lendecke
1e98d5859d s3: Remove talloc_autofree_context() from loadparm.c
None of these uses requires a special destructor
2010-10-08 21:11:45 +02:00
Günther Deschner
34008ef6b3 s3-build: fix the build of test_lp_load.
Guenther
2010-09-23 00:15:22 -07:00
Günther Deschner
62544c5d2b s3-build: only include smbldap.h where needed.
Guenther
2010-09-20 13:54:56 -07:00
Simo Sorce
94d86a22a1 s3-misc: Introduce lp_ncalrpc_dir() in S3, like we have in S4. 2010-09-15 12:53:40 +02:00
Pierre Carrier
eeb24afd78 Allows changing the maximum number of simultaneous clients in winbindd through an smb.conf option.
Signed-off-by: Jeremy Allison <jra@samba.org>
2010-09-14 16:43:39 -07:00
Andrew Tridgell
4ca96834f3 s3-param: added lp_set_cmdline() and --option= parameter
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-02 13:37:08 +10:00
Volker Lendecke
d1d2997b0e s3: Remove an unused macro 2010-08-28 15:12:44 +02:00
Günther Deschner
7a05ca2c9c s3-build: use dbwrap.h only where needed.
Guenther
2010-08-26 00:25:55 +02:00
Andrew Bartlett
d8734c3c03 s3:param Clarify parameter name on init_globals()
This parameter is used with the registry backend to
cause the globals table to be re-initialised.

Andrew Bartlett

Signed-off-by: Michael Adam <obnox@samba.org>
2010-08-22 22:54:59 +02:00
Michael Adam
34092c11b4 s3:loadparm: make lp_load_ex static. We have wrappers for external callers. 2010-08-20 11:14:06 +02:00
Günther Deschner
59289d4fa9 s3-build: only include smb_signing.h where needed.
Guenther
2010-08-18 09:20:13 +02:00
Günther Deschner
dc2313d1e8 s3-param: also remove lp_update_encrypted from loadparm.
Andreas, please check.

Guenther
2010-08-16 13:42:23 +02:00
Andreas Schneider
66b6a8cf62 s3-auth: Remove obsolete 'update encrypted' option. 2010-08-16 12:48:27 +02:00
Michael Adam
6d9f4d6d36 s3:loadparm: add new boolean parameter "idmap read only"
This will be used to be able to put the default idmap config
read only. This can make sense for instance with the tdb2
idmap backend and using the idmap script feature.
2010-08-14 02:10:40 +02:00
Michael Adam
c62f7c7a0b s3:loadparm: remove parameter "idmap alloc backend" 2010-08-14 02:10:40 +02:00
Andreas Schneider
4a5cef82d8 s3-loadparm: Added some comments to lp_load_ex calls.
Signed-off-by: Simo Sorce <idra@samba.org>
2010-08-13 12:20:10 -04:00
Günther Deschner
677dcfa678 s3-param: include svcctl headers in loadparm.
Guenther
2010-08-06 15:43:36 +02:00
Günther Deschner
e7a6a3ec0d s3: avoid global include of ads.h.
Guenther
2010-08-05 00:32:02 +02:00
Andrew Bartlett
dfb206f47e s3:param Put 'server_role' functions in another file.
Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-06-01 17:11:24 +10:00
Andrew Bartlett
6d2e796f35 s3:param Add helper function to get at Gobals.iDomainMaster
This is needed for a future split out of the server_role code.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-06-01 17:11:24 +10:00
Volker Lendecke
2e4c41431e s3: Don't announce readraw and writeraw with the async echo responder 2010-05-31 12:04:28 +02:00
Jeremy Allison
b2a7ad8c95 Make DFS work over SMB2.
Jeremy.
2010-05-21 16:56:10 -07:00
Jeremy Allison
8c9ea2ba7c Set SMB2 max read/write/trans sizes to Win7 compatible - 1Mb.
Jeremy.
2010-05-21 10:32:46 -07:00
Günther Deschner
7f6bb48bdf s3-secdesc: remove "typedef struct security_descriptor SEC_DESC".
Guenther
2010-05-18 12:30:12 +02:00
Günther Deschner
e9f5bdf6b5 smbconf: only include smbconf headers where needed.
Guenther
2010-05-18 10:36:33 +02:00
Luca Olivetti
a9e008ee36 Fix bug #7263 - Unable to print using Samba 3.5.1 and cups-1.1.23-40.46 on SLES10.
Fix cups encryption setting

I had the same problem and it's due to the fact that samba doesn't respect the
"cups encryption" setting since lp_cups_encrypt changes the value: if you set
"cups encryption=no", the first call will change it to HTTP_ENCRYPT_NEVER,
since that is 1 (i.e. true), the next call will change it to
HTTP_ENCRYPT_ALWAYS and after that it'll remain set as HTTP_ENCRYPT_ALWAYS.
This patch fixes this problem.

Don't mix up the HTTP_ENCRYPT_XXX constants up with the
enumeration constants (True, False, Auto) used in the
loadparm code.
2010-05-04 15:07:57 -07:00
Volker Lendecke
5fc2801c09 s3: Cache the username map in gencache
This is for uses with a heavy-weight username map script
2010-04-13 09:30:06 +02:00
Jeremy Allison
9c410118cb Parameterize "smb2 max read", "smb2 max write", "smb2 max trans".
Set to 64k by default.

Jeremy.
2010-04-06 15:43:35 -07:00
Volker Lendecke
0205633ed9 s3: Use bitmap_talloc in loadparm 2010-03-28 15:25:16 +02:00
Jeremy Allison
fac8ca52ad Fix bug #7240 - Net usershare is not case sensitive.
Updates usershare files in a backwards compatible way.
I don't intend to back port this fix to 3.5.x as it
depends on a version upgrade in the share_info.tdb share security database.

Jeremy.
2010-03-26 17:09:58 -07:00
Jeremy Allison
7509b56b5f share_info.tdb could use non-canonicalized sharenames.
Fix this by moving canonicalization into lib/sharesec.c. Update the
db version to 3. Ensures we always find share names with security
descriptors attached.

Jeremy.
2010-03-22 15:57:31 -07:00
Volker Lendecke
70f9338bf2 s3: Add the "ctdb locktime warn threshold" parameter
This is mainly a debugging aid for post-mortem analysis in case a cluster file
system is slow.
2010-03-22 17:32:18 +01:00
Stefan Metzmacher
752240ccdc s3:param: add "async smb echo handler" option
This will enable an extra forked process that will reply
to SMBecho requests, while the main process is blocked by another
request.

metze
2010-03-22 17:15:12 +01:00
Volker Lendecke
b2f45f20b0 s3: Add "log writeable files on exit" parameter
This boolean option controls whether at exit time the server dumps a list of
files with debug level 0 that were still open for write. This is an
administrative aid to find the files that were potentially corrupt if the
network connection died.
2010-03-22 12:03:44 +01:00
Jeremy Allison
a6f402ad87 Remove lp_safe_widelinks() -> convert to just lp_widelinks. Suggestion from Volker.
Create widelinks_warning(int snum) to cover the message needed in make_connection.

Jeremy.
2010-02-11 15:16:23 -08:00
Simo Sorce
5d92d969dd Introduce lp_safe_widelinks()
This way we avoid any chance that a configuration reload may turn
back on wide links when unix extensions are enabled.
2010-02-11 16:27:17 -05:00
Jeremy Allison
f2d7d9774e Revert "Change the default of "nmbd bind explicit broadcast" to "no""
This reverts commit 84fba3c1bc.

Now we have a "processed packet queue" in nmbd we can go back
to doing this by default.

Jeremy.
2010-02-10 12:42:27 -08:00