1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

9876 Commits

Author SHA1 Message Date
Andrew Bartlett
3b580ff000 This patch attemptes to clean up winbindd's mutex locking.
The current locking scheme in winbind is a complete mess - indeed, the
next step should be to push the locking into cli_full_connection(), but
I'll leave it for now.

This patch works on the noted behaviour that 2 parts of the connection
process need protection - and independent protection.  Tim Potter did
some work on this a little while back, verifying the second case.

The two cases are:
 - between connect() and first session setup
 - during the auth2 phase of the netlogon pipe setup.

I've removed the counter on the lock, as I fail to see what it gains us.

This patch also adds 'anonymous fallback' to our winbindd -> DC connection.

If the authenticated connection fails (wbinfo -A specifed) - say that
account isn't trusted by a trusted DC - then we try an anonymous.

Both tpot and mbp like the patch.

Andrew Bartlett
(This used to be commit 0620320002082298a15cbba72bd79aecfc607947)
2003-03-11 11:28:59 +00:00
Andrew Bartlett
17030fc403 security=domain and domain logons = yes should be a BDC (of sorts).
Matches 2.2

Andrew Bartlett
(This used to be commit f6497fd639c5bb7d61eda0286c4c3c38609933b0)
2003-03-11 10:53:46 +00:00
Andrew Bartlett
60a8e3c20c Some further tought on the server role issue - try not to break it compeatly.
Andrew Bartlett
(This used to be commit 4c6a2d8d28d1752d7fee52d253ce2829bd0a0671)
2003-03-11 10:13:57 +00:00
Andrew Bartlett
da6266f4f1 After 'consultation' with idra, this is how I think the server roles should work...
Andrew Bartlett
(This used to be commit 5c1f1005907bf50b809dfae1f8251c7122103098)
2003-03-11 10:06:34 +00:00
Simo Sorce
d40890e6a0 This is how combination of domain logons and security parameter best combine.
Comments wellcome.


Simo.
(This used to be commit e1431424e7603d946f63cfe7fe669b0b32ac8095)
2003-03-11 09:16:37 +00:00
Martin Pool
2e01ef5957 Remove valgrind_strlen function, hopefully no longer needed with
recent Valgrind relases and clashing with -DVALGRIND.
(This used to be commit 98479f1315cf8968152e1566966ac57e171008c3)
2003-03-11 07:25:48 +00:00
Martin Pool
6f7ac2dcab Note about using Valgrind with tdbs.
(This used to be commit 36c6f67d4af50d8fc4c8bd54486df315861d55c2)
2003-03-11 07:23:43 +00:00
Andrew Tridgell
538c832ba1 having sticky create times is not a bug
(This used to be commit f283f71104319fa9f1e7d22fc91b8d7224ae157a)
2003-03-11 06:53:44 +00:00
Andrew Tridgell
191b44b91c fixed the MANGLE smbtorture test with the new paranoid string code
(This used to be commit 7be44dbe009a8d831c0720a2649fc871b067beef)
2003-03-11 06:53:10 +00:00
Andrew Tridgell
c13990277f make sure we have an empty directory when we start the utable test
(This used to be commit af415842b80f024ca26b4e3bc52fd73fce0a28f3)
2003-03-11 06:31:23 +00:00
Martin Pool
cca61adcd2 If using --enable-developer and valgrind.h is present, define VALGRIND.
(This used to be commit 71c8e90117f00f168416f2f35a1c25755e2d0ed4)
2003-03-11 05:57:53 +00:00
Martin Pool
ee28d38fbc 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.
(This used to be commit e412dd6d7e5a41de94c07c64b186390ccce104cc)
2003-03-11 04:21:14 +00:00
Tim Potter
dcf7cad4bf Remove obsolete file.
(This used to be commit c5c1a7979385778c08d6dd7796cfe8be1815992f)
2003-03-11 02:30:17 +00:00
Martin Pool
2e3f9c35d5 Patch from Ronan Waide:
> when doing "enumdomusers", rpcclient prints each one preceded by the
> word "group" instead of "user"
(This used to be commit 17567dd1d510d4cf1dffa67be78510ae51571ec6)
2003-03-11 00:14:55 +00:00
Volker Lendecke
06c4d9a8ff Some conversion to pstrcpy_base.
Volker
(This used to be commit 329911e43681b724cb0579aad77b4a658759d7ba)
2003-03-10 16:59:29 +00:00
Gerald Carter
683c17ac0d check a pointer before dereferencing it; not sure why userdata == NULL though
(This used to be commit 6fca29ddcdb111af24ee051b555ab4eec8cadd1d)
2003-03-10 15:05:06 +00:00
Andrew Bartlett
8cad904f38 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
(This used to be commit 6a956390fa253e87e38b3f1909f13595fbf2767a)
2003-03-10 12:08:32 +00:00
Martin Pool
fba0a72035 Use "$@" to preserve shell quoting in case somebody passes an escaped
string as a configure parameter.
(This used to be commit 3285c80cb0e41d6736b4f74b01a65d55753a7920)
2003-03-10 03:04:47 +00:00
Andrew Tridgell
8dd9e99f37 fixed use_oplocks and the timeout in smbtorture startup
(This used to be commit cec1ef09e5009cdac22e6c9ca101a49c5ef36b1a)
2003-03-10 02:51:30 +00:00
Andrew Tridgell
44bd743c28 added -i option for ignoring dot errors in masktest
(This used to be commit 0f4d1172a6add3f490fca22a45975d2588485146)
2003-03-10 02:49:52 +00:00
Andrew Bartlett
190708832c Makefile.in for NTLMSSP singing update
(This used to be commit 7717555438e4d74bb63d12abde3573933c15342a)
2003-03-10 02:48:32 +00:00
Andrew Bartlett
e9a94cd2c9 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
(This used to be commit a034a5e381ba5612be21e2ba640d11f82cd945da)
2003-03-10 02:14:35 +00:00
Martin Pool
de6b39d898 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.
(This used to be commit 8d915e266cd8ccc8b27e9c7ea8e9d003d05f8182)
2003-03-10 01:10:45 +00:00
Martin Pool
becf7a0997 Include valgrind.h if present on the system.
(This used to be commit 65ba78c6bd4c5ab7ec9bf4d15e4410482e82588d)
2003-03-10 00:45:28 +00:00
Martin Pool
cb1de38cfd Check for valgrind.h
(This used to be commit 0ece70d631bf095bf9c8819180b6c59990159cd0)
2003-03-10 00:37:25 +00:00
Andrew Bartlett
2b6a6df0f6 Try not to clobber the session request.
(This used to be commit 05cffbee56f0556f550b4d14f3111bd7db972621)
2003-03-09 21:09:28 +00:00
Andrew Bartlett
2ed7730f2d 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
(This used to be commit b9cf95c3dc04a45de71fb16e85c1bfbae50e6d8f)
2003-03-09 09:23:09 +00:00
Andrew Bartlett
6ed6740236 Don't fault on error returns (ptr == 0) for this LSA query.
(for example, query to non-dc)

Andrew Bartlett
(This used to be commit d1dde5f684652f86e63ac6cfa34ff42a680693de)
2003-03-09 01:13:41 +00:00
Andrew Bartlett
8ccff3e995 This is C, not C++
(This used to be commit 25d210b90b6c0377046d89a1dce7a32f94fd7859)
2003-03-08 23:39:44 +00:00
Simo Sorce
bebdbcd248 more on idmap
two layers structure with
- local tdb cache
- remote idmap repository

compiles
(This used to be commit 8fb4e210bc7564ed491d121c20d598ba0bfbddff)
2003-03-08 17:29:40 +00:00
Andrew Bartlett
c08c475cf2 Testparm needs the extra arg to set_local_machine_name() too.
(This used to be commit 30ba31e6355b5dfb902e42d2b5edc71630db2923)
2003-03-08 10:24:48 +00:00
Andrew Bartlett
01289b14a7 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
(This used to be commit afe5a3832f79131fb74461577f1db0e5e8bf4b6d)
2003-03-08 10:22:50 +00:00
Andrew Bartlett
bbf8961b28 Make it clear that this is a fstrcpy().
(This used to be commit c2a266b7b661d319e13982bfdbc3a86e8502b8a4)
2003-03-08 05:18:08 +00:00
Jeremy Allison
7b2409214f Fix typo in earlier fix, caught by Ranjit @ HP.
Jeremy.
(This used to be commit 13ab94fa73dbaf54da0169bbcf4d027d5c07d207)
2003-03-08 01:16:30 +00:00
Simo Sorce
4a1d2ddd48 some more code
(not tested yet)
(This used to be commit 0d6cec90c13731827abcbc61974efc993e794003)
2003-03-08 00:49:18 +00:00
Simo Sorce
64e49aa3c5 initial work for the new idmpa interface
(This used to be commit 8338e74ac4e5f31150c96f459a67e52090dc6013)
2003-03-07 23:47:59 +00:00
Jeremy Allison
eed8772da1 Use ERROR_NT, not ERROR_DOS as Andrew Bartlett pointed out.
Jeremy.
(This used to be commit c0930e6d15eb68f06453d9b67142ccd7fb1370a0)
2003-03-07 23:34:55 +00:00
Steve French
f944fd6975 Add early prototype of cifs mount helper for Linux
(This used to be commit b20bcf8d336b4b2079eb42342a96d1fe714709de)
2003-03-07 22:29:14 +00:00
Jeremy Allison
24c95539d5 Missed parentheses around complex logic.
Jeremy.
(This used to be commit e81427c2d69be166afad94bc083e750e8f48fba7)
2003-03-07 19:46:51 +00:00
Jeremy Allison
6a141b7963 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.
(This used to be commit 8ec20cbae7ca7e685b1a4186d8482c7405915dc3)
2003-03-07 19:37:27 +00:00
Simo Sorce
8a751c019c Some progress towards gums and tdbsam2
genparser works fine, and it is a marvelous tool to store objects in tdb :)
(This used to be commit 4c6d461a8572f03cd33cba95500cc837638b732c)
2003-03-07 18:26:24 +00:00
Andrew Bartlett
04858cd702 Limit the number of SIDs that may be looked up, in line with existing code
for name->sid.
(This used to be commit 0ebccc0dbeecc10d423529909a2563fbc3bf9857)
2003-03-07 09:29:56 +00:00
Andrew Bartlett
80087e6cfe safe_strcpy() -> fstrcpy() fix, and a cleanup to how rpcclient calls the
IP address resolving code.
(This used to be commit 1f605fe77c56ee2a7838c9f87eedf4bb91ebf688)
2003-03-07 09:25:48 +00:00
Jeremy Allison
cea6fd0b0a Fix noticed by Corny.Bondad@hp.com. Ensure we free up memory on error exit.
Jeremy.
(This used to be commit 1cbd53dc3cd2d56f5e62d42fed5d589efcecb8f8)
2003-03-07 00:34:43 +00:00
Jeremy Allison
3327f13795 Found at Connectathon, .NET RC1 arranges trans/trans2/nttrans parameters
differently to W2K, cope with this.
Jeremy.
(This used to be commit 172f415c9eaa4d310a52794e3dc1a6bc92206ce4)
2003-03-07 00:30:29 +00:00
Gerald Carter
26b1ed7cc0 add #define for the max device name length in a DEVICEMODE
(This used to be commit 21ec2b6ba3ddba6964f6ddb53f8494e4a8b48a83)
2003-03-06 16:06:12 +00:00
Andrew Bartlett
ca0d82b11c Make smbtorture use the same cli_full_connection() framework as the rest of
Samba.  This fixes things like not doing *SMBSERVER etc.

Andrew Bartlett
(This used to be commit 8863ff863c1da42aa6b8718f315c608d9d9067c6)
2003-03-06 10:37:51 +00:00
Andrew Bartlett
6684c85714 more off-by-one safe_strcpy()
(This used to be commit d8d2d5e75503ae2b6532a25e4c9bbcdf20cc60af)
2003-03-06 08:24:39 +00:00
Andrew Bartlett
192148bab3 More safe_strcpy() off-by-one bug fixes. (mostly moves to pstrcpy()/fstrcpy())
Andrew Bartlett
(This used to be commit 42b5514404bc7e33306c11344c6c934a1f83d295)
2003-03-06 07:55:48 +00:00
Martin Pool
7a3cc345e0 FIXME about crash on failure case.
(This used to be commit a387c4209735f8e4c826cad7cb10c5349b2041ec)
2003-03-06 07:36:08 +00:00