add --ok-as-delegate and --windows flags
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23401 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -66,6 +66,8 @@ char *pk_user_id = NULL;
|
|||||||
char *pk_x509_anchors = NULL;
|
char *pk_x509_anchors = NULL;
|
||||||
int pk_use_enckey = 0;
|
int pk_use_enckey = 0;
|
||||||
static int canonicalize_flag = 0;
|
static int canonicalize_flag = 0;
|
||||||
|
static int ok_as_delegate_flag = 0;
|
||||||
|
static int windows_flag = 0;
|
||||||
static char *ntlm_domain;
|
static char *ntlm_domain;
|
||||||
|
|
||||||
static char *krb4_cc_name;
|
static char *krb4_cc_name;
|
||||||
@@ -161,6 +163,12 @@ static struct getargs args[] = {
|
|||||||
{ "ntlm-domain", 0, arg_string, &ntlm_domain,
|
{ "ntlm-domain", 0, arg_string, &ntlm_domain,
|
||||||
"NTLM domain", "domain" },
|
"NTLM domain", "domain" },
|
||||||
|
|
||||||
|
{ "ok-as-delegate", 0, arg_flag, &ok_as_delegate_flag,
|
||||||
|
"honor ok-as-delegate on tickets" },
|
||||||
|
|
||||||
|
{ "windows", 0, arg_flag, &windows_flag,
|
||||||
|
"get windows behavior" },
|
||||||
|
|
||||||
{ "version", 0, arg_flag, &version_flag },
|
{ "version", 0, arg_flag, &version_flag },
|
||||||
{ "help", 0, arg_flag, &help_flag }
|
{ "help", 0, arg_flag, &help_flag }
|
||||||
};
|
};
|
||||||
@@ -342,7 +350,7 @@ store_ntlmkey(krb5_context context, krb5_ccache id,
|
|||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
data.data = buf->data;
|
data.length = buf->length;
|
||||||
data.data = buf->data;
|
data.data = buf->data;
|
||||||
|
|
||||||
ret = krb5_cc_set_config(context, id, name, &data);
|
ret = krb5_cc_set_config(context, id, name, &data);
|
||||||
@@ -589,6 +597,16 @@ get_new_tickets(krb5_context context,
|
|||||||
if (ntlm_domain && ntlmkey.data)
|
if (ntlm_domain && ntlmkey.data)
|
||||||
store_ntlmkey(context, ccache, ntlm_domain, &ntlmkey);
|
store_ntlmkey(context, ccache, ntlm_domain, &ntlmkey);
|
||||||
|
|
||||||
|
if (ok_as_delegate_flag || windows_flag) {
|
||||||
|
krb5_data data;
|
||||||
|
|
||||||
|
data.length = 1;
|
||||||
|
data.data = "\x01";
|
||||||
|
|
||||||
|
krb5_cc_set_config(context, ccache, "realm-config", &data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (enctype)
|
if (enctype)
|
||||||
free(enctype);
|
free(enctype);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user