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

105 Commits

Author SHA1 Message Date
Jelmer Vernooij
ba75f1613a r26228: Store loadparm context in auth context, move more loadparm_contexts up the call stack. 2007-12-21 05:47:05 +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
Stefan Metzmacher
330b8dce85 r26016: remove unneeded include
metze
2007-12-21 05:45:42 +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
3468952e77 r25446: Merge some changes I made on the way home from SFO:
2007-09-29 More higher-level passing around of lp_ctx.
2007-09-29 Fix warning.
2007-09-29 Pass loadparm contexts on a higher level.
2007-09-29 Avoid using global loadparm context.
2007-10-10 15:07:34 -05:00
Jelmer Vernooij
3fcc960839 r25398: Parse loadparm context to all lp_*() functions. 2007-10-10 15:07:25 -05:00
Jelmer Vernooij
abe8349f9b r25026: Move param/param.h out of includes.h 2007-10-10 15:05:38 -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
Stefan Metzmacher
44c27b2fe6 r22627: fix crash msgs_tmp isn't always initialized
and we don't need an extra allocated string anyway

metze
2007-10-10 14:51:55 -05:00
Stefan Metzmacher
255acbb113 r22621: fix the 'sam' auth module
metze
2007-10-10 14:51:54 -05:00
Andrew Bartlett
929fd1beee r20352: Use the common function to find the DN for a domain.
Andrew Bartlett
2007-10-10 14:30:14 -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
Stefan Metzmacher
9c992a39db r20010: cosmetic fix
metze
2007-10-10 14:28:47 -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
Andrew Bartlett
2b569c42e0 r19598: Ahead of a merge to current lorikeet-heimdal:
Break up auth/auth.h not to include the world.

Add credentials_krb5.h with the kerberos dependent prototypes.

Andrew Bartlett
2007-10-10 14:25:00 -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
Stefan Metzmacher
5b26cbc342 r17270: split the logic of saying this auth backend wants to handle this
request from the password checking. This will help to make
the password checking hook async later

metze
2007-10-10 14:10:25 -05:00
Andrew Bartlett
a2441ae99a r16238: Use a baseDN for the auth_sam searches, to allow continued function
with partitions.

Also fix some debug messages.

Andrew Bartlett
2007-10-10 14:09:08 -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
Jelmer Vernooij
6646384aaf r15298: Fix the build using a few hacks in the build system.
Recursive dependencies are now forbidden (the build system
will bail out if there are any).

I've split up auth_sam.c into auth_sam.c and sam.c. Andrew,
please rename sam.c / move its contents to whatever/wherever you think suits
best.
2007-10-10 14:05:04 -05:00
Jelmer Vernooij
5b3ab728ed r15297: Move create_security_token() to samdb as it requires SAMDB (and the rest of LIBSECURITY doesn't)
Make the ldb password_hash module only depend on some keys manipulation code, not full heimdal
Some other dependency fixes
2007-10-10 14:05:04 -05:00
Andrew Tridgell
babf747cfd r14975: use the magic comment recognised by the IBM checker for deliberate
fall through in switch
2007-10-10 14:00:49 -05:00
Stefan Metzmacher
9ec706238c r14860: create libcli/security/security.h
metze
2007-10-10 13:59:44 -05:00
Jelmer Vernooij
e71cca7f0c r14571: More improvements on shared library support in Samba. Only ldb is left now... 2007-10-10 13:58:49 -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
Jelmer Vernooij
1a16a6f1df r14380: Reduce the size of structs.h 2007-10-10 13:57:16 -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
Andrew Bartlett
c6eb74f429 r13252: Cleanup, both in code, comments and talloc use:
In particular, I've used the --leak-report-full option to smbd to
track down memory that shouldn't be on a long-term context.  This is
now talloc_free()ed much earlier.

Andrew Bartlett
2007-10-10 13:51:38 -05:00
Andrew Bartlett
85b3f6ebdd r13247: Try to make better use of talloc in the auth/ and auth/gensec code.
We don't want temporary memory hanging around on the long-term
contexts.

Andrew Bartlett
2007-10-10 13:51:37 -05:00
Andrew Bartlett
c10491fb9b r12718: We don't use unicodePwd directly any more.
Andrew Bartlett
2007-10-10 13:49:45 -05:00
Jelmer Vernooij
70e7449318 r12608: Remove some unused #include lines. 2007-10-10 13:49:03 -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
Andrew Tridgell
53f0fb77c3 r12363: minor fixes for win2000 join/login
- the objectClass needs to be added to the list of attributes to make
   the check for objectClass=computer work

 - the short version of the name needs to be used for the 'cn' in
   cracknames
2007-10-10 13:47:31 -05:00
Andrew Bartlett
8308cf6e04 r12361: Add a new function: ldb_binary_encode_string()
This is for use on user-supplied arguments to printf style format
strings which will become ldb filters.  I have used it on LSA, SAMR
and the auth/ code so far.

Also add comments to cracknames code.

Andrew Bartlett
2007-10-10 13:47:30 -05:00
Andrew Bartlett
41f09ef934 r11929: Add static, comments.
Andrew Bartlett
2007-10-10 13:46:48 -05:00
Andrew Bartlett
36973b1eef r11543: A major upgrade to our KDC and PAC handling.
We now put the PAC in the AS-REP, so that the client has it in the
TGT.  We then validate it (and re-sign it) on a TGS-REQ, ie when the
client wants a ticket.

This should also allow us to interop with windows KDCs.

If we get an invalid PAC at the TGS stage, we just drop it.

I'm slowly trying to move the application logic out of hdb-ldb.c, and
back in with the rest of Samba's auth system, for consistancy.  This
continues that trend.

Andrew Bartlett
2007-10-10 13:45:52 -05:00
Andrew Bartlett
1643ad169c r11537: Make the authsam_account_ok routine callable by external users (the KDC).
Andrew Bartlett
2007-10-10 13:45:51 -05:00
Andrew Bartlett
da38bcefa7 r11525: Move lookups (including the attribute search) for users from
kdc/hdb-ldb.c to share the routines used for auth/

This will require keeping the attribute list in sync, but I think it
is worth it for the next steps (sharing the server_info generation).

Andrew Bartlett
2007-10-10 13:45:48 -05:00
Andrew Bartlett
ce611eb5f3 r11520: indent 2007-10-10 13:45:47 -05:00
Andrew Bartlett
690cad8083 r11370: Samba4 now passes it's own RPC-SAMLOGON test again.
This avoids the nasty user@DOMAIN test for now, as it has very odd
semantics with NTLMv2.

Allow only user accounts to do an interactive login.

Andrew Bartlett
2007-10-10 13:45:27 -05:00
Andrew Bartlett
421e64c2b4 r11366: Pass around the flags which indicate if we should support plaintext
logins and NTLM machine account logins.

Andrew Bartlett
2007-10-10 13:45:26 -05:00
Andrew Bartlett
0800942dbb r11312: Make it clear we are looking at the 'domain ref', not the domain
itself in the auth_sam module.

Andrew Bartlett
2007-10-10 13:45:18 -05:00
Andrew Bartlett
ecacef213b r11293: Use the right search when forming the data for the PAC.
Andrew Bartlett
2007-10-10 13:45:14 -05:00
Andrew Bartlett
bc6f6f9381 r11273: Initialise the new server_info->logon_server element.
Andrew Bartlett
2007-10-10 13:45:11 -05:00
Andrew Bartlett
c9d5d8e45d r11270: Move the core CrackNames code from rpc_server/drsuapi to dsdb/samdb.
I'm sure this will not be the final resting place, but it will do for
now.

Use the cracknames code in auth/ for creating a server_info given a
principal name only (should avoid assumtions about spliting a
user@realm principal).

Andrew Bartlett
2007-10-10 13:45:11 -05:00
Andrew Bartlett
fd7203789a r10810: This adds the hooks required to communicate the current user from the
authenticated session down into LDB.  This associates a session info
structure with the open LDB, allowing a future ldb_ntacl module to
allow/deny operations on that basis.

Along the way, I cleaned up a few things, and added new helper functions
to assist.  In particular the LSA pipe uses simpler queries for some of
the setup.

In ldap_server, I have removed the 'ldasrv:hacked' module, which hasn't
been worked on (other than making it continue to compile) since January,
and I think the features of this module are being put into ldb anyway.

I have also changed the partitions in ldap_server to be initialised
after the connection, with the private pointer used to associate the ldb
with the incoming session.

Andrew Bartlett
2007-10-10 13:39:32 -05:00