1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

1252 Commits

Author SHA1 Message Date
Richard Sharpe
e1a159c55f Commit some more fixes for Coolo ... -
Jelmer Vernooij
8b5ad24231 Add const (from a patch by Stephan Kulow <coolo@kde.org>) -
Andrew Tridgell
ca982a9f1d added simple tests for SMBchkpath and SMBioctl -
Andrew Bartlett
3d4c4b6cb3 Merge from HEAD - leave the SMB buffer untouched when checking it's SMB sig.
Andrew Bartlett
-
Andrew Bartlett
7064edf853 Don't modify the incoming packet when checking the signiture.
Andrew Bartlett
-
Andrew Tridgell
c95ae394c5 added a simple test for the old SMBtcon interface -
Richard Sharpe
b988e16b7d More patches from coolo. One of these functions needs to be moved
elsewhere so other code can use it.
-
Richard Sharpe
de49c3f48f Some fixes to URL syntax from coolo. -
Andrew Bartlett
5562f1865c Fix debug (thanks metze)
Andrew Bartlett
-
Jelmer Vernooij
1481cd9ecf Add mapping for Bad Network Path -
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
-
Andrew Bartlett
8315b9c311 (merge from HEAD) Valgrind found some memory leaks! -
Andrew Bartlett
fb680f610c Valgrind found a few memory leaks!
Andrew Bartlett
-
Jelmer Vernooij
2e1e5719f1 Don't use EDQUOT on systems where it's not available -
Jelmer Vernooij
6df38e250a Use FUNCTION_MACRO, not __FUNCTION__ -
Jelmer Vernooij
b757a43748 Don't use errno's when they're not available -
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
-
Andrew Bartlett
e8b4b13666 Fix compile on IA64 by noting that this should be the integer, not a pointer
to the integer for SIVAL().
-
Andrew Bartlett
5e20868fad Fix compile on IA64 by noting that this should be the integer, not a pointer
to the integer for SIVAL().
-
Andrew Bartlett
6bf04c41ed Merge fixes to libsmbclient (fstring/pstring) from HEAD.
Andrew Bartlett
-
Andrew Bartlett
05a63bd17e Clobber the 'SAFETY_MARGIN' in libsmb.
Andrew Bartlett
-
Andrew Bartlett
23c7342bc4 Patch from colo (on IRC) to get libsmbclient building due to pstring/fstring
issues.

Also pick up these link failures at compile time (rather than runtime).

Andrew Bartlett
-
Jelmer Vernooij
72bb5615f3 Add more mappings to the nterr->errno mapping table. It should be fairly
complete now.
-
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
f93c64b5ca Removed unused var.
Jeremy.
-
Jeremy Allison
fb925a72a6 Removed unused var.
Jeremy.
-
Andrew Bartlett
27ec538eca Parinoia fixes from HEAD - malloc() some extra room after the allocated
buffer size.
-
Andrew Bartlett
1c87be7a3d Merge from HEAD:
A much better SMB signing module, that allows for mulitple signing algorithms
and correctly backs down from signing when the server cannot sign the reply.

This also attempts to enable SMB signing on NTLMSSP connections, but I don't
know what NTLMSSP flags to set yet.

This would allow 'client use signing' to be set by default, for server
compatability.  (A seperate option value should be provided for mandetory
signing, which would not back down).

Andrew Bartlett
-
Andrew Bartlett
f4ae028c2a NTLMSSP updates from HEAD.
Andrew Bartlett
-
Andrew Bartlett
c5b604e2ee Jeremy merged across my string parinoia fixes, but forgot to enable them! :-)
This patch catches up on the rest of the work - as much string checking
as is possible is done at compile time, and the rest at runtime.

Lots of code converted to pstrcpy() etc, and other code reworked to correctly
call sizeof().

Andrew Bartlett
-
cvs2svn Import User
f0d009c3e9 This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'. -
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.
-
Andrew Bartlett
50f0ca752e Merge from HEAD:
signed/unsigned (mostly i counters)

a little bit of const.

Andrew Bartlett
-
Andrew Bartlett
3f9616a68a Merge from HEAD - sync up SessionSetup code to HEAD, including Luke Howard's
session key and auth verifier patches.

Andrew Bartlett
-
Andrew Bartlett
980f2eb7c2 pstrcpy_base merges for client-side smbpasswd.
Andrew Bartlett
-
Andrew Bartlett
a12e852499 Fix a memory leak - 'smbcontrol smbd pool-usage' is your freind!
Andrew Bartlett
-
Andrew Bartlett
a13ce0df4b Minor fixes.
- signed/unsigned
 - quieten warning about assignment as truth value
 - whitespace

Andrew Bartlett
-
Andrew Bartlett
31f4827acc String handling parinoia fixes.
This patch enables the compile-time checking of strings assable by means of
sizeof().  (Original code had the configure check reversed).

This is extended to all safe_strcpy() users, push_string and pull_string,
as well as the cli and srv derivitives.  There is an attempt to cap strings
at the end of the cli buffer, and clobber_region() of the speified length
(when not -1 :-).

Becouse of the way they are declared, the 'overmalloc a string' users of
safe_strcpy() have been changed to use overmalloc_safe_strcpy() (which skips
some of the checks).

This whole ball of mud worked fine, until I pulled out my 'fix' for our
statcache.  When jeremy fixes that, we should be able to get back to testing
this stuff.

This patch also includes a 'marker' of the last caller to clobber_region (ie,
the function that called pstrcpy() that called clobber_region) to assist in
debugging problems that may have smashed the stack.  This is printed at
smb_panic() time.  (Original idea and patch by metze).

It also removes some unsused functions, and #if 0's some others that are
unused but probably should be used in the near future.

For now, this patch gives us some confidence on one class of trivial parsing
error in our code.

Andrew Bartlett
-
Andrew Bartlett
f6ea572cd5 specify the size of these buffers -
Andrew Bartlett
aa12379b3f Specify buffer sizes -
Andrew Bartlett
2effcae13f Be parinoid, malloc an extra SAFETY_MARGIN on the client's inbuf and outbuf.
Andrew Bartlett
-
Andrew Bartlett
7ab6559369 client-side smbpasswd fixes - use pstrcpy_base to avoid clobber_region bugs
Andrew Bartlett
-
Andrew Bartlett
f07a93eaeb Add const, and a signed/unsigned fix. -
Rafal Szczesniak
d81b0d2690 We haven't implemented The Singing Contexts so far.
Who knows what .NET server brings, though ...?  ;-)


Rafal
-
Rafal Szczesniak
3f4cb7b2c4 /tmp/newfun.msg -
Andrew Bartlett
f9c3c93f55 Found by metze with the clobber-region check - if it's a pstring, use pstrcpy().
Andrew Bartlett
-
Jeremy Allison
41571a69e0 Merge from HEAD. 'win2000 can take much longer than the specified time to respond to a
lock - so to make the torture tests valid I give it a grace time of 10
seconds instead of 2'
Jeremy.
-