sssd_pac.c revision b4c44ebb8997d3debb33607c123ccfd9926e0cba
/*
Authors:
Sumit Bose <sbose@redhat.com>
Copyright (C) 2011, 2012, 2013 Red Hat
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* A short documentation about authdata plugins can be found in
#include <errno.h>
#include "krb5_authdata_int.h"
#include "sss_cli.h"
struct sssd_context {
};
static krb5_error_code
{
*plugin_context = NULL;
return 0;
}
static void
void *plugin_context,
{
}
static void
{
return;
}
static krb5_error_code
void *plugin_context,
void **request_context)
{
struct sssd_context *sssdctx;
return ENOMEM;
}
return 0;
}
static krb5_error_code
void *plugin_context,
void *request_context,
{
return EINVAL;
}
return ENOMEM;
}
}
}
return 0;
}
static void
void *plugin_context,
void *request_context)
{
}
}
}
void *plugin_context,
void *request_context,
const krb5_auth_context *auth_context,
const krb5_keyblock *key,
const krb5_ap_req *req)
{
int ret;
struct sss_cli_req_data sss_data;
int errnop;
return EINVAL;
}
if (kerr != 0) {
return EINVAL;
}
/* deallocate pac */
if (kerr != 0) {
/* The krb5 documentation says:
* A checksum mismatch can occur if the PAC was copied from a
* cross-realm TGT by an ignorant KDC; also Apple Mac OS X Server
* Open Directory (as of 10.6) generates PACs with no server checksum
* at all. One should consider not failing the whole authentication
* because of this reason, but, instead, treating the ticket as
* if it did not contain a PAC or marking the PAC information as
* non-verified.
*/
return 0;
}
if (ret != 0) {
/* Ignore the error */
}
return 0;
}
static krb5_error_code
void *plugin_context,
void *request_context,
{
*sizep += sizeof(krb5_int32);
*sizep += sizeof(krb5_int32);
return 0;
}
static krb5_error_code
void *plugin_context,
void *request_context,
krb5_octet **buffer,
{
krb5_error_code code = 0;
krb5_octet *bp;
} else {
}
} else {
}
return code;
}
static krb5_error_code
void *plugin_context,
void *request_context,
krb5_octet **buffer,
{
krb5_octet *bp;
/* length */
if (code != 0) {
return code;
}
if (ibuf != 0) {
return ENOMEM;
}
} else {
}
/* verified */
if (code != 0) {
return code;
}
}
return 0;
}
((void *)((uintptr_t)("sssd_sssdpac"))),
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
};