1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-31 17:18:04 +03:00
Commit Graph

625 Commits

Author SHA1 Message Date
Jelmer Vernooij
46aa296cc9 r12592: Remove some useless dependencies
(This used to be commit ca8db1a0cd)
2007-10-10 13:49:00 -05:00
Jelmer Vernooij
2cd5ca7d25 r12542: Move some more prototypes out to seperate headers
(This used to be commit 0aca5fd513)
2007-10-10 13:47:55 -05:00
Jelmer Vernooij
6aafed9600 r12499: Move smb_build.h out of includes.h
(This used to be commit c92ace494f)
2007-10-10 13:47:45 -05:00
Jelmer Vernooij
d8e35f8828 r12498: Eliminate INIT_OBJ_FILES and ADD_OBJ_FILES. We were not using
the difference between these at all, and in the future the
fact that INIT_OBJ_FILES include smb_build.h will be sufficient to
have recompiles at the right time.
(This used to be commit b24f2583ed)
2007-10-10 13:47:45 -05:00
Jelmer Vernooij
448483199f r12494: Support loading modules from .so files for most subsystems.
We now use a different system for initializing the modules for a subsystem.
Most subsystems now have an init function that looks something like this:

	init_module_fn static_init[] = STATIC_AUTH_MODULES;
	init_module_fn *shared_init = load_samba_modules(NULL, "auth");

	run_init_functions(static_init);
	run_init_functions(shared_init);

	talloc_free(shared_init);

I hope to eliminate the other init functions later on (the
init_programname_subsystems; defines).
(This used to be commit b6d2ad4ce0)
2007-10-10 13:47:45 -05:00
Andrew Bartlett
97113d0508 r12439: No need to keep walking this list if we find the match.
Andrew Bartlett
(This used to be commit cf1883c3cc)
2007-10-10 13:47:39 -05:00
Andrew Bartlett
36d7778784 r12436: Fix Samba4 as a server to Win2000 for the domain join.
We still have Win2000 issues, but now we correctly handle the case
where NTLMSSP is chosen as an authentication mech, but the OID list
still contains Kerberos as a later option.

Andrew Bartlett
(This used to be commit dc2b2c33f8)
2007-10-10 13:47:39 -05:00
Andrew Bartlett
9a9cb35cbd r12422: Some kerberos comments and clarifications.
Andrew Bartlett
(This used to be commit 31046cd22b)
2007-10-10 13:47:36 -05:00
Andrew Bartlett
221c1512a8 r12411: Add 'net samdump keytab <keytab>'.
This extracts a remote windows domain into a keytab, suitable for use
in ethereal for kerberos decryption.

For the moment, like net samdump and net samsync, the 'password
server' smb.conf option must be set to the binding string for the
server. eg:

password server = ncacn_np:mypdc

Andrew Bartlett
(This used to be commit 272013438f)
2007-10-10 13:47:35 -05:00
Andrew Tridgell
636dbb355b 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
(This used to be commit 53f0fb77c3)
2007-10-10 13:47:31 -05:00
Andrew Bartlett
bceca72304 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
(This used to be commit 8308cf6e04)
2007-10-10 13:47:30 -05:00
Andrew Bartlett
6bd8be8671 r12360: Add simple bind support into our LDAP server.
Needs changes to our client code for automated testing.

Andrew Bartlett
(This used to be commit e751d81414)
2007-10-10 13:47:30 -05:00
Andrew Bartlett
97b54b007e r12310: Link simple bind support in our internal LDAP libs to LDB and the
command line processing system.

This is a little ugly at the moment, but works.  What I cannot manage
to get to work is the extraction and propogation of command line
credentials into the js interface to ldb.

Andrew Bartlett
(This used to be commit f34ede763e)
2007-10-10 13:47:28 -05:00
Andrew Bartlett
d8966dcd7e r12268: Use transactions to ensure that the schannel db is consistant.
Andrew Bartlett
(This used to be commit 949137e312)
2007-10-10 13:47:26 -05:00
Jelmer Vernooij
ab31a44216 r12254: Add some (hopefully correct) descriptions for libraries that are installed.
Install pkg-config files.
(This used to be commit a86abe84e2)
2007-10-10 13:47:24 -05:00
Andrew Bartlett
a1827a1deb r12227: I realised that I wasn't yet seeing authenticated LDAP for the ldb
backend.

The idea is that every time we open an LDB, we can provide a
session_info and/or credentials.  This would allow any ldb to be remote
to LDAP.  We should also support provisioning to a authenticated ldap
server.

(They are separate so we can say authenticate as foo for remote, but
here we just want a token of SYSTEM).

Andrew Bartlett
(This used to be commit ae2f3a64ee)
2007-10-10 13:47:22 -05:00
Andrew Bartlett
172a8b477e r12179: Allow our KDC to use LDAP to get to the backend database.
To avoid a circular depenency, it is not allowed to use Krb5 as an
authentication mechanism, so this must be removed from the list.  An
extension to the credentials system allows this function.

Also remove proto.h use for any of the KDC, and use NTSTATUS returns
in more places.

Andrew Bartlett
(This used to be commit 5f9dddd02c)
2007-10-10 13:47:16 -05:00
Stefan Metzmacher
89260f978e r12065: fix compiler warning
metze
(This used to be commit c60bac5baa)
2007-10-10 13:47:03 -05:00
Andrew Tridgell
16c7e92cd2 r12064: pass back the socket level error correctly (so we get
NT_STATUS_CONNECTION_REFUSED when a KDC is not listening)
(This used to be commit 0f85fc204c)
2007-10-10 13:47:03 -05:00
Andrew Tridgell
469aad2c48 r12063: fixed the krb5 client code to handle ICMP port unreachable errors, and
error out immediatelly. This prevents a long timeout
(This used to be commit f6c0fccc06)
2007-10-10 13:47:03 -05:00
Andrew Bartlett
c3f35aafed r12061: Add missing file to previous commit. This provides a hook on which to
attach a restriction on available GENSEC mechanisms.

Andrew Bartlett
(This used to be commit 8154f2421f)
2007-10-10 13:47:03 -05:00
Andrew Bartlett
61bd609574 r12060: Work towards allowing the credentials system to allow/deny certain
GENSEC mechansims.  This will allow a machine join to an NT4 domain to
avoid even trying kerberos, or a sensitive operation to require it.

Andrew Bartlett
(This used to be commit 11c7a89e52)
2007-10-10 13:47:02 -05:00
Andrew Bartlett
42f2bfbd9b r12059: Use random keytab names (so we get different keytabs, rather than
share the MEMORY: keytab).

Andrew Bartlett
(This used to be commit 6c43de2708)
2007-10-10 13:47:02 -05:00
Andrew Bartlett
f8a44902f4 r12058: Set an anonymous fallback, if the machine account isn't available.
Andrew Bartlett
(This used to be commit 55cb72f5cf)
2007-10-10 13:47:02 -05:00
Andrew Bartlett
c7c6b5620b r12056: Some clarification fixes for the keytab code, and use the right
function for enctype to string.

Andrew Bartlett
(This used to be commit ae6c968cb2)
2007-10-10 13:47:02 -05:00
Andrew Bartlett
9c6b7f2d62 r11995: A big kerberos-related update.
This merges Samba4 up to current lorikeet-heimdal, which includes a
replacement for some Samba-specific hacks.

In particular, the credentials system now supplies GSS client and
server credentials.  These are imported into GSS with
gss_krb5_import_creds().  Unfortunetly this can't take an MEMORY
keytab, so we now create a FILE based keytab as provision and join
time.

Because the keytab is now created in advance, we don't spend .4s at
negprot doing sha1 s2k calls.  Also, because the keytab is read in
real time, any change in the server key will be correctly picked up by
the the krb5 code.

To mark entries in the secrets which should be exported to a keytab,
there is a new kerberosSecret objectClass.  The new routine
cli_credentials_update_all_keytabs() searches for these, and updates
the keytabs.

This is called in the provision.js via the ejs wrapper
credentials_update_all_keytabs().

We can now (in theory) use a system-provided /etc/krb5.keytab, if

krb5Keytab: FILE:/etc/krb5.keytab

is added to the secrets.ldb record.  By default the attribute

privateKeytab: secrets.keytab

is set, pointing to allow the whole private directory to be moved
without breaking the internal links.
(This used to be commit 6b75573df4)
2007-10-10 13:46:56 -05:00
Andrew Bartlett
22f1de0998 r11994: This function no longer needs a special declaration.
Andrew Bartlett
(This used to be commit 88a7b7805c)
2007-10-10 13:46:56 -05:00
Andrew Bartlett
b2c98db507 r11993: As well as making an in-MEMORY keytab, allow a file-based keytab to be updated.
This allows a new password to be written in, and old entries removed
(we keep kvno and kvno-1).

Clean up the code a lot, and add comments on what it is doing...

Andrew Bartlett
(This used to be commit 0a911baaba)
2007-10-10 13:46:56 -05:00
Andrew Bartlett
759e40fb4a r11991: Null termainte the list of backends. (Makes it easier to walk the list).
Andrew Bartlett
(This used to be commit fc4202dea8)
2007-10-10 13:46:56 -05:00
Andrew Bartlett
0e476e7ce0 r11989: Rather than grabbing the machine account details at this point, grab
them 'later'.  We will need to handle the errors when we call the
get_* methods.

Andrew Bartlett
(This used to be commit c6e572f870)
2007-10-10 13:46:55 -05:00
Andrew Tridgell
516d0a97c9 r11969: got rid of the very annoying 'failed to open /secrets.tdb'
messages. As discussed with Andrew, this will soon be replaced with a
system that marks the credentials to use the machine accout from the
database rather than pre-loading the machine account details here.

The reason we got the annoying messages is this was being called
before smb.conf is loaded, so the code doesn't yet know the location
of the private directory
(This used to be commit 6aeb4bf3fe)
2007-10-10 13:46:52 -05:00
Tim Potter
03d301ead5 r11967: Fix more 64-bit warnings.
(This used to be commit 9c4436a124)
2007-10-10 13:46:52 -05:00
Andrew Bartlett
3a3c53327a r11940: Love has clarified why this code does what it does.
Andrew Bartlett
(This used to be commit 9b3dedbc0b)
2007-10-10 13:46:49 -05:00
Andrew Bartlett
eb4fbaeee2 r11929: Add static, comments.
Andrew Bartlett
(This used to be commit 41f09ef934)
2007-10-10 13:46:48 -05:00
Andrew Bartlett
01fc59df42 r11928: More Kerberos musings...
Andrew Bartlett
(This used to be commit 571f9c9c51)
2007-10-10 13:46:48 -05:00
Stefan Metzmacher
1fb2397913 r11601: try to fix the build on IRIX 6.5 us4
abartlet, tridge, lha: is there a better way?

metze
(This used to be commit b2b4969bdc)
2007-10-10 13:45:57 -05:00
Stefan Metzmacher
b4bc46feb9 r11600: remove unused code
metze
(This used to be commit 06ccbc3fa9)
2007-10-10 13:45:56 -05:00
Stefan Metzmacher
5b28800103 r11599: remove local (and broken) version of strhaslower() strhasupper()
metze
(This used to be commit 35e17abb87)
2007-10-10 13:45:56 -05:00
Simo Sorce
5c95905871 r11567: Ldb API change patch.
This patch changes the way lsb_search is called and the meaning of the returned integer.
The last argument of ldb_search is changed from struct ldb_message to struct ldb_result
which contains a pointer to a struct ldb_message list and a count of the number of messages.
The return is not the count of messages anymore but instead it is an ldb error value.

I tryed to keep the patch as tiny as possible bu as you can guess I had to change a good
amount of places. I also tried to double check all my changes being sure that the calling
functions would still behave as before. But this patch is big enough that I fear some bug
may have been introduced anyway even if it passes the test suite. So if you are currently
working on any file being touched please give it a deep look and blame me for any error.

Simo.
(This used to be commit 22c8c97e6f)
2007-10-10 13:45:53 -05:00
Andrew Bartlett
918c7634c2 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
(This used to be commit 36973b1eef)
2007-10-10 13:45:52 -05:00
Andrew Bartlett
4c57d08c52 r11538: More notes on things we need.
Andrew Bartlett
(This used to be commit 890ad0412b)
2007-10-10 13:45:51 -05:00
Andrew Bartlett
cc99c7bbeb r11537: Make the authsam_account_ok routine callable by external users (the KDC).
Andrew Bartlett
(This used to be commit 1643ad169c)
2007-10-10 13:45:51 -05:00
Andrew Bartlett
2dcb73aed8 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
(This used to be commit da38bcefa7)
2007-10-10 13:45:48 -05:00
Andrew Bartlett
df9af34876 r11522: Add support for delegated credentials and machine account credentials
to ldb, based on the sessionInfo we now pass around.

Andrew Bartlett
(This used to be commit 84e16e4ea7)
2007-10-10 13:45:48 -05:00
Andrew Bartlett
72820aaf92 r11521: Add in client support for checking supportedSASLmechanisms, and then
determining a mechanism to use.

Currently it doesn't to fallbacks like SPNEGO does, but this could be
added (to GENSEC, not to here).

This also adds a new function to GENSEC, which returns a list of SASL
names in our preference order (currently determined by the build
system of all things...).

Also make the similar function used for OIDs in SPNEGO do the same.

This is all a very long-winded way of moving from a hard-coded NTLM to
GSS-SPNEGO in our SASL client...

Andrew Bartlett
(This used to be commit 130eb9bb9a)
2007-10-10 13:45:48 -05:00
Andrew Bartlett
6ac2585e87 r11520: indent
(This used to be commit ce611eb5f3)
2007-10-10 13:45:47 -05:00
Andrew Bartlett
694a8e7402 r11514: Fixup debug message
(This used to be commit b2372cad36)
2007-10-10 13:45:46 -05:00
Andrew Bartlett
20debaa289 r11470: To a server trusted for delegation (checked for in the gss libs),
delegate by default.

Andrew Bartlett
(This used to be commit 49d489c81d)
2007-10-10 13:45:41 -05:00
Andrew Bartlett
cc0f3779b1 r11468: Merge a bit more of init_sec_context from Heimdal CVS into our
DCE_STYLE modified version, and add parametric options to control
delegation.

It turns out the only remaining issue is sending delegated credentials
to a windows server, probably due to the bug lha mentions in his blog
(using the wrong key).

If I turn delgation on in smbclient, but off in smbd, I can proxy a
cifs session.

I can't wait till Heimdal 0.8, so I'll see if I can figure out the fix
myself :-)

Andrew Bartlett
(This used to be commit fd5fd03570)
2007-10-10 13:45:40 -05:00
Andrew Bartlett
3b2a6997b4 r11452: Update Heimdal to current lorikeet, including removing the ccache side
of the gsskrb5_acquire_cred hack.

Add support for delegated credentials into the auth and credentials
subsystem, and specifically into gensec_gssapi.

Add the CIFS NTVFS handler as a consumer of delegated credentials,
when no user/domain/password is specified.

Andrew Bartlett
(This used to be commit 55b89899ad)
2007-10-10 13:45:38 -05:00
Andrew Bartlett
1d6e6540e0 r11441: Remove the auth_domain module from Samba4, as we will only do things
via winbindd in Samba4.

Andrew Bartlett
(This used to be commit e63be25d0b)
2007-10-10 13:45:38 -05:00
Andrew Bartlett
8b95bda975 r11440: Actually check the right thing for 'is this a machine account' (thanks metze).
Andrew Bartlett
(This used to be commit 848831a155)
2007-10-10 13:45:37 -05:00
Andrew Bartlett
87d9cd202a r11414: Add passing around of logon_parameters to Samba4 auth_winbind
Andrew Bartlett
(This used to be commit 7e3c22f57b)
2007-10-10 13:45:34 -05:00
Andrew Bartlett
cfa2adf040 r11401: A simple hack to have our central credentials system deny sending LM
authentication for user@realm logins and machine account logins.

This should avoid various protocol downgrade attacks.

Andrew Bartlett
(This used to be commit 76c2d204d0)
2007-10-10 13:45:31 -05:00
Stefan Metzmacher
fb2bceea6e r11400: fix compiler warnings
metze
(This used to be commit a29a107d95)
2007-10-10 13:45:31 -05:00
Andrew Bartlett
d0831d27a5 r11399: Add another case where we need to fallback, if the KDC isn't there.
Andrew Bartlett
(This used to be commit e82fbb58dd)
2007-10-10 13:45:31 -05:00
Andrew Bartlett
12d4dd28a5 r11394: Allow KDC unreachable as another 'forget about gssapi' error on SPNEGO.
Andrew Bartlett
(This used to be commit da24074860)
2007-10-10 13:45:30 -05:00
Andrew Bartlett
5e456b38ed r11393: Avoid error messages and get more correctness with long plaintext passwords.
Andrew Bartlett
(This used to be commit cb0b3c0057)
2007-10-10 13:45:30 -05:00
Jelmer Vernooij
a4e7bf3a89 r11382: Require number of required M4 macros
Make MODULE handling a bit more like BINARY, LIBRARY and SUBSYSTEM
Add some more PUBLIC_HEADERS
(This used to be commit 875eb8f4cc)
2007-10-10 13:45:29 -05:00
Jelmer Vernooij
93fd08168f r11377: Add support for building LIBRARY elements as shared libraries:
- Adds -rpath bin/ so you don't have to install Samba in order to use compiled binaries.
 - Writes out pkg-config files when building shared libs
 - Supports automatic fallback to MERGEDOBJ (which is the default) or
   OBJ_LIST (if ld -r is not supported)

Building with shared libs reduces the size of the Samba binaries from
197 Mb to 60 Mb (including libraries) on my system (GCC4, with debugging).

To build with shared libraries support enabled, run:

LIBRARY_OUTPUT_TYPE=SHARED_LIBRARY ./config.status

init functions don't get called correctly yet when using shared libs, so
you won't be able to actually run anything with success :-)

Once init functions are done, I'll look at support for loading shared
modules once again.

Based on a patch by Peter Novodvorsky (nidd on IRC).
(This used to be commit 0b54405685)
2007-10-10 13:45:28 -05:00
Andrew Bartlett
546f63df5b 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
(This used to be commit 690cad8083)
2007-10-10 13:45:27 -05:00
Andrew Bartlett
152988a828 r11366: Pass around the flags which indicate if we should support plaintext
logins and NTLM machine account logins.

Andrew Bartlett
(This used to be commit 421e64c2b4)
2007-10-10 13:45:26 -05:00
Andrew Bartlett
2bb739396c r11358: Ensure domains are always upper-case as well. Helps NTLMv2.
Andrew Bartlett
(This used to be commit 82527491b2)
2007-10-10 13:45:24 -05:00
Andrew Bartlett
524eeac064 r11350: Add some debugs to assist tracking down kerberos issues in future.
(Make it easy to see what was put into the keytab, so we can tell when
gssapi screams that it can't pull it out).

Andrew Bartlett
(This used to be commit c56142c4ac)
2007-10-10 13:45:22 -05:00
Andrew Bartlett
c0d1fb4914 r11342: Remove unused variables.
Andrew Bartlett
(This used to be commit eed8f4a031)
2007-10-10 13:45:21 -05:00
Andrew Bartlett
13b0da09ee r11325: Fix up some kerberos notes.
Andrew Bartlett
(This used to be commit 89623af30f)
2007-10-10 13:45:20 -05:00
Andrew Bartlett
040add3d07 r11315: Sorry gd, I just removed all of your code that I just merged...
(We now ask the kerberos libraries to handle getting and unwapping the PAC).

Andrew Bartlett
(This used to be commit 6a0beb29da)
2007-10-10 13:45:18 -05:00
Andrew Bartlett
14a3abd559 r11314: Use a patch from lha to have the kerberos libs extract the PAC, rather
than doing ASN.1 parsing in Samba.

Also use the API function for getting a client from a ticket, rather
than just digging in the structure.

Andrew Bartlett
(This used to be commit 25d5ea6d72)
2007-10-10 13:45:18 -05:00
Andrew Bartlett
22c9123296 r11313: Typo
(This used to be commit 204185576c)
2007-10-10 13:45:18 -05:00
Andrew Bartlett
15f8a34a56 r11312: Make it clear we are looking at the 'domain ref', not the domain
itself in the auth_sam module.

Andrew Bartlett
(This used to be commit 0800942dbb)
2007-10-10 13:45:18 -05:00
Jelmer Vernooij
8ee1ee66ed r11303: Support defining and installing public headers for libraries.
Support installing libraries.
Get rid of pkg-config file (will be autogenerated later on).
(This used to be commit b4745032a2)
2007-10-10 13:45:16 -05:00
Andrew Bartlett
d27ffc27ff r11293: Use the right search when forming the data for the PAC.
Andrew Bartlett
(This used to be commit ecacef213b)
2007-10-10 13:45:14 -05:00
Stefan Metzmacher
7751bd939f r11278: fix compiler warnings
metze
(This used to be commit 716e6b0c88)
2007-10-10 13:45:12 -05:00
Andrew Bartlett
ef57650d6e r11273: Initialise the new server_info->logon_server element.
Andrew Bartlett
(This used to be commit bc6f6f9381)
2007-10-10 13:45:11 -05:00
Andrew Bartlett
a0647a89a8 r11272: In trying to track down why Win2k3 is again rejecting our PAC, ensure
we can round-trip all the way back to a server_info structure, not
just a filled in PAC_DATA. (I was worried about generated fields being
incorrect, or some other logical flaw).

Andrew Bartlett
(This used to be commit 11b1d78cc5)
2007-10-10 13:45:11 -05:00
Andrew Bartlett
db4b95827e 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
(This used to be commit c9d5d8e45d)
2007-10-10 13:45:11 -05:00
Jelmer Vernooij
4c5a4a7e02 r11244: Relative path names in .mk files
(This used to be commit 24e1030090)
2007-10-10 13:45:06 -05:00
Andrew Bartlett
16bbafb7e8 r11239: Use ${REALM} for the realm in rootdse.ldif
Add the kpasswd server to our KDC, implementing the 'original' and
Microsoft versions of the protocol.

This works with the Heimdal kpasswd client, but not with MIT, I think
due to ordering issues.  It may not be worth the pain to have this
code go via GENSEC, as it is very, very tied to krb5.

This gets us one step closer to joins from Apple, Samba3 and other
similar implementations.

Andrew Bartlett
(This used to be commit ab5dbbe10a)
2007-10-10 13:45:06 -05:00
Andrew Bartlett
f203903f1c r11226: Cope with Samba3's behaviour on LDAP with GSS-SPNEGO.
Andrew Bartlett
(This used to be commit 4d9667f5a0)
2007-10-10 13:45:05 -05:00
Andrew Bartlett
b0c7c175b1 r11220: Add the ability to handle the salt prinicpal as part of the
credentials.  This works with the setup/secrets.ldif change from the
previous patch, and pretty much just re-invents the keytab.

Needed for kpasswdd work.

Andrew Bartlett
(This used to be commit cc9d167bab)
2007-10-10 13:45:04 -05:00
Andrew Bartlett
2817ef9f53 r11219: Now that we have the credentials hooked in here, we have a much more
reasonable value to fill in for the mechListMIC.

Andrew Bartlett
(This used to be commit 51d78de2b7)
2007-10-10 13:45:04 -05:00
Andrew Bartlett
d820c353dc r11218: Always return the mutual authentication reply (needed for kpasswd),
and remove now duplicated unwrap_pac().

Andrew Bartlett
(This used to be commit 90642d54e0)
2007-10-10 13:45:04 -05:00
Andrew Bartlett
532b16f3d5 r11216: Upgrade to gd's PAC extraction code from Samba3. While I still want
to make some this the kerberos library's problem, we may as well use
the best code that is around.

Andrew Bartlett
(This used to be commit a7fe3078a6)
2007-10-10 13:45:04 -05:00
Andrew Bartlett
10989431e5 r11215: Remove no-op prompter intended to work around bugs in old kerberos libs.
I'm also worried this might cause loops, if we get a 'force password
change', and the prompter tries to 'deal with it'.

Andrew Bartlett
(This used to be commit 5bc10c4e47)
2007-10-10 13:45:03 -05:00
Jelmer Vernooij
f4d590662e r11214: Remove scons files (see http://lists.samba.org/archive/samba-technical/2005-October/043443.html)
(This used to be commit 7fffc5c917)
2007-10-10 13:45:03 -05:00
Andrew Bartlett
a9f15bb83e r11212: Enable sealing of data with raw krb5, consolidate some code into the
main gensec_krb5_start and always ask for sequence numbers.

Andrew Bartlett
(This used to be commit 801cd6c6ff)
2007-10-10 13:45:03 -05:00
Andrew Bartlett
b5e734b4ca r11209: We can't read the priorSecret unless we ask for it.
Andrew Bartlett
(This used to be commit ee9a93688d)
2007-10-10 13:45:02 -05:00
Andrew Bartlett
11b16c2580 r11204: Allow us to read credentials from secrets.ldb without a
secureChannelType (non machine join records).

Andrew Bartlett
(This used to be commit 3dddf497cc)
2007-10-10 13:45:01 -05:00
Andrew Bartlett
372ca26b20 r11200: Reposition the creation of the kerberos keytab for GSSAPI and Krb5
authentication.  This pulls the creating of the keytab back to the
credentials code, and removes the special case of 'use keberos keytab
= yes' for now.

This allows (and requires) the callers to specify the credentials for
the server credentails to GENSEC.  This allows kpasswdd (soon to be
added) to use a different set of kerberos credentials.

The 'use kerberos keytab' code will be moved into the credentials
layer, as the layers below now expect a keytab.

We also now allow for the old secret to be stored into the
credentials, allowing service password changes.

Andrew Bartlett
(This used to be commit 205f77c579)
2007-10-10 13:45:00 -05:00
Andrew Bartlett
9e25f33a1a r11199: Push an objectSid into the schannel state database, to match the new header.
Andrew Bartlett
(This used to be commit a665b56085)
2007-10-10 13:45:00 -05:00
Andrew Bartlett
b0fe5e6ade r11196: Clean up memory leaks (pointed out by vl), and handle the case where
the client doesn't guess correctly on the mech to use.  It must back
off and try the mech the server selected from the list.

I'm not particularly attached to our SPNEGO parser, so while I can't
easily use the SPNEGO application logic in Heimdal, I'm going to look
closely at using the asn1 routines to avoid some pain here.

Andrew Bartlett
(This used to be commit 9292173874)
2007-10-10 13:44:59 -05:00
Jeremy Allison
1bdd3a466d r11081: Remember to remove unused variables.
Jeremy.
(This used to be commit bfa41398a6)
2007-10-10 13:44:45 -05:00
Jeremy Allison
877a40d0a4 r11080: Narrowing down on the #1828 PPC bug. The PPC client sends an
initial NTLMSSP negotiate blob of only 16 bytes - no strings
added ! (So don't try parsing them).
Jeremy.
(This used to be commit 42d93a317a)
2007-10-10 13:44:45 -05:00
Jeremy Allison
5de65d5801 r11076: Still working on bug #1828, PPC hell. The PPC client sends the
NTLMSSP client and domain strings as Unicode, even when setting
flags as OEM. Cope with this.
Jeremy.
(This used to be commit 77399e1cec)
2007-10-10 13:44:44 -05:00
Stefan Metzmacher
ebe6f9ea49 r11058: remove useless talloc context
metze
(This used to be commit d9d3fe1b8a)
2007-10-10 13:44:43 -05:00
Stefan Metzmacher
cffd522b5c r11052: bring samba4 uptodate with the samba4-winsrepl branch,
before the bad merge

metze
(This used to be commit 471c0ca4ab)
2007-10-10 13:44:43 -05:00
Stefan Metzmacher
2ecb46d595 r11037:
(This used to be commit 6913e33840)
2007-10-10 13:42:33 -05:00
Andrew Bartlett
8dfa59372f r10985: To aid in testing, this allows us to easily force kerberos to use UDP or TCP.
Andrew Bartlett
(This used to be commit ae0b4028ff)
2007-10-10 13:39:50 -05:00
Andrew Bartlett
2c6ecae4e6 r10982: Move credentials.h into auth/credentials, and add flags needed by
previous patch.

Andrew Bartlett
(This used to be commit 2c537d47ba)
2007-10-10 13:39:50 -05:00
Andrew Bartlett
f7ff0540d2 r10981: Pull code to decide between and implement NTLMv2, NTLM and LM
authentication out of the various callers and into the kitchen
sink.. err, credentials subsystem.

This should ensure consistant logic, as well as get us one step closer
to security=server operation in future.

Andrew Bartlett
(This used to be commit 09c9576330)
2007-10-10 13:39:50 -05:00
Andrew Bartlett
b4a1e760c9 r10945: Free the salt after we are done with it. May need a merge to similar
code in Samba3.

Andrew Bartlett
(This used to be commit 36e302bac8)
2007-10-10 13:39:44 -05:00
Andrew Tridgell
a599edf04c r10913: This patch isn't as big as it looks ...
most of the changes are fixes to make all the ldb code compile without
warnings on gcc4. Unfortunately That required a lot of casts :-(

I have also added the start of an 'operational' module, which will
replace the timestamp module, plus add support for some other
operational attributes

In ldb_msg_*() I added some new utility functions to make the
operational module sane, and remove the 'ldb' argument from the
ldb_msg_add_*() functions. That argument was only needed back in the
early days of ldb when we didn't use the hierarchical talloc and thus
needed a place to get the allocation function from. Now its just a
pain to pass around everywhere.

Also added a ldb_debug_set() function that calls ldb_debug() plus sets
the result using ldb_set_errstring(). That saves on some awkward
coding in a few places.
(This used to be commit f6818daecc)
2007-10-10 13:39:41 -05:00
Andrew Tridgell
36d73b0e71 r10894: make the handling of dn/distinguishedName much closer to real
ldap. Also ensure we put a objectclass on our private ldb's, so they
have some chance of being stored in ldap if you want to
(This used to be commit 1af2cc067f)
2007-10-10 13:39:40 -05:00
Andrew Bartlett
90570e46d0 r10812: Fix capitalisation (thanks tridge).
Andrew Bartlett
(This used to be commit f78982a0f1)
2007-10-10 13:39:32 -05:00
Andrew Bartlett
1377cca5f4 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
(This used to be commit fd7203789a)
2007-10-10 13:39:32 -05:00
Andrew Bartlett
05c5d145e7 r10796: Make getting an anonymous session info a utility function.
Andrew Bartlett
(This used to be commit 6021fa3734)
2007-10-10 13:39:30 -05:00
Andrew Bartlett
39daa629ff r10764: To match Win2k3 SP1, we need to set an anonymous user token for
schannel connections.

Test for Win2k3 SP1 behaviour in RPC-SCHANNEL.

Andrew Bartlett
(This used to be commit 1c3911374e)
2007-10-10 13:39:28 -05:00
Andrew Bartlett
3223cd45ee r10670: Add notes on things that are TODO in Samba4 kerberos land.
Andrew Bartlett
(This used to be commit 5b2114bb9c)
2007-10-10 13:39:16 -05:00
Andrew Tridgell
69c7cd98ce r10669: reverted jelmers commit 10663 as it was causing lots of panics in 'make test'
I also think the method of getting rid of pstring isn't the right
one. I certainly do want to get rid of pstring/fstring, but the reason
for removing them is the use of arbitrary sized fixed length strings
on the stack and in structures. Changing to another fixed length stack
string format isn't really a win, and moving to use strncpy() is
actually worse than pstrcpy() as strncpy() has the absolutely awful
semantics of always zeroing all remaining bytes, so it ends up taking
a lot of cpu doing pointless memory writes.

I'd rather move to more use of asprintf()/talloc_asprintf() and
similar functions for dynamic string allocation.

You also have to be very careful about some of these system defined
string limits. One some systems PATH_MAX could be 64k or even larger,
which can quickly blow the stack out when you allocate a few of them.
(This used to be commit 194efd26e4)
2007-10-10 13:39:16 -05:00
Jelmer Vernooij
819eeaef32 r10663: Eliminate use of pstring
(This used to be commit 57cfbe51e6)
2007-10-10 13:39:15 -05:00
Andrew Bartlett
66af2d9e42 r10597: And add the .mk files for the new credentials subsystem.
Andrew Bartlett
(This used to be commit 51a0275a0e)
2007-10-10 13:39:09 -05:00
Andrew Bartlett
a12a6686ba r10596: Move the credentials code into it's own subsystem, and push it under auth/
Andrew Bartlett
(This used to be commit 2e76a4b8ef)
2007-10-10 13:39:09 -05:00
Jelmer Vernooij
5058f4b9e8 r10586: Add MergedObject() builder. Default to Library() rather
then StaticLibrary()
(This used to be commit b53313dc51)
2007-10-10 13:39:08 -05:00
Jelmer Vernooij
5a1cf98998 r10579: str_list_make() can return NULL
(This used to be commit f547ab4644)
2007-10-10 13:39:07 -05:00
Andrew Bartlett
718dd6dda6 r10565: Try to make Kerberos authentication a bit more friendly.
This disables it for 'localhost' as well as for any host our KDC does
not recognise.

Andrew Bartlett
(This used to be commit 49c6c36763)
2007-10-10 13:39:06 -05:00
Andrew Bartlett
8407a1a866 r10561: This patch takes over KDC socket routines in Heimdal, and directs them
at the Samba4 socket layer.

The intention here is to ensure that other events may be processed while
heimdal is waiting on the KDC.  The interface is designed to be
sufficiently flexible, so that the plugin may choose how to time
communication with the KDC (ie multiple outstanding requests, looking
for a functional KDC).

I've hacked the socket layer out of cldap.c to handle this very
specific case of one udp packet and reply.  Likewise I also handle
TCP, stolen from the winbind code.

This same plugin system might also be useful for a self-contained
testing mode in Heimdal, in conjunction with libkdc.  I would suggest
using socket-wrapper instead however.

Andrew Bartlett
(This used to be commit 3b09f9e8f9)
2007-10-10 13:39:04 -05:00
Jelmer Vernooij
3f41ddd882 r10532: Replace next_token() with str_list_make()
(This used to be commit 87bb382445)
2007-10-10 13:39:02 -05:00
Jelmer Vernooij
49839f356f r10513: Reduce some use of pstring. The main reason some parts of the code still
use pstring is next_token() now.
(This used to be commit a5b88bcd42)
2007-10-10 13:38:58 -05:00
Jelmer Vernooij
e337caeed1 r10509: Some more sconscript fixes. Now getting to link stage for smbclient
(This used to be commit 6df956edba)
2007-10-10 13:38:58 -05:00
Jelmer Vernooij
3d4ea18d4d r10478: More work on proto headers; we now generate a couple of smaller ones
that are then included by include/proto.h
(This used to be commit 703ffbaaac)
2007-10-10 13:38:52 -05:00
Andrew Bartlett
5a770bf720 r10464: Use more consistant names.
Andrew Bartlett
(This used to be commit 1f726906c4)
2007-10-10 13:38:49 -05:00
Tim Potter
52bf6f52a1 r10447: Add gensec sources to proto.h
(This used to be commit 1b675a1bdf)
2007-10-10 13:38:47 -05:00
Andrew Tridgell
6fe9eee3c4 r10407: the schannel database does not need to be synchronous (and thus crash
safe) as it is removed on smbd restart
(This used to be commit 0951db6a89)
2007-10-10 13:38:41 -05:00
Andrew Bartlett
51cbc188df r10402: Make the RPC-SAMLOGON test pass against Win2k3 SP0 again.
I still have issues with Win2k3 SP1, and Samba4 doesn't pass it's own
test for the moment, but I'm working on these issues :-)

This required a change to the credentials API, so that the special
case for NTLM logins using a principal was indeed handled as a
special, not general case.

Also don't set the realm from a ccache, as then it overrides --option=realm=.

Andrew Bartlett
(This used to be commit 194e8f07c0)
2007-10-10 13:38:39 -05:00
Andrew Bartlett
3b7f8ddd9a r10398: Don't do DNS lookups on short names (no .).
Andrew Bartlett
(This used to be commit 77aca9619d)
2007-10-10 13:38:39 -05:00
Volker Lendecke
b1ad4a27cb r10390: Remove fstring, pstring and uint32_t from winbindd_nss.h.
Volker
(This used to be commit 3dc7e67dc5)
2007-10-10 13:38:39 -05:00
Andrew Bartlett
428c8ce207 r10383: This patch is on the road to implementing servers (such as kpasswd) that
use raw krb5, not GSSAPI.  I still keep the 'fake GSSAPI' code, but
under the module name 'fake_gssapi_krb5'.

Andrew Bartlett
(This used to be commit 99efec2758)
2007-10-10 13:38:34 -05:00
Tim Potter
d191c7d993 r10377: Save configuration stuff to sconf.cache so it isn't annoyingly run
at every single build.  Run 'scons configure=1' or delete sconf.cache
to force checks to be re-run.

Jelmer, I think this stuff is cached in the .sconf_cache directory but
the message is still displayed and it looks like it caches the compiled
test object file not the actual result of the test.
(This used to be commit 9d001dc083)
2007-10-10 13:38:33 -05:00
Andrew Bartlett
b1b5e49f98 r10372: Having gone to all the effort to uppercase the realm, actually set the
upper-case realm.

Andrew Bartlett
(This used to be commit 3e38456dd5)
2007-10-10 13:38:32 -05:00
Jelmer Vernooij
8db177b652 r10366: More scons fixes. Building et, asn1, lex and yacc files sort-of works now
(This used to be commit 22f18a8424)
2007-10-10 13:38:32 -05:00
Andrew Bartlett
65d4da0ff3 r10364: Turn gensec:gssapi on by default, except for a login of the form
-Udomain\\user.

This will probably break in a few configurations, so please let me
know.  I'll also work to have a way to inhibit kerberos/ntlmssp, as
this removes -k.

Andrew Bartlett
(This used to be commit 3c0dc570b8)
2007-10-10 13:38:31 -05:00
Jelmer Vernooij
6812c73534 r10348: Add scons scripts for remaining subsystems. Most subsystems build now,
but final linking still fails (as does generating files asn1, et, idl and proto
files)
(This used to be commit 4f0d7f75b9)
2007-10-10 13:38:30 -05:00
Andrew Bartlett
f9263dd102 r10337: This grubby little hack is the implementation of a concept discussed
on the kerberos mailing lists a couple of weeks ago: Don't use DNS at
all for expanding short names into long names.

Using the 'override krb5_init_context' code already in the tree, this
removes the DNS lag on a kerberos session setup/connection.

Andrew Bartlett
(This used to be commit de3ceab3d0)
2007-10-10 13:38:29 -05:00
Jelmer Vernooij
069e498da2 r10330: Add SConscript to more subsystems. Some of the tdb tools build now.
Start on custom Samba scons tools (for handling proto generation, pidl, etc)
(This used to be commit 4bffe44359)
2007-10-10 13:38:28 -05:00
Andrew Bartlett
3198e58161 r10292: This is set below from lp_server_role().
Andrew Bartlett
(This used to be commit 096c751f37)
2007-10-10 13:38:14 -05:00
Andrew Bartlett
f281d77824 r10291: The patch optionally (off by default, not available in all cases) allows
Samba to use the target principal name supplied in the mechTokenMIC of
an SPNEGO negTokenInit.

This isn't a great idea for security reasons, but is how Samba3 behaves,
and allows kerberos to function more often in some environments.  It is
only available for CIFS session setups, due to the ordering of the
exchange.

Andrew Bartlett
(This used to be commit f6a6456441)
2007-10-10 13:38:13 -05:00
Andrew Bartlett
f3bce652c8 r10286: This patch is ugly and disgusting, but for now it works better than the other
ideas I have had.

When I get a full list of things I want to do to a krb5_context I'll
either add gsskrb5_ wrappers, or a way of speicfying the krb5 context
per gssapi context.

(I want to ensure that the only krb5_context variables created while
executing Samba4 are via our wrapper).

Andrew Bartlett
(This used to be commit 8a22d46e70)
2007-10-10 13:38:13 -05:00
Jelmer Vernooij
85263c3061 r10246: Remove unused function
Move auth-specific file to auth/
(This used to be commit 8aa9711a30)
2007-10-10 13:38:11 -05:00
Andrew Bartlett
5d3d4093b3 r10174: This patch implements generic PAC verification, without assumptions
about the size of the signature.  In particular, this works with AES,
which was previously broken Samba4/Samba4.

Reviewed by metze (and thanks for help with the previous IDL commit).
(This used to be commit 3c8be196cc)
2007-10-10 13:38:06 -05:00
Andrew Bartlett
c42e76f986 r10155: Add more notes on required gsskrb5 functions.
Andrew Bartlett
(This used to be commit cdfcc09343)
2007-10-10 13:38:04 -05:00
Andrew Bartlett
5edbeca141 r10153: This patch adds a new parameter to gensec_sig_size(), the size of the
data to be signed/sealed.  We can use this to split the data from the
signature portion of the resultant wrapped packet.

This required merging the gsskrb5_wrap_size patch from
lorikeet-heimdal, and fixes AES encrption issues on DCE/RPC (we no
longer use a static 45 byte value).

This fixes one of the krb5 issues in my list.

Andrew Bartlett
(This used to be commit e4f2afc343)
2007-10-10 13:38:04 -05:00
Andrew Bartlett
1757f8355c r10145: Allow a variable length signature, so we can support signing with
other than arcfour-hmac-md5.  Currently we still fail to verify other
signatures however.

Andrew Bartlett
(This used to be commit 2e5884fc24)
2007-10-10 13:38:03 -05:00
Andrew Bartlett
1f2f470889 r10066: This is the second in my patches to work on Samba4's kerberos support,
with an aim to make the code simpiler and more correct.

Gone is the old (since the very early Samba 3.0 krb5 days) 'iterate over
all keytypes)' code in gensec_krb5, we now follow the approach used in
gensec_gssapi, and use a keytab.

I have also done a lot of work in the GSSAPI code, to try and reduce
the diff between us and upstream heimdal.  It was becoming hard to
track patches in this code, and I also want this patch (the DCE_STYLE
support) to be in a 'manageable' state for when lha considers it for
merging.  (metze assures me it still has memory leak problems, but
I've started to address some of that).

This patch also includes a simple update of other code to current
heimdal, as well as changes we need for better PAC verification.

On the PAC side of things we now match windows member servers by
checking the name and authtime on an incoming PAC.  Not generating these
right was the cause of the PAC pain, and so now both the main code and
torture test validate this behaviour.

One thing doesn't work with this patch:
 - the sealing of RPC pipes with kerberos, Samba -> Samba seems
broken.  I'm pretty sure this is related to AES, and the need to break
apart the gss_wrap interface.

Andrew Bartlett
(This used to be commit a3aba57c00)
2007-10-10 13:36:33 -05:00
Andrew Bartlett
6b14ffe271 r10035: This patch removes the need for the special case hack
'MEMORY_WILDCARD' keytab type. (part of this checking is in effect a
merge from lorikeet-heimdal, where I removed this)

This is achieved by correctly using the GSSAPI gsskrb5_acquire_cred()
function, as this allows us to specify the target principal, regardless
of which alias the client may use.

This patch also tries to simplify some principal handling and fixes some
error cases.

Posted to samba-technical, reviewed by metze, and looked over by lha on IRC.

Andrew Bartlett
(This used to be commit 506a7b67ae)
2007-10-10 13:36:31 -05:00
Andrew Bartlett
370f5b9563 r10021: More kerberos notes.
(This used to be commit f36e657a41)
2007-10-10 13:36:30 -05:00
Andrew Bartlett
2786f3d704 r9927: Extend copyright for all the hard work I've done this year.
Andrew Bartlett
(This used to be commit b50e546eb4)
2007-10-10 13:36:22 -05:00
Jelmer Vernooij
b674411eb4 r9792: Rename StrCaseCmp -> strcasecmp_m. All these years I was thinking
StrCaseCmp was sys_strcasecmp, while it is in fact strcasecmp_m!
(This used to be commit 200a8f6652)
2007-10-10 13:35:01 -05:00
Andrew Bartlett
24186a80eb r9728: A *major* update to the credentials system, to incorporate the
Kerberos CCACHE into the system.

This again allows the use of the system ccache when no username is
specified, and brings more code in common between gensec_krb5 and
gensec_gssapi.

It also has a side-effect that may (or may not) be expected: If there
is a ccache, even if it is not used (perhaps the remote server didn't
want kerberos), it will change the default username.

Andrew Bartlett
(This used to be commit 6202267f6e)
2007-10-10 13:34:54 -05:00
Andrew Bartlett
d91a5808f0 r9693: Move the smb_krb5_context setup code to use the new pattern of
tmp_ctx, then steal at the last moment, on success.

andrew Bartlett
(This used to be commit c7a44518ad)
2007-10-10 13:34:41 -05:00
Andrew Bartlett
c496f58c6f r9681: We don't need the full smb_krb5_context here, so just pass the krb5_context.
Andrew Bartlett
(This used to be commit 47699019db)
2007-10-10 13:34:40 -05:00
Andrew Bartlett
02caf604be r9678: Remove unused variables.
Andrew Bartlett
(This used to be commit 50e6229c7a)
2007-10-10 13:34:39 -05:00
Andrew Tridgell
b8f4e0796d r9648: this fixes the krb5 based login with the pac. The key to this whole saga was
that the logon_time field in the pac must match the authtime field in the ticket we
gave the client in the AS-REP (and thus also the authtime field in the ticket we get
back in the TGS-REQ).

Many thanks to Andrew Bartlett for his patience in showing me the
basic ropes of all this code! This was a joint effort.
(This used to be commit 7bee374b3f)
2007-10-10 13:34:37 -05:00
Stefan Metzmacher
e85c8561a0 r9526: provide DCERPC auth type 16
metze
(This used to be commit 995b805e04)
2007-10-10 13:34:26 -05:00
Andrew Bartlett
ba90b652d9 r9505: Work on GENSEC and the code that calls it, for tighter interface
requirements, and for better error reporting.

In particular, the composite session setup (extended security/SPNEGO)
code now returns errors, rather than NT_STATUS_NO_MEMORY.  This is
seen particularly when GENSEC fails to start.

The tighter interface rules apply to NTLMSSP, which must be called
exactly the right number of times.  This is to match some of our other
less-tested modules, where adding flexablity is harder.  (and this is
security code, so let's just get it right).  As such, the DCE/RPC and
LDAP clients have been updated.

Andrew Bartlett
(This used to be commit 134550cf75)
2007-10-10 13:34:24 -05:00
Andrew Bartlett
6baa6e0aa8 r9420: Fix the SPNEGO system again: Update the state position after
processing the state.

Andrew Bartlett
(This used to be commit c3a8080a18)
2007-10-10 13:33:37 -05:00
Andrew Bartlett
1ba76ee8ba r9419: Silly, silly, untested mistake...
Andrew Bartlett
(This used to be commit 66cdd4dbd7)
2007-10-10 13:33:37 -05:00
Andrew Bartlett
7f7b6a59b4 r9418: SPNEGO fixes:
- Fix mixing of code and data
- send mechListMic again in SPENGO server
- only send optomistic first packet in the client.
(This used to be commit 9941da8081)
2007-10-10 13:33:36 -05:00
Andrew Bartlett
7e36c7e607 r9416: Cleanups inspired by jra's work to migrate Samba4's NTLMSSP code back
into Samba3.

The NTLMSSP sign/seal code now assumes that GENSEC has already checked
to see if SIGN or SEAL should be permitted.  This simplfies the code
ensures that no matter what the mech, the correct code paths have been
set in place.

Also remove duplication caused by the NTLMv2 code's history, and
document why some of the things a bit funny.

In SPNEGO, create a new routine to handle the negTokenInit creation.
We no longer send an OID for a mech we can't start (like kerberos on
the server without a valid trust account).

Andrew Bartlett
(This used to be commit fe45ef608f)
2007-10-10 13:33:36 -05:00
Andrew Bartlett
40f56f63be r9415: Remove old kerberos code (including salt guessing code) that has only
caused me pain (and covourty warnings).

Simply gensec_gssapi to assume the properties of lorikeet-heimdal,
rather than having #ifdef around critical features.  This simplifies
the code rather a lot.

Andrew Bartlett
(This used to be commit 11156f556d)
2007-10-10 13:33:36 -05:00
Andrew Bartlett
b456bfa015 r9412: Simplfy this NTLM authentication code by requiring the caller to
supply the user_sess_key and lm_sess_key parameters.  Inspired by
coverty complaining about inconsistant checking.

Also factor out some of this code, where we deal with just NT and LM
hashes, or embedded plaintext passwords.

Andrew Bartlett
(This used to be commit ceec35564f)
2007-10-10 13:33:35 -05:00
Andrew Bartlett
8e11003e21 r9411: Ensure we don't send a challenge without first getting a negotiate in
NTLMSSP, unless we are in datagram mode (not fully implemented yet).

Andrew Bartlett
(This used to be commit 727f510942)
2007-10-10 13:33:35 -05:00
Simo Sorce
3e4c4cff21 r9391: Convert all the code to use struct ldb_dn to ohandle ldap like distinguished names
Provide more functions to handle DNs in this form
(This used to be commit 692e35b779)
2007-10-10 13:33:32 -05:00
Tim Potter
878e139f09 r9357: Remove DBGC_CLASS cruft copied over from Samba 3. I would like to
replace this with something funkier.
(This used to be commit 8d376d56c7)
2007-10-10 13:33:27 -05:00
Stefan Metzmacher
3be75a4c6d r9240: - move struct security_token to the idl file, with this we can
the ndr_pull/push/print functions for it in the ntacl-lsm module

- fix compiler warnings in the ldap_encode_ndr_* code

metze
(This used to be commit 83d65d0d7e)
2007-10-10 13:31:37 -05:00
Andrew Bartlett
457d7fd672 r9233: Ensure that the output variable is initialised in this conversion from
error to non-error case.

Andrew Bartlett
(This used to be commit ab75cd53e7)
2007-10-10 13:31:35 -05:00
Stefan Metzmacher
79c1c76b26 r9196: - add a note about the Canonicalize KDCOPtion flag
- add a note about old client using the wrong checksum type for GSSAPI
  in the Authenticator

metze
(This used to be commit 07e39bd94c)
2007-10-10 13:31:30 -05:00
Andrew Bartlett
910c1d55c2 r9165: Fix inverted error check in untested code path. (My untested code...)
Andrew Bartlett
(This used to be commit fba7a0edd4)
2007-10-10 13:31:26 -05:00
Andrew Bartlett
8db8279730 r9084: 'resign' the sample PAC for the validation of the signature algorithms.
If we ever get problems with the kerberos code, it should show up as a
different signature in this PAC.

This involved returning more data from the pac functions, so changed
some callers and split up some functions.

Andrew Bartlett
(This used to be commit d514a74912)
2007-10-10 13:31:15 -05:00
Andrew Bartlett
aa7d44c0d9 r9022: One more step in the game of whack-a-mole with the PAC.
This makes the PAC we generate match (closely) the PAC generated by my
test win2k3 DC.

Andrew Bartlett
(This used to be commit 6172b18680)
2007-10-10 13:31:08 -05:00
Andrew Bartlett
896fd8e1cd r8980: Make Samba4 honour account control flags (we were asking for a
non-existant field).

Also change time(NULL) into an NTTIME for comparison, rather than
experience rounding bugs (size of time_t) when converting an NTTIME
into a time_t.

Andrew Bartlett
(This used to be commit 181155f9e0)
2007-10-10 13:31:03 -05:00
Jelmer Vernooij
5e1a9fe62b r8933: Fix missing prototype warnings
(This used to be commit 39b2220a84)
2007-10-10 13:30:58 -05:00
Andrew Tridgell
176ed87e48 r8774: make some gensec errors a bit less verbose
(This used to be commit 2134ca4755)
2007-10-10 13:30:04 -05:00
Andrew Bartlett
cd882fc78d r8701: Fix up auth_developer for recent changes.
Andrew Bartlett
(This used to be commit 1bc5a11907)
2007-10-10 13:29:55 -05:00
Andrew Bartlett
b16362fab6 r8700: Propmted by tridge's need to do plaintext auth in ejs, rework the
user_info strcture in auth/

This moves it to a pattern much like that found in ntvfs, with
functions to migrate between PAIN, HASH and RESPONSE passwords.

Instead of make_user_info*() functions, we simply fill in the control
block in the callers, per recent dicussions on the lists.  This
removed a lot of data copies as well as error paths, as we can grab
much of it with talloc.

Andrew Bartlett
(This used to be commit ecbd2235a3)
2007-10-10 13:29:55 -05:00
Andrew Tridgell
989a4b673d r8676: attribute lists in ldb searches must be NULL terminated
this is what was causing the panic on the s390 box
(This used to be commit 3a49626ae1)
2007-10-10 13:29:53 -05:00
Andrew Bartlett
5bf8d0f516 r8644: This is a more useful error than unsuccesful.
Andrew Bartlett
(This used to be commit d7136c93fb)
2007-10-10 13:29:49 -05:00
Andrew Tridgell
e835621799 r8520: fixed a pile of warnings from the build farm gcc -Wall output on
S390. This is an attempt to avoid the panic we're seeing in the
automatic builds.

The main fixes are:

 - assumptions that sizeof(size_t) == sizeof(int), mostly in printf formats

 - use of NULL format statements to perform dn searches.

 - assumption that sizeof() returns an int
(This used to be commit a58ea6b385)
2007-10-10 13:29:34 -05:00
Andrew Tridgell
c77f4a68c6 r8460: removed the unused function krb5_locate_kdc(). It causes a build failure on irix.
Andrew, if you planned on using this in the future then we can put it
back and work out how to make it portable
(This used to be commit eaa74913fe)
2007-10-10 13:23:05 -05:00
Love Hörnquist Åstrand
053cec96df r8390: (smb_pam_start): move variable to scope within #ifdef to avoid warning
for those PAM implementations w/o PAM_RHOST and/or PAM_TTY
(This used to be commit 95cb2d942f)
2007-10-10 13:20:14 -05:00
Volker Lendecke
3e0aa2e756 r8321: Fix some uninitalized variable warnings
(This used to be commit 126cb3db4b)
2007-10-10 13:20:06 -05:00
Simo Sorce
3b03ccb2f7 r8259: We want to oset the provided flags not zero
(This used to be commit 50d8ccacca)
2007-10-10 13:19:27 -05:00
Andrew Bartlett
e75c7ff39f r8252: Steal metze's thunder, and prove that with a few small tweaks, we can
now push/pull a sample PAC, and still have the same byte buffer.
(Metze set up the string code, and probably already has a similar
patch).

Unfortunetly win2k3 still doesn't like what we provide, but every step helps.

Also use data_blob_const() when we are just wrapping data for API
reasons.

Andrew Bartlett
(This used to be commit e7c8076fc1)
2007-10-10 13:19:25 -05:00
Andrew Tridgell
38ec84a75c r8251: fixed a couple of valgrind errors in the unix auth code. Simo, can you
please check that this is what you intended?
(This used to be commit a57738769d)
2007-10-10 13:19:25 -05:00
Andrew Bartlett
c0a78453a7 r8250: More PAC work. We now sucessfully verify the KDC signature from my DC
(I have included the krbtgt key from my test network).

It turns out the krbtgt signature is over the 16 (or whatever,
enc-type dependent) bytes of the signature, not the entire structure.

Also do not even try to use Kerberos or GSSAPI on an IP address, it
will only fail.

Andrew Bartlett
(This used to be commit 3b9558e82f)
2007-10-10 13:19:25 -05:00
Stefan Metzmacher
f1031746e5 r8164: - match the ordering w2k3 uses for the PAC_BUFFER:
LOGON_INFO
   LOGON_NAME
   SRV_CHECKSUM
   KDC_CHECKSUM

- w2k3 also don't use the groupmembership array with rids
  it uses the othersids array

metze
(This used to be commit 2286fad27d)
2007-10-10 13:19:16 -05:00
Stefan Metzmacher
1f01bafd44 r8163: if sidcount is zero it happened that we return NT_STATUS_NO_MEMORY...
metze
(This used to be commit a9ff35a1a2)
2007-10-10 13:19:16 -05:00
Stefan Metzmacher
a33178fc72 r8156: I found out that the unknown[2] field of the unknown[4] array is a length too,
it's always 16 bytes smaller than the size in the PAC_BUFFER

we now dump the blob's on LOCAL-PAC with -d 10

metze
(This used to be commit 4ef721ce53)
2007-10-10 13:19:13 -05:00
Stefan Metzmacher
148235a009 r8148: - make the PAC generation code a bit more readable and add some outof memory checks
- move to handmodified pull/push code for PAC_BUFFER
  to get the _ndr_size field and the subcontext size right

- after looking closely to the sample w2k3 PAC in our torture test (and some more in my archive)
  I found out that the first uint32 before the netr_SamInfo3 was also a pointer,
  (and we passed a NULL pointer there before, so I think that was the reason why the windows clients doesn't want our PAC)

  w2k3 uses this for unique pointers:

  ptr = ndr->ptr_count * 4;
  ptr |= 0x00020000;
  ndr->ptr_count;

- do one more pull/push round with the sample PAC

metze
(This used to be commit 0eee179415)
2007-10-10 13:19:13 -05:00
Andrew Bartlett
dbd2688c90 r8110: More PAC work. I still can't get WinXP to accept the PAC, but we are
much closer.

This changes PIDL to allow a subcontext to have a pad8 flag, saying to
pad behind to an 8 byte boundary.  This is the only way I can explain
the 4 trainling zeros in the signature struct.

Far more importantly, the PAC code is now under self-test, both in
creating/parsing our own PAC, but also a PAC from my win2k3 server.
This required changing auth_anonymous, because I wanted to reuse the
anonymous 'server_info' generation code.

I'm still having trouble with PIDL, particulary as surrounds value(),
but I'll follow up on the list.

Andrew Bartlett
(This used to be commit 50a54bf4e9)
2007-10-10 13:19:09 -05:00
Andrew Bartlett
ce5882e82f r8016: Get the keyblock arguments correct. (the context struct changed, but
I forgot to update the users)

Andrew Bartlett
(This used to be commit 44b86b7e65)
2007-10-10 13:18:59 -05:00
Andrew Bartlett
ddffc922df r8001: Also fill in the krbtgt checksum, and make sure to put the right
checksum in the right place...

Andrew Bartlett
(This used to be commit 90d0f502da)
2007-10-10 13:18:57 -05:00
Andrew Bartlett
9a7481bcfe r7993: Further work on the Krb5 PAC.
We now generate the PAC, and can verifiy both our own PAC and the PAC
from Win2k3.

This commit adds the PAC generation code, spits out the code to get
the information we need from the NETLOGON server back into a auth/
helper function, and adds a number of glue functions.

In the process of building the PAC generation code, some hints in the
Microsoft PAC specification shed light on other parts of the code, and
the updates to samr.idl and netlogon.idl come from those hints.

Also in this commit:

The Heimdal build package has been split up, so as to only link the
KDC with smbd, not the client utils.

To enable the PAC to be veified with gensec_krb5 (which isn't quite
dead yet), the keyblock has been passed back to the calling layer.

Andrew Bartlett
(This used to be commit e2015671c2)
2007-10-10 13:18:57 -05:00
Andrew Bartlett
f4e75294be r7991: I forgot to free the keyblock once we are done with it.
Andrew Bartlett
(This used to be commit a68e348375)
2007-10-10 13:18:56 -05:00
Andrew Bartlett
f4607c6e55 r7989: Allow the use of hashed passwords in the kerberos client and server,
and create the in-memory keytab with the correct kvno, if available.

Andrew Bartlett
(This used to be commit 7b7b2b038e)
2007-10-10 13:18:56 -05:00
Andrew Bartlett
cbbe4e816c r7986: Fix the compile, thanks to HotaruT.
This won't actually work until I get the keyblock filled in again, but
at least it will compile.

I first need to decide if we want to keep the server-side gensec_krb5
code at all, now we have the GSSAPI layer doing what we want.

Andrew Bartlett
(This used to be commit 28e49de929)
2007-10-10 13:18:56 -05:00
Andrew Bartlett
5daf957362 r7980: Forgot to add kerberos_pac.c to this config.mk file.
Andrew Bartlett
(This used to be commit bba58a1876)
2007-10-10 13:18:56 -05:00
Andrew Bartlett
66da650727 r7979: Metze reminded me to try one more combination, and we can now verify
the 'PAC', required for interopability with Active Directory.

This is still a cludge, as it doesn't handle different encryption
types, but that should be fairly easy to fix (needs PIDL/IDL changes).

Andrew Bartlett
(This used to be commit 690cfc44ce)
2007-10-10 13:18:56 -05:00
Andrew Bartlett
99777452f0 r7978: A start again on PAC verification. I have noticed that the kerberos
keys appear at the end of the PAC, which I feel is deliberate (it
makes this much easier).

I still can't make it work, but I'm sure we are closer.

Andrew Bartlett
(This used to be commit 6f0e1c80ae)
2007-10-10 13:18:55 -05:00
Andrew Bartlett
f9861c9c5a r7968: Pull the PAC from within GSSAPI, rather than only when using our own
'mock GSSAPI'.

Many thanks to Luke Howard for the work he has done on Heimdal for
XAD, to provide the right API hooks in GSSAPI.

Next step is to verify the signatures, and to build the PAC for the
KDC end.

Andrew Bartlett
(This used to be commit 2e82743c98)
2007-10-10 13:18:55 -05:00
Andrew Bartlett
2fb1e179f6 r7965: Remove the GENSEC password callback structure members, as these are no
longer used.

Andrew Bartlett
(This used to be commit 14be7d9569)
2007-10-10 13:18:54 -05:00
Andrew Bartlett
14b0722edf r7935: auth_unix now uses crypt(), so depend on -lcrypt.
This builds on the work tridge did to make -lcrypt conditional, rather
than globally linked.  This was needed for Heimdal stuff, but then I
'fixed' heimdal, and we now reintroduce it here.

Andrew Bartlett
(This used to be commit 83d9d8f482)
2007-10-10 13:18:52 -05:00
Simo Sorce
b30d59c3bf r7934: ported samba3 pass_check functions to auth_unix.c
not having these platforms they are untested,
let's hope the buildfarm can catch any problem
(This used to be commit 08ec299dcb)
2007-10-10 13:18:52 -05:00
Andrew Tridgell
37e3d02621 r7863: removed an unused variable
(This used to be commit 9ee3dbad6b)
2007-10-10 13:18:44 -05:00
Andrew Bartlett
8bbb77d88a r7862: Updates to the Kerberos notes, based on recent changes and discoveries.
Andrew Bartlett
(This used to be commit 7d791d13bc)
2007-10-10 13:18:44 -05:00
Andrew Tridgell
bdee131f30 r7860: switch our ldb storage format to use a NDR encoded objectSid. This is
quite a large change as we had lots of code that assumed that
objectSid was a string in S- format.

metze and simo tried to convince me to use NDR format months ago, but
I didn't listen, so its fair that I have the pain of fixing all the
code now :-)

This builds on the ldb_register_samba_handlers() and ldif handlers
code I did earlier this week. There are still three parts of this
conversion I have not finished:

 - the ltdb index records need to use the string form of the objectSid
   (to keep the DNs sane). Until that it done I have disabled indexing on
   objectSid, which is a big performance hit, but allows us to pass
   all our tests while I rejig the indexing system to use a externally
   supplied conversion function

 - I haven't yet put in place the code that allows client to use the
   "S-xxx-yyy" form for objectSid in ldap search expressions. w2k3
   supports this, presumably by looking for the "S-" prefix to
   determine what type of objectSid form is being used by the client. I
   have been working on ways to handle this, but am not happy with
   them yet so they aren't part of this patch

 - I need to change pidl to generate push functions that take a
   "const void *" instead of a "void*" for the data pointer. That will
   fix the couple of new warnings this code generates.

Luckily it many places the conversion to NDR formatted records
actually simplified the code, as it means we no longer need as many
calls to dom_sid_parse_talloc(). In some places it got more complex,
but not many.
(This used to be commit d40bc2fa8d)
2007-10-10 13:18:44 -05:00
Andrew Bartlett
4432cc73ae r7843: Use the new Heimdal gsskrb_acquire_creds API. This has the right
lifetime constraints, and works with the in-memory keytab.

Move initialize_krb5_error_table() into our kerberos startup code,
rather than in the GSSAPI code explitly.  (Hmm, we probably don't need
this at all..)

Andrew Bartlett
(This used to be commit bedf92da5c)
2007-10-10 13:18:42 -05:00
Andrew Bartlett
8a68f96f8c r7827: Add in-memory keytab to Samba4, using the new MEMORY_WILDCARD keytab
support in Heimdal.

This removes the 'ext_keytab' step from my Samba4/WinXP client howto.

In doing this work, I realised that the replay cache in Heimdal is
currently a no-op, so I have removed the calls to it, and therefore
the mutex calls from passdb/secrets.c.

This patch also includes a replacement 'magic' mechanism detection,
that does not issue extra error messages from deep inside the GSSAPI
code.

Andrew Bartlett
(This used to be commit c19d5706f4)
2007-10-10 13:18:41 -05:00
Andrew Bartlett
e578c33c2c r7757: Add NTLMv2 support to the NT1 Session setup (ie, not SPNEGO/NTLMSSP)
Session Setup code.

Add a mem_ctx argument to a few of the NTLMv2 support functions, and
add smb.conf options to control client NTLMv2 behaviour.

Andrew Bartlett
(This used to be commit 3f35cdb218)
2007-10-10 13:18:32 -05:00
Andrew Tridgell
ee57c76a68 r7704: - fixed open_nbt_connection() to return NULL when the connection failed
- got rid of smbcli_shutdown() and use talloc_free() instead.
(This used to be commit 1011b1bf51)
2007-10-10 13:18:23 -05:00
Andrew Bartlett
5b19286df0 r7690: Move the NT hash generation into the credentials system, rather than
in all the callers.  This also allows us to be more flexible in the
type of password we store.

Andrew Bartlett
(This used to be commit 00b8588c68)
2007-10-10 13:18:23 -05:00
Andrew Bartlett
949deaf9e3 r7687: Some more tests that must be done only when krb5_config is absent.
Andrew Bartlett
(This used to be commit 898f72d196)
2007-10-10 13:18:22 -05:00
Love Hörnquist Åstrand
c3948492d4 r7638: krb5_closelog in heimdal-0.7 not longer leaks memory, so remove that comment
(This used to be commit 3aa80b8e58)
2007-10-10 13:18:16 -05:00
Andrew Bartlett
7a33552d82 r7637: Another useful Heimdal feature we need.
Andrew Bartlett
(This used to be commit 57ddedc954)
2007-10-10 13:18:16 -05:00
Andrew Tridgell
af237084ec r7633: this patch started as an attempt to make the dcerpc code use a given
event_context for the socket_connect() call, so that when things that
use dcerpc are running alongside anything else it doesn't block the
whole process during a connect.

Then of course I needed to change any code that created a dcerpc
connection (such as the auth code) to also take an event context, and
anything that called that and so on .... thus the size of the patch.

There were 3 places where I punted:

  - abartlet wanted me to add a gensec_set_event_context() call
    instead of adding it to the gensec init calls. Andrew, my
    apologies for not doing this. I didn't do it as adding a new
    parameter allowed me to catch all the callers with the
    compiler. Now that its done, we could go back and use
    gensec_set_event_context()

  - the ejs code calls auth initialisation, which means it should pass
    in the event context from the web server. I punted on that. Needs fixing.

  - I used a NULL event context in dcom_get_pipe(). This is equivalent
    to what we did already, but should be fixed to use a callers event
    context. Jelmer, can you think of a clean way to do that?

I also cleaned up a couple of things:

 - libnet_context_destroy() makes no sense. I removed it.

 - removed some unused vars in various places
(This used to be commit 3a3025485b)
2007-10-10 13:18:15 -05:00
Andrew Tridgell
6be47e9bc2 r7597: removed the bogus get_myfullname() and get_mydomname() calls, and put
them in the ntlmssp code, which is the only place they are
used. Andrew, please remove them completely once you have some more
reliable way to get this info

they are bogus as gethostname() may give us a short hostname (and does
on lot of systems), so the calls often give totally the wrong result
anyway
(This used to be commit 35ec292f86)
2007-10-10 13:18:12 -05:00
Stefan Metzmacher
33bbe2b9e1 r7536: doesn't spam the smbd_log in the build_farm...
metze
(This used to be commit 9f4ed54c58)
2007-10-10 13:18:07 -05:00
Andrew Bartlett
e9fa8f7cce r7509: With the update to Heimdal 20050612 we no longer need krb5_freelog(),
as krb5_closelog() no longer leaks memory.

Andrew Bartlett
(This used to be commit b0bf8a4a5f)
2007-10-10 13:18:02 -05:00
Andrew Tridgell
bce8cda061 r7352: the internal heimdal build change. This changes quite a few things:
- if you want kerberos now, you need to unpack a lorikeet heimdal
   tree in source/heimdal/. If source/heimdal/ does not exist at
   configure time then all kerberos features are disabled. You cannot
   use an external kerberos library for now. That may change later.

 - moved lib/replace/ config stuff to lib/replace/ and create a
   lib/replace/replace.h. That allows the heimdal build to use our
   portability layer, and prevenets duplicate definitions of functions
   like strlcat()

 - if you do enable heimdal, then you will need to do 'make
   HEIMDAL_EXTERNAL' before you build Samba. That should be fixed once
   I explain the problem to jelmer (the problem is the inability to
   set a depend without also dragging in the object list of the
   dependency. We need this for building the heimdal asn1 compiler and
   et compiler.

 - disabled all of the m4 checks for external kerberos libraries. I
   left them in place in auth/kerberos/, but disabled it in
   configure.in

some of the heimdal_build/ code is still very rough, for example I
don't correctly detect the correct awk, flex, bison replacements for
heimdal_build/build_external.sh. I expect to fix that stuff up over
the next few days.
(This used to be commit d4648249b2)
2007-10-10 13:17:45 -05:00
Andrew Bartlett
8107bdec7b r7306: Use a consistant #define for detecting support for the Heimdal krb5
log redirection code.

Andrew Bartlett
(This used to be commit 93335d587d)
2007-10-10 13:17:39 -05:00
Stefan Metzmacher
2c499fe5aa r7303: autodetect the libkdc and our kdc support
btw: I use this for configuring heimdal

>>>
CONFIG="CFLAGS=\"-g -O -Wall -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -Wdeclaration-after-statement\" \
	CC=gcc-4.0 \
	./configure -C --prefix=$HOME/prefix/heimdal-test \
	--sysconfdir=/etc \
	--enable-shared=no \
	--with-ldb=$HOME/prefix/ldb \
	--without-openldap \
	--without-openssl $@"

echo $CONFIG
eval $CONFIG
>>>

maybe you also want to use --disable-berkeley-db

metze
(This used to be commit 2aec140e00)
2007-10-10 13:17:39 -05:00
Andrew Bartlett
2e787b5b17 r7291: Additional notes on what we require from a kerberos implementation.
Andrew Bartlett
(This used to be commit a8d3493b6f)
2007-10-10 13:17:37 -05:00
Andrew Bartlett
e168c5fefa r7285: It appears that MIT Kerberos does not have the log redirection
facility that I'm using. This should let us compile the non-KDC
components on MIT again.

Andrew Bartlett
(This used to be commit ae9c2d2b54)
2007-10-10 13:17:36 -05:00
Andrew Bartlett
d26f46f72c r7270: A big revamp to the way we handle kerberos errors in Samba4. We now
fill in the function pointers to handle the logging, and catch all the
kerberos warnings. (Currently at level 3).

To avoid a memory leak, this requries a new function: krb5_freelog(),
which I've added to lorikeet/heimdal.

This also required a revamp to how we handle the krb5_context, so as
to make it easier to handle with talloc destructors.

Andrew Bartlett
(This used to be commit 63272794c4)
2007-10-10 13:17:34 -05:00
Andrew Bartlett
8cd92242b9 r7269: talloc_steal() is preferred where possible, as it can't fail and does
not have some of the issues of talloc_reference().

Andrew Bartlett
(This used to be commit 2fb413355a)
2007-10-10 13:17:34 -05:00
Andrew Bartlett
5112e38393 r7258: Fix the final linking error with libkdc - we need to link libhdb as well.
With this fix, I can request tickets from our built-in KDC!

Andrew Bartlett
(This used to be commit d7cd76013b)
2007-10-10 13:17:32 -05:00
Andrew Bartlett
7ea6543ce5 r7257: Ensure the error message can never be uninitialised.
Andrew Bartlett
(This used to be commit fdd964582a)
2007-10-10 13:17:32 -05:00
Simo Sorce
6a71fa86fb r7242: typo
(This used to be commit 4444585f06)
2007-10-10 13:17:31 -05:00
Andrew Bartlett
089b538163 r7241: The KDC almost links...
Using current lorikeet/heimdal, and with the KDC module enabled (it is
disabled by default), I almost get the KDC to link.

(To enable the KDC for testing, comment out the only line in
smbd/config.m4, and add 'kdc' to the 'server services' line in
smb.conf).
(This used to be commit 26cd4b4f68)
2007-10-10 13:17:30 -05:00
Andrew Bartlett
752ffdf49c r7240: Don't call our fancy error message routines on a null context.
Andrew Bartlett
(This used to be commit 35877387c8)
2007-10-10 13:17:30 -05:00
Simo Sorce
a27609822b r7233: what about filling that new element ?
(This used to be commit 6a5e48c35c)
2007-10-10 13:17:29 -05:00
Simo Sorce
d870c3481e r7232: add some more auth stuff
enables us to authenticate against system users (only PAM support right now)
(This used to be commit 0c894de58b)
2007-10-10 13:17:29 -05:00
Simo Sorce
0b4a3021e1 r7224: add some more usefull data to the auth_usersupplied_info struct
(This used to be commit e40c44e9cd)
2007-10-10 13:17:28 -05:00
Andrew Bartlett
8c4733b412 r7219: Don't allow 'binding' to be used uninitilaised.
Andrew Bartlett
(This used to be commit 3dd730fbc8)
2007-10-10 13:17:27 -05:00
Andrew Bartlett
b910a7c5e3 r7218: Don't use an uninitialised variable in an error message.
Andrew Bartlett
(This used to be commit 1f68cf7d0e)
2007-10-10 13:17:27 -05:00
Tim Potter
4888823524 r6939: Get rid of SUBSYSTEM::NDR since all it did was require NDR_RAW.
(This used to be commit e077d9948f)
2007-10-10 13:16:59 -05:00
Andrew Bartlett
db169af3b7 r6883: Move to what simo assures me is the 'correct' way to find the NetBIOS
and long names for a domain.

Add servicePrincipalName mapping table (administrator configurable),
in the same spot as microsoft uses.

Andrew Bartlett
(This used to be commit c25e78b4b3)
2007-10-10 13:16:55 -05:00
Andrew Bartlett
ab92b82d83 r6882: Put in configure tests and #ifdef to keep Samba building on older Heimdal.
Andrew Bartlett
(This used to be commit f2e9261925)
2007-10-10 13:16:54 -05:00
Jelmer Vernooij
e73d051e20 r6839: Add support for building subsystems as shared libraries. This can be
done by setting:
OUTPUT_TYPE = SHARED_LIBRARY
in the [SUBSYSTEM::...] section belonging to a subsystem.

The idea is to allow multiple values to OUTPUT_TYPE simultaneously
(e.g. OUTPUT_TYPE = SHARED_LIBRARY, STATIC_LIBRARY, OBJLIST )
(This used to be commit b9d0ae93ba)
2007-10-10 13:16:50 -05:00
Jelmer Vernooij
29a8069aee r6838: Remove unnecessary calls to gensec_gsskrb5
Make the build system give a proper warning about this in the future
(This used to be commit 2d980465af)
2007-10-10 13:16:49 -05:00
Andrew Bartlett
e29cb65a90 r6819: More notes on krb5 requirements
Andrew Bartlett
(This used to be commit dbd8459987)
2007-10-10 13:16:47 -05:00
Tim Potter
d441930987 r6810: Rename auth/{ntlmssp,gensec,kerberos} mk and m4 files to be called
config.mk and config.m4 to be consistent with the rest of Samba.
(This used to be commit f377c71e4f)
2007-10-10 13:16:46 -05:00
Jelmer Vernooij
3184d47c42 r6805: Remove two remaining references to gensec_gsskrb5
(This used to be commit a02e077397)
2007-10-10 13:16:45 -05:00
Andrew Bartlett
1d0e2b9569 r6803: Try to bring in the correct GSSAPI headers for the krb5 mech. This
should allow us to ditch the local static storage for OIDs, as well as
fix the build on non-heimdal platforms.

Andrew Bartlett
(This used to be commit a7e2ecfac9)
2007-10-10 13:16:45 -05:00
Andrew Bartlett
c71a11c7ad r6801: It appears that krb5_make_principal, while convenient, is not portable.
Andrew Bartlett
(This used to be commit c8e8fa129e)
2007-10-10 13:16:45 -05:00
Andrew Bartlett
5c6dd5e800 r6800: A big GENSEC update:
Finally remove the distinction between 'krb5' and 'ms_krb5'.  We now
don't do kerberos stuff twice on failure.  The solution to this is
slightly more general than perhaps was really required (as this is a
special case), but it works, and I'm happy with the cleanup I achived
in the process.  All modules have been updated to supply a
NULL-terminated list of OIDs.

In that process, SPNEGO code has been generalised, as I realised that
two of the functions should have been identical in behaviour.

Over in the actual modules, I have worked to remove the 'kinit' code
from gensec_krb5, and placed it in kerberos/kerberos_util.c.

The GSSAPI module has been extended to use this, so no longer requires
a manual kinit at the command line.  It will soon loose the
requirement for a on-disk keytab too.

The general kerberos code has also been updated to move from
error_message() to our routine which gets the Heimdal error string
(which may be much more useful) when available.

Andrew Bartlett
(This used to be commit 0101728d8e)
2007-10-10 13:16:45 -05:00
Andrew Bartlett
8f96c42027 r6799: Remove a rudundent variable from the context structure - we can figure
this out by asking GENSEC, just like everybody else.

Andrew Bartlett
(This used to be commit 0268d6c46b)
2007-10-10 13:16:45 -05:00
Rafal Szczesniak
2c08639e02 r6797: Typo fix.
rafal
(This used to be commit 0f9a2aef6c)
2007-10-10 13:16:44 -05:00
Andrew Bartlett
50da9ed856 r6796: Remove the gensec_gsskrb5 module, which had had all of it's special
features merged back into gensec_gssapi.

(Removed because I've made some API changes, and it isn't worth
'fixing' the rudundent code to cope with changes)

Andrew Bartlett
(This used to be commit e8cf3d58ec)
2007-10-10 13:16:44 -05:00
Jelmer Vernooij
5b18cf2268 r6795: Make some functions static and remove some unused ones.
(This used to be commit 46509eb899)
2007-10-10 13:16:44 -05:00
Simo Sorce
51b0f62b8f r6794: spellfix
(This used to be commit f5956d1501)
2007-10-10 13:16:44 -05:00