1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-15 05:57:49 +03:00

1827 Commits

Author SHA1 Message Date
Andrew Bartlett
9daf41c41f Fix memory leak of the key. -
Andrew Tridgell
b96590ad09 strequal() returns True for equal, not an int -
Andrew Tridgell
bd00355c1d don't rely on realloc() working on NULL -
Martin Pool
d0b2c5d7ba Export lazy_initialize_conv so that it can be called from
check_dos_char.

init_iconv: Call init_doschar_table when reinitializing conversions.
-
Martin Pool
e4ec19e03f check_dos_char: Change this to use a lazily-initialized lookup table
indicating which characters are valid dos characters.  This function
was previously quite slow because it did two unicode conversions on
every call.
-
Martin Pool
0ee80a9018 lazy_initialize_conv: Remove redundant call to init_valid_table,
because init_iconv calls it for us.

init_iconv: Add documentation about how this is reintialized when
configuration is reloaded.
-
Martin Pool
52520fda6a check_dos_char: Export this function so that it can be tested in
isolation by a test case.
-
Jim McDonough
87c7c582c6 The ldap idmap backend from Anthony Liguori (aliguori@us.ibm.com):
This patch moves the ldap routines out of passdb into a generic
library and implements an LDAP backend for IDMAP.  THe backend
can be enabled with "idmap backend = ldap" in smb.conf.  THere
are also schema changes to make sure to update teh ldap schema files.
-
Jelmer Vernooij
7dccd144b7 Add const -
Simo Sorce
0278132047 THE Idmap patch :-)
includes a --with-idmap=no switch to disable idmap usage if you find
problems.

cosmetic fixes and param aliases to separate winbind from idamp roles.

A temporarily remote idmap winbind compatibility backend.
As I have time I will further change code to not call directly winbind
(partly done but not tested) and a specilized module will be built in place
for the current glue hack.

The patch has been tested locally in my limited time, the patch is simple and
clear and should not reserve problems, if any just disable it.

As usual, comments and fisex are welcome :-)

Simo.
-
Andrew Bartlett
7ab39cba6a Don't set zero length for the base64 decoded string (fixes swat auth).
Andrew Bartlett
-
Andrew Bartlett
647a720cfb OHKAWA Yuichi (kuri@makino.ecei.tohoku.ac.jp) points out that using
decoded.length after it's been zero'ed out by data_blob_free() doesn't
give you the original length...

Andrew Bartlett
-
Jelmer Vernooij
aa36f462d9 - Support absolute paths in vfs and charset modules
- Fix typo in Makefile.in
- Fix compatibility with older vfs modules (from patch by metze)
- Build some modules shared by default and some static (and fall
  back to static when dlopen() is not available)
-
Jelmer Vernooij
9cc17bcfe6 Fix formatting of back traces - pathc by metze -
Jelmer Vernooij
794d3ed036 - Point users at the HOWTO Collection instead of 'README' in modules/mysql.c
- Make passdb work with absolute paths (passdb backend = /path/to/smbpasswd.so works now). vfs, rpc and charset will follow
-
Gerald Carter
0dc6115694 fix CIDR hosts allow/deny notation -
Gerald Carter
84707fd95e fix CIDR hosts allow/deny notation -
Jelmer Vernooij
b49436d020 Use SAFE_FREE() instead of plain free() - pointed out by metze -
Jelmer Vernooij
bf439d733d Output backtrace to logfile in smb_panic(), as suggested by mbp
(only on systems that support it, of course)
-
Jelmer Vernooij
37ee8aecf4 We need to 'preprocess' in popt_common_samba as well -
Jelmer Vernooij
d5f9b0275c Revoke some of the popt patch from metze I applied earlier today. It added
some double options and broke some parameters.
-
Jelmer Vernooij
cf3d31b980 Add modules support to charset -
Jelmer Vernooij
2ddfed298d Patch from metze to generalise POPT_COMMON_SAMBA, with some minor changes -
Andrew Bartlett
ec071ca3dc (merge from HEAD)
NTLM Authentication:

- Add a 'privileged' mode to Winbindd.  This is achieved by means of a directory
  under lockdir, that the admin can change the group access for.

- This mode is now required to access with 'CRAP' authentication feature.
- This *will* break the current SQUID helper, so I've fixed up our ntlm_auth
  replacement:
 - Update our NTLMSSP code to cope with 'datagram' mode, where we don't get a
   challenge.
 - Use this to make our ntlm_auth utility suitable for use in current Squid 2.5
   servers.
 - Tested - works for Win2k clients, but not Win9X at present.  NTLMSSP updates
   are needed.
 - Now uses fgets(), not x_fgets() to cope with Squid environment (I think
   somthing to do with non-blocking stdin).

- Add much more robust connection code to wb_common.c - it will not connect to
  a server of a different protocol version, and it will automatically try and
  reconnect to the 'privileged' pipe if possible.
  - This could help with 'privileged' idmap operations etc in future.

- Add a generic HEX encode routine to util_str.c,
- fix a small line of dodgy C in StrnCpy_fn()

- Correctly pull our 'session key' out of the info3 from th the DC.  This is
  used in both the auth code, and in for export over the winbind pipe to
  ntlm_auth.

- Given the user's challenge/response and access to the privileged pipe,
  allow external access to the 'session key'.  To be used for MSCHAPv2
  integration.

Andrew Bartlett
-
Andrew Bartlett
dcdc75ebd8 NTLM Authentication:
- Add a 'privileged' mode to Winbindd.  This is achieved by means of a directory
  under lockdir, that the admin can change the group access for.

- This mode is now required to access with 'CRAP' authentication feature.
- This *will* break the current SQUID helper, so I've fixed up our ntlm_auth
  replacement:
 - Update our NTLMSSP code to cope with 'datagram' mode, where we don't get a
   challenge.
 - Use this to make our ntlm_auth utility suitable for use in current Squid 2.5
   servers.
 - Tested - works for Win2k clients, but not Win9X at present.  NTLMSSP updates
   are needed.
 - Now uses fgets(), not x_fgets() to cope with Squid environment (I think
   somthing to do with non-blocking stdin).

- Add much more robust connection code to wb_common.c - it will not connect to
  a server of a different protocol version, and it will automatically try and
  reconnect to the 'privileged' pipe if possible.
  - This could help with 'privileged' idmap operations etc in future.

- Add a generic HEX encode routine to util_str.c,
- fix a small line of dodgy C in StrnCpy_fn()

- Correctly pull our 'session key' out of the info3 from th the DC.  This is
  used in both the auth code, and in for export over the winbind pipe to
  ntlm_auth.

- Given the user's challenge/response and access to the privileged pipe,
  allow external access to the 'session key'.  To be used for MSCHAPv2
  integration.

Andrew Bartlett
-
Jelmer Vernooij
eeeeb37fc6 Use True, not TRUE -
Jelmer Vernooij
b18d02891b Don't crash when initialising tdb fails -
Jelmer Vernooij
5a88d78f67 Add -U, -N, -i, -A, -W to popt. -
Andrew Bartlett
8315b9c311 (merge from HEAD) Valgrind found some memory leaks! -
Jelmer Vernooij
e149e70717 - Use FUNCTION_MACRO, not __FUNCTION__.
- Add some const
-
Andrew Bartlett
fb680f610c Valgrind found a few memory leaks!
Andrew Bartlett
-
Andrew Bartlett
c91e76bddb (merge from HEAD)
Small clenaup patches:
 - safe_string.h - don't assume that __FUNCTION__ is available
 - process.c - use new workaround from safe_string.h for the same
 - util.c - Show how many bytes we smb_panic()ed trying to smb_xmalloc()
 - gencache.c - Keep valgrind quiet by always null terminating.
 - clistr.c - Add copyright
 - srvstr.h - move srvstr_push into a .c file again, as a real function.
 - srvstr.c - revive, with 'safe' checked srvstr_push
 - loadparm.c - set a default for the display charset.

 - connection.c - use safe_strcpy()
Andrew Bartlett
-
Andrew Bartlett
a7eba37aad Small clenaup patches:
- safe_string.h - don't assume that __FUNCTION__ is available
 - process.c - use new workaround from safe_string.h for the same
 - util.c - Show how many bytes we smb_panic()ed trying to smb_xmalloc()
 - gencache.c - Keep valgrind quiet by always null terminating.
 - clistr.c - Add copyright
 - srvstr.h - move srvstr_push into a .c file again, as a real function.
 - srvstr.c - revive, with 'safe' checked srvstr_push
 - loadparm.c - set a default for the display charset.

Andrew Bartlett
-
Jelmer Vernooij
5310447ec6 Patch from Samuel Thibault to convert messages from dos to unix charset
when sending(and vice versa when receiving).
-
Jelmer Vernooij
ca066502a2 Patch from Samuel Thibault to convert messages from unix to dos charset. Works
on 2000.
sending messages to 9x needs to be fixed, but that didn't work anyway
-
Jeremy Allison
bf795b684e lib/messages.c: Check return from chainlock before modifying message queue.
Apply the job returned limit across all requests for job queues.
Jeremy.
-
Jeremy Allison
dee1326a1d lib/messages.c: Check return from chainlock before modifying message queue.
Apply the job returned limit across all requests for job queues.
Jeremy.
-
Tim Potter
45929d1269 Cleanup bogus initialisation in SID_NAME_USE enum.
Added new sid type = 9 for "computer" from MSDN.
-
Jim McDonough
5078436d83 use strnlen to prevent coredumps -
Jim McDonough
1960a650c1 use strnlen to prevent coredumps -
Jelmer Vernooij
af7bfee0c6 Put in the new modules system. It's now used by passdb and rpc. I will
put a doc about it in dev-doc later today.
-
Jeremy Allison
da1271a95f Merge mbp's HEAD changes.
Jeremy.
-
Andrew Bartlett
38a6ad95d7 Add const. -
Andrew Bartlett
4c7163e7c2 Add an extra parameter to our 'set_remote_machine_name' and
'set_local_machine_name' so that the client can't change it from under us.

(.NET RC2 and WinXP install calls the machine 'machinename' during NTLMSSP
on the domain join).

Andrew Bartlett
-
Martin Pool
f7f692b2db Step one of optimizations for StrCaseCmp:
First of all, do a char-by-char walk through both buffers until we get
to a non-ascii character, or a difference between the strings.  This
prefix can be directly compared without needing to call into iconv.
This should be much faster for strings that are either all ascii, or
differ near the start.
-
cvs2svn Import User
f0d009c3e9 This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'. -
Martin Pool
4bbddbfc6a Split "clobber" function and variables into its own file before it
grows too much larger.
-
Martin Pool
412a8780c3 Update comment: Valgrind 1.9.4 seems to always respect client
requests, without needing --client-perms=yes.
-
Martin Pool
5653a42ae6 global_globber_region_function/line ought to be recorded before
clobbering the region, just in case clobbering causes us to crash
immediately.  (That might happen if we just shot ourselves in the
stack and strcpy was not inlined.)

Also, in DEVELOPER mode and when Valgrind is available, mark the
clobbered region as uninitialized.  This is an even stronger
protection than clobbering with 0xf1.
-
Jeremy Allison
86e3eddac6 Merge in the developer string options from HEAD. We need to ensure 3.0
is as stable as possible in the string department and some pain now
will help later :-).
Jeremy.
-