1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-26 23:33:15 +03:00
Commit Graph

162 Commits

Author SHA1 Message Date
Jelmer Vernooij
40ae12c086 r26328: remove more uses of global_loadparm. 2007-12-21 05:48:41 +01:00
Jelmer Vernooij
95a6ef7fc8 r26319: Split encoding functions out of libcli_ldap. 2007-12-21 05:48:33 +01:00
Jelmer Vernooij
6fd0d9d3b7 r26313: Fix more uses of static loadparm. 2007-12-21 05:48:25 +01:00
Jelmer Vernooij
fc1f4d2d65 r26296: Store loadparm context in DCE/RPC server context. 2007-12-21 05:48:13 +01:00
Jelmer Vernooij
0721a07aad r26227: Make loadparm_context part of a server task, move loadparm_contexts further up the call stack. 2007-12-21 05:47:04 +01:00
Andrew Bartlett
09c0faa5b7 r26135: Remove samdb_add(), samdb_delete() and samdb_modify(), which were just
wrappers to ldb_add() etc.  samdb_replace() remains, as it sets flags on
all entries as 'replace'.

Andrew Bartlett
2007-12-21 05:46:17 +01:00
Jelmer Vernooij
56dfcb4f2f r26003: Split up DB_WRAP, as first step in an attempt to sanitize dependencies. 2007-12-21 05:45:40 +01:00
Jelmer Vernooij
3fcc960839 r25398: Parse loadparm context to all lp_*() functions. 2007-10-10 15:07:25 -05:00
Andrew Bartlett
5b893fc6f5 r25052: This missing 'break' caused problems on 32 bit platforms only, due to
alignment of the union.

Sorry for the time it took to test and fix this.

Andrew Bartlett
2007-10-10 15:05:51 -05:00
Jelmer Vernooij
abe8349f9b r25026: Move param/param.h out of includes.h 2007-10-10 15:05:38 -05:00
Andrew Bartlett
9aae9b1d24 r24973: Try to make it really clear we are dealing with 64 bit numbers here.
Andrew Bartlett
2007-10-10 15:03:43 -05:00
Andrew Bartlett
e5f0744d62 r24942: Patch from Matthias Wallnöfer <mwallnoefer@yahoo.de> and a testsuite
to prove it is correct.

This should fix bug #4824: User Manager for Domains - Account Expires.

Thanks!

Andrew Bartlett
2007-10-10 15:03:41 -05:00
Andrew Bartlett
d42150ff0a 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
2007-10-10 15:01:24 -05:00
Andrew Bartlett
3bfa6dbf7d 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
2007-10-10 15:01:23 -05:00
Andrew Bartlett
b05fe69304 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
2007-10-10 15:01:20 -05:00
Andrew Bartlett
7f7e4fe298 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
2007-10-10 15:01:19 -05:00
Andrew Bartlett
9475d94a61 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
2007-10-10 15:01:19 -05:00
Andrew Bartlett
625a9e6c04 r23815: Thanks to Matthias Wallnoefer <mwallnoefer@yahoo.de> for pointing out
that we had the wrong objectClass for OU=Domain
Controllers,${DOMAINDN} (was CN=Domain Controllers,${DOMAINDN})

This fixes both the SAMR server and the LDIF templates.

Andrew Bartlett
2007-10-10 14:59:22 -05:00
Andrew Tridgell
fcf38a38ac r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
2007-10-10 14:59:12 -05:00
Andrew Bartlett
7f3671bf11 r23365: Try to make Windows Vista join again. On my new test environment, it
wants to check for an existing domain join account, and fails.  This
test shows that we need to return NT_STATUS_NONE_MAPPED when nothing
matches.  (not yet tested if this helps vista).

Andrew Bartlett
2007-10-10 14:53:12 -05:00
Jelmer Vernooij
76c78b0339 r20850: Prefix all server calls with dcesrv_ 2007-10-10 14:43:39 -05:00
Andrew Bartlett
67d8365e83 r20149: Remove the smb.conf distinction between PDC and BDC. Now the correct
way to setup a Samba4 DC is to set 'server role = domain controller'.

We use the fSMORoleOwner attribute in the base DN to determine the PDC.

This patch is quite large, as I have corrected a number of places that
assumed taht we are always the PDC, or that used the smb.conf
lp_server_role() to determine that.

Also included is a warning fix in the SAMR code, where the IDL has
seperated a couple of types for group display enumeration.

We also now use the ldb database to determine if we should run the
global catalog service.

In the near future, I will complete the DRSUAPI
DsGetDomainControllerInfo server-side on the same basis.

Andrew Bartlett
2007-10-10 14:29:15 -05:00
Simo Sorce
4f07542143 r20034: Start using ldb_search_exp_fmt() 2007-10-10 14:28:51 -05:00
Simo Sorce
93b738b111 r19903: This is a cut&paste error for sure
there is no ongoing transaction in this code
2007-10-10 14:28:34 -05:00
Stefan Metzmacher
b4d7d49c27 r19902: give better errors...
metze
2007-10-10 14:28:33 -05:00
Simo Sorce
3929c086d5 r19832: better prototypes for the linearization functions:
- ldb_dn_get_linearized
  returns a const string

- ldb_dn_alloc_linearized
  allocs astring with the linearized dn
2007-10-10 14:28:22 -05:00
Simo Sorce
a580c871d3 r19831: Big ldb_dn optimization and interfaces enhancement patch
This patch changes a lot of the code in ldb_dn.c, and also
removes and add a number of manipulation functions around.

The aim is to avoid validating a dn if not necessary as the
validation code is necessarily slow. This is mainly to speed up
internal operations where input is not user generated and so we
can assume the DNs need no validation. The code is designed to
keep the data as a string if possible.

The code is not yet 100% perfect, but pass all the tests so far.
A memleak is certainly present, I'll work on that next.

Simo.
2007-10-10 14:28:22 -05:00
Rafal Szczesniak
60ade8ddbd r19256: add missing infolevel and fields to SetUserInfo call
that's why ntsrv and win2k3 srv could pass the net test
and we could not...

rafal
2007-10-10 14:20:58 -05:00
Andrew Bartlett
9ce88a8917 r18775: Performing an ldb op of 'do nothing' is pointless, and breaks against
OpenLDAP.

Andrew Bartlett
2007-10-10 14:19:10 -05:00
Andrew Bartlett
5525baf521 r18416: We need to look for both builtinDomain and domain, in the OpenDomain call.
Andrew Bartlett
2007-10-10 14:18:25 -05:00
Andrew Bartlett
6419ef09b1 r18409: Make sure to print a DEBUG message if this LDB search fails.
Andrew Bartlett
2007-10-10 14:18:24 -05:00
Andrew Bartlett
8cddcdb7c7 r18252: Make sure to NULL terminate these lists of attributes.
Andrew Bartlett
2007-10-10 14:17:56 -05:00
Jelmer Vernooij
f7afa1cb77 r17930: Merge noinclude branch:
* Move dlinklist.h, smb.h to subsystem-specific directories
 * Clean up ads.h and move what is left of it to dsdb/
   (only place where it's used)
2007-10-10 14:16:54 -05:00
Andrew Tridgell
09007b0907 r17824: add a wrapper for the common partitions_basedn calculation 2007-10-10 14:16:45 -05:00
Andrew Tridgell
a5ea749f0a r17823: get rid of most of the samdb_base_dn() calls, as they are no longer
needed in searches
2007-10-10 14:16:45 -05:00
Simo Sorce
ad75cf8695 r17516: Change helper function names to make more clear what they are meant to do 2007-10-10 14:15:31 -05:00
Andrew Bartlett
10eeea6da4 r16827: Factor out some code into common samdb functions:
- creation of ForeignSecurityPrincipals
 - template duplication code

Rework much of the LSA server to pass the RPC-LSA test.  Much of the
server code was untested.  In implementing the LSA Accounts feature, I
have opted to have it only create entires when privilages are applied,
and not to delete entries, but to delete the privilages.

We skip some parts of the test, but it is much better than not testing
it at all.

Andrew Bartlett
2007-10-10 14:09:48 -05:00
Andrew Bartlett
01d25c9d6c r16794: Make Samba4 pass it's own RPC-SAMR test, at least in part. There are
still a couple of unimplemented functions, but this is far better than
not testing this at all.  In particular, this exercises the
password_hash module.

Specific changes:
 - Add support for SetDomainInfo
 - Add many more info levels to QueryDomainInfo
 - Set a domain comment in RPC-SAMR, and verify it is kept
 - Refactor QueryUserInfo not to always serach for all attributes
 - Add QueryDiplayInfo3 and QueryDomainInfo2 as aliased calls
 - Make OemChangePassword2 search under the samdb_base_dn(), so it
   finds the user when partitions are active.
 - Skip SetSecurity, DisplayIndex, MemberAttributesOfGroup and
  'Multiple' alias operations in RPC-SAMR for Samba4
 - Add RPC-SAMR as a 'slow' RPC test (it is quite slow)

Andrew Bartlett
2007-10-10 14:09:46 -05:00
Andrew Bartlett
c50095efab r16773: Fix one more RPC-SAMR test (an alias level), and make it clear that
the unknown value in the samr_GroupInfo structures are the group
attributes.

Andrew Bartlett
2007-10-10 14:09:45 -05:00
Andrew Bartlett
c4ab9e8a75 r16236: Add a proper baseDN to a large number of queries. Searching the NULL
baseDN won't work once the partitions module is loaded.

Andrew Bartlett
2007-10-10 14:09:07 -05:00
Andrew Bartlett
81f3cd1c45 r16166: Remove hexidecimal constants from the Samba4 provision files.
This change is required for compatibility with the OSX client, in
particular, but returning 0x80000002 rather than -2147483646 violates
what LDAP clients expect in general.

Andrew Bartlett
2007-10-10 14:09:03 -05:00
Jelmer Vernooij
c19c2b51d3 r15328: Move some functions around, remove dependencies.
Remove some autogenerated headers (which had prototypes now autogenerated by pidl)
Remove ndr_security.h from a few places - it's no longer necessary
2007-10-10 14:05:17 -05:00
Stefan Metzmacher
9ec706238c r14860: create libcli/security/security.h
metze
2007-10-10 13:59:44 -05:00
Jelmer Vernooij
3dd477ca51 r14464: Don't include ndr_BASENAME.h files unless strictly required, instead
try to include just the BASENAME.h files (containing only structs)
2007-10-10 13:57:27 -05:00
Stefan Metzmacher
83d2978da1 r14438: fix warnings
metze
2007-10-10 13:57:24 -05:00
Jelmer Vernooij
1228358767 r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
2007-10-10 13:52:24 -05:00
Andrew Bartlett
c530ab5dc6 r13910: Fix the 'your password has expired' on every login. We now consider
if the 'password does not expire' flag has been set, filling in the
PAC and netlogon reply correctly if so.

Andrew Bartlett
2007-10-10 13:52:22 -05:00
Jelmer Vernooij
c80a8f1102 r13903: Don't generate prototypes for modules and binaries in include/proto.h by
default.
2007-10-10 13:52:21 -05:00
Andrew Bartlett
e902274321 r12599: This new LDB module (and associated changes) allows Samba4 to operate
using pre-calculated passwords for all kerberos key types.
(Previously we could only use these for the NT# type).

The module handles all of the hash/string2key tasks for all parts of
Samba, which was previously in the rpc_server/samr/samr_password.c
code.  We also update the msDS-KeyVersionNumber, and the password
history.  This new module can be called at provision time, which
ensures we start with a database that is consistent in this respect.

By ensuring that the krb5key attribute is the only one we need to
retrieve, this also simplifies the run-time KDC logic.  (Each value of
the multi-valued attribute is encoded as a 'Key' in ASN.1, using the
definition from Heimdal's HDB.  This simplfies the KDC code.).

It is hoped that this will speed up the KDC enough that it can again
operate under valgrind.
2007-10-10 13:49:01 -05:00
Jelmer Vernooij
0aca5fd513 r12542: Move some more prototypes out to seperate headers 2007-10-10 13:47:55 -05:00