summaryrefslogtreecommitdiff
path: root/source3/auth/auth_info.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-01-01 03:10:32 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-01-01 03:10:32 +0000
commit4a6d1318bd9123f5a9c1d72721a9175320356fbe (patch)
treeefa9b16c660b3abfdbcea6cc4b5c58c536cfd86c /source3/auth/auth_info.c
parentef40945a5b206730e19713dfd3c50f9032a9e36c (diff)
downloadsamba-4a6d1318bd9123f5a9c1d72721a9175320356fbe.tar.gz
samba-4a6d1318bd9123f5a9c1d72721a9175320356fbe.tar.bz2
samba-4a6d1318bd9123f5a9c1d72721a9175320356fbe.zip
A farily large commit:
- Move rpc_client/cli_trust.c to smbd/change_trust_pw.c - It hasn't been used by anything else since smbpasswd lost its -j - Add a TALLOC_CTX to the auth subsytem. These are only valid for the length of the calls to the individual modules, if you want a longer context hide it in your private data. Similarly, all returns (like the server_info) should still be malloced. - Move the 'ntdomain' module (security=domain in oldspeak) over to use the new libsmb domain logon code. Also rework much of the code to use some better helper functions for the connection - getting us much better error returns (the new code is NTSTATUS). The only remaining thing to do is to figure out if tpot's 0xdead 0xbeef for the LUID feilds is sufficient, or if we should do random LUIDs as per the old code. Similarly, I'll move winbind over to this when I get a chance. This leaves the SPOOLSS code and some cli_pipe code as the only stuff still in rpc_client, at least as far as smbd is concerned. While I've given this a basic rundown, any testing is as always appriciated. Andrew Bartlett (This used to be commit d870edce76ecca259230fbdbdacd0c86793b4837)
Diffstat (limited to 'source3/auth/auth_info.c')
-rw-r--r--source3/auth/auth_info.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/auth/auth_info.c b/source3/auth/auth_info.c
index bdd490d3ef..9d399a88eb 100644
--- a/source3/auth/auth_info.c
+++ b/source3/auth/auth_info.c
@@ -253,6 +253,7 @@ DATA_BLOB auth_get_challenge(auth_authsupplied_info *auth_info)
DATA_BLOB challenge = data_blob(NULL, 0);
char *challenge_set_by = NULL;
auth_methods *auth_method;
+ TALLOC_CTX *mem_ctx;
if (auth_info->challenge.length) {
DEBUG(5, ("auth_get_challenge: returning previous challenge (normal)\n"));
@@ -267,7 +268,12 @@ DATA_BLOB auth_get_challenge(auth_authsupplied_info *auth_info)
DEBUG(1, ("auth_get_challenge: CONFIGURATION ERROR: authenticaion method %s has already specified a challenge. Challenge by %s ignored.\n",
challenge_set_by, auth_method->name));
} else {
- challenge = auth_method->get_chal(&auth_method->private_data, auth_info);
+ mem_ctx = talloc_init_named("auth_get_challange for module %s", auth_method->name);
+ if (!mem_ctx) {
+ smb_panic("talloc_init_named() failed!");
+ }
+
+ challenge = auth_method->get_chal(&auth_method->private_data, mem_ctx, auth_info);
if (challenge.length) {
DEBUG(5, ("auth_get_challenge: sucessfully got challenge from module %s\n", auth_method->name));
auth_info->challenge = challenge;
@@ -277,6 +283,7 @@ DATA_BLOB auth_get_challenge(auth_authsupplied_info *auth_info)
DEBUG(3, ("auth_get_challenge: getting challenge from authenticaion method %s FAILED.\n",
auth_method->name));
}
+ talloc_destroy(mem_ctx);
}
} else {
DEBUG(5, ("auth_get_challenge: module %s did not want to specify a challenge\n", auth_method->name));