1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

13125 Commits

Author SHA1 Message Date
Andrew Bartlett
9b1cdd45eb r24285: A number of machines on the build farm fail because while they use
SOCKET_WRAPPER, they don't compile with --enable-developer.  As such
the winbind tests fail.

We need to ensure that on production systems we never have
SOCKET_WRAPPER set, or this could be a security issue.

Andrew Bartlett
(This used to be commit eccc2d11da)
2007-10-10 15:01:36 -05:00
Andrew Tridgell
4792285282 r24284: change brlock_tdb.c to use the dbwrap API. This actually makes the
backend abstraction for brlock pointless, but I have left it in place
for now. It would be useful for other clustering systems that can't
map to dbwrap, and would also be useful if we wanted to keep the
remote function call capabilities in ctdb instead of the less
efficient fetch_locked() call in dbwrap
(This used to be commit 912c014b7c)
2007-10-10 15:01:36 -05:00
Andrew Tridgell
d8c070a550 r24283: added a dbwrap API for temporary databases, based on the one from the
s3 clustering code.

This commit just establishes the API. The ctdb backend for this will
come soon.
(This used to be commit 3767e755db)
2007-10-10 15:01:35 -05:00
Andrew Bartlett
233e4f72d6 r24282: Try to fix the occasional Samba4 crash in BASE-BENCH-READWRITE, as
seen in particular on opi.

This looked like a Heimdal problem, but I think it was simply that we
didn't do a talloc_reference() to keep tabs on the memory we were
using, and in between obtaining the pointer and using it, it was
assigned to unrelated memory.

Andrew Bartlett
(This used to be commit a650ad8b37)
2007-10-10 15:01:35 -05:00
Andrew Bartlett
9fd3416452 r24277: Tidyup as requested by metze.
Andrew Bartlett
(This used to be commit 43d62181f2)
2007-10-10 15:01:35 -05:00
Andrew Tridgell
b5c4c5f420 r24276: don't mark a stream readable until after the messaging setup is
complete. This is needed because messaging setup with ctdb involve
events, and we don't want a SMB packet to be processed on this stream
until after the stream structure is fully setup
(This used to be commit 8e378051e5)
2007-10-10 15:01:34 -05:00
Andrew Tridgell
7ee3cbd9eb r24275: - setup the connection to the ctdb daemon
- disable the brlock ctdb backend for now
(This used to be commit b04bcf46e1)
2007-10-10 15:01:34 -05:00
Andrew Tridgell
b7b3e3e0d4 r24274: - merge from ctdb bzr tree
- use ctdb_attach() instead of ctdb_db_handle()

- make ctdb_attach() return an existing db handle if it exists
(This used to be commit be85c48f8d)
2007-10-10 15:01:33 -05:00
Andrew Bartlett
edca65915a r24273: Fix bug #4817 by <mwallnoefer@yahoo.de>. (Unable to add a computer
from MMC Active Directory Users and Computers).

Windows sets a 14 UCS2 char buffer as the password in this case.

We need to allow random buffers to be accepted as complex passwords,
even if they don't have ASCII upper or lower case characters.  (If
half the bytes are > 127, then it's likely a random buffer).

Also make the test match the documented windows behaviour of '3 of the
4 classes: upper, lower, digit, special'.

Andrew Bartlett
(This used to be commit 5ef26a2ba3)
2007-10-10 15:01:33 -05:00
Andrew Bartlett
c4e5fcc349 r24263: Fix bug 4846 (unable to copy users in MMC Active Directory Users and
Computers).

We now generate a security descriptor for each object, when it is
created.  This seems to keep MMC happy.  The next step is to honour
it.

Andrew Bartlett
(This used to be commit 72f4ae8246)
2007-10-10 15:01:32 -05:00
Andrew Bartlett
ae7819d715 r24262: Set the objectCategory by default in the objectclass module, rather than using templates.
Modify the samba3sam test to be less fussy, and not use the
objectclass module (which requires proper schema stuff now).

Andrew Bartlett
(This used to be commit 53c248c264)
2007-10-10 15:01:32 -05:00
Andrew Bartlett
49c42e2550 r24261: Fix the standalone ldb build after I moved the objectclass module out.
Andrew Bartlett
(This used to be commit c4c3afcdcb)
2007-10-10 15:01:32 -05:00
Andrew Bartlett
5fe53d6ace r24260: Ensure we always override any existing values for these generated
attributes.  Anything else leads to madness.

Andrew Bartlett
(This used to be commit af092a361d)
2007-10-10 15:01:31 -05:00
Andrew Bartlett
10c1480d16 r24259: Rework the objectclass module to use the new schema, rather than the
ldb_subclass list.

Next step will be to have this module also set the objectCategory and
default ntSecurityDescriptor

Andrew Bartlett
(This used to be commit 0f7135a468)
2007-10-10 15:01:31 -05:00
Andrew Bartlett
1594b27db8 r24249: Thse generated attributes should not be pushed this far down the stack
in any cse.

Andrew Bartlett
(This used to be commit 5f08a686a6)
2007-10-10 15:01:30 -05:00
Andrew Bartlett
210971d092 r24248: Attempt to fix bug #4830 by <mwallnoefer@yahoo.de>. If there is no
payload to the control, we still need to inialise *value, as otherwise
we read uninitialised data later.

Andrew Bartlett
(This used to be commit f6566480b7)
2007-10-10 15:01:30 -05:00
Andrew Bartlett
85e1975022 r24247: Remove extra newlines from ldb_debug() calls - it already adds one.
Andrew Bartlett
(This used to be commit e5fdcda2a1)
2007-10-10 15:01:30 -05:00
Andrew Bartlett
58d9f6ed9d r24246: Avoid the annoying 'probable memory leak in ldb' messages, by fixing
some issues in the NBT server (this was a false positive, but easily
worked around) and DRSUAPI server.

We should take care not to use the ldb_context as a talloc pool, and
to always ensure that any results from ldb_search() are moved off that
pool with talloc_steal or talloc_free().

To work around the issue in provision, for which I can find no fault
(other than a lot of work being done in provision), I've moved the
detector trigger to 400 additional blocks.

This fixes Bug #4810 by <mwallnoefer@yahoo.de>

Andrew Bartlett
(This used to be commit 42bcf85620)
2007-10-10 15:01:29 -05:00
Andrew Bartlett
b351641c6e r24245: Fix bug #4828 - we need to set the samba LDB debug handler early, so
we catch messages pushed out by modules during startup.

This also sets an explict mapping between ldb and Samba debug levels.

Andrew Bartlett
(This used to be commit 50913a401d)
2007-10-10 15:01:29 -05:00
Kai Blin
e87a0e5f69 r24157: Merge from kai/samba4-gsoc.git;h=728deba680f8cf85cab168a6278a2cf657f65fdb
Make WBSRV_SAMBA3_SET_STRING use safe_strcpy instead of strncpy.
(This used to be commit 6b92b816fc)
2007-10-10 15:01:28 -05:00
Andrew Bartlett
5f6b501f21 r24146: It is not an error for a Win2k3-only server not to support the NT4
replication call.

Andrew Bartlett
(This used to be commit 59cba32c09)
2007-10-10 15:01:28 -05:00
Andrew Bartlett
e0779e2d3b r24127: Set the Domain SID into the libnet context, and have libnet_UserInfo
return full SIDs for the user SID and primary group sid.

This should help kai with his getpwnam work in winbind.

Andrew Bartlett
(This used to be commit 078671d501)
2007-10-10 15:01:27 -05:00
Andrew Bartlett
fc9471c4df r24118: Start fixing #4842 (usrmgr polcies menu not working) by removing range
restriction on the maximum returned size.  There isn't a good reason
to have a limit on this one.

Andrew Bartlett
(This used to be commit 9a8315019e)
2007-10-10 15:01:27 -05:00
Andrew Bartlett
3de02665fe r24112: Complete initialistion of the libnet_ctx when setting up the domain.
We need to set the access_mask and the domain name, or else libnet
will try to do this itself.

This seems to fix the issues Kai was having.

Andrew Bartlett
(This used to be commit 44c193272b)
2007-10-10 15:01:27 -05:00
Andrew Bartlett
07b15cd9fd r24111: Untested code is broken code, untested code is broken code...
Apologies for my previous commit, which should never have been
commited untested.

Andrew Bartlett
(This used to be commit ec69f41d09)
2007-10-10 15:01:26 -05:00
Andrew Bartlett
fa16e28424 r24110: I hate seeing callers manually filling in the composite context. Use
the helper functions instead (and in kai's new code, which just copied
the previous bad practice).

Andrew Bartlett
(This used to be commit 0908d8232e)
2007-10-10 15:01:25 -05:00
Kai Blin
6d10dc296c r24109: Add a wb_name2domain call
(This used to be commit a6a45ab970)
2007-10-10 15:01:25 -05:00
Kai Blin
91750a2825 r24108: Split out samba3_parse_domuser to a seperate file and rename, so it can be
used for a name2domain call.
(This used to be commit 75e41da039)
2007-10-10 15:01:25 -05:00
Andrew Bartlett
50a66a2e81 r24083: Don't fail the test (looking for the user in the enum) if we didn't
create the user in the first place.

Andrew Bartlett
(This used to be commit db0f81734d)
2007-10-10 15:01:24 -05:00
Andrew Bartlett
bd705012b8 r24082: Following the removal of a fanstsy condition from the SAMR testsuite,
allow the server side to enumerate all domain controllers and domain
members...

Andrew Bartlett
(This used to be commit d42150ff0a)
2007-10-10 15:01:24 -05:00
Andrew Bartlett
97859bc760 r24081: Domain Controllers are also shown in this enumeration.
Andrew Bartlett
(This used to be commit 3e332ff771)
2007-10-10 15:01:23 -05:00
Andrew Bartlett
008b840760 r24080: Set the primary group (matching windows) when creating new users in
SAMR.  This can't be done in the ldb templates code, as it doesn't
happen over direct LDAP.

As noted in bug #4829.

Andrew Bartlett
(This used to be commit 3bfa6dbf7d)
2007-10-10 15:01:23 -05:00
Andrew Bartlett
63c20026c4 r24076: Make ldap.js pass against Win2k3 again (looks like we don't match AD
on this error code, but allow both for now).

Also prove that bug #4829 needs a different solution: we can't fix
this by changing the template.  I think this fix needs to be in the
SAMR server.

Andrew Bartlett
(This used to be commit c3554e3ee7)
2007-10-10 15:01:22 -05:00
Andrew Bartlett
bd750a77c0 r24075: As suggested by metze, match the behaviour of ntvfs_posix, and remove
the backend data (effectivly closing the handle) when we close an IPC
FD.

This should fix #4821.

Andrew Bartlett
(This used to be commit efaf91b9d5)
2007-10-10 15:01:22 -05:00
Andrew Bartlett
649d4bf8aa r24074: Test both permitted logon hours and permitted workstations in the
RPC-SAMLOGON test.

This showed that, as noted by bug #4823, we didn't test for invalid
workstations.  In fact, the code had been ported across, but because
untested code is broken code, it never worked...

Andrew Bartlett
(This used to be commit 5e07417ada)
2007-10-10 15:01:21 -05:00
Andrew Bartlett
06a6194ead r24061: Anther part of bug #4823, which is that until now Samba4 didn't parse
the logon hours, even if set.

This code happily stolen from the great work in Samba3 :-)

Andrew Bartlett
(This used to be commit a4939ab629)
2007-10-10 15:01:21 -05:00
Andrew Bartlett
4e697b288b r24060: Fix bug #4806 by Matthias Wallnöfer <mwallnoefer@yahoo.de>: We need to
include the attribute allowedChildClassesEffective for MMC to allow
the creation of containers.

This may need further refinement, but it seems to work for now.

Andrew Bartlett
(This used to be commit d053b8e218)
2007-10-10 15:01:21 -05:00
Andrew Bartlett
fe60cd993d r24059: Fix bug 4822 reported by Matthias Wallnöfer <mwallnoefer@yahoo.de>.
Any SAMR client (usrmgr.exe in this case) that attempted to set a
property to a zero length string found instead the the old value was
kept.

In fixing this, rework the macros to be cleaner (add the
always-present .string) to every macro, and remove the use of the
samdb_modify() and samdb_replace() wrappers where possible.

Andrew Bartlett
(This used to be commit b05fe69304)
2007-10-10 15:01:20 -05:00
Volker Lendecke
6dad5b6e06 r24054: Fix some warnings
(This used to be commit b3473db397)
2007-10-10 15:01:20 -05:00
Andrew Bartlett
41ab04e37c r24053: Ensure we filter EnumDomainUsers with the supplied mask.
Should fix another part (list of domains in usrmgr incorrectly
including accounts) of bug #4815 by mwallnoefer@yahoo.de.

Andrew Bartlett
(This used to be commit 7f7e4fe298)
2007-10-10 15:01:19 -05:00
Andrew Bartlett
32d55960b5 r24052: Fix some of the NT4 usrmgr.exe portions of bug 4815.
- The icons in usermgr were incorrect, because the acct_flags were
   not filled in (due to missing attribute in ldb query)

 - The Full name was missing, and the description used as the full
   name (due to missing attributes in ldb query and incorrect IDL)

To prove the correctness of these fixes, I added a substantial new
test to RPC-SAMR-USERS, to ensure cross-consistancy between
QueryDisplayInfo and QueryUserInfo on each user.

This showed that for some reason, we must add ACB_NORMAL to the
acct_flags on level 2 queries (for machine trust accounts)...

Getting this right is important, because Samba3's RPC winbind methods
uses these queries.

Andrew Bartlett
(This used to be commit 9475d94a61)
2007-10-10 15:01:19 -05:00
Rafal Szczesniak
a47313851f r24051: more monitor function calls and monitor msg names
convention change.

rafal
(This used to be commit 6ab10b2ed2)
2007-10-10 15:01:18 -05:00
Volker Lendecke
890c42045d r24041: After metze's ack, check in torture_comment from Zack Krisch
<zack.kirsch@isilon.com>
(This used to be commit b1148b7ab8)
2007-10-10 15:01:18 -05:00
Andrew Bartlett
a7416c0894 r24012: Remove duplicate code block (from bad merge).
Andrew Bartlett
(This used to be commit 68bdbd732f)
2007-10-10 15:01:18 -05:00
Andrew Bartlett
4a517b1433 r24011: Keep the connect handle around in libnet, in case we want it.
Andrew Bartlett
(This used to be commit e6ccdb6cea)
2007-10-10 15:01:17 -05:00
Andrew Bartlett
276436311f r24010: Fix warning for the function paramter to qsort().
Andrew Bartlett
(This used to be commit 51862c4c52)
2007-10-10 15:01:17 -05:00
Andrew Bartlett
dc25ec5ce7 r23995: Work to allow mimir's libnet code to be called from winbind.
We now setup a libnet_ctx for each domain.  We should then be able to
replace/merge some more of the winbind code with libnet calls,
referencing domain->libnet_ctx.

Andrew Bartlett
(This used to be commit bad2dc14d7)
2007-10-10 15:01:16 -05:00
Andrew Bartlett
ae0115d8db r23994: Finish my work to ensure that non-root and non-administrator users
cannot vampire, provision or upgrade a Samba4 server via SWAT.

(The previous commit was an accident, and not complete).

This should get Samba4 closer to being 'secure' for an alpha release.

Andrew Bartlett
(This used to be commit 3b6695de36)
2007-10-10 15:01:16 -05:00
Andrew Bartlett
b7f9e85db1 r23993: Attempt to fix bug #4808, reported by mwallnoefer@yahoo.de. The issue
is that when we all ldb_msg_add_empty(), we might realloc() the
msg->elements array.  We need to ensure the source pointer (when
copying an element from the same msg) is still valid, or the data
copied.

Andrew Bartlett
(This used to be commit 0fbea30577)
2007-10-10 15:01:16 -05:00
Andrew Bartlett
62b56dc2db r23982: Fix use-after-realloc() found by valgrind and mwallnoefer@yahoo.de.
Should fix bug #4804.

Andrew Bartlett
(This used to be commit 848336dc61)
2007-10-10 15:01:15 -05:00