/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Portions of this source code were derived from Berkeley 4.3 BSD
* under license from the Regents of the University of California.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* auth_des.c, client-side implementation of DES authentication
*/
#include <rpc/des_crypt.h>
#include <rpc/auth_des.h>
return (FALSE)
static void authdes_nextverf(AUTH *);
static void authdes_destroy(AUTH *);
int, struct timeval *);
static struct auth_ops *authdes_ops(void);
/*
* This struct is pointed to by the ah_private field of an "AUTH *"
*/
struct ad_private {
};
/*
* Create the client des authentication object
*/
/* ARGSUSED */
int
{
int error = 0;
return (EINVAL);
/*
* Allocate everything now
*/
"authdes_create: unable to get client's netname: %s (error %d)",
goto failed;
}
goto failed;
}
/*
* Set up private data
*/
} else {
}
"authdes_create: unable to gen conversation key: %s (error %d)",
else if (stat == RPC_TIMEDOUT)
else
goto failed;
}
} else
/*
* Set up auth handle
*/
goto failed;
return (0);
}
/*
* Implement the five authentication operations
*/
/*
* 1. Next Verifier
*/
/* ARGSUSED */
static void
{
/* what the heck am I supposed to do??? */
}
/*
* 2. Marshal
*/
/* ARGSUSED */
static bool_t
{
/* LINTED pointer alignment */
int status;
int len;
/*
* Figure out the "time", accounting for any time difference
* with the server if necessary.
*/
}
/*
* XDR the timestamp and possibly some other things, then
* encrypt them.
*/
} else {
sizeof (des_block), DES_ENCRYPT);
}
if (DES_FAILED(status)) {
return (FALSE);
}
} else {
}
/*
* Serialize the credential and verifier into opaque
* authentication data.
*/
ad->ad_fullnamelen);
} else
} else {
}
} else {
}
return (TRUE);
}
/*
* 3. Validate
*/
static bool_t
{
/* LINTED pointer alignment */
int status;
return (FALSE);
/* LINTED pointer alignment */
/*
* Decrypt the timestamp
*/
sizeof (des_block), DES_DECRYPT);
if (DES_FAILED(status)) {
return (FALSE);
}
/*
* xdr the decrypted timestamp
*/
/* LINTED pointer alignment */
/*
* validate
*/
sizeof (struct timeval)) != 0) {
return (FALSE);
}
/*
* We have a nickname now, let's use it
*/
return (TRUE);
}
/*
* 4. Refresh
*
* msg is a dummy argument here.
*/
/* ARGSUSED */
static bool_t
{
/* LINTED pointer alignment */
/*
* Hope the clocks are synced!
*/
}
RPC_SUCCESS) {
"authdes_refresh: unable to encrypt conversation key for user (uid %d): "
"%s (error %d)",
return (FALSE);
}
return (TRUE);
}
/*
* 5. Destroy
*/
static void
{
/* LINTED pointer alignment */
}
/*
* Synchronize with the server at the given address, that is,
* adjust timep to reflect the delta between our clocks
*/
static bool_t
{
return (FALSE);
}
return (TRUE);
}
static struct auth_ops *
authdes_ops(void)
{
}
return (&ops);
}