diff --git a/include/rpcsvc/bootparam_prot.x b/include/rpcsvc/bootparam_prot.x index 548d618755d7..6e47bdb218d3 100644 --- a/include/rpcsvc/bootparam_prot.x +++ b/include/rpcsvc/bootparam_prot.x @@ -1,104 +1,103 @@ /*- * Copyright (c) 2010, Oracle America, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 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. * * Neither the name of the "Oracle America, Inc." 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 COPYRIGHT HOLDERS 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 * COPYRIGHT HOLDER 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. */ /* * RPC for bootparms service. * There are two procedures: * WHOAMI takes a net address and returns a client name and also a * likely net address for routing * GETFILE takes a client name and file identifier and returns the * server name, server net address and pathname for the file. * file identifiers typically include root, swap, pub and dump */ #ifdef RPC_HDR %#include %#include %#include %#include %#include #else %#ifndef lint %/*static char sccsid[] = "from: @(#)bootparam_prot.x 1.2 87/06/24 Copyr 1987 Sun Micro";*/ %/*static char sccsid[] = "from: @(#)bootparam_prot.x 2.1 88/08/01 4.0 RPCSRC";*/ %#endif /* not lint */ %#include -%__FBSDID("$FreeBSD$"); #endif const MAX_MACHINE_NAME = 255; const MAX_PATH_LEN = 1024; const MAX_FILEID = 32; const IP_ADDR_TYPE = 1; typedef string bp_machine_name_t; typedef string bp_path_t; typedef string bp_fileid_t; struct ip_addr_t { char net; char host; char lh; char impno; }; union bp_address switch (int address_type) { case IP_ADDR_TYPE: ip_addr_t ip_addr; }; struct bp_whoami_arg { bp_address client_address; }; struct bp_whoami_res { bp_machine_name_t client_name; bp_machine_name_t domain_name; bp_address router_address; }; struct bp_getfile_arg { bp_machine_name_t client_name; bp_fileid_t file_id; }; struct bp_getfile_res { bp_machine_name_t server_name; bp_address server_address; bp_path_t server_path; }; program BOOTPARAMPROG { version BOOTPARAMVERS { bp_whoami_res BOOTPARAMPROC_WHOAMI(bp_whoami_arg) = 1; bp_getfile_res BOOTPARAMPROC_GETFILE(bp_getfile_arg) = 2; } = 1; } = 100026; diff --git a/include/rpcsvc/crypt.x b/include/rpcsvc/crypt.x index 3b296c0ddf1d..7d6b94d96067 100644 --- a/include/rpcsvc/crypt.x +++ b/include/rpcsvc/crypt.x @@ -1,87 +1,86 @@ /* * Copyright (c) 1996 * Bill Paul . All rights reserved. * * 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. * 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. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Bill Paul. * 4. Neither the name of the author nor the names of any co-contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY Bill Paul 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 Bill Paul 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. */ #ifndef RPC_HDR %#include -%__FBSDID("$FreeBSD$"); #endif /* * This protocol definition exists because of the U.S. government and * its stupid export laws. We can't export DES code from the United * States to other countries (even though the code already exists * outside the U.S. -- go figure that one out) but we need to make * Secure RPC work. The normal way around this is to break the DES * code out into a shared library; we can then provide a dummy lib * in the base OS and provide the real lib in the secure dist, which * the user can install later. But we need Secure RPC for NIS+, and * there are several system programs that use NIS+ which are statically * linked. We would have to provide replacements for these programs * in the secure dist, but there are a lot, and this is a pain. The * shared lib trick won't work for these programs, and we can't change * them once they're compiled. * * One solution for this problem is to do the DES encryption as a system * call; no programs need to be changed and we can even supply the DES * support as an LKM. But this bloats the kernel. Maybe if we have * Secure NFS one day this will be worth it, but for now we should keep * this mess in user space. * * So we have this second solution: we provide a server that does the * DES encryption for us. In this case, the server is keyserv (we need * it to make Secure RPC work anyway) and we use this protocol to ship * the data back and forth between keyserv and the application. */ enum des_dir { ENCRYPT_DES, DECRYPT_DES }; enum des_mode { CBC_DES, ECB_DES }; struct desargs { u_char des_key[8]; /* key (with low bit parity) */ des_dir des_dir; /* direction */ des_mode des_mode; /* mode */ u_char des_ivec[8]; /* input vector */ opaque desbuf<>; }; struct desresp { opaque desbuf<>; u_char des_ivec[8]; int stat; }; program CRYPT_PROG { version CRYPT_VERS { desresp DES_CRYPT(desargs) = 1; } = 1; } = 600100029; diff --git a/include/rpcsvc/key_prot.x b/include/rpcsvc/key_prot.x index 1fccd957941d..09a20049832e 100644 --- a/include/rpcsvc/key_prot.x +++ b/include/rpcsvc/key_prot.x @@ -1,287 +1,286 @@ %/*- % * Copyright (c) 2010, Oracle America, Inc. % * % * Redistribution and use in source and binary forms, with or without % * modification, are permitted provided that the following conditions are % * met: % * % * * Redistributions of source code must retain the above copyright % * notice, this list of conditions and the following disclaimer. % * * 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. % * * Neither the name of the "Oracle America, Inc." 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 COPYRIGHT HOLDERS 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 % * COPYRIGHT HOLDER 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. % */ /* * Key server protocol definition * Copyright (C) 1990, 1991 Sun Microsystems, Inc. * * The keyserver is a public key storage/encryption/decryption service * The encryption method used is based on the Diffie-Hellman exponential * key exchange technology. * * The key server is local to each machine, akin to the portmapper. * Under TI-RPC, communication with the keyserver is through the * loopback transport. * * NOTE: This .x file generates the USER level headers for the keyserver. * the KERNEL level headers are created by hand as they kernel has special * requirements. */ %/* From: #pragma ident "@(#)key_prot.x 1.7 94/04/29 SMI" */ %/* Copyright (c) 1990, 1991 Sun Microsystems, Inc. */ %#include -%__FBSDID("$FreeBSD$"); % %/* % * Compiled from key_prot.x using rpcgen. % * DO NOT EDIT THIS FILE! % * This is NOT source code! % */ /* * PROOT and MODULUS define the way the Diffie-Hellman key is generated. * * MODULUS should be chosen as a prime of the form: MODULUS == 2*p + 1, * where p is also prime. * * PROOT satisfies the following two conditions: * (1) (PROOT ** 2) % MODULUS != 1 * (2) (PROOT ** p) % MODULUS != 1 * */ const PROOT = 3; const HEXMODULUS = "d4a0ba0250b6fd2ec626e7efd637df76c716e22d0944b88b"; const HEXKEYBYTES = 48; /* HEXKEYBYTES == strlen(HEXMODULUS) */ const KEYSIZE = 192; /* KEYSIZE == bit length of key */ const KEYBYTES = 24; /* byte length of key */ /* * The first 16 hex digits of the encrypted secret key are used as * a checksum in the database. */ const KEYCHECKSUMSIZE = 16; /* * status of operation */ enum keystatus { KEY_SUCCESS, /* no problems */ KEY_NOSECRET, /* no secret key stored */ KEY_UNKNOWN, /* unknown netname */ KEY_SYSTEMERR /* system error (out of memory, encryption failure) */ }; typedef opaque keybuf[HEXKEYBYTES]; /* store key in hex */ typedef string netnamestr; /* * Argument to ENCRYPT or DECRYPT */ struct cryptkeyarg { netnamestr remotename; des_block deskey; }; /* * Argument to ENCRYPT_PK or DECRYPT_PK */ struct cryptkeyarg2 { netnamestr remotename; netobj remotekey; /* Contains a length up to 1024 bytes */ des_block deskey; }; /* * Result of ENCRYPT, DECRYPT, ENCRYPT_PK, and DECRYPT_PK */ union cryptkeyres switch (keystatus status) { case KEY_SUCCESS: des_block deskey; default: void; }; const MAXGIDS = 16; /* max number of gids in gid list */ /* * Unix credential */ struct unixcred { u_int uid; u_int gid; u_int gids; }; /* * Result returned from GETCRED */ union getcredres switch (keystatus status) { case KEY_SUCCESS: unixcred cred; default: void; }; /* * key_netstarg; */ struct key_netstarg { keybuf st_priv_key; keybuf st_pub_key; netnamestr st_netname; }; union key_netstres switch (keystatus status){ case KEY_SUCCESS: key_netstarg knet; default: void; }; #ifdef RPC_HDR % %#ifndef opaque %#define opaque char %#endif % #endif program KEY_PROG { version KEY_VERS { /* * This is my secret key. * Store it for me. */ keystatus KEY_SET(keybuf) = 1; /* * I want to talk to X. * Encrypt a conversation key for me. */ cryptkeyres KEY_ENCRYPT(cryptkeyarg) = 2; /* * X just sent me a message. * Decrypt the conversation key for me. */ cryptkeyres KEY_DECRYPT(cryptkeyarg) = 3; /* * Generate a secure conversation key for me */ des_block KEY_GEN(void) = 4; /* * Get me the uid, gid and group-access-list associated * with this netname (for kernel which cannot use NIS) */ getcredres KEY_GETCRED(netnamestr) = 5; } = 1; version KEY_VERS2 { /* * ####### * Procedures 1-5 are identical to version 1 * ####### */ /* * This is my secret key. * Store it for me. */ keystatus KEY_SET(keybuf) = 1; /* * I want to talk to X. * Encrypt a conversation key for me. */ cryptkeyres KEY_ENCRYPT(cryptkeyarg) = 2; /* * X just sent me a message. * Decrypt the conversation key for me. */ cryptkeyres KEY_DECRYPT(cryptkeyarg) = 3; /* * Generate a secure conversation key for me */ des_block KEY_GEN(void) = 4; /* * Get me the uid, gid and group-access-list associated * with this netname (for kernel which cannot use NIS) */ getcredres KEY_GETCRED(netnamestr) = 5; /* * I want to talk to X. and I know X's public key * Encrypt a conversation key for me. */ cryptkeyres KEY_ENCRYPT_PK(cryptkeyarg2) = 6; /* * X just sent me a message. and I know X's public key * Decrypt the conversation key for me. */ cryptkeyres KEY_DECRYPT_PK(cryptkeyarg2) = 7; /* * Store my public key, netname and private key. */ keystatus KEY_NET_PUT(key_netstarg) = 8; /* * Retrieve my public key, netname and private key. */ key_netstres KEY_NET_GET(void) = 9; /* * Return me the conversation key that is constructed * from my secret key and this publickey. */ cryptkeyres KEY_GET_CONV(keybuf) = 10; } = 2; } = 100029; diff --git a/include/rpcsvc/klm_prot.x b/include/rpcsvc/klm_prot.x index 5860f3251c17..b78dbfc20c3c 100644 --- a/include/rpcsvc/klm_prot.x +++ b/include/rpcsvc/klm_prot.x @@ -1,141 +1,140 @@ /*- * Copyright (c) 2010, Oracle America, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 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. * * Neither the name of the "Oracle America, Inc." 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 COPYRIGHT HOLDERS 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 * COPYRIGHT HOLDER 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. */ /* * Kernel/lock manager protocol definition * Copyright (C) 1986 Sun Microsystems, Inc. * * protocol used between the UNIX kernel (the "client") and the * local lock manager. The local lock manager is a daemon running * above the kernel. */ #ifndef RPC_HDR %#ifndef lint %/*static char sccsid[] = "from: @(#)klm_prot.x 1.7 87/07/08 Copyr 1987 Sun Micro";*/ %/*static char sccsid[] = "from: @(#)klm_prot.x 2.1 88/08/01 4.0 RPCSRC";*/ %#endif /* not lint */ %#include -%__FBSDID("$FreeBSD$"); #endif const LM_MAXSTRLEN = 1024; /* * lock manager status returns */ enum klm_stats { klm_granted = 0, /* lock is granted */ klm_denied = 1, /* lock is denied */ klm_denied_nolocks = 2, /* no lock entry available */ klm_working = 3 /* lock is being processed */ }; /* * lock manager lock identifier */ struct klm_lock { string server_name; netobj fh; /* a counted file handle */ int pid; /* holder of the lock */ unsigned l_offset; /* beginning offset of the lock */ unsigned l_len; /* byte length of the lock; * zero means through end of file */ }; /* * lock holder identifier */ struct klm_holder { bool exclusive; /* FALSE if shared lock */ int svid; /* holder of the lock (pid) */ unsigned l_offset; /* beginning offset of the lock */ unsigned l_len; /* byte length of the lock; * zero means through end of file */ }; /* * reply to KLM_LOCK / KLM_UNLOCK / KLM_CANCEL */ struct klm_stat { klm_stats stat; }; /* * reply to a KLM_TEST call */ union klm_testrply switch (klm_stats stat) { case klm_denied: struct klm_holder holder; default: /* All other cases return no arguments */ void; }; /* * arguments to KLM_LOCK */ struct klm_lockargs { bool block; bool exclusive; struct klm_lock alock; }; /* * arguments to KLM_TEST */ struct klm_testargs { bool exclusive; struct klm_lock alock; }; /* * arguments to KLM_UNLOCK */ struct klm_unlockargs { struct klm_lock alock; }; program KLM_PROG { version KLM_VERS { klm_testrply KLM_TEST (struct klm_testargs) = 1; klm_stat KLM_LOCK (struct klm_lockargs) = 2; klm_stat KLM_CANCEL (struct klm_lockargs) = 3; /* klm_granted=> the cancel request fails due to lock is already granted */ /* klm_denied=> the cancel request successfully aborts lock request */ klm_stat KLM_UNLOCK (struct klm_unlockargs) = 4; } = 1; } = 100020; diff --git a/include/rpcsvc/mount.x b/include/rpcsvc/mount.x index 9ebee835b273..e67cbc73d867 100644 --- a/include/rpcsvc/mount.x +++ b/include/rpcsvc/mount.x @@ -1,259 +1,258 @@ /*- * Copyright (c) 2010, Oracle America, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 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. * * Neither the name of the "Oracle America, Inc." 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 COPYRIGHT HOLDERS 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 * COPYRIGHT HOLDER 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. */ /* * Protocol description for the mount program */ #ifndef RPC_HDR %#ifndef lint %/*static char sccsid[] = "from: @(#)mount.x 1.2 87/09/18 Copyr 1987 Sun Micro";*/ %/*static char sccsid[] = "from: @(#)mount.x 2.1 88/08/01 4.0 RPCSRC";*/ %#endif /* not lint */ %#include -%__FBSDID("$FreeBSD$"); #endif const MNTPATHLEN = 1024; /* maximum bytes in a pathname argument */ const MNTNAMLEN = 255; /* maximum bytes in a name argument */ const FHSIZE = 32; /* size in bytes of a file handle */ #ifdef WANT_NFS3 const FHSIZE3 = 64; /* size in bytes of a file handle (v3) */ #endif /* * The fhandle is the file handle that the server passes to the client. * All file operations are done using the file handles to refer to a file * or a directory. The file handle can contain whatever information the * server needs to distinguish an individual file. */ typedef opaque fhandle[FHSIZE]; #ifdef WANT_NFS3 typedef opaque fhandle3; #endif /* * If a status of zero is returned, the call completed successfully, and * a file handle for the directory follows. A non-zero status indicates * some sort of error. The status corresponds with UNIX error numbers. */ union fhstatus switch (unsigned fhs_status) { case 0: fhandle fhs_fhandle; default: void; }; #ifdef WANT_NFS3 /* * Status codes returned by the version 3 mount call. */ enum mountstat3 { MNT3_OK = 0, /* no error */ MNT3ERR_PERM = 1, /* Not owner */ MNT3ERR_NOENT = 2, /* No such file or directory */ MNT3ERR_IO = 5, /* I/O error */ MNT3ERR_ACCES = 13, /* Permission denied */ MNT3ERR_NOTDIR = 20, /* Not a directory */ MNT3ERR_INVAL = 22, /* Invalid argument */ MNT3ERR_NAMETOOLONG = 63, /* Filename too long */ MNT3ERR_NOTSUPP = 10004, /* Operation not supported */ MNT3ERR_SERVERFAULT = 10006 /* A failure on the server */ }; struct mountres3_ok { fhandle3 fhandle; int auth_flavors<>; }; union mountres3 switch (mountstat3 fhs_status) { case 0: mountres3_ok mountinfo; default: void; }; #endif /* * The type dirpath is the pathname of a directory */ typedef string dirpath; /* * The type name is used for arbitrary names (hostnames, groupnames) */ typedef string name; /* * A list of who has what mounted */ typedef struct mountbody *mountlist; struct mountbody { name ml_hostname; dirpath ml_directory; mountlist ml_next; }; /* * A list of netgroups */ typedef struct groupnode *groups; struct groupnode { name gr_name; groups gr_next; }; /* * A list of what is exported and to whom */ typedef struct exportnode *exports; struct exportnode { dirpath ex_dir; groups ex_groups; exports ex_next; }; program MOUNTPROG { /* * Version one of the mount protocol communicates with version two * of the NFS protocol. Version three communicates with * version three of the NFS protocol. The only connecting * point is the fhandle structure, which is the same for both * protocols. */ version MOUNTVERS { /* * Does no work. It is made available in all RPC services * to allow server response testing and timing */ void MOUNTPROC_NULL(void) = 0; /* * If fhs_status is 0, then fhs_fhandle contains the * file handle for the directory. This file handle may * be used in the NFS protocol. This procedure also adds * a new entry to the mount list for this client mounting * the directory. * Unix authentication required. */ fhstatus MOUNTPROC_MNT(dirpath) = 1; /* * Returns the list of remotely mounted filesystems. The * mountlist contains one entry for each hostname and * directory pair. */ mountlist MOUNTPROC_DUMP(void) = 2; /* * Removes the mount list entry for the directory * Unix authentication required. */ void MOUNTPROC_UMNT(dirpath) = 3; /* * Removes all of the mount list entries for this client * Unix authentication required. */ void MOUNTPROC_UMNTALL(void) = 4; /* * Returns a list of all the exported filesystems, and which * machines are allowed to import it. */ exports MOUNTPROC_EXPORT(void) = 5; /* * Identical to MOUNTPROC_EXPORT above */ exports MOUNTPROC_EXPORTALL(void) = 6; } = 1; #ifdef WANT_NFS3 version MOUNTVERS3 { /* * Does no work. It is made available in all RPC services * to allow server response testing and timing */ void MOUNTPROC_NULL(void) = 0; /* * If mountres3.fhs_status is MNT3_OK, then * mountres3.mountinfo contains the file handle for * the directory and a list of acceptable * authentication flavors. This file handle may only * be used in the NFS version 3 protocol. This * procedure also results in the server adding a new * entry to its mount list recording that this client * has mounted the directory. AUTH_UNIX authentication * or better is required. */ mountres3 MOUNTPROC_MNT(dirpath) = 1; /* * Returns the list of remotely mounted filesystems. The * mountlist contains one entry for each hostname and * directory pair. */ mountlist MOUNTPROC_DUMP(void) = 2; /* * Removes the mount list entry for the directory * Unix authentication required. */ void MOUNTPROC_UMNT(dirpath) = 3; /* * Removes all of the mount list entries for this client * Unix authentication required. */ void MOUNTPROC_UMNTALL(void) = 4; /* * Returns a list of all the exported filesystems, and which * machines are allowed to import it. */ exports MOUNTPROC_EXPORT(void) = 5; } = 3; #endif } = 100005; diff --git a/include/rpcsvc/nfs_prot.x b/include/rpcsvc/nfs_prot.x index 17791b6a18b2..9706c5a03bbd 100644 --- a/include/rpcsvc/nfs_prot.x +++ b/include/rpcsvc/nfs_prot.x @@ -1,1268 +1,1267 @@ /*- * Copyright (c) 2010, Oracle America, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 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. * * Neither the name of the "Oracle America, Inc." 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 COPYRIGHT HOLDERS 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 * COPYRIGHT HOLDER 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. */ #ifndef RPC_HDR %#ifndef lint %/*static char sccsid[] = "from: @(#)nfs_prot.x 1.2 87/10/12 Copyr 1987 Sun Micro";*/ %/*static char sccsid[] = "from: @(#)nfs_prot.x 2.1 88/08/01 4.0 RPCSRC";*/ %#endif /* not lint */ %#include -%__FBSDID("$FreeBSD$"); #endif const NFS_PORT = 2049; const NFS_MAXDATA = 8192; const NFS_MAXPATHLEN = 1024; const NFS_MAXNAMLEN = 255; const NFS_FHSIZE = 32; const NFS_COOKIESIZE = 4; const NFS_FIFO_DEV = -1; /* size kludge for named pipes */ /* * File types */ const NFSMODE_FMT = 0170000; /* type of file */ const NFSMODE_DIR = 0040000; /* directory */ const NFSMODE_CHR = 0020000; /* character special */ const NFSMODE_BLK = 0060000; /* block special */ const NFSMODE_REG = 0100000; /* regular */ const NFSMODE_LNK = 0120000; /* symbolic link */ const NFSMODE_SOCK = 0140000; /* socket */ const NFSMODE_FIFO = 0010000; /* fifo */ /* * Error status */ enum nfsstat { NFS_OK= 0, /* no error */ NFSERR_PERM=1, /* Not owner */ NFSERR_NOENT=2, /* No such file or directory */ NFSERR_IO=5, /* I/O error */ NFSERR_NXIO=6, /* No such device or address */ NFSERR_ACCES=13, /* Permission denied */ NFSERR_EXIST=17, /* File exists */ NFSERR_NODEV=19, /* No such device */ NFSERR_NOTDIR=20, /* Not a directory*/ NFSERR_ISDIR=21, /* Is a directory */ NFSERR_FBIG=27, /* File too large */ NFSERR_NOSPC=28, /* No space left on device */ NFSERR_ROFS=30, /* Read-only file system */ NFSERR_NAMETOOLONG=63, /* File name too long */ NFSERR_NOTEMPTY=66, /* Directory not empty */ NFSERR_DQUOT=69, /* Disc quota exceeded */ NFSERR_STALE=70, /* Stale NFS file handle */ NFSERR_WFLUSH=99 /* write cache flushed */ }; /* * File types */ enum ftype { NFNON = 0, /* non-file */ NFREG = 1, /* regular file */ NFDIR = 2, /* directory */ NFBLK = 3, /* block special */ NFCHR = 4, /* character special */ NFLNK = 5, /* symbolic link */ NFSOCK = 6, /* unix domain sockets */ NFBAD = 7, /* unused */ NFFIFO = 8 /* named pipe */ }; /* * File access handle */ struct nfs_fh { opaque data[NFS_FHSIZE]; }; /* * Timeval */ struct nfstime { unsigned seconds; unsigned useconds; }; /* * File attributes */ struct fattr { ftype type; /* file type */ unsigned mode; /* protection mode bits */ unsigned nlink; /* # hard links */ unsigned uid; /* owner user id */ unsigned gid; /* owner group id */ unsigned size; /* file size in bytes */ unsigned blocksize; /* preferred block size */ unsigned rdev; /* special device # */ unsigned blocks; /* Kb of disk used by file */ unsigned fsid; /* device # */ unsigned fileid; /* inode # */ nfstime atime; /* time of last access */ nfstime mtime; /* time of last modification */ nfstime ctime; /* time of last change */ }; /* * File attributes which can be set */ struct sattr { unsigned mode; /* protection mode bits */ unsigned uid; /* owner user id */ unsigned gid; /* owner group id */ unsigned size; /* file size in bytes */ nfstime atime; /* time of last access */ nfstime mtime; /* time of last modification */ }; typedef string filename; typedef string nfspath; /* * Reply status with file attributes */ union attrstat switch (nfsstat status) { case NFS_OK: fattr attributes; default: void; }; struct sattrargs { nfs_fh file; sattr attributes; }; /* * Arguments for directory operations */ struct diropargs { nfs_fh dir; /* directory file handle */ filename name; /* name (up to NFS_MAXNAMLEN bytes) */ }; struct diropokres { nfs_fh file; fattr attributes; }; /* * Results from directory operation */ union diropres switch (nfsstat status) { case NFS_OK: diropokres diropres; default: void; }; union readlinkres switch (nfsstat status) { case NFS_OK: nfspath data; default: void; }; /* * Arguments to remote read */ struct readargs { nfs_fh file; /* handle for file */ unsigned offset; /* byte offset in file */ unsigned count; /* immediate read count */ unsigned totalcount; /* total read count (from this offset)*/ }; /* * Status OK portion of remote read reply */ struct readokres { fattr attributes; /* attributes, need for pagin*/ opaque data; }; union readres switch (nfsstat status) { case NFS_OK: readokres reply; default: void; }; /* * Arguments to remote write */ struct writeargs { nfs_fh file; /* handle for file */ unsigned beginoffset; /* beginning byte offset in file */ unsigned offset; /* current byte offset in file */ unsigned totalcount; /* total write count (to this offset)*/ opaque data; }; struct createargs { diropargs where; sattr attributes; }; struct renameargs { diropargs from; diropargs to; }; struct linkargs { nfs_fh from; diropargs to; }; struct symlinkargs { diropargs from; nfspath to; sattr attributes; }; typedef opaque nfscookie[NFS_COOKIESIZE]; /* * Arguments to readdir */ struct readdirargs { nfs_fh dir; /* directory handle */ nfscookie cookie; unsigned count; /* number of directory bytes to read */ }; struct entry { unsigned fileid; filename name; nfscookie cookie; entry *nextentry; }; struct dirlist { entry *entries; bool eof; }; union readdirres switch (nfsstat status) { case NFS_OK: dirlist reply; default: void; }; struct statfsokres { unsigned tsize; /* preferred transfer size in bytes */ unsigned bsize; /* fundamental file system block size */ unsigned blocks; /* total blocks in file system */ unsigned bfree; /* free blocks in fs */ unsigned bavail; /* free blocks avail to non-superuser */ }; union statfsres switch (nfsstat status) { case NFS_OK: statfsokres reply; default: void; }; #ifdef WANT_NFS3 /* * NFSv3 constants and types */ const NFS3_FHSIZE = 64; /* maximum size in bytes of a file handle */ const NFS3_COOKIEVERFSIZE = 8; /* size of a cookie verifier for READDIR */ const NFS3_CREATEVERFSIZE = 8; /* size of the verifier used for CREATE */ const NFS3_WRITEVERFSIZE = 8; /* size of the verifier used for WRITE */ typedef unsigned hyper uint64; typedef hyper int64; typedef unsigned long uint32; typedef long int32; typedef string filename3<>; typedef string nfspath3<>; typedef uint64 fileid3; typedef uint64 cookie3; typedef opaque cookieverf3[NFS3_COOKIEVERFSIZE]; typedef opaque createverf3[NFS3_CREATEVERFSIZE]; typedef opaque writeverf3[NFS3_WRITEVERFSIZE]; typedef uint32 uid3; typedef uint32 gid3; typedef uint64 size3; typedef uint64 offset3; typedef uint32 mode3; typedef uint32 count3; /* * Error status (v3) */ enum nfsstat3 { NFS3_OK = 0, NFS3ERR_PERM = 1, NFS3ERR_NOENT = 2, NFS3ERR_IO = 5, NFS3ERR_NXIO = 6, NFS3ERR_ACCES = 13, NFS3ERR_EXIST = 17, NFS3ERR_XDEV = 18, NFS3ERR_NODEV = 19, NFS3ERR_NOTDIR = 20, NFS3ERR_ISDIR = 21, NFS3ERR_INVAL = 22, NFS3ERR_FBIG = 27, NFS3ERR_NOSPC = 28, NFS3ERR_ROFS = 30, NFS3ERR_MLINK = 31, NFS3ERR_NAMETOOLONG = 63, NFS3ERR_NOTEMPTY = 66, NFS3ERR_DQUOT = 69, NFS3ERR_STALE = 70, NFS3ERR_REMOTE = 71, NFS3ERR_BADHANDLE = 10001, NFS3ERR_NOT_SYNC = 10002, NFS3ERR_BAD_COOKIE = 10003, NFS3ERR_NOTSUPP = 10004, NFS3ERR_TOOSMALL = 10005, NFS3ERR_SERVERFAULT = 10006, NFS3ERR_BADTYPE = 10007, NFS3ERR_JUKEBOX = 10008 }; /* * File types (v3) */ enum ftype3 { NF3REG = 1, /* regular file */ NF3DIR = 2, /* directory */ NF3BLK = 3, /* block special */ NF3CHR = 4, /* character special */ NF3LNK = 5, /* symbolic link */ NF3SOCK = 6, /* unix domain sockets */ NF3FIFO = 7 /* named pipe */ }; struct specdata3 { uint32 specdata1; uint32 specdata2; }; /* * File access handle (v3) */ struct nfs_fh3 { opaque data; }; /* * Timeval (v3) */ struct nfstime3 { uint32 seconds; uint32 nseconds; }; /* * File attributes (v3) */ struct fattr3 { ftype3 type; /* file type */ mode3 mode; /* protection mode bits */ uint32 nlink; /* # hard links */ uid3 uid; /* owner user id */ gid3 gid; /* owner group id */ size3 size; /* file size in bytes */ size3 used; /* preferred block size */ specdata3 rdev; /* special device # */ uint64 fsid; /* device # */ fileid3 fileid; /* inode # */ nfstime3 atime; /* time of last access */ nfstime3 mtime; /* time of last modification */ nfstime3 ctime; /* time of last change */ }; union post_op_attr switch (bool attributes_follow) { case TRUE: fattr3 attributes; case FALSE: void; }; struct wcc_attr { size3 size; nfstime3 mtime; nfstime3 ctime; }; union pre_op_attr switch (bool attributes_follow) { case TRUE: wcc_attr attributes; case FALSE: void; }; struct wcc_data { pre_op_attr before; post_op_attr after; }; union post_op_fh3 switch (bool handle_follows) { case TRUE: nfs_fh3 handle; case FALSE: void; }; /* * File attributes which can be set (v3) */ enum time_how { DONT_CHANGE = 0, SET_TO_SERVER_TIME = 1, SET_TO_CLIENT_TIME = 2 }; union set_mode3 switch (bool set_it) { case TRUE: mode3 mode; default: void; }; union set_uid3 switch (bool set_it) { case TRUE: uid3 uid; default: void; }; union set_gid3 switch (bool set_it) { case TRUE: gid3 gid; default: void; }; union set_size3 switch (bool set_it) { case TRUE: size3 size; default: void; }; union set_atime switch (time_how set_it) { case SET_TO_CLIENT_TIME: nfstime3 atime; default: void; }; union set_mtime switch (time_how set_it) { case SET_TO_CLIENT_TIME: nfstime3 mtime; default: void; }; struct sattr3 { set_mode3 mode; set_uid3 uid; set_gid3 gid; set_size3 size; set_atime atime; set_mtime mtime; }; /* * Arguments for directory operations (v3) */ struct diropargs3 { nfs_fh3 dir; /* directory file handle */ filename3 name; /* name (up to NFS_MAXNAMLEN bytes) */ }; /* * Arguments to getattr (v3). */ struct GETATTR3args { nfs_fh3 object; }; struct GETATTR3resok { fattr3 obj_attributes; }; union GETATTR3res switch (nfsstat3 status) { case NFS3_OK: GETATTR3resok resok; default: void; }; /* * Arguments to setattr (v3). */ union sattrguard3 switch (bool check) { case TRUE: nfstime3 obj_ctime; case FALSE: void; }; struct SETATTR3args { nfs_fh3 object; sattr3 new_attributes; sattrguard3 guard; }; struct SETATTR3resok { wcc_data obj_wcc; }; struct SETATTR3resfail { wcc_data obj_wcc; }; union SETATTR3res switch (nfsstat3 status) { case NFS3_OK: SETATTR3resok resok; default: SETATTR3resfail resfail; }; /* * Arguments to lookup (v3). */ struct LOOKUP3args { diropargs3 what; }; struct LOOKUP3resok { nfs_fh3 object; post_op_attr obj_attributes; post_op_attr dir_attributes; }; struct LOOKUP3resfail { post_op_attr dir_attributes; }; union LOOKUP3res switch (nfsstat3 status) { case NFS3_OK: LOOKUP3resok resok; default: LOOKUP3resfail resfail; }; /* * Arguments to access (v3). */ const ACCESS3_READ = 0x0001; const ACCESS3_LOOKUP = 0x0002; const ACCESS3_MODIFY = 0x0004; const ACCESS3_EXTEND = 0x0008; const ACCESS3_DELETE = 0x0010; const ACCESS3_EXECUTE = 0x0020; struct ACCESS3args { nfs_fh3 object; uint32 access; }; struct ACCESS3resok { post_op_attr obj_attributes; uint32 access; }; struct ACCESS3resfail { post_op_attr obj_attributes; }; union ACCESS3res switch (nfsstat3 status) { case NFS3_OK: ACCESS3resok resok; default: ACCESS3resfail resfail; }; /* * Arguments to readlink (v3). */ struct READLINK3args { nfs_fh3 symlink; }; struct READLINK3resok { post_op_attr symlink_attributes; nfspath3 data; }; struct READLINK3resfail { post_op_attr symlink_attributes; }; union READLINK3res switch (nfsstat3 status) { case NFS3_OK: READLINK3resok resok; default: READLINK3resfail resfail; }; /* * Arguments to read (v3). */ struct READ3args { nfs_fh3 file; offset3 offset; count3 count; }; struct READ3resok { post_op_attr file_attributes; count3 count; bool eof; opaque data<>; }; struct READ3resfail { post_op_attr file_attributes; }; /* XXX: solaris 2.6 uses ``nfsstat'' here */ union READ3res switch (nfsstat3 status) { case NFS3_OK: READ3resok resok; default: READ3resfail resfail; }; /* * Arguments to write (v3). */ enum stable_how { UNSTABLE = 0, DATA_SYNC = 1, FILE_SYNC = 2 }; struct WRITE3args { nfs_fh3 file; offset3 offset; count3 count; stable_how stable; opaque data<>; }; struct WRITE3resok { wcc_data file_wcc; count3 count; stable_how committed; writeverf3 verf; }; struct WRITE3resfail { wcc_data file_wcc; }; union WRITE3res switch (nfsstat3 status) { case NFS3_OK: WRITE3resok resok; default: WRITE3resfail resfail; }; /* * Arguments to create (v3). */ enum createmode3 { UNCHECKED = 0, GUARDED = 1, EXCLUSIVE = 2 }; union createhow3 switch (createmode3 mode) { case UNCHECKED: case GUARDED: sattr3 obj_attributes; case EXCLUSIVE: createverf3 verf; }; struct CREATE3args { diropargs3 where; createhow3 how; }; struct CREATE3resok { post_op_fh3 obj; post_op_attr obj_attributes; wcc_data dir_wcc; }; struct CREATE3resfail { wcc_data dir_wcc; }; union CREATE3res switch (nfsstat3 status) { case NFS3_OK: CREATE3resok resok; default: CREATE3resfail resfail; }; /* * Arguments to mkdir (v3). */ struct MKDIR3args { diropargs3 where; sattr3 attributes; }; struct MKDIR3resok { post_op_fh3 obj; post_op_attr obj_attributes; wcc_data dir_wcc; }; struct MKDIR3resfail { wcc_data dir_wcc; }; union MKDIR3res switch (nfsstat3 status) { case NFS3_OK: MKDIR3resok resok; default: MKDIR3resfail resfail; }; /* * Arguments to symlink (v3). */ struct symlinkdata3 { sattr3 symlink_attributes; nfspath3 symlink_data; }; struct SYMLINK3args { diropargs3 where; symlinkdata3 symlink; }; struct SYMLINK3resok { post_op_fh3 obj; post_op_attr obj_attributes; wcc_data dir_wcc; }; struct SYMLINK3resfail { wcc_data dir_wcc; }; union SYMLINK3res switch (nfsstat3 status) { case NFS3_OK: SYMLINK3resok resok; default: SYMLINK3resfail resfail; }; /* * Arguments to mknod (v3). */ struct devicedata3 { sattr3 dev_attributes; specdata3 spec; }; union mknoddata3 switch (ftype3 type) { case NF3CHR: case NF3BLK: devicedata3 device; case NF3SOCK: case NF3FIFO: sattr3 pipe_attributes; default: void; }; struct MKNOD3args { diropargs3 where; mknoddata3 what; }; struct MKNOD3resok { post_op_fh3 obj; post_op_attr obj_attributes; wcc_data dir_wcc; }; struct MKNOD3resfail { wcc_data dir_wcc; }; union MKNOD3res switch (nfsstat3 status) { case NFS3_OK: MKNOD3resok resok; default: MKNOD3resfail resfail; }; /* * Arguments to remove (v3). */ struct REMOVE3args { diropargs3 object; }; struct REMOVE3resok { wcc_data dir_wcc; }; struct REMOVE3resfail { wcc_data dir_wcc; }; union REMOVE3res switch (nfsstat3 status) { case NFS3_OK: REMOVE3resok resok; default: REMOVE3resfail resfail; }; /* * Arguments to rmdir (v3). */ struct RMDIR3args { diropargs3 object; }; struct RMDIR3resok { wcc_data dir_wcc; }; struct RMDIR3resfail { wcc_data dir_wcc; }; union RMDIR3res switch (nfsstat3 status) { case NFS3_OK: RMDIR3resok resok; default: RMDIR3resfail resfail; }; /* * Arguments to rename (v3). */ struct RENAME3args { diropargs3 from; diropargs3 to; }; struct RENAME3resok { wcc_data fromdir_wcc; wcc_data todir_wcc; }; struct RENAME3resfail { wcc_data fromdir_wcc; wcc_data todir_wcc; }; union RENAME3res switch (nfsstat3 status) { case NFS3_OK: RENAME3resok resok; default: RENAME3resfail resfail; }; /* * Arguments to link (v3). */ struct LINK3args { nfs_fh3 file; diropargs3 link; }; struct LINK3resok { post_op_attr file_attributes; wcc_data linkdir_wcc; }; struct LINK3resfail { post_op_attr file_attributes; wcc_data linkdir_wcc; }; union LINK3res switch (nfsstat3 status) { case NFS3_OK: LINK3resok resok; default: LINK3resfail resfail; }; /* * Arguments to readdir (v3). */ struct READDIR3args { nfs_fh3 dir; cookie3 cookie; cookieverf3 cookieverf; count3 count; }; struct entry3 { fileid3 fileid; filename3 name; cookie3 cookie; entry3 *nextentry; }; struct dirlist3 { entry3 *entries; bool eof; }; struct READDIR3resok { post_op_attr dir_attributes; cookieverf3 cookieverf; dirlist3 reply; }; struct READDIR3resfail { post_op_attr dir_attributes; }; union READDIR3res switch (nfsstat3 status) { case NFS3_OK: READDIR3resok resok; default: READDIR3resfail resfail; }; /* * Arguments to readdirplus (v3). */ struct READDIRPLUS3args { nfs_fh3 dir; cookie3 cookie; cookieverf3 cookieverf; count3 dircount; count3 maxcount; }; struct entryplus3 { fileid3 fileid; filename3 name; cookie3 cookie; post_op_attr name_attributes; post_op_fh3 name_handle; entryplus3 *nextentry; }; struct dirlistplus3 { entryplus3 *entries; bool eof; }; struct READDIRPLUS3resok { post_op_attr dir_attributes; cookieverf3 cookieverf; dirlistplus3 reply; }; struct READDIRPLUS3resfail { post_op_attr dir_attributes; }; union READDIRPLUS3res switch (nfsstat3 status) { case NFS3_OK: READDIRPLUS3resok resok; default: READDIRPLUS3resfail resfail; }; /* * Arguments to fsstat (v3). */ struct FSSTAT3args { nfs_fh3 fsroot; }; struct FSSTAT3resok { post_op_attr obj_attributes; size3 tbytes; size3 fbytes; size3 abytes; size3 tfiles; size3 ffiles; size3 afiles; uint32 invarsec; }; struct FSSTAT3resfail { post_op_attr obj_attributes; }; union FSSTAT3res switch (nfsstat3 status) { case NFS3_OK: FSSTAT3resok resok; default: FSSTAT3resfail resfail; }; /* * Arguments to fsinfo (v3). */ const FSF3_LINK = 0x0001; const FSF3_SYMLINK = 0x0002; const FSF3_HOMOGENEOUS = 0x0008; const FSF3_CANSETTIME = 0x0010; struct FSINFO3args { nfs_fh3 fsroot; }; struct FSINFO3resok { post_op_attr obj_attributes; uint32 rtmax; uint32 rtpref; uint32 rtmult; uint32 wtmax; uint32 wtpref; uint32 wtmult; uint32 dtpref; size3 maxfilesize; nfstime3 time_delta; uint32 properties; }; struct FSINFO3resfail { post_op_attr obj_attributes; }; union FSINFO3res switch (nfsstat3 status) { case NFS3_OK: FSINFO3resok resok; default: FSINFO3resfail resfail; }; /* * Arguments to pathconf (v3). */ struct PATHCONF3args { nfs_fh3 object; }; struct PATHCONF3resok { post_op_attr obj_attributes; uint32 linkmax; uint32 name_max; bool no_trunc; bool chown_restricted; bool case_insensitive; bool case_preserving; }; struct PATHCONF3resfail { post_op_attr obj_attributes; }; union PATHCONF3res switch (nfsstat3 status) { case NFS3_OK: PATHCONF3resok resok; default: PATHCONF3resfail resfail; }; /* * Arguments to commit (v3). */ struct COMMIT3args { nfs_fh3 file; offset3 offset; count3 count; }; struct COMMIT3resok { wcc_data file_wcc; writeverf3 verf; }; struct COMMIT3resfail { wcc_data file_wcc; }; union COMMIT3res switch (nfsstat3 status) { case NFS3_OK: COMMIT3resok resok; default: COMMIT3resfail resfail; }; #endif /* WANT_NFS3 */ /* * Remote file service routines */ program NFS_PROGRAM { version NFS_VERSION { void NFSPROC_NULL(void) = 0; attrstat NFSPROC_GETATTR(nfs_fh) = 1; attrstat NFSPROC_SETATTR(sattrargs) = 2; void NFSPROC_ROOT(void) = 3; diropres NFSPROC_LOOKUP(diropargs) = 4; readlinkres NFSPROC_READLINK(nfs_fh) = 5; readres NFSPROC_READ(readargs) = 6; void NFSPROC_WRITECACHE(void) = 7; attrstat NFSPROC_WRITE(writeargs) = 8; diropres NFSPROC_CREATE(createargs) = 9; nfsstat NFSPROC_REMOVE(diropargs) = 10; nfsstat NFSPROC_RENAME(renameargs) = 11; nfsstat NFSPROC_LINK(linkargs) = 12; nfsstat NFSPROC_SYMLINK(symlinkargs) = 13; diropres NFSPROC_MKDIR(createargs) = 14; nfsstat NFSPROC_RMDIR(diropargs) = 15; readdirres NFSPROC_READDIR(readdirargs) = 16; statfsres NFSPROC_STATFS(nfs_fh) = 17; } = 2; } = 100003; #ifdef WANT_NFS3 program NFS3_PROGRAM { version NFS_V3 { void NFSPROC3_NULL(void) = 0; GETATTR3res NFSPROC3_GETATTR(GETATTR3args) = 1; SETATTR3res NFSPROC3_SETATTR(SETATTR3args) = 2; LOOKUP3res NFSPROC3_LOOKUP(LOOKUP3args) = 3; ACCESS3res NFSPROC3_ACCESS(ACCESS3args) = 4; READLINK3res NFSPROC3_READLINK(READLINK3args) = 5; READ3res NFSPROC3_READ(READ3args) = 6; WRITE3res NFSPROC3_WRITE(WRITE3args) = 7; CREATE3res NFSPROC3_CREATE(CREATE3args) = 8; MKDIR3res NFSPROC3_MKDIR(MKDIR3args) = 9; SYMLINK3res NFSPROC3_SYMLINK(SYMLINK3args) = 10; MKNOD3res NFSPROC3_MKNOD(MKNOD3args) = 11; REMOVE3res NFSPROC3_REMOVE(REMOVE3args) = 12; RMDIR3res NFSPROC3_RMDIR(RMDIR3args) = 13; RENAME3res NFSPROC3_RENAME(RENAME3args) = 14; LINK3res NFSPROC3_LINK(LINK3args) = 15; READDIR3res NFSPROC3_READDIR(READDIR3args) = 16; READDIRPLUS3res NFSPROC3_READDIRPLUS(READDIRPLUS3args) = 17; FSSTAT3res NFSPROC3_FSSTAT(FSSTAT3args) = 18; FSINFO3res NFSPROC3_FSINFO(FSINFO3args) = 19; PATHCONF3res NFSPROC3_PATHCONF(PATHCONF3args) = 20; COMMIT3res NFSPROC3_COMMIT(COMMIT3args) = 21; } = 3; } = 100003; #endif diff --git a/include/rpcsvc/nis.x b/include/rpcsvc/nis.x index ee822d039b86..bd1e61828dec 100644 --- a/include/rpcsvc/nis.x +++ b/include/rpcsvc/nis.x @@ -1,460 +1,459 @@ %/*- % * Copyright (c) 2010, Oracle America, Inc. % * % * Redistribution and use in source and binary forms, with or without % * modification, are permitted provided that the following conditions are % * met: % * % * * Redistributions of source code must retain the above copyright % * notice, this list of conditions and the following disclaimer. % * * 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. % * * Neither the name of the "Oracle America, Inc." 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 COPYRIGHT HOLDERS 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 % * COPYRIGHT HOLDER 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. % */ #ifndef RPC_HDR %#include -%__FBSDID("$FreeBSD$"); #endif /* * From 4.1 : @(#)nis.x 1.61 Copyright 1989 Sun Microsystems * * RPC Language Protocol description file for NIS Plus * This version : 1.61 * Last Modified : 3/19/91 */ #ifdef RPC_HDR %/* % * nis.h % * % * This file is the main include file for NIS clients. It contains % * both the client library function defines and the various data % * structures used by the NIS service. It includes the file nis_tags.h % * which defines the tag values. This allows the tags to change without % * having to change the nis.x file. % * % * NOTE : DO NOT EDIT THIS FILE! It is automatically generated when % * rpcgen is run on the nis.x file. Note that there is a % * simple sed script to remove some unneeded lines. (See the % * Makefile target nis.h) % * % */ %#include #endif /* This gets stuffed into the source files. */ #if RPC_HDR %#include #endif /* * This is just pointless. */ #ifdef SUN_STUPIDITY #if RPC_SVC %#include "nis_svc.h" #endif #endif /* Include the RPC Language description of NIS objects */ #include "nis_object.x" /* Errors that can be returned by the service */ enum nis_error { NIS_SUCCESS = 0, /* A-ok, let's rock n roll */ NIS_S_SUCCESS = 1, /* Name found (maybe) */ NIS_NOTFOUND = 2, /* Name definitely not found */ NIS_S_NOTFOUND = 3, /* Name maybe not found */ NIS_CACHEEXPIRED = 4, /* Name exists but cache out of date */ NIS_NAMEUNREACHABLE = 5, /* Can't get there from here */ NIS_UNKNOWNOBJ = 6, /* Object type is bogus */ NIS_TRYAGAIN = 7, /* I'm busy, call back */ NIS_SYSTEMERROR = 8, /* Out of band failure */ NIS_CHAINBROKEN = 9, /* First/Next warning */ NIS_PERMISSION = 10, /* Not enough permission to access */ NIS_NOTOWNER = 11, /* You don't own it, sorry */ NIS_NOT_ME = 12, /* I don't serve this name */ NIS_NOMEMORY = 13, /* Outta VM! Help! */ NIS_NAMEEXISTS = 14, /* Can't create over another name */ NIS_NOTMASTER = 15, /* I'm justa secondaray, don't ask me */ NIS_INVALIDOBJ = 16, /* Object is broken somehow */ NIS_BADNAME = 17, /* Unparsable name */ NIS_NOCALLBACK = 18, /* Couldn't talk to call back proc */ NIS_CBRESULTS = 19, /* Results being called back to you */ NIS_NOSUCHNAME = 20, /* Name unknown */ NIS_NOTUNIQUE = 21, /* Value is not uniques (entry) */ NIS_IBMODERROR = 22, /* Inf. Base. Modify error. */ NIS_NOSUCHTABLE = 23, /* Name for table was wrong */ NIS_TYPEMISMATCH = 24, /* Entry and table type mismatch */ NIS_LINKNAMEERROR = 25, /* Link points to bogus name */ NIS_PARTIAL = 26, /* Partial success, found table */ NIS_TOOMANYATTRS = 27, /* Too many attributes */ NIS_RPCERROR = 28, /* RPC error encountered */ NIS_BADATTRIBUTE = 29, /* Bad or invalid attribute */ NIS_NOTSEARCHABLE = 30, /* Non-searchable object searched */ NIS_CBERROR = 31, /* Error during callback (svc crash) */ NIS_FOREIGNNS = 32, /* Foreign Namespace */ NIS_BADOBJECT = 33, /* Malformed object structure */ NIS_NOTSAMEOBJ = 34, /* Object swapped during deletion */ NIS_MODFAIL = 35, /* Failure during a Modify. */ NIS_BADREQUEST = 36, /* Illegal query for table */ NIS_NOTEMPTY = 37, /* Attempt to remove a non-empty tbl */ NIS_COLDSTART_ERR = 38, /* Error accesing the cold start file */ NIS_RESYNC = 39, /* Transaction log too far out of date */ NIS_FAIL = 40, /* NIS operation failed. */ NIS_UNAVAIL = 41, /* NIS+ service is unavailable (client) */ NIS_RES2BIG = 42, /* NIS+ result too big for datagram */ NIS_SRVAUTH = 43, /* NIS+ server wasn't authenticated. */ NIS_CLNTAUTH = 44, /* NIS+ Client wasn't authenticated. */ NIS_NOFILESPACE = 45, /* NIS+ server ran out of disk space */ NIS_NOPROC = 46, /* NIS+ server couldn't create new proc */ NIS_DUMPLATER = 47 /* NIS+ server already has dump child */ }; /* * Structure definitions for the parameters and results of the actual * NIS RPC calls. * * This is the standard result (in the protocol) of most of the nis * requests. */ struct nis_result { nis_error status; /* Status of the response */ nis_object objects<>; /* objects found */ netobj cookie; /* Cookie Data */ u_long zticks; /* server ticks */ u_long dticks; /* DBM ticks. */ u_long aticks; /* Cache (accel) ticks */ u_long cticks; /* Client ticks */ }; /* * A Name Service request * This request is used to access the name space, ns_name is the name * of the object within the namespace and the object is it's value, for * add/modify, a copy of the original for remove. */ struct ns_request { nis_name ns_name; /* Name in the NIS name space */ nis_object ns_object<1>; /* Optional Object (add/remove) */ }; /* * An information base request * This request includes the NIS name of the table we wish to search, the * search criteria in the form of attribute/value pairs and an optional * callback program number. If the callback program number is provided * the server will send back objects one at a time, otherwise it will * return them all in the response. */ struct ib_request { nis_name ibr_name; /* The name of the Table */ nis_attr ibr_srch<>; /* The search critereia */ u_long ibr_flags; /* Optional flags */ nis_object ibr_obj<1>; /* optional object (add/modify) */ nis_server ibr_cbhost<1>; /* Optional callback info */ u_long ibr_bufsize; /* Optional first/next bufsize */ netobj ibr_cookie; /* The first/next cookie */ }; /* * This argument to the PING call notifies the replicas that something in * a directory has changed and this is it's timestamp. The replica will use * the timestamp to determine if its resync operation was successful. */ struct ping_args { nis_name dir; /* Directory that had the change */ u_long stamp; /* timestamp of the transaction */ }; /* * These are the type of entries that are stored in the transaction log, * note that modifications will appear as two entries, for names, they have * an "OLD" entry followed by a "NEW" entry. For entries in tables, there * is a remove followed by an add. It is done this way so that we can read * the log backwards to back out transactions and forwards to propagate * updates. */ enum log_entry_t { LOG_NOP = 0, ADD_NAME = 1, /* Name Added to name space */ REM_NAME = 2, /* Name removed from name space */ MOD_NAME_OLD = 3, /* Name was modified in the name space */ MOD_NAME_NEW = 4, /* Name was modified in the name space */ ADD_IBASE = 5, /* Entry added to information base */ REM_IBASE = 6, /* Entry removed from information base */ MOD_IBASE = 7, /* Entry was modified in information base */ UPD_STAMP = 8 /* Update timestamp (used as fenceposts) */ }; /* * This result is returned from the name service when it is requested to * dump logged entries from its transaction log. Information base updates * will have the name of the information base in the le_name field and * a canonical set of attribute/value pairs to fully specify the entry's * 'name'. */ struct log_entry { u_long le_time; /* Time in seconds */ log_entry_t le_type; /* Type of log entry */ nis_name le_princp; /* Principal making the change */ nis_name le_name; /* Name of table/dir involved */ nis_attr le_attrs<>; /* List of AV pairs. */ nis_object le_object; /* Actual object value */ }; struct log_result { nis_error lr_status; /* The status itself */ netobj lr_cookie; /* Used by the dump callback */ log_entry lr_entries<>; /* zero or more entries */ }; struct cp_result { nis_error cp_status; /* Status of the checkpoint */ u_long cp_zticks; /* Service 'ticks' */ u_long cp_dticks; /* Database 'ticks' */ }; /* * This structure defines a generic NIS tag list. The taglist contains * zero or tags, each of which is a type and a value. (u_long). * These are used to report statistics (see tag definitions below) * and to set or reset state variables. */ struct nis_tag { u_long tag_type; /* Statistic tag (may vary) */ string tag_val<1024>; /* Statistic value may also vary */ }; struct nis_taglist { nis_tag tags<>; /* List of tags */ }; struct dump_args { nis_name da_dir; /* Directory to dump */ u_long da_time; /* From this timestamp */ nis_server da_cbhost<1>; /* Callback to use. */ }; struct fd_args { nis_name dir_name; /* The directory we're looking for */ nis_name requester; /* Host principal name for signature */ }; struct fd_result { nis_error status; /* Status returned by function */ nis_name source; /* Source of this answer */ opaque dir_data<>; /* Directory Data (XDR'ed) */ opaque signature<>; /* Signature of the source */ }; /* * What's going on here? Well, it's like this. When the service * is being compiled it wants to have the service definition specific * info included, and when the client is being compiled it wants that * info. This includes the appropriate file which was generated by * make in the protocols directory (probably /usr/include/rpcsvc). * * Uhm... guys? With RPC, you aren't supposed to have separate * server-specific and client-specific header files. You have one header * file that's suitable for both. If your code doesn't work using just * the one header file, I submit to you that it's broken. * -Bill */ #ifdef SUN_STUPIDITY #ifdef RPC_SVC %#include "nis_svc.h" #endif #ifdef RPC_CLNT %#include "nis_clnt.h" #endif #endif program NIS_PROG { /* RPC Language description of the NIS+ protocol */ version NIS_VERSION { /* The name service functions */ nis_result NIS_LOOKUP(ns_request) = 1; nis_result NIS_ADD(ns_request) = 2; nis_result NIS_MODIFY(ns_request) = 3; nis_result NIS_REMOVE(ns_request) = 4; /* The information base functions */ nis_result NIS_IBLIST(ib_request) = 5; nis_result NIS_IBADD(ib_request) = 6; nis_result NIS_IBMODIFY(ib_request) = 7; nis_result NIS_IBREMOVE(ib_request) = 8; nis_result NIS_IBFIRST(ib_request) = 9; nis_result NIS_IBNEXT(ib_request) = 10; /* NIS Administrative functions */ fd_result NIS_FINDDIRECTORY(fd_args) = 12; /* If fetch and optionally reset statistics */ nis_taglist NIS_STATUS(nis_taglist) = 14; /* Dump changes to directory since time in da_time */ log_result NIS_DUMPLOG(dump_args) = 15; /* Dump contents of directory named */ log_result NIS_DUMP(dump_args) = 16; /* Check status of callback thread */ bool NIS_CALLBACK(netobj) = 17; /* Return last update time for named dir */ u_long NIS_CPTIME(nis_name) = 18; /* Checkpoint directory or table named */ cp_result NIS_CHECKPOINT(nis_name) = 19; /* Send 'status changed' ping to replicates */ void NIS_PING(ping_args) = 20; /* Modify server behaviour (such as debugging) */ nis_taglist NIS_SERVSTATE(nis_taglist) = 21; /* Create a Directory */ nis_error NIS_MKDIR(nis_name) = 22; /* Remove a Directory */ nis_error NIS_RMDIR(nis_name) = 23; /* Update public keys of a directory object */ nis_error NIS_UPDKEYS(nis_name) = 24; } = 3; } = 100300; /* * Included below are the defines that become part of nis.h, * they are technically not part of the protocol, but do define * key aspects of the implementation and are therefore useful * in building a conforming server or client. */ #if RPC_HDR %/* % * Generic "hash" datastructures, used by all types of hashed data. % */ %struct nis_hash_data { % nis_name name; /* NIS name of hashed item */ % int keychain; /* It's hash key (for pop) */ % struct nis_hash_data *next; /* Hash collision pointer */ % struct nis_hash_data *prv_item; /* A serial, doubly linked list */ % struct nis_hash_data *nxt_item; /* of items in the hash table */ %}; %typedef struct nis_hash_data NIS_HASH_ITEM; % %struct nis_hash_table { % NIS_HASH_ITEM *keys[64]; /* A hash table of items */ % NIS_HASH_ITEM *first; /* The first "item" in serial list */ %}; %typedef struct nis_hash_table NIS_HASH_TABLE; % %/* Structure for storing dynamically allocated static data */ %struct nis_sdata { % void *buf; /* Memory allocation pointer */ % u_long size; /* Buffer size */ %}; % %/* Generic client creating flags */ %#define ZMH_VC 1 %#define ZMH_DG 2 %#define ZMH_AUTH 4 % %/* Testing Access rights for objects */ % %#define NIS_READ_ACC 1 %#define NIS_MODIFY_ACC 2 %#define NIS_CREATE_ACC 4 %#define NIS_DESTROY_ACC 8 %/* Test macros. a == access rights, m == desired rights. */ %#define WORLD(a, m) (((a) & (m)) != 0) %#define GROUP(a, m) (((a) & ((m) << 8)) != 0) %#define OWNER(a, m) (((a) & ((m) << 16)) != 0) %#define NOBODY(a, m) (((a) & ((m) << 24)) != 0) % %#define OATYPE(d, n) (((d)->do_armask.do_armask_val+n)->oa_otype) %#define OARIGHTS(d, n) (((d)->do_armask.do_armask_val+n)->oa_rights) %#define WORLD_DEFAULT (NIS_READ_ACC) %#define GROUP_DEFAULT (NIS_READ_ACC << 8) %#define OWNER_DEFAULT ((NIS_READ_ACC + NIS_MODIFY_ACC + NIS_CREATE_ACC + NIS_DESTROY_ACC) << 16) %#define DEFAULT_RIGHTS (WORLD_DEFAULT | GROUP_DEFAULT | OWNER_DEFAULT) % %/* Result manipulation defines ... */ %#define NIS_RES_NUMOBJ(x) ((x)->objects.objects_len) %#define NIS_RES_OBJECT(x) ((x)->objects.objects_val) %#define NIS_RES_COOKIE(x) ((x)->cookie) %#define NIS_RES_STATUS(x) ((x)->status) % %/* These defines make getting at the variant part of the object easier. */ %#define TA_data zo_data.objdata_u.ta_data %#define EN_data zo_data.objdata_u.en_data %#define DI_data zo_data.objdata_u.di_data %#define LI_data zo_data.objdata_u.li_data %#define GR_data zo_data.objdata_u.gr_data % %#define __type_of(o) ((o)->zo_data.zo_type) % %/* Declarations for the internal subroutines in nislib.c */ %enum name_pos {SAME_NAME, HIGHER_NAME, LOWER_NAME, NOT_SEQUENTIAL, BAD_NAME}; %typedef enum name_pos name_pos; % %/* % * Defines for getting at column data in entry objects. Because RPCGEN % * generates some rather wordy structures, we create some defines that % * collapse the needed keystrokes to access a particular value using % * these definitions they take an nis_object *, and an int and return % * a u_char * for Value, and an int for length. % */ %#define ENTRY_VAL(obj, col) (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val %#define ENTRY_LEN(obj, col) (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len % %#ifdef __cplusplus %} %#endif % %/* Prototypes, and extern declarations for the NIS library functions. */ %#include %#endif /* __NIS_RPCGEN_H */ %/* EDIT_START */ % %/* % * nis_3.h % * % * This file contains definitions that are only of interest to the actual % * service daemon and client stubs. Normal users of NIS will not include % * this file. % * % * NOTE : This include file is automatically created by a combination % * of rpcgen and sed. DO NOT EDIT IT, change the nis.x file instead % * and then remake this file. % */ %#ifndef __nis_3_h %#define __nis_3_h %#ifdef __cplusplus %extern "C" { %#endif #endif diff --git a/include/rpcsvc/nis_cache.x b/include/rpcsvc/nis_cache.x index 6edaea92c38b..e55173994c13 100644 --- a/include/rpcsvc/nis_cache.x +++ b/include/rpcsvc/nis_cache.x @@ -1,85 +1,84 @@ %/* % * Sun RPC is a product of Sun Microsystems, Inc. and is provided for % * unrestricted use provided that this legend is included on all tape % * media and as a part of the software program in whole or part. Users % * may copy or modify Sun RPC without charge, but are not authorized % * to license or distribute it to anyone else except as part of a product or % * program developed by the user or with the express written consent of % * Sun Microsystems, Inc. % * % * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE % * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR % * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. % * % * Sun RPC is provided with no support and without any obligation on the % * part of Sun Microsystems, Inc. to assist in its use, correction, % * modification or enhancement. % * % * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE % * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC % * OR ANY PART THEREOF. % * % * In no event will Sun Microsystems, Inc. be liable for any lost revenue % * or profits or other special, indirect and consequential damages, even if % * Sun has been advised of the possibility of such damages. % * % * Sun Microsystems, Inc. % * 2550 Garcia Avenue % * Mountain View, California 94043 % */ /* * nis_cache.x * * Copyright (c) 1988-1992 Sun Microsystems Inc * All Rights Reserved. */ /* From: %#pragma ident "@(#)nis_cache.x 1.11 94/05/03 SMI" */ #ifndef RPC_HDR %#include -%__FBSDID("$FreeBSD$"); #endif #ifdef RPC_HDR %#include %#include % %/* default cache file */ %#define CACHEFILE "/var/nis/NIS_SHARED_DIRCACHE" % %/* clients have to read-lock the cache file, and SVR4 locking requires that */ %/* the file be writable, but we don't want a world-writable cache file. */ %/* So... everyone agrees to use a different, world-writable file for the */ %/* locking operations, but the data is in CACHEFILE. */ %#define CACHELOCK "/usr/tmp/.NIS_DIR_CACHELOCK" % %/* the file containing one trusted XDR'ed directory object. % * This has to be present for the system to work. % */ %#define COLD_START_FILE "/var/nis/NIS_COLD_START" % %enum pc_status {HIT, MISS, NEAR_MISS}; % %extern int __nis_debuglevel; % % #endif #ifdef RPC_CLNT #ifdef SOLARIS %#include "../gen/nis_clnt.h" #else %#include "nis.h" #endif #endif program CACHEPROG { version CACHE_VER_1 { void NIS_CACHE_ADD_ENTRY(fd_result) = 1; void NIS_CACHE_REMOVE_ENTRY(directory_obj) = 2; void NIS_CACHE_READ_COLDSTART(void) = 3; void NIS_CACHE_REFRESH_ENTRY(string<>) = 4; } = 1; } = 100301; diff --git a/include/rpcsvc/nis_callback.x b/include/rpcsvc/nis_callback.x index 74a555b4f16b..7b717e918dcc 100644 --- a/include/rpcsvc/nis_callback.x +++ b/include/rpcsvc/nis_callback.x @@ -1,75 +1,74 @@ %/*- % * Copyright (c) 2010, Oracle America, Inc. % * % * Redistribution and use in source and binary forms, with or without % * modification, are permitted provided that the following conditions are % * met: % * % * * Redistributions of source code must retain the above copyright % * notice, this list of conditions and the following disclaimer. % * * 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. % * * Neither the name of the "Oracle America, Inc." 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 COPYRIGHT HOLDERS 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 % * COPYRIGHT HOLDER 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. % */ /* * nis_callback.x * * Copyright (c) 1988-1992 Sun Microsystems Inc * All Rights Reserved. */ /* From: %#pragma ident "@(#)nis_callback.x 1.7 94/05/03 SMI" */ #ifndef RPC_HDR %#include -%__FBSDID("$FreeBSD$"); #endif /* * "@(#)zns_cback.x 1.2 90/09/10 Copyr 1990 Sun Micro" * * RPCL description of the Callback Service. */ #ifdef RPC_HDR %#include #endif #ifdef RPC_XDR #ifdef SOLARIS %#include "nis_clnt.h" #else %#include "nis.h" #endif #endif typedef nis_object *obj_p; struct cback_data { obj_p entries<>; /* List of objects */ }; program CB_PROG { version CB_VERS { bool CBPROC_RECEIVE(cback_data) = 1; void CBPROC_FINISH(void) = 2; void CBPROC_ERROR(nis_error) = 3; } = 1; } = 100302; diff --git a/include/rpcsvc/nlm_prot.x b/include/rpcsvc/nlm_prot.x index 87bf6c844359..f53d81996801 100644 --- a/include/rpcsvc/nlm_prot.x +++ b/include/rpcsvc/nlm_prot.x @@ -1,327 +1,326 @@ /* * Network lock manager protocol definition * Copyright (C) 1986 Sun Microsystems, Inc. * * protocol used between local lock manager and remote lock manager */ #ifdef RPC_HDR %#define LM_MAXSTRLEN 1024 %#define MAXNAMELEN LM_MAXSTRLEN+1 #else %#include %#ifndef lint %/*static char sccsid[] = "from: @(#)nlm_prot.x 1.8 87/09/21 Copyr 1987 Sun Micro";*/ %/*static char sccsid[] = "from: * @(#)nlm_prot.x 2.1 88/08/01 4.0 RPCSRC";*/ %__RCSID("$NetBSD: nlm_prot.x,v 1.6 2000/06/07 14:30:15 bouyer Exp $"); %#endif /* not lint */ -%__FBSDID("$FreeBSD$"); #endif /* * status of a call to the lock manager */ enum nlm_stats { nlm_granted = 0, nlm_denied = 1, nlm_denied_nolocks = 2, nlm_blocked = 3, nlm_denied_grace_period = 4, nlm_deadlck = 5 }; struct nlm_holder { bool exclusive; int svid; netobj oh; unsigned l_offset; unsigned l_len; }; union nlm_testrply switch (nlm_stats stat) { case nlm_denied: struct nlm_holder holder; default: void; }; struct nlm_stat { nlm_stats stat; }; struct nlm_res { netobj cookie; nlm_stat stat; }; struct nlm_testres { netobj cookie; nlm_testrply stat; }; struct nlm_lock { string caller_name; netobj fh; /* identify a file */ netobj oh; /* identify owner of a lock */ int svid; /* generated from pid for svid */ unsigned l_offset; unsigned l_len; }; struct nlm_lockargs { netobj cookie; bool block; bool exclusive; struct nlm_lock alock; bool reclaim; /* used for recovering locks */ int state; /* specify local status monitor state */ }; struct nlm_cancargs { netobj cookie; bool block; bool exclusive; struct nlm_lock alock; }; struct nlm_testargs { netobj cookie; bool exclusive; struct nlm_lock alock; }; struct nlm_unlockargs { netobj cookie; struct nlm_lock alock; }; #ifdef RPC_HDR %/* % * The following enums are actually bit encoded for efficient % * boolean algebra.... DON'T change them..... % */ #endif enum fsh_mode { fsm_DN = 0, /* deny none */ fsm_DR = 1, /* deny read */ fsm_DW = 2, /* deny write */ fsm_DRW = 3 /* deny read/write */ }; enum fsh_access { fsa_NONE = 0, /* for completeness */ fsa_R = 1, /* read only */ fsa_W = 2, /* write only */ fsa_RW = 3 /* read/write */ }; struct nlm_share { string caller_name; netobj fh; netobj oh; fsh_mode mode; fsh_access access; }; struct nlm_shareargs { netobj cookie; nlm_share share; bool reclaim; }; struct nlm_shareres { netobj cookie; nlm_stats stat; int sequence; }; struct nlm_notify { string name; long state; }; #ifdef RPC_HDR %/* definitions for NLM version 4 */ #endif enum nlm4_stats { nlm4_granted = 0, nlm4_denied = 1, nlm4_denied_nolocks = 2, nlm4_blocked = 3, nlm4_denied_grace_period = 4, nlm4_deadlck = 5, nlm4_rofs = 6, nlm4_stale_fh = 7, nlm4_fbig = 8, nlm4_failed = 9 }; struct nlm4_stat { nlm4_stats stat; }; struct nlm4_holder { bool exclusive; u_int32_t svid; netobj oh; u_int64_t l_offset; u_int64_t l_len; }; struct nlm4_lock { string caller_name; netobj fh; netobj oh; u_int32_t svid; u_int64_t l_offset; u_int64_t l_len; }; struct nlm4_share { string caller_name; netobj fh; netobj oh; fsh_mode mode; fsh_access access; }; union nlm4_testrply switch (nlm4_stats stat) { case nlm_denied: struct nlm4_holder holder; default: void; }; struct nlm4_testres { netobj cookie; nlm4_testrply stat; }; struct nlm4_testargs { netobj cookie; bool exclusive; struct nlm4_lock alock; }; struct nlm4_res { netobj cookie; nlm4_stat stat; }; struct nlm4_lockargs { netobj cookie; bool block; bool exclusive; struct nlm4_lock alock; bool reclaim; /* used for recovering locks */ int state; /* specify local status monitor state */ }; struct nlm4_cancargs { netobj cookie; bool block; bool exclusive; struct nlm4_lock alock; }; struct nlm4_unlockargs { netobj cookie; struct nlm4_lock alock; }; struct nlm4_shareargs { netobj cookie; nlm4_share share; bool reclaim; }; struct nlm4_shareres { netobj cookie; nlm4_stats stat; int sequence; }; /* * argument for the procedure called by rpc.statd when a monitored host * status change. * XXX assumes LM_MAXSTRLEN == SM_MAXSTRLEN */ struct nlm_sm_status { string mon_name; /* name of host */ int state; /* new state */ opaque priv[16]; /* private data */ }; struct nlm4_notify { string name; int32_t state; }; /* * Over-the-wire protocol used between the network lock managers */ program NLM_PROG { version NLM_SM { void NLM_SM_NOTIFY(struct nlm_sm_status) = 1; } = 0; version NLM_VERS { nlm_testres NLM_TEST(struct nlm_testargs) = 1; nlm_res NLM_LOCK(struct nlm_lockargs) = 2; nlm_res NLM_CANCEL(struct nlm_cancargs) = 3; nlm_res NLM_UNLOCK(struct nlm_unlockargs) = 4; /* * remote lock manager call-back to grant lock */ nlm_res NLM_GRANTED(struct nlm_testargs)= 5; /* * message passing style of requesting lock */ void NLM_TEST_MSG(struct nlm_testargs) = 6; void NLM_LOCK_MSG(struct nlm_lockargs) = 7; void NLM_CANCEL_MSG(struct nlm_cancargs) =8; void NLM_UNLOCK_MSG(struct nlm_unlockargs) = 9; void NLM_GRANTED_MSG(struct nlm_testargs) = 10; void NLM_TEST_RES(nlm_testres) = 11; void NLM_LOCK_RES(nlm_res) = 12; void NLM_CANCEL_RES(nlm_res) = 13; void NLM_UNLOCK_RES(nlm_res) = 14; void NLM_GRANTED_RES(nlm_res) = 15; } = 1; version NLM_VERSX { nlm_shareres NLM_SHARE(nlm_shareargs) = 20; nlm_shareres NLM_UNSHARE(nlm_shareargs) = 21; nlm_res NLM_NM_LOCK(nlm_lockargs) = 22; void NLM_FREE_ALL(nlm_notify) = 23; } = 3; version NLM_VERS4 { nlm4_testres NLM4_TEST(nlm4_testargs) = 1; nlm4_res NLM4_LOCK(nlm4_lockargs) = 2; nlm4_res NLM4_CANCEL(nlm4_cancargs) = 3; nlm4_res NLM4_UNLOCK(nlm4_unlockargs) = 4; nlm4_res NLM4_GRANTED(nlm4_testargs) = 5; void NLM4_TEST_MSG(nlm4_testargs) = 6; void NLM4_LOCK_MSG(nlm4_lockargs) = 7; void NLM4_CANCEL_MSG(nlm4_cancargs) = 8; void NLM4_UNLOCK_MSG(nlm4_unlockargs) = 9; void NLM4_GRANTED_MSG(nlm4_testargs) = 10; void NLM4_TEST_RES(nlm4_testres) = 11; void NLM4_LOCK_RES(nlm4_res) = 12; void NLM4_CANCEL_RES(nlm4_res) = 13; void NLM4_UNLOCK_RES(nlm4_res) = 14; void NLM4_GRANTED_RES(nlm4_res) = 15; nlm4_shareres NLM4_SHARE(nlm4_shareargs) = 20; nlm4_shareres NLM4_UNSHARE(nlm4_shareargs) = 21; nlm4_res NLM4_NM_LOCK(nlm4_lockargs) = 22; void NLM4_FREE_ALL(nlm4_notify) = 23; } = 4; } = 100021; diff --git a/include/rpcsvc/pmap_prot.x b/include/rpcsvc/pmap_prot.x index 19a4d8c5a2fd..fb8a3bbde044 100644 --- a/include/rpcsvc/pmap_prot.x +++ b/include/rpcsvc/pmap_prot.x @@ -1,279 +1,278 @@ %/* % * Sun RPC is a product of Sun Microsystems, Inc. and is provided for % * unrestricted use provided that this legend is included on all tape % * media and as a part of the software program in whole or part. Users % * may copy or modify Sun RPC without charge, but are not authorized % * to license or distribute it to anyone else except as part of a product or % * program developed by the user. % * % * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE % * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR % * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. % * % * Sun RPC is provided with no support and without any obligation on the % * part of Sun Microsystems, Inc. to assist in its use, correction, % * modification or enhancement. % * % * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE % * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC % * OR ANY PART THEREOF. % * % * In no event will Sun Microsystems, Inc. be liable for any lost revenue % * or profits or other special, indirect and consequential damages, even if % * Sun has been advised of the possibility of such damages. % * % * Sun Microsystems, Inc. % * 2550 Garcia Avenue % * Mountain View, California 94043 % */ %/* % * Copyright (c) 1984,1989 by Sun Microsystems, Inc. % */ %/* from pmap_prot.x */ #ifdef RPC_HDR % %#pragma ident "@(#)pmap_prot.x 1.6 94/04/29 SMI" %#include -%__FBSDID("$FreeBSD$"); % %#ifndef _KERNEL % #endif /* * Port Mapper Protocol Specification (in RPC Language) * derived from RFC 1057 */ %/* % * Protocol for the local binder service, or pmap. % * % * Copyright (C) 1984, Sun Microsystems, Inc. % * % * The following procedures are supported by the protocol: % * % * PMAPPROC_NULL() returns () % * takes nothing, returns nothing % * % * PMAPPROC_SET(struct pmap) returns (bool_t) % * TRUE is success, FALSE is failure. Registers the tuple % * [prog, vers, prot, port]. % * % * PMAPPROC_UNSET(struct pmap) returns (bool_t) % * TRUE is success, FALSE is failure. Un-registers pair % * [prog, vers]. prot and port are ignored. % * % * PMAPPROC_GETPORT(struct pmap) returns (long unsigned). % * 0 is failure. Otherwise returns the port number where the pair % * [prog, vers] is registered. It may lie! % * % * PMAPPROC_DUMP() RETURNS (struct pmaplist_ptr) % * % * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>) % * RETURNS (port, string<>); % * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, % * encapsulatedargs); % * Calls the procedure on the local machine. If it is not registered, % * this procedure is quite; ie it does not return error information!!! % * This procedure only is supported on rpc/udp and calls via % * rpc/udp. This routine only passes null authentication parameters. % * This file has no interface to xdr routines for PMAPPROC_CALLIT. % * % * The service supports remote procedure calls on udp/ip or tcp/ip socket 111. % */ % const PMAPPORT = 111; /* portmapper port number */ % % %/* % * A mapping of (program, version, protocol) to port number % */ struct pmap { unsigned long pm_prog; unsigned long pm_vers; unsigned long pm_prot; unsigned long pm_port; }; #ifdef RPC_HDR % %typedef pmap PMAP; % #endif % %/* % * Supported values for the "prot" field % */ % const PMAP_IPPROTO_TCP = 6; /* protocol number for TCP/IP */ const PMAP_IPPROTO_UDP = 17; /* protocol number for UDP/IP */ % % %/* % * A list of mappings % * % * Below are two definitions for the pmaplist structure. This is done because % * xdr_pmaplist() is specified to take a struct pmaplist **, rather than a % * struct pmaplist * that rpcgen would produce. One version of the pmaplist % * structure (actually called pm__list) is used with rpcgen, and the other is % * defined only in the header file for compatibility with the specified % * interface. % */ struct pm__list { pmap pml_map; struct pm__list *pml_next; }; typedef pm__list *pmaplist_ptr; /* results of PMAPPROC_DUMP */ #ifdef RPC_HDR % %typedef struct pm__list pmaplist; %typedef struct pm__list PMAPLIST; % %#ifndef __cplusplus %struct pmaplist { % PMAP pml_map; % struct pmaplist *pml_next; %}; %#endif % %#ifdef __cplusplus %extern "C" { %#endif %extern bool_t xdr_pmaplist(XDR *, pmaplist**); %#ifdef __cplusplus %} %#endif % #endif % %/* % * Arguments to callit % */ struct rmtcallargs { unsigned long prog; unsigned long vers; unsigned long proc; opaque args<>; }; #ifdef RPC_HDR % %/* % * Client-side only representation of rmtcallargs structure. % * % * The routine that XDRs the rmtcallargs structure must deal with the % * opaque arguments in the "args" structure. xdr_rmtcall_args() needs to be % * passed the XDR routine that knows the args' structure. This routine % * doesn't need to go over-the-wire (and it wouldn't make sense anyway) since % * the application being called knows the args structure already. So we use a % * different "XDR" structure on the client side, p_rmtcallargs, which includes % * the args' XDR routine. % */ %struct p_rmtcallargs { % u_long prog; % u_long vers; % u_long proc; % struct { % u_int args_len; % char *args_val; % } args; % xdrproc_t xdr_args; /* encodes args */ %}; % #endif /* def RPC_HDR */ % % %/* % * Results of callit % */ struct rmtcallres { unsigned long port; opaque res<>; }; #ifdef RPC_HDR % %/* % * Client-side only representation of rmtcallres structure. % */ %struct p_rmtcallres { % u_long port; % struct { % u_int res_len; % char *res_val; % } res; % xdrproc_t xdr_res; /* decodes res */ %}; % #endif /* def RPC_HDR */ /* * Port mapper procedures */ program PMAPPROG { version PMAPVERS { void PMAPPROC_NULL(void) = 0; bool PMAPPROC_SET(pmap) = 1; bool PMAPPROC_UNSET(pmap) = 2; unsigned long PMAPPROC_GETPORT(pmap) = 3; pmaplist_ptr PMAPPROC_DUMP(void) = 4; rmtcallres PMAPPROC_CALLIT(rmtcallargs) = 5; } = 2; } = 100000; % #ifdef RPC_HDR %#define PMAPVERS_PROTO ((u_long)2) %#define PMAPVERS_ORIG ((u_long)1) % %#else /* ndef _KERNEL */ % %#include % %#ifdef __cplusplus %extern "C" { %#endif % %#define PMAPPORT 111 % %struct pmap { % long unsigned pm_prog; % long unsigned pm_vers; % long unsigned pm_prot; % long unsigned pm_port; %}; %typedef struct pmap PMAP; %extern bool_t xdr_pmap (XDR *, struct pmap *); % %struct pmaplist { % struct pmap pml_map; % struct pmaplist *pml_next; %}; %typedef struct pmaplist PMAPLIST; %typedef struct pmaplist *pmaplist_ptr; % % %#ifdef __cplusplus %} %#endif % %#endif /* ndef _KERNEL */ #endif diff --git a/include/rpcsvc/rex.x b/include/rpcsvc/rex.x index 4d4bda65f283..20cce24e0ffa 100644 --- a/include/rpcsvc/rex.x +++ b/include/rpcsvc/rex.x @@ -1,237 +1,236 @@ /*- * Copyright (c) 2010, Oracle America, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 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. * * Neither the name of the "Oracle America, Inc." 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 COPYRIGHT HOLDERS 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 * COPYRIGHT HOLDER 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. */ /* * Remote execution (rex) protocol specification */ #ifndef RPC_HDR %#ifndef lint %/*static char sccsid[] = "from: @(#)rex.x 1.3 87/09/18 Copyr 1987 Sun Micro";*/ %/*static char sccsid[] = "from: @(#)rex.x 2.1 88/08/01 4.0 RPCSRC";*/ %#endif /* not lint */ %#include -%__FBSDID("$FreeBSD$"); #endif const STRINGSIZE = 1024; typedef string rexstring<1024>; /* * values to pass to REXPROC_SIGNAL */ const SIGINT = 2; /* interrupt */ /* * Values for rst_flags, below */ const REX_INTERACTIVE = 1; /* interactive mode */ struct rex_start { rexstring rst_cmd<>; /* list of command and args */ rexstring rst_host; /* working directory host name */ rexstring rst_fsname; /* working directory file system name */ rexstring rst_dirwithin;/* working directory within file system */ rexstring rst_env<>; /* list of environment */ unsigned int rst_port0; /* port for stdin */ unsigned int rst_port1; /* port for stdout */ unsigned int rst_port2; /* port for stderr */ unsigned int rst_flags; /* options - see const above */ }; struct rex_result { int rlt_stat; /* integer status code */ rexstring rlt_message; /* string message for human consumption */ }; struct sgttyb { unsigned four; /* always equals 4 */ opaque chars[4]; /* chars[0] == input speed */ /* chars[1] == output speed */ /* chars[2] == kill character */ /* chars[3] == erase character */ unsigned flags; }; /* values for speeds above (baud rates) */ const B0 = 0; const B50 = 1; const B75 = 2; const B110 = 3; const B134 = 4; const B150 = 5; const B200 = 6; const B300 = 7; const B600 = 8; const B1200 = 9; const B1800 = 10; const B2400 = 11; const B4800 = 12; const B9600 = 13; const B19200 = 14; const B38400 = 15; /* values for flags above */ const TANDEM = 0x00000001; /* send stopc on out q full */ const CBREAK = 0x00000002; /* half-cooked mode */ const LCASE = 0x00000004; /* simulate lower case */ const ECHO = 0x00000008; /* echo input */ const CRMOD = 0x00000010; /* map \r to \r\n on output */ const RAW = 0x00000020; /* no i/o processing */ const ODDP = 0x00000040; /* get/send odd parity */ const EVENP = 0x00000080; /* get/send even parity */ const ANYP = 0x000000c0; /* get any parity/send none */ const NLDELAY = 0x00000300; /* \n delay */ const NL0 = 0x00000000; const NL1 = 0x00000100; /* tty 37 */ const NL2 = 0x00000200; /* vt05 */ const NL3 = 0x00000300; const TBDELAY = 0x00000c00; /* horizontal tab delay */ const TAB0 = 0x00000000; const TAB1 = 0x00000400; /* tty 37 */ const TAB2 = 0x00000800; const XTABS = 0x00000c00; /* expand tabs on output */ const CRDELAY = 0x00003000; /* \r delay */ const CR0 = 0x00000000; const CR1 = 0x00001000; /* tn 300 */ const CR2 = 0x00002000; /* tty 37 */ const CR3 = 0x00003000; /* concept 100 */ const VTDELAY = 0x00004000; /* vertical tab delay */ const FF0 = 0x00000000; const FF1 = 0x00004000; /* tty 37 */ const BSDELAY = 0x00008000; /* \b delay */ const BS0 = 0x00000000; const BS1 = 0x00008000; const CRTBS = 0x00010000; /* do backspacing for crt */ const PRTERA = 0x00020000; /* \ ... / erase */ const CRTERA = 0x00040000; /* " \b " to wipe out char */ const TILDE = 0x00080000; /* hazeltine tilde kludge */ const MDMBUF = 0x00100000; /* start/stop output on carrier intr */ const LITOUT = 0x00200000; /* literal output */ const TOSTOP = 0x00400000; /* SIGTTOU on background output */ const FLUSHO = 0x00800000; /* flush output to terminal */ const NOHANG = 0x01000000; /* no SIGHUP on carrier drop */ const L001000 = 0x02000000; const CRTKIL = 0x04000000; /* kill line with " \b " */ const PASS8 = 0x08000000; const CTLECH = 0x10000000; /* echo control chars as ^X */ const PENDIN = 0x20000000; /* tp->t_rawq needs reread */ const DECCTQ = 0x40000000; /* only ^Q starts after ^S */ const NOFLSH = 0x80000000; /* no output flush on signal */ struct tchars { unsigned six; /* always equals 6 */ opaque chars[6]; /* chars[0] == interrupt char */ /* chars[1] == quit char */ /* chars[2] == start output char */ /* chars[3] == stop output char */ /* chars[4] == end-of-file char */ /* chars[5] == input delimeter (like nl) */ }; struct ltchars { unsigned six; /* always equals 6 */ opaque chars[6]; /* chars[0] == stop process signal */ /* chars[1] == delayed stop process signal */ /* chars[2] == reprint line */ /* chars[3] == flush output */ /* chars[4] == word erase */ /* chars[5] == literal next character */ unsigned mode; }; struct rex_ttysize { int ts_lines; int ts_cols; }; struct rex_ttymode { sgttyb basic; /* standard unix tty flags */ tchars more; /* interrupt, kill characters, etc. */ ltchars yetmore; /* special Berkeley characters */ unsigned andmore; /* and Berkeley modes */ }; /* values for andmore above */ const LCRTBS = 0x0001; /* do backspacing for crt */ const LPRTERA = 0x0002; /* \ ... / erase */ const LCRTERA = 0x0004; /* " \b " to wipe out char */ const LTILDE = 0x0008; /* hazeltine tilde kludge */ const LMDMBUF = 0x0010; /* start/stop output on carrier intr */ const LLITOUT = 0x0020; /* literal output */ const LTOSTOP = 0x0040; /* SIGTTOU on background output */ const LFLUSHO = 0x0080; /* flush output to terminal */ const LNOHANG = 0x0100; /* no SIGHUP on carrier drop */ const LL001000 = 0x0200; const LCRTKIL = 0x0400; /* kill line with " \b " */ const LPASS8 = 0x0800; const LCTLECH = 0x1000; /* echo control chars as ^X */ const LPENDIN = 0x2000; /* needs reread */ const LDECCTQ = 0x4000; /* only ^Q starts after ^S */ const LNOFLSH = 0x8000; /* no output flush on signal */ program REXPROG { version REXVERS { /* * Start remote execution */ rex_result REXPROC_START(rex_start) = 1; /* * Wait for remote execution to terminate */ rex_result REXPROC_WAIT(void) = 2; /* * Send tty modes */ void REXPROC_MODES(rex_ttymode) = 3; /* * Send window size change */ void REXPROC_WINCH(rex_ttysize) = 4; /* * Send other signal */ void REXPROC_SIGNAL(int) = 5; } = 1; } = 100017; diff --git a/include/rpcsvc/rnusers.x b/include/rpcsvc/rnusers.x index 421a515ac725..1b6dcada2ff1 100644 --- a/include/rpcsvc/rnusers.x +++ b/include/rpcsvc/rnusers.x @@ -1,125 +1,124 @@ /*- * Copyright (c) 2010, Oracle America, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 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. * * Neither the name of the "Oracle America, Inc." 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 COPYRIGHT HOLDERS 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 * COPYRIGHT HOLDER 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. */ /* * Find out about remote users */ #ifndef RPC_HDR %#ifndef lint %/*static char sccsid[] = "from: @(#)rnusers.x 1.2 87/09/20 Copyr 1987 Sun Micro";*/ %/*static char sccsid[] = "from: @(#)rnusers.x 2.1 88/08/01 4.0 RPCSRC";*/ %#endif /* not lint */ %#include -%__FBSDID("$FreeBSD$"); #endif const MAXUSERS = 100; const MAXUTLEN = 256; struct utmp { string ut_line; string ut_name; string ut_host; int ut_time; }; struct utmpidle { utmp ui_utmp; unsigned int ui_idle; }; typedef utmp utmparr; typedef utmpidle utmpidlearr; const RUSERS_MAXUSERLEN = 32; const RUSERS_MAXLINELEN = 32; const RUSERS_MAXHOSTLEN = 257; struct rusers_utmp { string ut_user; /* aka ut_name */ string ut_line; /* device */ string ut_host; /* host user logged on from */ int ut_type; /* type of entry */ int ut_time; /* time entry was made */ unsigned int ut_idle; /* minutes idle */ }; typedef rusers_utmp utmp_array<>; program RUSERSPROG { /* * Old version does not include idle information */ version RUSERSVERS_ORIG { int RUSERSPROC_NUM(void) = 1; utmparr RUSERSPROC_NAMES(void) = 2; utmparr RUSERSPROC_ALLNAMES(void) = 3; } = 1; /* * Includes idle information */ version RUSERSVERS_IDLE { int RUSERSPROC_NUM(void) = 1; utmpidlearr RUSERSPROC_NAMES(void) = 2; utmpidlearr RUSERSPROC_ALLNAMES(void) = 3; } = 2; /* * Version 3 rusers procedures (from Solaris). * (Thanks a lot Sun.) */ version RUSERSVERS_3 { int RUSERSPROC_NUM(void) = 1; utmp_array RUSERSPROC_NAMES(void) = 2; utmp_array RUSERSPROC_ALLNAMES(void) = 3; } = 3; } = 100002; diff --git a/include/rpcsvc/rquota.x b/include/rpcsvc/rquota.x index 8c8dfe452b54..b4ef0d3a6dda 100644 --- a/include/rpcsvc/rquota.x +++ b/include/rpcsvc/rquota.x @@ -1,144 +1,143 @@ /* @(#)rquota.x 2.1 88/08/01 4.0 RPCSRC */ /* @(#)rquota.x 1.2 87/09/20 Copyr 1987 Sun Micro */ /* * Remote quota protocol * Requires unix authentication */ #ifndef RPC_HDR %#include -%__FBSDID("$FreeBSD$"); #endif const RQ_PATHLEN = 1024; struct sq_dqblk { unsigned int rq_bhardlimit; /* absolute limit on disk blks alloc */ unsigned int rq_bsoftlimit; /* preferred limit on disk blks */ unsigned int rq_curblocks; /* current block count */ unsigned int rq_fhardlimit; /* absolute limit on allocated files */ unsigned int rq_fsoftlimit; /* preferred file limit */ unsigned int rq_curfiles; /* current # allocated files */ unsigned int rq_btimeleft; /* time left for excessive disk use */ unsigned int rq_ftimeleft; /* time left for excessive files */ }; struct getquota_args { string gqa_pathp; /* path to filesystem of interest */ int gqa_uid; /* Inquire about quota for uid */ }; struct setquota_args { int sqa_qcmd; string sqa_pathp; /* path to filesystem of interest */ int sqa_id; /* Set quota for uid */ sq_dqblk sqa_dqblk; }; struct ext_getquota_args { string gqa_pathp; /* path to filesystem of interest */ int gqa_type; /* Type of quota info is needed about */ int gqa_id; /* Inquire about quota for id */ }; struct ext_setquota_args { int sqa_qcmd; string sqa_pathp; /* path to filesystem of interest */ int sqa_id; /* Set quota for id */ int sqa_type; /* Type of quota to set */ sq_dqblk sqa_dqblk; }; /* * remote quota structure */ struct rquota { int rq_bsize; /* block size for block counts */ bool rq_active; /* indicates whether quota is active */ unsigned int rq_bhardlimit; /* absolute limit on disk blks alloc */ unsigned int rq_bsoftlimit; /* preferred limit on disk blks */ unsigned int rq_curblocks; /* current block count */ unsigned int rq_fhardlimit; /* absolute limit on allocated files */ unsigned int rq_fsoftlimit; /* preferred file limit */ unsigned int rq_curfiles; /* current # allocated files */ unsigned int rq_btimeleft; /* time left for excessive disk use */ unsigned int rq_ftimeleft; /* time left for excessive files */ }; enum gqr_status { Q_OK = 1, /* quota returned */ Q_NOQUOTA = 2, /* noquota for uid */ Q_EPERM = 3 /* no permission to access quota */ }; union getquota_rslt switch (gqr_status status) { case Q_OK: rquota gqr_rquota; /* valid if status == Q_OK */ case Q_NOQUOTA: void; case Q_EPERM: void; }; union setquota_rslt switch (gqr_status status) { case Q_OK: rquota sqr_rquota; /* valid if status == Q_OK */ case Q_NOQUOTA: void; case Q_EPERM: void; }; program RQUOTAPROG { version RQUOTAVERS { /* * Get all quotas */ getquota_rslt RQUOTAPROC_GETQUOTA(getquota_args) = 1; /* * Get active quotas only */ getquota_rslt RQUOTAPROC_GETACTIVEQUOTA(getquota_args) = 2; /* * Set all quotas */ setquota_rslt RQUOTAPROC_SETQUOTA(setquota_args) = 3; /* * Get active quotas only */ setquota_rslt RQUOTAPROC_SETACTIVEQUOTA(setquota_args) = 4; } = 1; version EXT_RQUOTAVERS { /* * Get all quotas */ getquota_rslt RQUOTAPROC_GETQUOTA(ext_getquota_args) = 1; /* * Get active quotas only */ getquota_rslt RQUOTAPROC_GETACTIVEQUOTA(ext_getquota_args) = 2; /* * Set all quotas */ setquota_rslt RQUOTAPROC_SETQUOTA(ext_setquota_args) = 3; /* * Set active quotas only */ setquota_rslt RQUOTAPROC_SETACTIVEQUOTA(ext_setquota_args) = 4; } = 2; } = 100011; diff --git a/include/rpcsvc/rstat.x b/include/rpcsvc/rstat.x index a34456082afa..1b62470777e8 100644 --- a/include/rpcsvc/rstat.x +++ b/include/rpcsvc/rstat.x @@ -1,160 +1,158 @@ /*- * Copyright (c) 2010, Oracle America, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 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. * * Neither the name of the "Oracle America, Inc." 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 COPYRIGHT HOLDERS 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 * COPYRIGHT HOLDER 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. */ /* * Gather statistics on remote machines */ #ifdef RPC_HDR %#ifndef FSCALE %/* % * Scale factor for scaled integers used to count load averages. % */ %#define FSHIFT 8 /* bits to right of fixed binary point */ %#define FSCALE (1< -%__FBSDID("$FreeBSD$"); - #endif /* def RPC_HDR */ const RSTAT_CPUSTATES = 4; const RSTAT_DK_NDRIVE = 4; /* * GMT since 0:00, January 1, 1970 */ struct rstat_timeval { unsigned int tv_sec; /* seconds */ unsigned int tv_usec; /* and microseconds */ }; struct statstime { /* RSTATVERS_TIME */ int cp_time[RSTAT_CPUSTATES]; int dk_xfer[RSTAT_DK_NDRIVE]; unsigned int v_pgpgin; /* these are cumulative sum */ unsigned int v_pgpgout; unsigned int v_pswpin; unsigned int v_pswpout; unsigned int v_intr; int if_ipackets; int if_ierrors; int if_oerrors; int if_collisions; unsigned int v_swtch; int avenrun[3]; /* scaled by FSCALE */ rstat_timeval boottime; rstat_timeval curtime; int if_opackets; }; struct statsswtch { /* RSTATVERS_SWTCH */ int cp_time[RSTAT_CPUSTATES]; int dk_xfer[RSTAT_DK_NDRIVE]; unsigned int v_pgpgin; /* these are cumulative sum */ unsigned int v_pgpgout; unsigned int v_pswpin; unsigned int v_pswpout; unsigned int v_intr; int if_ipackets; int if_ierrors; int if_oerrors; int if_collisions; unsigned int v_swtch; unsigned int avenrun[3];/* scaled by FSCALE */ rstat_timeval boottime; int if_opackets; }; struct stats { /* RSTATVERS_ORIG */ int cp_time[RSTAT_CPUSTATES]; int dk_xfer[RSTAT_DK_NDRIVE]; unsigned int v_pgpgin; /* these are cumulative sum */ unsigned int v_pgpgout; unsigned int v_pswpin; unsigned int v_pswpout; unsigned int v_intr; int if_ipackets; int if_ierrors; int if_oerrors; int if_collisions; int if_opackets; }; program RSTATPROG { /* * Newest version includes current time and context switching info */ version RSTATVERS_TIME { statstime RSTATPROC_STATS(void) = 1; unsigned int RSTATPROC_HAVEDISK(void) = 2; } = 3; /* * Does not have current time */ version RSTATVERS_SWTCH { statsswtch RSTATPROC_STATS(void) = 1; unsigned int RSTATPROC_HAVEDISK(void) = 2; } = 2; /* * Old version has no info about current time or context switching */ version RSTATVERS_ORIG { stats RSTATPROC_STATS(void) = 1; unsigned int RSTATPROC_HAVEDISK(void) = 2; } = 1; } = 100001; #ifdef RPC_HDR % %enum clnt_stat rstat(char *, struct statstime *); %int havedisk(char *); % #endif diff --git a/include/rpcsvc/sm_inter.x b/include/rpcsvc/sm_inter.x index 42a00915e8f7..a9a69c8b24eb 100644 --- a/include/rpcsvc/sm_inter.x +++ b/include/rpcsvc/sm_inter.x @@ -1,127 +1,126 @@ /* @(#)sm_inter.x 2.2 88/08/01 4.0 RPCSRC */ /* @(#)sm_inter.x 1.7 87/06/24 Copyr 1987 Sun Micro */ /*- * Copyright (c) 2010, Oracle America, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 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. * * Neither the name of the "Oracle America, Inc." 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 COPYRIGHT HOLDERS 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 * COPYRIGHT HOLDER 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. */ /* * Status monitor protocol specification * Copyright (C) 1986 Sun Microsystems, Inc. * */ #ifndef RPC_HDR %#include -%__FBSDID("$FreeBSD$"); #endif program SM_PROG { version SM_VERS { /* res_stat = stat_succ if status monitor agrees to monitor */ /* res_stat = stat_fail if status monitor cannot monitor */ /* if res_stat == stat_succ, state = state number of site sm_name */ struct sm_stat_res SM_STAT(struct sm_name) = 1; /* res_stat = stat_succ if status monitor agrees to monitor */ /* res_stat = stat_fail if status monitor cannot monitor */ /* stat consists of state number of local site */ struct sm_stat_res SM_MON(struct mon) = 2; /* stat consists of state number of local site */ struct sm_stat SM_UNMON(struct mon_id) = 3; /* stat consists of state number of local site */ struct sm_stat SM_UNMON_ALL(struct my_id) = 4; void SM_SIMU_CRASH(void) = 5; void SM_NOTIFY(struct stat_chge) = 6; } = 1; } = 100024; const SM_MAXSTRLEN = 1024; struct sm_name { string mon_name; }; struct my_id { string my_name; /* name of the site iniates the monitoring request*/ int my_prog; /* rpc program # of the requesting process */ int my_vers; /* rpc version # of the requesting process */ int my_proc; /* rpc procedure # of the requesting process */ }; struct mon_id { string mon_name; /* name of the site to be monitored */ struct my_id my_id; }; struct mon{ struct mon_id mon_id; opaque priv[16]; /* private information to store at monitor for requesting process */ }; struct stat_chge { string mon_name; /* name of the site that had the state change */ int state; }; /* * state # of status monitor monitonically increases each time * status of the site changes: * an even number (>= 0) indicates the site is down and * an odd number (> 0) indicates the site is up; */ struct sm_stat { int state; /* state # of status monitor */ }; enum sm_res { stat_succ = 0, /* status monitor agrees to monitor */ stat_fail = 1 /* status monitor cannot monitor */ }; struct sm_stat_res { sm_res res_stat; int state; }; /* * structure of the status message sent back by the status monitor * when monitor site status changes */ struct sm_status { string mon_name; int state; opaque priv[16]; /* stored private information */ }; diff --git a/include/rpcsvc/spray.x b/include/rpcsvc/spray.x index b6a5b849a079..406d318a4943 100644 --- a/include/rpcsvc/spray.x +++ b/include/rpcsvc/spray.x @@ -1,92 +1,91 @@ /*- * Copyright (c) 2010, Oracle America, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 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. * * Neither the name of the "Oracle America, Inc." 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 COPYRIGHT HOLDERS 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 * COPYRIGHT HOLDER 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. */ /* * Spray a server with packets * Useful for testing flakiness of network interfaces */ #ifndef RPC_HDR %#ifndef lint %/*static char sccsid[] = "from: @(#)spray.x 1.2 87/09/18 Copyr 1987 Sun Micro";*/ %/*static char sccsid[] = "from: @(#)spray.x 2.1 88/08/01 4.0 RPCSRC";*/ %#endif /* not lint */ %#include -%__FBSDID("$FreeBSD$"); #endif const SPRAYMAX = 8845; /* max amount can spray */ /* * GMT since 0:00, 1 January 1970 */ struct spraytimeval { unsigned int sec; unsigned int usec; }; /* * spray statistics */ struct spraycumul { unsigned int counter; spraytimeval clock; }; /* * spray data */ typedef opaque sprayarr; program SPRAYPROG { version SPRAYVERS { /* * Just throw away the data and increment the counter * This call never returns, so the client should always * time it out. */ void SPRAYPROC_SPRAY(sprayarr) = 1; /* * Get the value of the counter and elapsed time since * last CLEAR. */ spraycumul SPRAYPROC_GET(void) = 2; /* * Clear the counter and reset the elapsed time */ void SPRAYPROC_CLEAR(void) = 3; } = 1; } = 100012; diff --git a/include/rpcsvc/yp.x b/include/rpcsvc/yp.x index 91614b20486f..d11902c4a279 100644 --- a/include/rpcsvc/yp.x +++ b/include/rpcsvc/yp.x @@ -1,379 +1,378 @@ /* @(#)yp.x 2.1 88/08/01 4.0 RPCSRC */ /*- * Copyright (c) 2010, Oracle America, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 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. * * Neither the name of the "Oracle America, Inc." 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 COPYRIGHT HOLDERS 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 * COPYRIGHT HOLDER 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. */ /* * Protocol description file for the Yellow Pages Service */ #ifndef RPC_HDR %#include -%__FBSDID("$FreeBSD$"); #endif const YPMAXRECORD = 16777216; const YPMAXDOMAIN = 64; const YPMAXMAP = 64; const YPMAXPEER = 64; enum ypstat { YP_TRUE = 1, YP_NOMORE = 2, YP_FALSE = 0, YP_NOMAP = -1, YP_NODOM = -2, YP_NOKEY = -3, YP_BADOP = -4, YP_BADDB = -5, YP_YPERR = -6, YP_BADARGS = -7, YP_VERS = -8 }; enum ypxfrstat { YPXFR_SUCC = 1, YPXFR_AGE = 2, YPXFR_NOMAP = -1, YPXFR_NODOM = -2, YPXFR_RSRC = -3, YPXFR_RPC = -4, YPXFR_MADDR = -5, YPXFR_YPERR = -6, YPXFR_BADARGS = -7, YPXFR_DBM = -8, YPXFR_FILE = -9, YPXFR_SKEW = -10, YPXFR_CLEAR = -11, YPXFR_FORCE = -12, YPXFR_XFRERR = -13, YPXFR_REFUSED = -14 }; typedef string domainname; typedef string mapname; typedef string peername; typedef opaque keydat; typedef opaque valdat; struct ypmap_parms { domainname domain; mapname map; unsigned int ordernum; peername peer; }; struct ypreq_key { domainname domain; mapname map; keydat key; }; struct ypreq_nokey { domainname domain; mapname map; }; struct ypreq_xfr { ypmap_parms map_parms; unsigned int transid; unsigned int prog; unsigned int port; }; struct ypresp_val { ypstat stat; valdat val; }; struct ypresp_key_val { ypstat stat; #ifdef STUPID_SUN_BUG /* These are backwards */ keydat key; valdat val; #else valdat val; keydat key; #endif }; struct ypresp_master { ypstat stat; peername peer; }; struct ypresp_order { ypstat stat; unsigned int ordernum; }; union ypresp_all switch (bool more) { case TRUE: ypresp_key_val val; case FALSE: void; }; struct ypresp_xfr { unsigned int transid; ypxfrstat xfrstat; }; struct ypmaplist { mapname map; ypmaplist *next; }; struct ypresp_maplist { ypstat stat; ypmaplist *maps; }; enum yppush_status { YPPUSH_SUCC = 1, /* Success */ YPPUSH_AGE = 2, /* Master's version not newer */ YPPUSH_NOMAP = -1, /* Can't find server for map */ YPPUSH_NODOM = -2, /* Domain not supported */ YPPUSH_RSRC = -3, /* Local resource alloc failure */ YPPUSH_RPC = -4, /* RPC failure talking to server */ YPPUSH_MADDR = -5, /* Can't get master address */ YPPUSH_YPERR = -6, /* YP server/map db error */ YPPUSH_BADARGS = -7, /* Request arguments bad */ YPPUSH_DBM = -8, /* Local dbm operation failed */ YPPUSH_FILE = -9, /* Local file I/O operation failed */ YPPUSH_SKEW = -10, /* Map version skew during transfer */ YPPUSH_CLEAR = -11, /* Can't send "Clear" req to local ypserv */ YPPUSH_FORCE = -12, /* No local order number in map use -f flag. */ YPPUSH_XFRERR = -13, /* ypxfr error */ YPPUSH_REFUSED = -14 /* Transfer request refused by ypserv */ }; struct yppushresp_xfr { unsigned transid; yppush_status status; }; /* * Response structure and overall result status codes. Success and failure * represent two separate response message types. */ enum ypbind_resptype { YPBIND_SUCC_VAL = 1, YPBIND_FAIL_VAL = 2 }; struct ypbind_binding { opaque ypbind_binding_addr[4]; /* In network order */ opaque ypbind_binding_port[2]; /* In network order */ }; union ypbind_resp switch (ypbind_resptype ypbind_status) { case YPBIND_FAIL_VAL: unsigned ypbind_error; case YPBIND_SUCC_VAL: ypbind_binding ypbind_bindinfo; }; /* Detailed failure reason codes for response field ypbind_error*/ const YPBIND_ERR_ERR = 1; /* Internal error */ const YPBIND_ERR_NOSERV = 2; /* No bound server for passed domain */ const YPBIND_ERR_RESC = 3; /* System resource allocation failure */ /* * Request data structure for ypbind "Set domain" procedure. */ struct ypbind_setdom { domainname ypsetdom_domain; ypbind_binding ypsetdom_binding; unsigned ypsetdom_vers; }; /* * NIS v1 support for backwards compatibility */ enum ypreqtype { YPREQ_KEY = 1, YPREQ_NOKEY = 2, YPREQ_MAP_PARMS = 3 }; enum ypresptype { YPRESP_VAL = 1, YPRESP_KEY_VAL = 2, YPRESP_MAP_PARMS = 3 }; union yprequest switch (ypreqtype yp_reqtype) { case YPREQ_KEY: ypreq_key yp_req_keytype; case YPREQ_NOKEY: ypreq_nokey yp_req_nokeytype; case YPREQ_MAP_PARMS: ypmap_parms yp_req_map_parmstype; }; union ypresponse switch (ypresptype yp_resptype) { case YPRESP_VAL: ypresp_val yp_resp_valtype; case YPRESP_KEY_VAL: ypresp_key_val yp_resp_key_valtype; case YPRESP_MAP_PARMS: ypmap_parms yp_resp_map_parmstype; }; #if !defined(YPBIND_ONLY) && !defined(YPPUSH_ONLY) /* * YP access protocol */ program YPPROG { /* * NIS v1 support for backwards compatibility */ version YPOLDVERS { void YPOLDPROC_NULL(void) = 0; bool YPOLDPROC_DOMAIN(domainname) = 1; bool YPOLDPROC_DOMAIN_NONACK(domainname) = 2; ypresponse YPOLDPROC_MATCH(yprequest) = 3; ypresponse YPOLDPROC_FIRST(yprequest) = 4; ypresponse YPOLDPROC_NEXT(yprequest) = 5; ypresponse YPOLDPROC_POLL(yprequest) = 6; ypresponse YPOLDPROC_PUSH(yprequest) = 7; ypresponse YPOLDPROC_PULL(yprequest) = 8; ypresponse YPOLDPROC_GET(yprequest) = 9; } = 1; version YPVERS { void YPPROC_NULL(void) = 0; bool YPPROC_DOMAIN(domainname) = 1; bool YPPROC_DOMAIN_NONACK(domainname) = 2; ypresp_val YPPROC_MATCH(ypreq_key) = 3; ypresp_key_val #ifdef STUPID_SUN_BUG /* should be ypreq_nokey */ YPPROC_FIRST(ypreq_key) = 4; #else YPPROC_FIRST(ypreq_nokey) = 4; #endif ypresp_key_val YPPROC_NEXT(ypreq_key) = 5; ypresp_xfr YPPROC_XFR(ypreq_xfr) = 6; void YPPROC_CLEAR(void) = 7; ypresp_all YPPROC_ALL(ypreq_nokey) = 8; ypresp_master YPPROC_MASTER(ypreq_nokey) = 9; ypresp_order YPPROC_ORDER(ypreq_nokey) = 10; ypresp_maplist YPPROC_MAPLIST(domainname) = 11; } = 2; } = 100004; #endif #if !defined(YPSERV_ONLY) && !defined(YPBIND_ONLY) /* * YPPUSHPROC_XFRRESP is the callback routine for result of YPPROC_XFR */ program YPPUSH_XFRRESPPROG { version YPPUSH_XFRRESPVERS { void YPPUSHPROC_NULL(void) = 0; #ifdef STUPID_SUN_BUG /* argument and return value are backwards */ yppushresp_xfr YPPUSHPROC_XFRRESP(void) = 1; #else void YPPUSHPROC_XFRRESP(yppushresp_xfr) = 1; #endif } = 1; } = 0x40000000; /* transient: could be anything up to 0x5fffffff */ #endif #if !defined(YPSERV_ONLY) && !defined(YPPUSH_ONLY) /* * YP binding protocol */ program YPBINDPROG { version YPBINDVERS { void YPBINDPROC_NULL(void) = 0; ypbind_resp YPBINDPROC_DOMAIN(domainname) = 1; void YPBINDPROC_SETDOM(ypbind_setdom) = 2; } = 2; } = 100007; #endif diff --git a/include/rpcsvc/yppasswd.x b/include/rpcsvc/yppasswd.x index 1b39a632fa94..2ad2215689f3 100644 --- a/include/rpcsvc/yppasswd.x +++ b/include/rpcsvc/yppasswd.x @@ -1,77 +1,76 @@ /*- * Copyright (c) 2010, Oracle America, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 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. * * Neither the name of the "Oracle America, Inc." 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 COPYRIGHT HOLDERS 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 * COPYRIGHT HOLDER 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. */ /* * YP password update protocol * Requires unix authentication */ #ifndef RPC_HDR %#ifndef lint %/*static char sccsid[] = "from: @(#)yppasswd.x 1.1 87/04/13 Copyr 1987 Sun Micro";*/ %/*static char sccsid[] = "from: @(#)yppasswd.x 2.1 88/08/01 4.0 RPCSRC";*/ %#endif /* not lint */ %#include -%__FBSDID("$FreeBSD$"); #endif program YPPASSWDPROG { version YPPASSWDVERS { /* * Update my passwd entry */ int YPPASSWDPROC_UPDATE(yppasswd) = 1; } = 1; } = 100009; struct x_passwd { string pw_name<>; /* username */ string pw_passwd<>; /* encrypted password */ int pw_uid; /* user id */ int pw_gid; /* group id */ string pw_gecos<>; /* in real life name */ string pw_dir<>; /* home directory */ string pw_shell<>; /* default shell */ }; struct yppasswd { string oldpass<>; /* unencrypted old password */ x_passwd newpw; /* new passwd entry */ }; #ifdef RPC_HDR %#include %extern int _yppasswd( char * , struct x_passwd * ); %#define yppasswd(x,y) _yppasswd(x,y) #endif diff --git a/include/rpcsvc/ypupdate_prot.x b/include/rpcsvc/ypupdate_prot.x index 90648a023e6e..328a07432f0d 100644 --- a/include/rpcsvc/ypupdate_prot.x +++ b/include/rpcsvc/ypupdate_prot.x @@ -1,86 +1,85 @@ %/* % * Sun RPC is a product of Sun Microsystems, Inc. and is provided for % * unrestricted use provided that this legend is included on all tape % * media and as a part of the software program in whole or part. Users % * may copy or modify Sun RPC without charge, but are not authorized % * to license or distribute it to anyone else except as part of a product or % * program developed by the user or with the express written consent of % * Sun Microsystems, Inc. % * % * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE % * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR % * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. % * % * Sun RPC is provided with no support and without any obligation on the % * part of Sun Microsystems, Inc. to assist in its use, correction, % * modification or enhancement. % * % * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE % * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC % * OR ANY PART THEREOF. % * % * In no event will Sun Microsystems, Inc. be liable for any lost revenue % * or profits or other special, indirect and consequential damages, even if % * Sun has been advised of the possibility of such damages. % * % * Sun Microsystems, Inc. % * 2550 Garcia Avenue % * Mountain View, California 94043 % */ %/* % * Copyright (c) 1986, 1990 by Sun Microsystems, Inc. % */ % %/* from @(#)ypupdate_prot.x 1.3 91/03/11 TIRPC 1.0 */ #ifndef RPC_HDR %#include -%__FBSDID("$FreeBSD$"); #endif % %/* % * Compiled from ypupdate_prot.x using rpcgen % * This is NOT source code! % * DO NOT EDIT THIS FILE! % */ /* * YP update service protocol */ #ifdef RPC_HDR % %#ifndef _rpcsvc_ypupdate_prot_h %#define _rpcsvc_ypupdate_prot_h % #endif const MAXMAPNAMELEN = 255; const MAXYPDATALEN = 1023; const MAXERRMSGLEN = 255; program YPU_PROG { version YPU_VERS { u_int YPU_CHANGE(ypupdate_args) = 1; u_int YPU_INSERT(ypupdate_args) = 2; u_int YPU_DELETE(ypdelete_args) = 3; u_int YPU_STORE(ypupdate_args) = 4; } = 1; } = 100028; typedef opaque yp_buf; struct ypupdate_args { string mapname; yp_buf key; yp_buf datum; }; struct ypdelete_args { string mapname; yp_buf key; }; #ifdef RPC_HDR % %#endif /* !_rpcsvc_ypupdate_prot_h */ #endif diff --git a/include/rpcsvc/ypxfrd.x b/include/rpcsvc/ypxfrd.x index e6ff902a1dfe..44ce886f64f5 100644 --- a/include/rpcsvc/ypxfrd.x +++ b/include/rpcsvc/ypxfrd.x @@ -1,169 +1,168 @@ /* * Copyright (c) 1995, 1996 * Bill Paul . All rights reserved. * * 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. * 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. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Bill Paul. * 4. Neither the name of the author nor the names of any co-contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY Bill Paul 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 Bill Paul 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 protocol definition file describes a file transfer * system used to very quickly move NIS maps from one host to * another. This is similar to what Sun does with their ypxfrd * protocol, but it must be stressed that this protocol is _NOT_ * compatible with Sun's. There are a couple of reasons for this: * * 1) Sun's protocol is proprietary. The protocol definition is * not freely available in any of the SunRPC source distributions, * even though the NIS v2 protocol is. * * 2) The idea here is to transfer entire raw files rather than * sending just the records. Sun uses ndbm for its NIS map files, * while FreeBSD uses Berkeley DB. Both are hash databases, but the * formats are incompatible, making it impossible for them to * use each others' files. Even if FreeBSD adopted ndbm for its * database format, FreeBSD/i386 is a little-endian OS and * SunOS/SPARC is big-endian; ndbm is byte-order sensitive and * not very smart about it, which means an attempt to read a * database on a little-endian box that was created on a big-endian * box (or vice-versa) can cause the ndbm code to eat itself. * Luckily, Berkeley DB is able to deal with this situation in * a more graceful manner. * * While the protocol is incompatible, the idea is the same: we just open * up a TCP pipe to the client and transfer the raw map database * from the master server to the slave. This is many times faster than * the standard yppush/ypxfr transfer method since it saves us from * having to recreate the map databases via the DB library each time. * For example: creating a passwd database with 30,000 entries with yp_mkdb * can take a couple of minutes, but to just copy the file takes only a few * seconds. */ #ifndef RPC_HDR %#include -%__FBSDID("$FreeBSD$"); #endif /* XXX cribbed from yp.x */ const _YPMAXRECORD = 16777216; const _YPMAXDOMAIN = 64; const _YPMAXMAP = 64; const _YPMAXPEER = 64; /* Suggested default -- not necessarily the one used. */ const YPXFRBLOCK = 32767; /* * Possible return codes from the remote server. */ enum xfrstat { XFR_REQUEST_OK = 1, /* Transfer request granted */ XFR_DENIED = 2, /* Transfer request denied */ XFR_NOFILE = 3, /* Requested map file doesn't exist */ XFR_ACCESS = 4, /* File exists, but I couldn't access it */ XFR_BADDB = 5, /* File is not a hash database */ XFR_READ_OK = 6, /* Block read successfully */ XFR_READ_ERR = 7, /* Read error during transfer */ XFR_DONE = 8, /* Transfer completed */ XFR_DB_ENDIAN_MISMATCH = 9, /* Database byte order mismatch */ XFR_DB_TYPE_MISMATCH = 10 /* Database type mismatch */ }; /* * Database type specifications. The client can use this to ask * the server for a particular type of database or just take whatever * the server has to offer. */ enum xfr_db_type { XFR_DB_ASCII = 1, /* Flat ASCII text */ XFR_DB_BSD_HASH = 2, /* Berkeley DB, hash method */ XFR_DB_BSD_BTREE = 3, /* Berkeley DB, btree method */ XFR_DB_BSD_RECNO = 4, /* Berkeley DB, recno method */ XFR_DB_BSD_MPOOL = 5, /* Berkeley DB, mpool method */ XFR_DB_BSD_NDBM = 6, /* Berkeley DB, hash, ndbm compat */ XFR_DB_GNU_GDBM = 7, /* GNU GDBM */ XFR_DB_DBM = 8, /* Old, deprecated dbm format */ XFR_DB_NDBM = 9, /* ndbm format (used by Sun's NISv2) */ XFR_DB_OPAQUE = 10, /* Mystery format -- just pass along */ XFR_DB_ANY = 11, /* I'll take any format you've got */ XFR_DB_UNKNOWN = 12 /* Unknown format */ }; /* * Machine byte order specification. This allows the client to check * that it's copying a map database from a machine of similar byte sex. * This is necessary for handling database libraries that are fatally * byte order sensitive. * * The XFR_ENDIAN_ANY type is for use with the Berkeley DB database * formats; Berkeley DB is smart enough to make up for byte order * differences, so byte sex isn't important. */ enum xfr_byte_order { XFR_ENDIAN_BIG = 1, /* We want big endian */ XFR_ENDIAN_LITTLE = 2, /* We want little endian */ XFR_ENDIAN_ANY = 3 /* We'll take whatever you got */ }; typedef string xfrdomain<_YPMAXDOMAIN>; typedef string xfrmap<_YPMAXMAP>; typedef string xfrmap_filename<_YPMAXMAP>; /* actual name of map file */ /* * Ask the remote ypxfrd for a map using this structure. * Note: we supply both a map name and a map file name. These are not * the same thing. In the case of ndbm, maps are stored in two files: * map.bykey.pag and may.bykey.dir. We may also have to deal with * file extensions (on the off chance that the remote server is supporting * multiple DB formats). To handle this, we tell the remote server both * what map we want and, in the case of ndbm, whether we want the .dir * or the .pag part. This name should not be a fully qualified path: * it's up to the remote server to decide which directories to look in. */ struct ypxfr_mapname { xfrmap xfrmap; xfrdomain xfrdomain; xfrmap_filename xfrmap_filename; xfr_db_type xfr_db_type; xfr_byte_order xfr_byte_order; }; /* Read response using this structure. */ union xfr switch (bool ok) { case TRUE: opaque xfrblock_buf<>; case FALSE: xfrstat xfrstat; }; program YPXFRD_FREEBSD_PROG { version YPXFRD_FREEBSD_VERS { union xfr YPXFRD_GETMAP(ypxfr_mapname) = 1; } = 1; } = 600100069; /* 100069 + 60000000 -- 100069 is the Sun ypxfrd prog number */ diff --git a/usr.sbin/rpc.yppasswdd/yppasswd_private.x b/usr.sbin/rpc.yppasswdd/yppasswd_private.x index a1d6be51f369..d1e32f8819b5 100644 --- a/usr.sbin/rpc.yppasswdd/yppasswd_private.x +++ b/usr.sbin/rpc.yppasswdd/yppasswd_private.x @@ -1,70 +1,69 @@ /* * Copyright (c) 1995, 1996 * Bill Paul . All rights reserved. * * 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. * 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. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Bill Paul. * 4. Neither the name of the author nor the names of any co-contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY Bill Paul 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 Bill Paul 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. */ #ifndef RPC_HDR %#include -%__FBSDID("$FreeBSD$"); #endif #ifdef RPC_HDR %#define YP_SOCKNAME "/var/run/yppasswdsock" #endif struct x_master_passwd { string pw_name<>; /* username */ string pw_passwd<>; /* encrypted password */ int pw_uid; /* user id */ int pw_gid; /* group id */ unsigned long pw_change;/* password change time */ string pw_class<>; /* user access class */ string pw_gecos<>; /* in real life name */ string pw_dir<>; /* home directory */ string pw_shell<>; /* default shell */ unsigned long pw_expire;/* account expiration */ unsigned long pw_fields;/* internal: fields filled in */ }; const _YPMAXDOMAIN = 64; struct master_yppasswd { string oldpass<>; /* unencrypted old password */ string domain<_YPMAXDOMAIN>; /* domain we want to operate on */ x_master_passwd newpw; /* new passwd entry */ }; program MASTER_YPPASSWDPROG { version MASTER_YPPASSWDVERS { int YPPASSWDPROC_UPDATE_MASTER(master_yppasswd) = 1; } = 1; } = 600100009;