1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-28 17:47:29 +03:00

10594 Commits

Author SHA1 Message Date
Andrew Tridgell
af415842b8 make sure we have an empty directory when we start the utable test -
Martin Pool
71c8e90117 If using --enable-developer and valgrind.h is present, define VALGRIND. -
Martin Pool
7090d9f693 When opening an existing DB, don't require the hash_size specified to
the open call to be the same as that of the existing tdb.  The
specified hash_size is only used if the tdb needs to be (re)created.

With this patch in place, tdbtool can open the printing tdbs, which
are created with a hash_size of 5000.  Before it would fail with EIO.
-
Martin Pool
e412dd6d7e When opening an existing DB, don't require the hash_size specified to
the open call to be the same as that of the existing tdb.  The
specified hash_size is only used if the tdb needs to be (re)created.

With this patch in place, tdbtool can open the printing tdbs, which
are created with a hash_size of 5000.  Before it would fail with EIO.
-
Martin Pool
0e9a2f41df Patch from Ronan Waide:
> when doing "enumdomusers", rpcclient prints each one preceded by the
> word "group" instead of "user"
-
Tim Potter
560deeb4ec Remove obsolete file. -
Tim Potter
c5c1a79793 Remove obsolete file. -
Martin Pool
17567dd1d5 Patch from Ronan Waide:
> when doing "enumdomusers", rpcclient prints each one preceded by the
> word "group" instead of "user"
-
Volker Lendecke
329911e436 Some conversion to pstrcpy_base.
Volker
-
Volker Lendecke
54c99ee1fb strcpy_base from HEAD and trivial fix for smbclient -L
Volker
-
Gerald Carter
6fca29ddcd check a pointer before dereferencing it; not sure why userdata == NULL though -
Gerald Carter
944752024b check a pointer before dereferencing it; not sure why userdata == NULL though -
Andrew Bartlett
6a956390fa Don't segfault on make_server_info_guest() failure - instead return the
error code.

make_server_info_guest() requires an entry in the SAM at the moment, but
this will change before release.

Andrew Bartlett
-
Martin Pool
10b2de7ebd Use "$@" to preserve shell quoting in case somebody passes an escaped
string as a configure parameter.
-
Martin Pool
3285c80cb0 Use "$@" to preserve shell quoting in case somebody passes an escaped
string as a configure parameter.
-
Andrew Tridgell
cec1ef09e5 fixed use_oplocks and the timeout in smbtorture startup -
Andrew Tridgell
0f4d1172a6 added -i option for ignoring dot errors in masktest -
Andrew Bartlett
7717555438 Makefile.in for NTLMSSP singing update -
Andrew Bartlett
a034a5e381 Further work on NTLMSSP-based SMB signing. Current status is that I cannnot
get Win2k to send a valid signiture in it's session setup reply - which it will
give to win2k clients.

So, I need to look at becoming 'more like MS', but for now I'll get this code
into the tree.  It's actually based on the TNG cli_pipe_ntlmssp.c, as it was
slightly easier to understand than our own (but only the utility functions
remain in any way intact...).

This includes the mysical 'NTLM2' code - I have no idea if it actually works.

(I couldn't get TNG to use it for its pipes either).

Andrew Bartlett
-
Martin Pool
8d915e266c Clobber strings with 0xf1f1f1f1 before writing to them to check buffer
lengths are correct.  Attempts to pstrcpy into an fstring or allocated
string should fail in developer builds.

This builds on abartlet's earlier overflow probe for safe_strcpy, but
by clobbering the whole string with a nonzero value is more likely to
find overflows on the stack.

This is only used in -DDEVELOPER mode.

Reviewed by abartlet, tpot.
-
Martin Pool
65ba78c6bd Include valgrind.h if present on the system. -
Martin Pool
0ece70d631 Check for valgrind.h -
Andrew Bartlett
05cffbee56 Try not to clobber the session request. -
Andrew Bartlett
b9cf95c3dc Change the way we sign SMB packets, to a function pointer interface.
The intention is to allow for NTLMSSP and kerberos signing of packets, but
for now it's just what I call 'simple' signing. (aka SMB signing per the SNIA
spec)

Andrew Bartlett
-
Andrew Bartlett
d1dde5f684 Don't fault on error returns (ptr == 0) for this LSA query.
(for example, query to non-dc)

Andrew Bartlett
-
Andrew Bartlett
25d210b90b This is C, not C++ -
Simo Sorce
8fb4e210bc more on idmap
two layers structure with
- local tdb cache
- remote idmap repository

compiles
-
Andrew Bartlett
30ba31e635 Testparm needs the extra arg to set_local_machine_name() too. -
Andrew Bartlett
afe5a3832f Make sure that the 'remote' machine name can only be set once. For some weird
reason, during a Win2003 installation, when you select 'domain join' it sends
one machine name in the name exchange, and litraly 'machinename' during the
NTLMSSP login.

Also fix up winbindd's logfile handling, so that it matches smbd and nmbd.

(This helps me, by seperating the logs by pid).

Andrew Bartlett
-
Andrew Bartlett
c2a266b7b6 Make it clear that this is a fstrcpy(). -
Jeremy Allison
11077368ec Fix typo in earlier fix, caught by Ranjit @ HP.
Jeremy.
-
Jeremy Allison
13ab94fa73 Fix typo in earlier fix, caught by Ranjit @ HP.
Jeremy.
-
Simo Sorce
0d6cec90c1 some more code
(not tested yet)
-
Simo Sorce
8338e74ac4 initial work for the new idmpa interface -
Jeremy Allison
c0930e6d15 Use ERROR_NT, not ERROR_DOS as Andrew Bartlett pointed out.
Jeremy.
-
Jeremy Allison
723e9ee31c Use ERROR_NT, not ERROR_DOS as Andrew Bartlett pointed out.
Jeremy.
-
Steve French
b20bcf8d33 Add early prototype of cifs mount helper for Linux -
Jeremy Allison
e81427c2d6 Missed parentheses around complex logic.
Jeremy.
-
Jeremy Allison
183ce97d37 Extra const committed by mistake - revert.
Jeremy.
-
Jeremy Allison
7f8d3a49b2 Missed parentheses around complex logic.
Jeremy.
-
Jeremy Allison
1d3b8c528b Patch from Michael Steffens. In his own words :
-------------------------------------------------------------------------
I think there are basically two problem:

  1. Windows clients do not always send ACEs for SMB_ACL_USER_OBJ, SMB_ACL_GROUP_OBJ,
     and SMB_ACL_OTHER.
     The function ensure_canon_entry_valid() is prepared for that, but tries
     to "guess" values from group or other permissions, respectively, otherwise
     falling back to minimum r-- for the owner. Even if the owner had full
     permissions before setting ACL. This is the problem with W2k clients.

  2. Function set_nt_acl() always chowns *before* attempting to set POSIX ACLs.
     This is ok in a take-ownership situation, but must fail if the file is
     to be given away. This is the problem with XP clients, trying to transfer
     ownership of the original file to the temp file.

The problem with NT4 clients (no ACEs are transferred to the temp file, thus
are lost after moving the temp file to the original name) is a client problem.
It simply doesn't attempt to.

I have played around with that using posic_acls.c from 3.0 merged into 2.2.
As a result I can now present two patches, one for each branch. They
basically modify:

  1. Interpret missing SMB_ACL_USER_OBJ, SMB_ACL_GROUP_OBJ, or SMB_ACL_OTHER
     as "preserve current value" instead of attempting to build one ourself.
     The original code is still in, but only as fallback in case current values
     can't be retrieved.

  2. Rearrange set_nt_acl() such that chown is only done before setting
     ACLs if there is either no change of owning user, or change of owning
     user is towards the current user. Otherwise chown is done after setting
     ACLs.

It now seems to produce reasonable results. (Well, as far as it can. If
NT4 doesn't even try to transfer ACEs, only deliberate use of named default
ACEs and/or "force group" or the crystal ball can help :)
-------------------------------------------------------------------------
Jeremy.
-
Jeremy Allison
8ec20cbae7 Patch from Michael Steffens. In his own words :
-------------------------------------------------------------------------
I think there are basically two problem:

  1. Windows clients do not always send ACEs for SMB_ACL_USER_OBJ, SMB_ACL_GROUP_OBJ,
     and SMB_ACL_OTHER.
     The function ensure_canon_entry_valid() is prepared for that, but tries
     to "guess" values from group or other permissions, respectively, otherwise
     falling back to minimum r-- for the owner. Even if the owner had full
     permissions before setting ACL. This is the problem with W2k clients.

  2. Function set_nt_acl() always chowns *before* attempting to set POSIX ACLs.
     This is ok in a take-ownership situation, but must fail if the file is
     to be given away. This is the problem with XP clients, trying to transfer
     ownership of the original file to the temp file.

The problem with NT4 clients (no ACEs are transferred to the temp file, thus
are lost after moving the temp file to the original name) is a client problem.
It simply doesn't attempt to.

I have played around with that using posic_acls.c from 3.0 merged into 2.2.
As a result I can now present two patches, one for each branch. They
basically modify:

  1. Interpret missing SMB_ACL_USER_OBJ, SMB_ACL_GROUP_OBJ, or SMB_ACL_OTHER
     as "preserve current value" instead of attempting to build one ourself.
     The original code is still in, but only as fallback in case current values
     can't be retrieved.

  2. Rearrange set_nt_acl() such that chown is only done before setting
     ACLs if there is either no change of owning user, or change of owning
     user is towards the current user. Otherwise chown is done after setting
     ACLs.

It now seems to produce reasonable results. (Well, as far as it can. If
NT4 doesn't even try to transfer ACEs, only deliberate use of named default
ACEs and/or "force group" or the crystal ball can help :)
-------------------------------------------------------------------------
Jeremy.
-
Simo Sorce
4c6d461a85 Some progress towards gums and tdbsam2
genparser works fine, and it is a marvelous tool to store objects in tdb :)
-
Andrew Bartlett
0ebccc0dbe Limit the number of SIDs that may be looked up, in line with existing code
for name->sid.
-
Andrew Bartlett
1f605fe77c safe_strcpy() -> fstrcpy() fix, and a cleanup to how rpcclient calls the
IP address resolving code.
-
Jeremy Allison
05a8a61af8 Fix noticed by Corny.Bondad@hp.com. Ensure we free up memory on error exit.
Jeremy.
-
Jeremy Allison
1cbd53dc3c Fix noticed by Corny.Bondad@hp.com. Ensure we free up memory on error exit.
Jeremy.
-
Jeremy Allison
5e2755508f Found at Connectathon, .NET RC1 arranges trans/trans2/nttrans parameters
differently to W2K, cope with this.
Jeremy.
-
Jeremy Allison
172f415c9e Found at Connectathon, .NET RC1 arranges trans/trans2/nttrans parameters
differently to W2K, cope with this.
Jeremy.
-
Gerald Carter
52ef84b534 add #define for the max device name length in a DEVICEMODE -