Blame sunrpc/rpc/auth_unix.h

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