xref: /illumos-gate/usr/src/head/rpcsvc/nis_object.x (revision 36e852a1)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*36e852a1SRaja Andra  * Common Development and Distribution License (the "License").
6*36e852a1SRaja Andra  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
227c478bd9Sstevel@tonic-gate  *	nis_object.x
237c478bd9Sstevel@tonic-gate  *
24*36e852a1SRaja Andra  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25*36e852a1SRaja Andra  * Use is subject to license terms.
267c478bd9Sstevel@tonic-gate  */
277c478bd9Sstevel@tonic-gate 
287c478bd9Sstevel@tonic-gate #if RPC_HDR
297c478bd9Sstevel@tonic-gate %
307c478bd9Sstevel@tonic-gate %#ifndef __nis_object_h
317c478bd9Sstevel@tonic-gate %#define __nis_object_h
327c478bd9Sstevel@tonic-gate %
337c478bd9Sstevel@tonic-gate #endif
347c478bd9Sstevel@tonic-gate /*
357c478bd9Sstevel@tonic-gate  * 	This file defines the format for a NIS object in RPC language.
367c478bd9Sstevel@tonic-gate  * It is included by the main .x file and the database access protocol
377c478bd9Sstevel@tonic-gate  * file. It is common because both of them need to deal with the same
387c478bd9Sstevel@tonic-gate  * type of object. Generating the actual code though is a bit messy because
397c478bd9Sstevel@tonic-gate  * the nis.x file and the nis_dba.x file will generate xdr routines to
407c478bd9Sstevel@tonic-gate  * encode/decode objects when only one set is needed. Such is life when
417c478bd9Sstevel@tonic-gate  * one is using rpcgen.
427c478bd9Sstevel@tonic-gate  *
437c478bd9Sstevel@tonic-gate  * Note, the protocol doesn't specify any limits on such things as
447c478bd9Sstevel@tonic-gate  * maximum name length, number of attributes, etc. These are enforced
457c478bd9Sstevel@tonic-gate  * by the database backend. When you hit them you will no. Also see
467c478bd9Sstevel@tonic-gate  * the db_getlimits() function for fetching the limit values.
477c478bd9Sstevel@tonic-gate  *
487c478bd9Sstevel@tonic-gate  */
497c478bd9Sstevel@tonic-gate 
507c478bd9Sstevel@tonic-gate #if defined(RPC_XDR) || defined(RPC_SVC) || defined(RPC_CLNT)
517c478bd9Sstevel@tonic-gate %#ifndef xdr_uint32_t
527c478bd9Sstevel@tonic-gate %#define xdr_uint32_t xdr_u_int
537c478bd9Sstevel@tonic-gate %#endif
547c478bd9Sstevel@tonic-gate %#ifndef xdr_uint_t
557c478bd9Sstevel@tonic-gate %#define xdr_uint_t xdr_u_int
567c478bd9Sstevel@tonic-gate %#endif
577c478bd9Sstevel@tonic-gate #endif
587c478bd9Sstevel@tonic-gate 
597c478bd9Sstevel@tonic-gate /* Some manifest constants, chosen to maximize flexibility without
607c478bd9Sstevel@tonic-gate  * plugging the wire full of data.
617c478bd9Sstevel@tonic-gate  */
627c478bd9Sstevel@tonic-gate const NIS_MAXSTRINGLEN = 255;
637c478bd9Sstevel@tonic-gate const NIS_MAXNAMELEN   = 1024;
647c478bd9Sstevel@tonic-gate const NIS_MAXATTRNAME  = 32;
657c478bd9Sstevel@tonic-gate const NIS_MAXATTRVAL   = 2048;
667c478bd9Sstevel@tonic-gate const NIS_MAXCOLUMNS   = 64;
677c478bd9Sstevel@tonic-gate const NIS_MAXATTR      = 16;
687c478bd9Sstevel@tonic-gate const NIS_MAXPATH      = 1024;
697c478bd9Sstevel@tonic-gate const NIS_MAXREPLICAS  = 128;
707c478bd9Sstevel@tonic-gate const NIS_MAXLINKS     = 16;
717c478bd9Sstevel@tonic-gate 
727c478bd9Sstevel@tonic-gate const NIS_PK_NONE      = 0;	/* no public key (unix/sys auth) */
737c478bd9Sstevel@tonic-gate const NIS_PK_DH	       = 1;	/* Public key is Diffie-Hellman type */
747c478bd9Sstevel@tonic-gate const NIS_PK_RSA       = 2;	/* Public key if RSA type */
757c478bd9Sstevel@tonic-gate const NIS_PK_KERB      = 3;	/* Use kerberos style authentication */
767c478bd9Sstevel@tonic-gate const NIS_PK_DHEXT     = 4;	/* Extended Diffie-Hellman for RPC-GSS */
777c478bd9Sstevel@tonic-gate 
787c478bd9Sstevel@tonic-gate /*
797c478bd9Sstevel@tonic-gate  * The fundamental name type of NIS. The name may consist of two parts,
807c478bd9Sstevel@tonic-gate  * the first being the fully qualified name, and the second being an
817c478bd9Sstevel@tonic-gate  * optional set of attribute/value pairs.
827c478bd9Sstevel@tonic-gate  */
837c478bd9Sstevel@tonic-gate struct nis_attr {
847c478bd9Sstevel@tonic-gate 	string	zattr_ndx<>;	/* name of the index 		*/
857c478bd9Sstevel@tonic-gate 	opaque	zattr_val<>;	/* Value for the attribute. 	*/
867c478bd9Sstevel@tonic-gate };
877c478bd9Sstevel@tonic-gate 
887c478bd9Sstevel@tonic-gate typedef string nis_name<>;	/* The NIS name itself. */
897c478bd9Sstevel@tonic-gate 
907c478bd9Sstevel@tonic-gate /* NIS object types are defined by the following enumeration. The numbers
917c478bd9Sstevel@tonic-gate  * they use are based on the following scheme :
927c478bd9Sstevel@tonic-gate  *		     0 - 1023 are reserved for Sun,
937c478bd9Sstevel@tonic-gate  * 		1024 - 2047 are defined to be private to a particular tree.
947c478bd9Sstevel@tonic-gate  *		2048 - 4095 are defined to be user defined.
957c478bd9Sstevel@tonic-gate  *		4096 - ...  are reserved for future use.
967c478bd9Sstevel@tonic-gate  *
977c478bd9Sstevel@tonic-gate  * EOL Alert - The non-prefixed names are present for backward
987c478bd9Sstevel@tonic-gate  * compatability only, and will not exist in future releases. Use
997c478bd9Sstevel@tonic-gate  * the NIS_* names for future compatability.
1007c478bd9Sstevel@tonic-gate  */
1017c478bd9Sstevel@tonic-gate 
1027c478bd9Sstevel@tonic-gate enum zotypes {
1037c478bd9Sstevel@tonic-gate 
1047c478bd9Sstevel@tonic-gate 	BOGUS_OBJ  	= 0,	/* Uninitialized object structure 	*/
1057c478bd9Sstevel@tonic-gate 	NO_OBJ   	= 1,	/* NULL object (no data)	 	*/
1067c478bd9Sstevel@tonic-gate 	DIRECTORY_OBJ 	= 2,	/* Directory object describing domain 	*/
1077c478bd9Sstevel@tonic-gate 	GROUP_OBJ  	= 3,	/* Group object (a list of names) 	*/
1087c478bd9Sstevel@tonic-gate 	TABLE_OBJ  	= 4,	/* Table object (a database schema) 	*/
1097c478bd9Sstevel@tonic-gate 	ENTRY_OBJ  	= 5,	/* Entry object (a database record) 	*/
1107c478bd9Sstevel@tonic-gate 	LINK_OBJ   	= 6, 	/* A name link.				*/
1117c478bd9Sstevel@tonic-gate 	PRIVATE_OBJ  	= 7, 	/* Private object (all opaque data) 	*/
1127c478bd9Sstevel@tonic-gate 
1137c478bd9Sstevel@tonic-gate 	NIS_BOGUS_OBJ  	= 0,	/* Uninitialized object structure 	*/
1147c478bd9Sstevel@tonic-gate 	NIS_NO_OBJ   	= 1,	/* NULL object (no data)	 	*/
1157c478bd9Sstevel@tonic-gate 	NIS_DIRECTORY_OBJ = 2, /* Directory object describing domain 	*/
1167c478bd9Sstevel@tonic-gate 	NIS_GROUP_OBJ  	= 3,	/* Group object (a list of names) 	*/
1177c478bd9Sstevel@tonic-gate 	NIS_TABLE_OBJ  	= 4,	/* Table object (a database schema) 	*/
1187c478bd9Sstevel@tonic-gate 	NIS_ENTRY_OBJ  	= 5,	/* Entry object (a database record) 	*/
1197c478bd9Sstevel@tonic-gate 	NIS_LINK_OBJ	= 6, 	/* A name link.				*/
1207c478bd9Sstevel@tonic-gate 	NIS_PRIVATE_OBJ  = 7 /* Private object (all opaque data) */
1217c478bd9Sstevel@tonic-gate };
1227c478bd9Sstevel@tonic-gate 
1237c478bd9Sstevel@tonic-gate /*
1247c478bd9Sstevel@tonic-gate  * The types of Name services NIS knows about. They are enumerated
1257c478bd9Sstevel@tonic-gate  * here. The Binder code will use this type to determine if it has
1267c478bd9Sstevel@tonic-gate  * a set of library routines that will access the indicated name service.
1277c478bd9Sstevel@tonic-gate  */
1287c478bd9Sstevel@tonic-gate enum nstype {
1297c478bd9Sstevel@tonic-gate 	UNKNOWN = 0,
1307c478bd9Sstevel@tonic-gate 	NIS = 1,	/* Nis Plus Service		*/
1317c478bd9Sstevel@tonic-gate 	SUNYP = 2,	/* Old NIS Service		*/
1327c478bd9Sstevel@tonic-gate 	IVY = 3,	/* Nis Plus Plus Service	*/
1337c478bd9Sstevel@tonic-gate 	DNS = 4,	/* Domain Name Service		*/
1347c478bd9Sstevel@tonic-gate 	X500 = 5,	/* ISO/CCCIT X.500 Service	*/
1357c478bd9Sstevel@tonic-gate 	DNANS = 6,	/* Digital DECNet Name Service	*/
1367c478bd9Sstevel@tonic-gate 	XCHS = 7,	/* Xerox ClearingHouse Service	*/
1377c478bd9Sstevel@tonic-gate 	CDS= 8
1387c478bd9Sstevel@tonic-gate };
1397c478bd9Sstevel@tonic-gate 
1407c478bd9Sstevel@tonic-gate /*
1417c478bd9Sstevel@tonic-gate  * DIRECTORY - The name service object. These objects identify other name
1427c478bd9Sstevel@tonic-gate  * servers that are serving some portion of the name space. Each has a
1437c478bd9Sstevel@tonic-gate  * type associated with it. The resolver library will note whether or not
1447c478bd9Sstevel@tonic-gate  * is has the needed routines to access that type of service.
1457c478bd9Sstevel@tonic-gate  * The oarmask structure defines an access rights mask on a per object
1467c478bd9Sstevel@tonic-gate  * type basis for the name spaces. The only bits currently used are
1477c478bd9Sstevel@tonic-gate  * create and destroy. By enabling or disabling these access rights for
1487c478bd9Sstevel@tonic-gate  * a specific object type for a one of the accessor entities (owner,
1497c478bd9Sstevel@tonic-gate  * group, world) the administrator can control what types of objects
1507c478bd9Sstevel@tonic-gate  * may be freely added to the name space and which require the
1517c478bd9Sstevel@tonic-gate  * administrator's approval.
1527c478bd9Sstevel@tonic-gate  */
1537c478bd9Sstevel@tonic-gate struct oar_mask {
1547c478bd9Sstevel@tonic-gate 	uint_t	oa_rights;	/* Access rights mask 	*/
1557c478bd9Sstevel@tonic-gate 	zotypes	oa_otype;	/* Object type 		*/
1567c478bd9Sstevel@tonic-gate };
1577c478bd9Sstevel@tonic-gate 
1587c478bd9Sstevel@tonic-gate struct endpoint {
1597c478bd9Sstevel@tonic-gate 	string		uaddr<>;
1607c478bd9Sstevel@tonic-gate 	string		family<>;   /* Transport family (INET, OSI, etc) */
1617c478bd9Sstevel@tonic-gate 	string		proto<>;    /* Protocol (TCP, UDP, CLNP,  etc)   */
1627c478bd9Sstevel@tonic-gate };
1637c478bd9Sstevel@tonic-gate 
1647c478bd9Sstevel@tonic-gate /*
1657c478bd9Sstevel@tonic-gate  * Note: pkey is a netobj which is limited to 1024 bytes which limits the
1667c478bd9Sstevel@tonic-gate  * keysize to 8192 bits. This is consider to be a reasonable limit for
1677c478bd9Sstevel@tonic-gate  * the expected lifetime of this service.
1687c478bd9Sstevel@tonic-gate  */
1697c478bd9Sstevel@tonic-gate struct nis_server {
1707c478bd9Sstevel@tonic-gate 	nis_name	name; 	 	/* Principal name of the server  */
1717c478bd9Sstevel@tonic-gate 	endpoint	ep<>;  		/* Universal addr(s) for server  */
1727c478bd9Sstevel@tonic-gate 	uint_t		key_type;	/* Public key type		 */
1737c478bd9Sstevel@tonic-gate 	netobj		pkey;		/* server's public key  	 */
1747c478bd9Sstevel@tonic-gate };
1757c478bd9Sstevel@tonic-gate 
1767c478bd9Sstevel@tonic-gate struct directory_obj {
1777c478bd9Sstevel@tonic-gate 	nis_name   do_name;	 /* Name of the directory being served   */
1787c478bd9Sstevel@tonic-gate 	nstype	   do_type;	 /* one of NIS, DNS, IVY, YP, or X.500 	 */
1797c478bd9Sstevel@tonic-gate 	nis_server do_servers<>; /* <0> == Primary name server     	 */
1807c478bd9Sstevel@tonic-gate 	uint32_t   do_ttl;	 /* Time To Live (for caches) 		 */
1817c478bd9Sstevel@tonic-gate 	oar_mask   do_armask<>;  /* Create/Destroy rights by object type */
1827c478bd9Sstevel@tonic-gate };
1837c478bd9Sstevel@tonic-gate 
1847c478bd9Sstevel@tonic-gate /*
1857c478bd9Sstevel@tonic-gate  * ENTRY - This is one row of data from an information base.
1867c478bd9Sstevel@tonic-gate  * The type value is used by the client library to convert the entry to
1877c478bd9Sstevel@tonic-gate  * it's internal structure representation. The Table name is a back pointer
1887c478bd9Sstevel@tonic-gate  * to the table where the entry is stored. This allows the client library
1897c478bd9Sstevel@tonic-gate  * to determine where to send a request if the client wishes to change this
1907c478bd9Sstevel@tonic-gate  * entry but got to it through a LINK rather than directly.
1917c478bd9Sstevel@tonic-gate  * If the entry is a "standalone" entry then this field is void.
1927c478bd9Sstevel@tonic-gate  */
1937c478bd9Sstevel@tonic-gate const EN_BINARY   = 1;	/* Indicates value is binary data 	*/
1947c478bd9Sstevel@tonic-gate const EN_CRYPT    = 2;	/* Indicates the value is encrypted	*/
1957c478bd9Sstevel@tonic-gate const EN_XDR      = 4;	/* Indicates the value is XDR encoded	*/
1967c478bd9Sstevel@tonic-gate const EN_MODIFIED = 8;	/* Indicates entry is modified. 	*/
1977c478bd9Sstevel@tonic-gate const EN_ASN1     = 64;	/* Means contents use ASN.1 encoding    */
1987c478bd9Sstevel@tonic-gate 
1997c478bd9Sstevel@tonic-gate struct entry_col {
2007c478bd9Sstevel@tonic-gate 	uint_t	ec_flags;	/* Flags for this value */
2017c478bd9Sstevel@tonic-gate 	opaque	ec_value<>;	/* It's textual value	*/
2027c478bd9Sstevel@tonic-gate };
2037c478bd9Sstevel@tonic-gate 
2047c478bd9Sstevel@tonic-gate struct entry_obj {
2057c478bd9Sstevel@tonic-gate 	string 	en_type<>;	/* Type of entry such as "passwd" */
2067c478bd9Sstevel@tonic-gate 	entry_col en_cols<>;	/* Value for the entry		  */
2077c478bd9Sstevel@tonic-gate };
2087c478bd9Sstevel@tonic-gate 
2097c478bd9Sstevel@tonic-gate /*
2107c478bd9Sstevel@tonic-gate  * GROUP - The group object contains a list of NIS principal names. Groups
2117c478bd9Sstevel@tonic-gate  * are used to authorize principals. Each object has a set of access rights
2127c478bd9Sstevel@tonic-gate  * for members of its group. Principal names in groups are in the form
2137c478bd9Sstevel@tonic-gate  * name.directory and recursive groups are expressed as @groupname.directory
2147c478bd9Sstevel@tonic-gate  */
2157c478bd9Sstevel@tonic-gate struct group_obj {
2167c478bd9Sstevel@tonic-gate 	uint_t		gr_flags;	/* Flags controlling group	*/
2177c478bd9Sstevel@tonic-gate 	nis_name	gr_members<>;  	/* List of names in group 	*/
2187c478bd9Sstevel@tonic-gate };
2197c478bd9Sstevel@tonic-gate 
2207c478bd9Sstevel@tonic-gate /*
2217c478bd9Sstevel@tonic-gate  * LINK - This is the LINK object. It is quite similar to a symbolic link
2227c478bd9Sstevel@tonic-gate  * in the UNIX filesystem. The attributes in the main object structure are
2237c478bd9Sstevel@tonic-gate  * relative to the LINK data and not what it points to (like the file system)
2247c478bd9Sstevel@tonic-gate  * "modify" privleges here indicate the right to modify what the link points
2257c478bd9Sstevel@tonic-gate  * at and not to modify that actual object pointed to by the link.
2267c478bd9Sstevel@tonic-gate  */
2277c478bd9Sstevel@tonic-gate struct link_obj {
2287c478bd9Sstevel@tonic-gate 	zotypes	 li_rtype;	/* Real type of the object	*/
2297c478bd9Sstevel@tonic-gate 	nis_attr li_attrs<>;	/* Attribute/Values for tables	*/
2307c478bd9Sstevel@tonic-gate 	nis_name li_name; 	/* The object's real NIS name	*/
2317c478bd9Sstevel@tonic-gate };
2327c478bd9Sstevel@tonic-gate 
2337c478bd9Sstevel@tonic-gate /*
2347c478bd9Sstevel@tonic-gate  * TABLE - This is the table object. It implements a simple
2357c478bd9Sstevel@tonic-gate  * data base that applications and use for configuration or
2367c478bd9Sstevel@tonic-gate  * administration purposes. The role of the table is to group together
2377c478bd9Sstevel@tonic-gate  * a set of related entries. Tables are the simple database component
2387c478bd9Sstevel@tonic-gate  * of NIS. Like many databases, tables are logically divided into columns
2397c478bd9Sstevel@tonic-gate  * and rows. The columns are labeled with indexes and each ENTRY makes
2407c478bd9Sstevel@tonic-gate  * up a row. Rows may be addressed within the table by selecting one
2417c478bd9Sstevel@tonic-gate  * or more indexes, and values for those indexes. Each row which has
2427c478bd9Sstevel@tonic-gate  * a value for the given index that matches the desired value is returned.
2437c478bd9Sstevel@tonic-gate  * Within the definition of each column there is a flags variable, this
2447c478bd9Sstevel@tonic-gate  * variable contains flags which determine whether or not the column is
2457c478bd9Sstevel@tonic-gate  * searchable, contains binary data, and access rights for the entry objects
2467c478bd9Sstevel@tonic-gate  * column value.
2477c478bd9Sstevel@tonic-gate  */
2487c478bd9Sstevel@tonic-gate 
2497c478bd9Sstevel@tonic-gate const TA_BINARY     = 1;	/* Means table data is binary 		*/
2507c478bd9Sstevel@tonic-gate const TA_CRYPT      = 2;	/* Means value should be encrypted 	*/
2517c478bd9Sstevel@tonic-gate const TA_XDR        = 4;	/* Means value is XDR encoded		*/
2527c478bd9Sstevel@tonic-gate const TA_SEARCHABLE = 8;	/* Means this column is searchable	*/
2537c478bd9Sstevel@tonic-gate const TA_CASE       = 16;	/* Means this column is Case Sensitive	*/
2547c478bd9Sstevel@tonic-gate const TA_MODIFIED   = 32;	/* Means this columns attrs are modified*/
2557c478bd9Sstevel@tonic-gate const TA_ASN1       = 64;	/* Means contents use ASN.1 encoding     */
2567c478bd9Sstevel@tonic-gate 
2577c478bd9Sstevel@tonic-gate struct table_col {
2587c478bd9Sstevel@tonic-gate 	string	tc_name<64>;	/* Column Name 	 	   */
2597c478bd9Sstevel@tonic-gate 	uint_t	tc_flags;	/* control flags	   */
2607c478bd9Sstevel@tonic-gate 	uint_t	tc_rights;	/* Access rights mask	   */
2617c478bd9Sstevel@tonic-gate };
2627c478bd9Sstevel@tonic-gate 
2637c478bd9Sstevel@tonic-gate struct table_obj {
2647c478bd9Sstevel@tonic-gate 	string 	  ta_type<64>;	 /* Table type such as "passwd"	*/
2657c478bd9Sstevel@tonic-gate 	int	  ta_maxcol;	 /* Total number of columns	*/
2667c478bd9Sstevel@tonic-gate 	u_char	  ta_sep;	 /* Separator character 	*/
2677c478bd9Sstevel@tonic-gate 	table_col ta_cols<>; 	 /* The number of table indexes */
2687c478bd9Sstevel@tonic-gate 	string	  ta_path<>;	 /* A search path for this table */
2697c478bd9Sstevel@tonic-gate };
2707c478bd9Sstevel@tonic-gate 
2717c478bd9Sstevel@tonic-gate /*
2727c478bd9Sstevel@tonic-gate  * This union joins together all of the currently known objects.
2737c478bd9Sstevel@tonic-gate  */
2747c478bd9Sstevel@tonic-gate union objdata switch (zotypes zo_type) {
2757c478bd9Sstevel@tonic-gate         case NIS_DIRECTORY_OBJ :
2767c478bd9Sstevel@tonic-gate                 struct directory_obj di_data;
2777c478bd9Sstevel@tonic-gate         case NIS_GROUP_OBJ :
2787c478bd9Sstevel@tonic-gate                 struct group_obj gr_data;
2797c478bd9Sstevel@tonic-gate         case NIS_TABLE_OBJ :
2807c478bd9Sstevel@tonic-gate                 struct table_obj ta_data;
2817c478bd9Sstevel@tonic-gate         case NIS_ENTRY_OBJ:
2827c478bd9Sstevel@tonic-gate                 struct entry_obj en_data;
2837c478bd9Sstevel@tonic-gate         case NIS_LINK_OBJ :
2847c478bd9Sstevel@tonic-gate                 struct link_obj li_data;
2857c478bd9Sstevel@tonic-gate         case NIS_PRIVATE_OBJ :
2867c478bd9Sstevel@tonic-gate                 opaque	po_data<>;
2877c478bd9Sstevel@tonic-gate 	case NIS_NO_OBJ :
2887c478bd9Sstevel@tonic-gate 		void;
2897c478bd9Sstevel@tonic-gate         case NIS_BOGUS_OBJ :
2907c478bd9Sstevel@tonic-gate 		void;
2917c478bd9Sstevel@tonic-gate         default :
2927c478bd9Sstevel@tonic-gate                 void;
2937c478bd9Sstevel@tonic-gate };
2947c478bd9Sstevel@tonic-gate 
2957c478bd9Sstevel@tonic-gate /*
2967c478bd9Sstevel@tonic-gate  * This is the basic NIS object data type. It consists of a generic part
2977c478bd9Sstevel@tonic-gate  * which all objects contain, and a specialized part which varies depending
2987c478bd9Sstevel@tonic-gate  * on the type of the object. All of the specialized sections have been
2997c478bd9Sstevel@tonic-gate  * described above. You might have wondered why they all start with an
3007c478bd9Sstevel@tonic-gate  * integer size, followed by the useful data. The answer is, when the
3017c478bd9Sstevel@tonic-gate  * server doesn't recognize the type returned it treats it as opaque data.
3027c478bd9Sstevel@tonic-gate  * And the definition for opaque data is {int size; char *data;}. In this
3037c478bd9Sstevel@tonic-gate  * way, servers and utility routines that do not understand a given type
3047c478bd9Sstevel@tonic-gate  * may still pass it around. One has to be careful in setting
3057c478bd9Sstevel@tonic-gate  * this variable accurately, it must take into account such things as
3067c478bd9Sstevel@tonic-gate  * XDR padding of structures etc. The best way to set it is to note one's
3077c478bd9Sstevel@tonic-gate  * position in the XDR encoding stream, encode the structure, look at the
3087c478bd9Sstevel@tonic-gate  * new position and calculate the size.
3097c478bd9Sstevel@tonic-gate  */
3107c478bd9Sstevel@tonic-gate struct nis_oid {
3117c478bd9Sstevel@tonic-gate 	uint32_t ctime;		/* Time of objects creation 	*/
3127c478bd9Sstevel@tonic-gate 	uint32_t mtime;		/* Time of objects modification */
3137c478bd9Sstevel@tonic-gate };
3147c478bd9Sstevel@tonic-gate 
3157c478bd9Sstevel@tonic-gate struct nis_object {
3167c478bd9Sstevel@tonic-gate 	nis_oid	 zo_oid;	/* object identity verifier.		*/
3177c478bd9Sstevel@tonic-gate 	nis_name zo_name;	/* The NIS name for this object		*/
3187c478bd9Sstevel@tonic-gate 	nis_name zo_owner;	/* NIS name of object owner.		*/
3197c478bd9Sstevel@tonic-gate 	nis_name zo_group;	/* NIS name of access group.		*/
3207c478bd9Sstevel@tonic-gate 	nis_name zo_domain;	/* The administrator for the object	*/
3217c478bd9Sstevel@tonic-gate 	uint_t	 zo_access;	/* Access rights (owner, group, world)	*/
3227c478bd9Sstevel@tonic-gate 	uint32_t zo_ttl;	/* Object's time to live in seconds.	*/
3237c478bd9Sstevel@tonic-gate 	objdata	 zo_data;	/* Data structure for this type 	*/
3247c478bd9Sstevel@tonic-gate };
3257c478bd9Sstevel@tonic-gate #if RPC_HDR
3267c478bd9Sstevel@tonic-gate %
3277c478bd9Sstevel@tonic-gate %#endif /* if __nis_object_h */
3287c478bd9Sstevel@tonic-gate %
3297c478bd9Sstevel@tonic-gate #endif
330