1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-18 17:57:55 +03:00

504 Commits

Author SHA1 Message Date
Martin Pool
b32ae2d83f lp_string: Add note about dodgy StrnCpy use. -
Jeremy Allison
4a739d914b Added limit to number of jobs enumerated. Set to 0 (means no limit).
Yes I will add the docs....
Jeremy.
-
Jelmer Vernooij
f8f2165322 - Rename 'modules = ' to 'preload modules = '
- Add smb_probe_module()
- Add init_modules()
- Call these functions
-
Andrew Bartlett
6f32fa2349 Remove 'unixsam' from the default passdb backends.
The intention is to remove the muliple passdb backends, but we need the
'guest' account to always be there.  If the admin adds the guest account to
(say) LDAP, there will only be one backend required for operation.

This helps remove some nasty behaviours with adding accounts to the system
for both the RPC 'create user' and the SAMSYNC code.  Users 'added' with
an 'add user/machine' script won't magicly appear, and machine accounts
'pre-added' to unix, but not the smbpasswd file will not cause mayhem.

This commit also implements somthing tridge discussed with me, the concept
of 'default' passdb operation pointers - so that each backend does not
need it's own stub funcitons wrapping the default tdb privilages/group
mapping code.

This also removes an implicit 'sid->name' and 'name->sid' mapping from our
own local SID space, to winbind usernames.  When adding mapping for NIS/LDAP
non-sam users in future, we need to be careful.

Andrew Bartlett
-
Jim McDonough
822083f73e rename 'winbind backend' to 'idmap backend'. Put paramter in security section...does this make sense? -
Jim McDonough
35e4448dcb From aliguori@us.ibm.com:
This patch adds the architecture for an IDMAP backend system including a new
smb.conf parameter "winbind backend".  Right now, the only valid value is "tdb"
but I'm currently working on an LDAP backend.
-
Andrew Bartlett
85e9c060ea (only for HEAD at the moment).
Add NTLMv2 support to our client, used when so configured ('client use NTLMv2 =
yes') and only when 'client use spengo = no'.  (A new option to allow the
client and server ends to chose spnego seperatly).

NTLMv2 signing doesn't yet work, and NTLMv2 is not done for NTLMSSP yet.

Also some parinoia checks in our input parsing.

Andrew Bartlett
-
Andrew Bartlett
1a2738937e We now have client-side SMB signing support!
This checking allows us to connect to Microsoft servers the use SMB signing,
within a few restrictions:

 - I've not get the NTLMSSP stuff going - it appears to work, but if you break
the sig - say by writing a zero in it - it still passes...
 - We don't currently verfiy the server's reply
 - It works against one of my test servers, but not the other...

However, it provides an excellent basis to work from.  Enable it with 'client
signing' in your smb.conf.

Doc to come (tomorrow) and this is not for 3.0, till we get it complete.

The CIFS Spec is misleading - the session key (for NTLMv1 at least) is the
standard session key, ie MD4(NT#).

Thanks to jra for the early work on this.

Andrew Bartlett
-
Andrew Bartlett
71f4d8efd3 Patch from metze to to make testparm show values for 'workgroup', 'netbios
name' and 'netbios scope'.  Probably has a similar effect on SWAT.

Also adds '-V' to testparm.

Andrew Bartlett
-
Andrew Bartlett
92a777d0ea BIG patch...
This patch makes Samba compile cleanly with -Wwrite-strings.
 - That is, all string literals are marked as 'const'.  These strings are
always read only, this just marks them as such for passing to other functions.

What is most supprising is that I didn't need to change more than a few lines of code (all
in 'net', which got a small cleanup of net.h and extern variables).  The rest
is just adding a lot of 'const'.

As far as I can tell, I have not added any new warnings - apart from making all
of tdbutil.c's function const (so they warn for adding that const string to
struct).

Andrew Bartlett
-
Shirish Kalele
9df93b1ffc Add msdfs proxy functionality to HEAD. -
Jeremy Allison
842e08e52a Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
-
Jeremy Allison
ac856fbb96 Added "kernel change notify" boolean to allow easier valgrind testing.
Jeremy.
-
Simo Sorce
e6ae8b4eac finnally put in Alexander parametric pacth -
Tim Potter
be90650674 Make lp_winbind_separator a const string. -
Andrew Bartlett
ab812ada56 Add support for 'restrict anonymous=2' and make the doco give a slight hint
as to what it now does in 3.0.  Needs more work, but better than documenting
the old functionality :-).

As the security benifits of this are nullified by a setting of 'guest ok' on
any share, we might want to put some documentation there too.

Andrew Bartlett
-
Jelmer Vernooij
344d8e521f add lp_modules() -
Jeremy Allison
82b8f749a3 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
-
Andrew Bartlett
18abaeffda Add a 'ldap trust ids' option that lets pdb_ldap check for posixAccount
attributes rather than calling getpwnam() on the user.

This should help fix some of metze's performance issues - particularly on
enumerations.

There is a consequential change to the operation of 'non unix account's in LDAP
- they are no longer restricted to being 'within' the NUA range, but will
always be added to that range.

Finally, there is the doco for this and the previous LDAP SSL changes.
-
Andrew Bartlett
cfa1e459d7 Fixes for pdb_ldap:
- Default is now for start-tls, on the ldap (not ldaps) port
 - We check for 'I am currently root' in the right place now, and don't
   accidentily use a cached connection.
 - We don't loop on failure to be root, or some other errors.

 - A bit cleaner error reporting for add/modify.

 - Both the OpenLDAP and manual URI parsing tested.

Andrew Bartlett
-
Jeremy Allison
a81d700ae9 First cut of new ACL mapping code from Andreas Gruenbacher <agruen@suse.de>.
This is not 100% the same as what SuSE shipped in their Samba, there is
a crash bug fix, a race condition fix, and a few logic changes I'd like to
discuss with Andreas. Added Andreas to (C) notices for posix_acls.c
Jeremy.
-
Gerald Carter
e7dd8cf903 merge from samba_3_0
removed the following parameters

  * postscript
  * printer driver
  * printer driver location
  * printer driver file

also removed the get_a_printer_driver_9x_compatible() function
-
Andrew Tridgell
3ca3cc838e add a 'mangle prefix' option to allow people to tune the number of
characters used in the prefix for 8.3 names in the hash2
algorithm. The longer the prefix the more readable the 8.3 names will
be, but the weaker the hash.

this was added because of someone complaining that the new hashing
algorithm was unreadable but the old one was broken :)
-
Jeremy Allison
e5fbfbcc9d Change default of max_xmit to match W2K. Ensure NT negprot uses it.
Jeremy.
-
Gerald Carter
07c7048aa4 removed stat() call in lp_add_home() -
Jeremy Allison
6a9d0c9bdd Turn on sendfile detection by default in HEAD and 3.0.
Jeremy.
-
Jeremy Allison
bb58a08af4 Add a timeout to tdb_lock_bystring(). Ensure we never have more than
MAX_PRINT_JOBS in a queue.
Jeremy.
-
Herb Lewis
074de699a2 make the default printed values for boolean the same for all parameters. -
Andrew Bartlett
df8f0338fa Vance picked up a pile of typos etc at the CIFS confernce, and finally got them
off his laptop :-)

Andrew Bartlett
-
Andrew Bartlett
0a6a0c88d0 When compiled --with-ldapsam, make ldapsam the default passdb backend.
This is to allow painless upgrades from 2.2, and so people don't get a shock
when they follow old docs.

If ldap has been detected on the system, ldapsam is always available, just not
the default.

Andrew Bartlett
-
Andrew Bartlett
36c2a3820f Readd the 2.2 --with-ldapsam paramaters so as to allow a smooth upgrade path to
a 3.0 based PDC.

Change defaults to use SSL, so that this also matches.

Andrew Bartlett
-
Andrew Bartlett
25950dbb32 Fix the circular dependency that was preventing 'domain master = auto' (the
default) from working.

Andrew Bartlett
-
Andrew Bartlett
f13e243f1a This patch from "Stefan (metze) Metzmacher" <metze@metzemix.de> cleans up
pdb_ldap and adds a 'ldap passwd sync' option.

The idea with this option is to do allow an ldap backend to do all the fancy
password hashing etc - and to tell smbd no to try and double-up.  Using 'ldap
passwd sync = only' will do this, but is not recommended unless such a backend
is in place...

Running 'ldap passwd sync = yes' just gets you the same as doing 'pam passwd
sync = yes' and having both PAM and pam_ldap correctly configured for 'magic
root' behaviour, but only using ldap connection, and one set of credentials.

This also gets us closer to allowing ldap to say 'password too short' etc,
which might assist in maintaining a consistant password policy.

Andrew Bartlett
-
Jeremy Allison
cfd1bf250b Merge of "profile acls" code.
Jeremy.
-
Volker Lendecke
9f7a16acf1 Sorry for the new parameter, but I think to really reflect what's coming
in via deltas, we need a way to set a user's primary group.

Volker
-
Jeremy Allison
28466ff42c Added "use sendfile" per share option.
Jeremy.
-
John Terpstra
bd9dbf5c79 Update to add DEVELOPER option to more parameters. -
John Terpstra
8a1c136494 Applied new display mode FLAGS for SWAT. -
Jelmer Vernooij
06eb3138ab small fixes
make lp_sam_backend() a list
-
Jeremy Allison
15ff5a48f9 Reverted and tidied up the "special" files patch. Adds "hide special files"
option (set to false by default). Made checking for hide unreadable/writable
more efficient (less stat calls, less allocating printf calls).
Jeremy.
-
Tim Potter
08d7d6ffa6 Put back in BDC support in set_server_role(). Tidied up debugs. -
Volker Lendecke
5af5326f13 Fix debug level initialization for net.c
Volker
-
Jelmer Vernooij
71e2b41c77 fix typo -
Jelmer Vernooij
6a787a695d fix typo auth/auth_server.c
remove unused 'max packet' and 'packet size' options
-
Jelmer Vernooij
6e34651591 remove 'admin log' parameter (discussed with Jeremy)
remove 'alternate permissions' parameter (deprecated and not used since 2.0) (discussed with tridge)
-
Andrew Bartlett
8718e5e7b2 Rework the 'guest account get's RID 501' code again...
This moves it right into the passdb subsystem, where we can do this in
just one (or 2) places.  Due to the fact that this code can be in a tight loop,
I've had to make 'guest account' a 'const' paramater, where % macros cannot be
used.  In any case, if the 'guest account' varies, we are in for some nasty
cases in the other code, so it's useful anyway.

Andrew Bartlett
-
Tim Potter
dad31483b3 Merge of netbios namecache code from APPLIANCE_HEAD.
Tridge suggested a generic caching mechanism for Samba to avoid the
proliferation of little cache files hanging around limpet like in the
locks directory.  Someone should probably implement this at some
stage.
-
Jim McDonough
e6ceb34823 Allow ADS PDC to exist -
Simo Sorce
7532e82896 fix log level, set a default, and also copy the value set in smb.conf into parm_struct.ptr
this one also fixes log level not shown in swat
fix swat help system
-
Andrew Bartlett
f77335b6f8 Only allow 'security=ads' when we HAVE_ADS.
Andrew Bartlett
-