remove trailing whitespace
This commit is contained in:
@@ -67,7 +67,7 @@ kcm_ccache_acquire(krb5_context context,
|
||||
ccache->name);
|
||||
return KRB5_FCC_INTERNAL;
|
||||
}
|
||||
|
||||
|
||||
HEIMDAL_MUTEX_lock(&ccache->mutex);
|
||||
|
||||
/* Fake up an internal ccache */
|
||||
|
@@ -168,7 +168,7 @@ krb5_error_code kcm_debug_ccache(krb5_context context)
|
||||
krb5_unparse_name(context, p->client, &cpn);
|
||||
if (p->server != NULL)
|
||||
krb5_unparse_name(context, p->server, &spn);
|
||||
|
||||
|
||||
kcm_log(7, "cache %08x: name %s refcnt %d flags %04x mode %04o "
|
||||
"uid %d gid %d client %s server %s ncreds %d",
|
||||
p, p->name, p->refcnt, p->flags, p->mode, p->uid, p->gid,
|
||||
|
@@ -114,7 +114,7 @@ kcm_ccache_new_client(krb5_context context,
|
||||
if (bad && !CLIENT_IS_ROOT(client))
|
||||
return KRB5_CC_BADNAME;
|
||||
}
|
||||
|
||||
|
||||
ret = kcm_ccache_resolve(context, name, &ccache);
|
||||
if (ret == 0) {
|
||||
if ((ccache->uid != client->uid ||
|
||||
|
@@ -357,7 +357,7 @@ kcm_configure(int argc, char **argv)
|
||||
ret = krb5_prepend_config_files_default(config_file, &files);
|
||||
if (ret)
|
||||
krb5_err(kcm_context, 1, ret, "getting configuration files");
|
||||
|
||||
|
||||
ret = krb5_set_config_files(kcm_context, files);
|
||||
krb5_free_config_files(files);
|
||||
if(ret)
|
||||
|
@@ -74,7 +74,7 @@ kcm_service(void *ctx, const heim_idata *req,
|
||||
|
||||
request.data = buf + 2;
|
||||
request.length = len - 2;
|
||||
|
||||
|
||||
/* buf is now pointing at opcode */
|
||||
|
||||
ret = kcm_dispatch(kcm_context, &peercred, &request, &rep);
|
||||
|
50
kcm/kcm.8
50
kcm/kcm.8
@@ -1,33 +1,33 @@
|
||||
.\" Copyright (c) 2005 Kungliga Tekniska Högskolan
|
||||
.\" (Royal Institute of Technology, Stockholm, Sweden).
|
||||
.\" All rights reserved.
|
||||
.\" (Royal Institute of Technology, Stockholm, Sweden).
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\"
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\"
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\"
|
||||
.\" 3. Neither the name of the Institute nor the names of its contributors
|
||||
.\" may be used to endorse or promote products derived from this software
|
||||
.\" without specific prior written permission.
|
||||
.\" 3. Neither the name of the Institute nor the names of its contributors
|
||||
.\" may be used to endorse or promote products derived from this software
|
||||
.\" without specific prior written permission.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
|
||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
|
||||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
|
||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
|
||||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $Id$
|
||||
.\"
|
||||
@@ -122,7 +122,7 @@ The
|
||||
daemon can also keep a SYSTEM credential that server processes can
|
||||
use to access services. One example of usage might be an nss_ldap
|
||||
module that quickly needs to get credentials and doesn't want to renew
|
||||
the ticket itself.
|
||||
the ticket itself.
|
||||
.Pp
|
||||
Supported options:
|
||||
.Bl -tag -width Ds
|
||||
|
@@ -59,7 +59,7 @@ kcm_op_noop(krb5_context context,
|
||||
{
|
||||
KCM_LOG_REQUEST(context, client, opcode);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -108,7 +108,7 @@ kcm_op_get_name(krb5_context context,
|
||||
|
||||
/*
|
||||
* Request:
|
||||
*
|
||||
*
|
||||
* Response:
|
||||
* NameZ
|
||||
*/
|
||||
@@ -139,9 +139,9 @@ kcm_op_gen_new(krb5_context context,
|
||||
* Request:
|
||||
* NameZ
|
||||
* Principal
|
||||
*
|
||||
*
|
||||
* Response:
|
||||
*
|
||||
*
|
||||
*/
|
||||
static krb5_error_code
|
||||
kcm_op_initialize(krb5_context context,
|
||||
@@ -205,9 +205,9 @@ kcm_op_initialize(krb5_context context,
|
||||
/*
|
||||
* Request:
|
||||
* NameZ
|
||||
*
|
||||
*
|
||||
* Response:
|
||||
*
|
||||
*
|
||||
*/
|
||||
static krb5_error_code
|
||||
kcm_op_destroy(krb5_context context,
|
||||
@@ -238,9 +238,9 @@ kcm_op_destroy(krb5_context context,
|
||||
* Request:
|
||||
* NameZ
|
||||
* Creds
|
||||
*
|
||||
*
|
||||
* Response:
|
||||
*
|
||||
*
|
||||
*/
|
||||
static krb5_error_code
|
||||
kcm_op_store(krb5_context context,
|
||||
@@ -298,7 +298,7 @@ kcm_op_store(krb5_context context,
|
||||
*
|
||||
* Response:
|
||||
* Creds
|
||||
*
|
||||
*
|
||||
*/
|
||||
static krb5_error_code
|
||||
kcm_op_retrieve(krb5_context context,
|
||||
@@ -432,7 +432,7 @@ kcm_op_get_principal(krb5_context context,
|
||||
*
|
||||
* Response:
|
||||
* UUIDs
|
||||
*
|
||||
*
|
||||
*/
|
||||
static krb5_error_code
|
||||
kcm_op_get_cred_uuid_list(krb5_context context,
|
||||
@@ -535,7 +535,7 @@ kcm_op_get_cred_by_uuid(krb5_context context,
|
||||
* MatchCreds
|
||||
*
|
||||
* Response:
|
||||
*
|
||||
*
|
||||
*/
|
||||
static krb5_error_code
|
||||
kcm_op_remove_cred(krb5_context context,
|
||||
@@ -593,7 +593,7 @@ kcm_op_remove_cred(krb5_context context,
|
||||
* Flags
|
||||
*
|
||||
* Response:
|
||||
*
|
||||
*
|
||||
*/
|
||||
static krb5_error_code
|
||||
kcm_op_set_flags(krb5_context context,
|
||||
@@ -640,7 +640,7 @@ kcm_op_set_flags(krb5_context context,
|
||||
* GID
|
||||
*
|
||||
* Response:
|
||||
*
|
||||
*
|
||||
*/
|
||||
static krb5_error_code
|
||||
kcm_op_chown(krb5_context context,
|
||||
@@ -694,7 +694,7 @@ kcm_op_chown(krb5_context context,
|
||||
* Mode
|
||||
*
|
||||
* Response:
|
||||
*
|
||||
*
|
||||
*/
|
||||
static krb5_error_code
|
||||
kcm_op_chmod(krb5_context context,
|
||||
@@ -1257,7 +1257,7 @@ find_ntlm_cred(const char *user, const char *domain, kcm_client *client)
|
||||
struct kcm_ntlm_cred *c;
|
||||
|
||||
for (c = ntlm_head; c != NULL; c = c->next)
|
||||
if ((user[0] == '\0' || strcmp(user, c->user) == 0) &&
|
||||
if ((user[0] == '\0' || strcmp(user, c->user) == 0) &&
|
||||
(domain == NULL || strcmp(domain, c->domain) == 0) &&
|
||||
kcm_is_same_session(client, c->uid, c->session))
|
||||
return c;
|
||||
@@ -1448,7 +1448,7 @@ kcm_op_do_ntlm(krb5_context context,
|
||||
memset(&type3, 0, sizeof(type3));
|
||||
sessionkey.data = NULL;
|
||||
sessionkey.length = 0;
|
||||
|
||||
|
||||
ret = krb5_ret_stringz(request, &user);
|
||||
if (ret)
|
||||
goto error;
|
||||
@@ -1489,22 +1489,22 @@ kcm_op_do_ntlm(krb5_context context,
|
||||
type3.flags = type2.flags;
|
||||
type3.targetname = type2.targetname;
|
||||
type3.ws = rk_UNCONST("workstation");
|
||||
|
||||
|
||||
/*
|
||||
* NTLM Version 1 if no targetinfo buffer.
|
||||
*/
|
||||
|
||||
|
||||
if (1 || type2.targetinfo.length == 0) {
|
||||
struct ntlm_buf sessionkey;
|
||||
|
||||
|
||||
if (type2.flags & NTLM_NEG_NTLM2_SESSION) {
|
||||
unsigned char nonce[8];
|
||||
|
||||
|
||||
if (RAND_bytes(nonce, sizeof(nonce)) != 1) {
|
||||
ret = EINVAL;
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
||||
ret = heim_ntlm_calculate_ntlm2_sess(nonce,
|
||||
type2.challenge,
|
||||
c->nthash.data,
|
||||
@@ -1515,11 +1515,11 @@ kcm_op_do_ntlm(krb5_context context,
|
||||
c->nthash.length,
|
||||
type2.challenge,
|
||||
&type3.ntlm);
|
||||
|
||||
|
||||
}
|
||||
if (ret)
|
||||
goto error;
|
||||
|
||||
|
||||
ret = heim_ntlm_build_ntlm1_master(c->nthash.data,
|
||||
c->nthash.length,
|
||||
&sessionkey,
|
||||
@@ -1541,14 +1541,14 @@ kcm_op_do_ntlm(krb5_context context,
|
||||
goto error;
|
||||
}
|
||||
flags |= NTLM_FLAG_SESSIONKEY;
|
||||
#if 0
|
||||
#if 0
|
||||
} else {
|
||||
struct ntlm_buf sessionkey;
|
||||
unsigned char ntlmv2[16];
|
||||
struct ntlm_targetinfo ti;
|
||||
|
||||
|
||||
/* verify infotarget */
|
||||
|
||||
|
||||
ret = heim_ntlm_decode_targetinfo(&type2.targetinfo, 1, &ti);
|
||||
if(ret) {
|
||||
_gss_ntlm_delete_sec_context(minor_status,
|
||||
@@ -1556,14 +1556,14 @@ kcm_op_do_ntlm(krb5_context context,
|
||||
*minor_status = ret;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
if (ti.domainname && strcmp(ti.domainname, name->domain) != 0) {
|
||||
_gss_ntlm_delete_sec_context(minor_status,
|
||||
context_handle, NULL);
|
||||
*minor_status = EINVAL;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
ret = heim_ntlm_calculate_ntlm2(ctx->client->key.data,
|
||||
ctx->client->key.length,
|
||||
type3.username,
|
||||
@@ -1578,7 +1578,7 @@ kcm_op_do_ntlm(krb5_context context,
|
||||
*minor_status = ret;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
ret = heim_ntlm_build_ntlm1_master(ntlmv2, sizeof(ntlmv2),
|
||||
&sessionkey,
|
||||
&type3.sessionkey);
|
||||
@@ -1589,10 +1589,10 @@ kcm_op_do_ntlm(krb5_context context,
|
||||
*minor_status = ret;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
flags |= NTLM_FLAG_NTLM2_SESSION |
|
||||
NTLM_FLAG_SESSION;
|
||||
|
||||
|
||||
if (type3.flags & NTLM_NEG_KEYEX)
|
||||
flags |= NTLM_FLAG_KEYEX;
|
||||
|
||||
@@ -1607,7 +1607,7 @@ kcm_op_do_ntlm(krb5_context context,
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
if (flags & NTLM_FLAG_NTLM2_SESSION) {
|
||||
_gss_ntlm_set_key(&ctx->u.v2.send, 0, (ctx->flags & NTLM_NEG_KEYEX),
|
||||
@@ -1630,7 +1630,7 @@ kcm_op_do_ntlm(krb5_context context,
|
||||
ret = heim_ntlm_encode_type3(&type3, &ndata);
|
||||
if (ret)
|
||||
goto error;
|
||||
|
||||
|
||||
data.data = ndata.data;
|
||||
data.length = ndata.length;
|
||||
ret = krb5_store_data(response, data);
|
||||
|
@@ -62,18 +62,18 @@ kcm_session_setup_handler(void)
|
||||
for (;;) {
|
||||
auditinfo_addr_t aio;
|
||||
int event;
|
||||
|
||||
|
||||
if (au_sdev_read_aia(h, &event, &aio) != 0)
|
||||
continue;
|
||||
|
||||
/*
|
||||
/*
|
||||
* Ignore everything but END. This should relly be
|
||||
* CLOSE but since that is delayed until the credential
|
||||
* is reused, we can't do that
|
||||
* is reused, we can't do that
|
||||
* */
|
||||
if (event != AUE_SESSION_END)
|
||||
continue;
|
||||
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
kcm_cache_remove_session(aio.ai_asid);
|
||||
});
|
||||
|
Reference in New Issue
Block a user