Blame src/include/gssrpc/auth_unix.h

Packit fd8b60
/* @(#)auth_unix.h	2.2 88/07/29 4.0 RPCSRC; from 1.8 88/02/08 SMI */
Packit fd8b60
/*
Packit fd8b60
 * Copyright (c) 2010, Oracle America, Inc.
Packit fd8b60
 *
Packit fd8b60
 * All rights reserved.
Packit fd8b60
 *
Packit fd8b60
 * Redistribution and use in source and binary forms, with or without
Packit fd8b60
 * modification, are permitted provided that the following conditions are met:
Packit fd8b60
 *
Packit fd8b60
 *     * Redistributions of source code must retain the above copyright
Packit fd8b60
 *       notice, this list of conditions and the following disclaimer.
Packit fd8b60
 *
Packit fd8b60
 *     * Redistributions in binary form must reproduce the above copyright
Packit fd8b60
 *       notice, this list of conditions and the following disclaimer in
Packit fd8b60
 *       the documentation and/or other materials provided with the
Packit fd8b60
 *       distribution.
Packit fd8b60
 *
Packit fd8b60
 *     * Neither the name of the "Oracle America, Inc." nor the names of
Packit fd8b60
 *       its contributors may be used to endorse or promote products
Packit fd8b60
 *       derived from this software without specific prior written permission.
Packit fd8b60
 *
Packit fd8b60
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
Packit fd8b60
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
Packit fd8b60
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
Packit fd8b60
 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
Packit fd8b60
 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
Packit fd8b60
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
Packit fd8b60
 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
Packit fd8b60
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
Packit fd8b60
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
Packit fd8b60
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
Packit fd8b60
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Packit fd8b60
 */
Packit fd8b60
/*      @(#)auth_unix.h 1.5 86/07/16 SMI      */
Packit fd8b60
Packit fd8b60
/*
Packit fd8b60
 * auth_unix.h, Protocol for UNIX style authentication parameters for RPC
Packit fd8b60
 */
Packit fd8b60
Packit fd8b60
#ifndef GSSRPC_AUTH_UNIX_H
Packit fd8b60
#define GSSRPC_AUTH_UNIX_H
Packit fd8b60
Packit fd8b60
GSSRPC__BEGIN_DECLS
Packit fd8b60
/*
Packit fd8b60
 * The system is very weak.  The client uses no encryption for  it
Packit fd8b60
 * credentials and only sends null verifiers.  The server sends backs
Packit fd8b60
 * null verifiers or optionally a verifier that suggests a new short hand
Packit fd8b60
 * for the credentials.
Packit fd8b60
 */
Packit fd8b60
Packit fd8b60
/* The machine name is part of a credential; it may not exceed 255 bytes */
Packit fd8b60
#define MAX_MACHINE_NAME 255
Packit fd8b60
Packit fd8b60
/* gids compose part of a credential; there may not be more than 16 of them */
Packit fd8b60
#define NGRPS 16
Packit fd8b60
Packit fd8b60
/*
Packit fd8b60
 * Unix style credentials.
Packit fd8b60
 */
Packit fd8b60
struct authunix_parms {
Packit fd8b60
	uint32_t	 aup_time;
Packit fd8b60
	char	*aup_machname;
Packit fd8b60
	int	 aup_uid;
Packit fd8b60
	int	 aup_gid;
Packit fd8b60
	u_int	 aup_len;
Packit fd8b60
	int	*aup_gids;
Packit fd8b60
};
Packit fd8b60
Packit fd8b60
extern bool_t xdr_authunix_parms(XDR *, struct authunix_parms *);
Packit fd8b60
Packit fd8b60
/*
Packit fd8b60
 * If a response verifier has flavor AUTH_SHORT,
Packit fd8b60
 * then the body of the response verifier encapsulates the following structure;
Packit fd8b60
 * again it is serialized in the obvious fashion.
Packit fd8b60
 */
Packit fd8b60
struct short_hand_verf {
Packit fd8b60
	struct opaque_auth new_cred;
Packit fd8b60
};
Packit fd8b60
Packit fd8b60
GSSRPC__END_DECLS
Packit fd8b60
Packit fd8b60
#endif /* !defined(GSSRPC_AUTH_UNIX_H) */