Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/rpcsvc
File: nis.h
/*
[0] Fix | Delete
* Copyright (c) 2010, Oracle America, Inc.
[1] Fix | Delete
*
[2] Fix | Delete
* Redistribution and use in source and binary forms, with or without
[3] Fix | Delete
* modification, are permitted provided that the following conditions are
[4] Fix | Delete
* met:
[5] Fix | Delete
*
[6] Fix | Delete
* * Redistributions of source code must retain the above copyright
[7] Fix | Delete
* notice, this list of conditions and the following disclaimer.
[8] Fix | Delete
* * Redistributions in binary form must reproduce the above
[9] Fix | Delete
* copyright notice, this list of conditions and the following
[10] Fix | Delete
* disclaimer in the documentation and/or other materials
[11] Fix | Delete
* provided with the distribution.
[12] Fix | Delete
* * Neither the name of the "Oracle America, Inc." nor the names of its
[13] Fix | Delete
* contributors may be used to endorse or promote products derived
[14] Fix | Delete
* from this software without specific prior written permission.
[15] Fix | Delete
*
[16] Fix | Delete
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
[17] Fix | Delete
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
[18] Fix | Delete
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
[19] Fix | Delete
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
[20] Fix | Delete
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
[21] Fix | Delete
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
[22] Fix | Delete
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
[23] Fix | Delete
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
[24] Fix | Delete
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
[25] Fix | Delete
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
[26] Fix | Delete
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
[27] Fix | Delete
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[28] Fix | Delete
*/
[29] Fix | Delete
[30] Fix | Delete
#ifndef _RPCSVC_NIS_H
[31] Fix | Delete
#define _RPCSVC_NIS_H 1
[32] Fix | Delete
[33] Fix | Delete
#include <rpc/rpc.h>
[34] Fix | Delete
#include <rpcsvc/nis_tags.h>
[35] Fix | Delete
[36] Fix | Delete
#ifdef __cplusplus
[37] Fix | Delete
extern "C" {
[38] Fix | Delete
#endif
[39] Fix | Delete
[40] Fix | Delete
/*
[41] Fix | Delete
* nis.h
[42] Fix | Delete
*
[43] Fix | Delete
* This file is the main include file for NIS clients. It contains
[44] Fix | Delete
* both the client library function defines and the various data
[45] Fix | Delete
* structures used by the NIS service. It includes the file nis_tags.h
[46] Fix | Delete
* which defines the tag values. This allows the tags to change without
[47] Fix | Delete
* having to change the nis.x file.
[48] Fix | Delete
*
[49] Fix | Delete
* NOTE : THIS FILE IS NOT GENERATED WITH RPCGEN ! SO YOU HAVE TO
[50] Fix | Delete
* ADD ALL THE CHANGES ON nis_*.x FILES HERE AGAIN !
[51] Fix | Delete
*
[52] Fix | Delete
* I have removed all the Solaris internal structs and variables,
[53] Fix | Delete
* because they are not supported, Sun changed them between various
[54] Fix | Delete
* releases and they shouldn't be used in user programs.
[55] Fix | Delete
* <kukuk@suse.de>
[56] Fix | Delete
*/
[57] Fix | Delete
[58] Fix | Delete
[59] Fix | Delete
#ifndef __nis_object_h
[60] Fix | Delete
#define __nis_object_h
[61] Fix | Delete
[62] Fix | Delete
#define NIS_MAXSTRINGLEN 255
[63] Fix | Delete
#define NIS_MAXNAMELEN 1024
[64] Fix | Delete
#define NIS_MAXATTRNAME 32
[65] Fix | Delete
#define NIS_MAXATTRVAL 2048
[66] Fix | Delete
#define NIS_MAXCOLUMNS 64
[67] Fix | Delete
#define NIS_MAXATTR 16
[68] Fix | Delete
#define NIS_MAXPATH 1024
[69] Fix | Delete
#define NIS_MAXREPLICAS 128
[70] Fix | Delete
#define NIS_MAXLINKS 16
[71] Fix | Delete
#define NIS_PK_NONE 0
[72] Fix | Delete
#define NIS_PK_DH 1
[73] Fix | Delete
#define NIS_PK_RSA 2
[74] Fix | Delete
#define NIS_PK_KERB 3
[75] Fix | Delete
#define NIS_PK_DHEXT 4
[76] Fix | Delete
[77] Fix | Delete
struct nis_attr {
[78] Fix | Delete
char *zattr_ndx;
[79] Fix | Delete
struct {
[80] Fix | Delete
u_int zattr_val_len;
[81] Fix | Delete
char *zattr_val_val;
[82] Fix | Delete
} zattr_val;
[83] Fix | Delete
};
[84] Fix | Delete
typedef struct nis_attr nis_attr;
[85] Fix | Delete
[86] Fix | Delete
typedef char *nis_name;
[87] Fix | Delete
[88] Fix | Delete
enum zotypes {
[89] Fix | Delete
BOGUS_OBJ = 0,
[90] Fix | Delete
NO_OBJ = 1,
[91] Fix | Delete
DIRECTORY_OBJ = 2,
[92] Fix | Delete
GROUP_OBJ = 3,
[93] Fix | Delete
TABLE_OBJ = 4,
[94] Fix | Delete
ENTRY_OBJ = 5,
[95] Fix | Delete
LINK_OBJ = 6,
[96] Fix | Delete
PRIVATE_OBJ = 7,
[97] Fix | Delete
NIS_BOGUS_OBJ = 0,
[98] Fix | Delete
NIS_NO_OBJ = 1,
[99] Fix | Delete
NIS_DIRECTORY_OBJ = 2,
[100] Fix | Delete
NIS_GROUP_OBJ = 3,
[101] Fix | Delete
NIS_TABLE_OBJ = 4,
[102] Fix | Delete
NIS_ENTRY_OBJ = 5,
[103] Fix | Delete
NIS_LINK_OBJ = 6,
[104] Fix | Delete
NIS_PRIVATE_OBJ = 7
[105] Fix | Delete
};
[106] Fix | Delete
typedef enum zotypes zotypes;
[107] Fix | Delete
[108] Fix | Delete
enum nstype {
[109] Fix | Delete
UNKNOWN = 0,
[110] Fix | Delete
NIS = 1,
[111] Fix | Delete
SUNYP = 2,
[112] Fix | Delete
IVY = 3,
[113] Fix | Delete
DNS = 4,
[114] Fix | Delete
X500 = 5,
[115] Fix | Delete
DNANS = 6,
[116] Fix | Delete
XCHS = 7,
[117] Fix | Delete
CDS = 8,
[118] Fix | Delete
};
[119] Fix | Delete
typedef enum nstype nstype;
[120] Fix | Delete
[121] Fix | Delete
struct oar_mask {
[122] Fix | Delete
uint32_t oa_rights;
[123] Fix | Delete
zotypes oa_otype;
[124] Fix | Delete
};
[125] Fix | Delete
typedef struct oar_mask oar_mask;
[126] Fix | Delete
[127] Fix | Delete
struct endpoint {
[128] Fix | Delete
char *uaddr;
[129] Fix | Delete
char *family;
[130] Fix | Delete
char *proto;
[131] Fix | Delete
};
[132] Fix | Delete
typedef struct endpoint endpoint;
[133] Fix | Delete
[134] Fix | Delete
struct nis_server {
[135] Fix | Delete
nis_name name;
[136] Fix | Delete
struct {
[137] Fix | Delete
u_int ep_len;
[138] Fix | Delete
endpoint *ep_val;
[139] Fix | Delete
} ep;
[140] Fix | Delete
uint32_t key_type;
[141] Fix | Delete
netobj pkey;
[142] Fix | Delete
};
[143] Fix | Delete
typedef struct nis_server nis_server;
[144] Fix | Delete
[145] Fix | Delete
struct directory_obj {
[146] Fix | Delete
nis_name do_name;
[147] Fix | Delete
nstype do_type;
[148] Fix | Delete
struct {
[149] Fix | Delete
u_int do_servers_len;
[150] Fix | Delete
nis_server *do_servers_val;
[151] Fix | Delete
} do_servers;
[152] Fix | Delete
uint32_t do_ttl;
[153] Fix | Delete
struct {
[154] Fix | Delete
u_int do_armask_len;
[155] Fix | Delete
oar_mask *do_armask_val;
[156] Fix | Delete
} do_armask;
[157] Fix | Delete
};
[158] Fix | Delete
typedef struct directory_obj directory_obj;
[159] Fix | Delete
[160] Fix | Delete
#define EN_BINARY 1
[161] Fix | Delete
#define EN_CRYPT 2
[162] Fix | Delete
#define EN_XDR 4
[163] Fix | Delete
#define EN_MODIFIED 8
[164] Fix | Delete
#define EN_ASN1 64
[165] Fix | Delete
[166] Fix | Delete
struct entry_col {
[167] Fix | Delete
uint32_t ec_flags;
[168] Fix | Delete
struct {
[169] Fix | Delete
u_int ec_value_len;
[170] Fix | Delete
char *ec_value_val;
[171] Fix | Delete
} ec_value;
[172] Fix | Delete
};
[173] Fix | Delete
typedef struct entry_col entry_col;
[174] Fix | Delete
[175] Fix | Delete
struct entry_obj {
[176] Fix | Delete
char *en_type;
[177] Fix | Delete
struct {
[178] Fix | Delete
u_int en_cols_len;
[179] Fix | Delete
entry_col *en_cols_val;
[180] Fix | Delete
} en_cols;
[181] Fix | Delete
};
[182] Fix | Delete
typedef struct entry_obj entry_obj;
[183] Fix | Delete
[184] Fix | Delete
struct group_obj {
[185] Fix | Delete
uint32_t gr_flags;
[186] Fix | Delete
struct {
[187] Fix | Delete
u_int gr_members_len;
[188] Fix | Delete
nis_name *gr_members_val;
[189] Fix | Delete
} gr_members;
[190] Fix | Delete
};
[191] Fix | Delete
typedef struct group_obj group_obj;
[192] Fix | Delete
[193] Fix | Delete
struct link_obj {
[194] Fix | Delete
zotypes li_rtype;
[195] Fix | Delete
struct {
[196] Fix | Delete
u_int li_attrs_len;
[197] Fix | Delete
nis_attr *li_attrs_val;
[198] Fix | Delete
} li_attrs;
[199] Fix | Delete
nis_name li_name;
[200] Fix | Delete
};
[201] Fix | Delete
typedef struct link_obj link_obj;
[202] Fix | Delete
[203] Fix | Delete
#define TA_BINARY 1
[204] Fix | Delete
#define TA_CRYPT 2
[205] Fix | Delete
#define TA_XDR 4
[206] Fix | Delete
#define TA_SEARCHABLE 8
[207] Fix | Delete
#define TA_CASE 16
[208] Fix | Delete
#define TA_MODIFIED 32
[209] Fix | Delete
#define TA_ASN1 64
[210] Fix | Delete
[211] Fix | Delete
struct table_col {
[212] Fix | Delete
char *tc_name;
[213] Fix | Delete
uint32_t tc_flags;
[214] Fix | Delete
uint32_t tc_rights;
[215] Fix | Delete
};
[216] Fix | Delete
typedef struct table_col table_col;
[217] Fix | Delete
[218] Fix | Delete
struct table_obj {
[219] Fix | Delete
char *ta_type;
[220] Fix | Delete
int ta_maxcol;
[221] Fix | Delete
u_char ta_sep;
[222] Fix | Delete
struct {
[223] Fix | Delete
u_int ta_cols_len;
[224] Fix | Delete
table_col *ta_cols_val;
[225] Fix | Delete
} ta_cols;
[226] Fix | Delete
char *ta_path;
[227] Fix | Delete
};
[228] Fix | Delete
typedef struct table_obj table_obj;
[229] Fix | Delete
[230] Fix | Delete
struct objdata {
[231] Fix | Delete
zotypes zo_type;
[232] Fix | Delete
union {
[233] Fix | Delete
struct directory_obj di_data;
[234] Fix | Delete
struct group_obj gr_data;
[235] Fix | Delete
struct table_obj ta_data;
[236] Fix | Delete
struct entry_obj en_data;
[237] Fix | Delete
struct link_obj li_data;
[238] Fix | Delete
struct {
[239] Fix | Delete
u_int po_data_len;
[240] Fix | Delete
char *po_data_val;
[241] Fix | Delete
} po_data;
[242] Fix | Delete
} objdata_u;
[243] Fix | Delete
};
[244] Fix | Delete
typedef struct objdata objdata;
[245] Fix | Delete
[246] Fix | Delete
struct nis_oid {
[247] Fix | Delete
uint32_t ctime;
[248] Fix | Delete
uint32_t mtime;
[249] Fix | Delete
};
[250] Fix | Delete
typedef struct nis_oid nis_oid;
[251] Fix | Delete
[252] Fix | Delete
struct nis_object {
[253] Fix | Delete
nis_oid zo_oid;
[254] Fix | Delete
nis_name zo_name;
[255] Fix | Delete
nis_name zo_owner;
[256] Fix | Delete
nis_name zo_group;
[257] Fix | Delete
nis_name zo_domain;
[258] Fix | Delete
uint32_t zo_access;
[259] Fix | Delete
uint32_t zo_ttl;
[260] Fix | Delete
objdata zo_data;
[261] Fix | Delete
};
[262] Fix | Delete
typedef struct nis_object nis_object;
[263] Fix | Delete
[264] Fix | Delete
#endif /* if __nis_object_h */
[265] Fix | Delete
[266] Fix | Delete
enum nis_error {
[267] Fix | Delete
NIS_SUCCESS = 0,
[268] Fix | Delete
NIS_S_SUCCESS = 1,
[269] Fix | Delete
NIS_NOTFOUND = 2,
[270] Fix | Delete
NIS_S_NOTFOUND = 3,
[271] Fix | Delete
NIS_CACHEEXPIRED = 4,
[272] Fix | Delete
NIS_NAMEUNREACHABLE = 5,
[273] Fix | Delete
NIS_UNKNOWNOBJ = 6,
[274] Fix | Delete
NIS_TRYAGAIN = 7,
[275] Fix | Delete
NIS_SYSTEMERROR = 8,
[276] Fix | Delete
NIS_CHAINBROKEN = 9,
[277] Fix | Delete
NIS_PERMISSION = 10,
[278] Fix | Delete
NIS_NOTOWNER = 11,
[279] Fix | Delete
NIS_NOT_ME = 12,
[280] Fix | Delete
NIS_NOMEMORY = 13,
[281] Fix | Delete
NIS_NAMEEXISTS = 14,
[282] Fix | Delete
NIS_NOTMASTER = 15,
[283] Fix | Delete
NIS_INVALIDOBJ = 16,
[284] Fix | Delete
NIS_BADNAME = 17,
[285] Fix | Delete
NIS_NOCALLBACK = 18,
[286] Fix | Delete
NIS_CBRESULTS = 19,
[287] Fix | Delete
NIS_NOSUCHNAME = 20,
[288] Fix | Delete
NIS_NOTUNIQUE = 21,
[289] Fix | Delete
NIS_IBMODERROR = 22,
[290] Fix | Delete
NIS_NOSUCHTABLE = 23,
[291] Fix | Delete
NIS_TYPEMISMATCH = 24,
[292] Fix | Delete
NIS_LINKNAMEERROR = 25,
[293] Fix | Delete
NIS_PARTIAL = 26,
[294] Fix | Delete
NIS_TOOMANYATTRS = 27,
[295] Fix | Delete
NIS_RPCERROR = 28,
[296] Fix | Delete
NIS_BADATTRIBUTE = 29,
[297] Fix | Delete
NIS_NOTSEARCHABLE = 30,
[298] Fix | Delete
NIS_CBERROR = 31,
[299] Fix | Delete
NIS_FOREIGNNS = 32,
[300] Fix | Delete
NIS_BADOBJECT = 33,
[301] Fix | Delete
NIS_NOTSAMEOBJ = 34,
[302] Fix | Delete
NIS_MODFAIL = 35,
[303] Fix | Delete
NIS_BADREQUEST = 36,
[304] Fix | Delete
NIS_NOTEMPTY = 37,
[305] Fix | Delete
NIS_COLDSTART_ERR = 38,
[306] Fix | Delete
NIS_RESYNC = 39,
[307] Fix | Delete
NIS_FAIL = 40,
[308] Fix | Delete
NIS_UNAVAIL = 41,
[309] Fix | Delete
NIS_RES2BIG = 42,
[310] Fix | Delete
NIS_SRVAUTH = 43,
[311] Fix | Delete
NIS_CLNTAUTH = 44,
[312] Fix | Delete
NIS_NOFILESPACE = 45,
[313] Fix | Delete
NIS_NOPROC = 46,
[314] Fix | Delete
NIS_DUMPLATER = 47,
[315] Fix | Delete
};
[316] Fix | Delete
typedef enum nis_error nis_error;
[317] Fix | Delete
[318] Fix | Delete
struct nis_result {
[319] Fix | Delete
nis_error status;
[320] Fix | Delete
struct {
[321] Fix | Delete
u_int objects_len;
[322] Fix | Delete
nis_object *objects_val;
[323] Fix | Delete
} objects;
[324] Fix | Delete
netobj cookie;
[325] Fix | Delete
uint32_t zticks;
[326] Fix | Delete
uint32_t dticks;
[327] Fix | Delete
uint32_t aticks;
[328] Fix | Delete
uint32_t cticks;
[329] Fix | Delete
};
[330] Fix | Delete
typedef struct nis_result nis_result;
[331] Fix | Delete
[332] Fix | Delete
struct ns_request {
[333] Fix | Delete
nis_name ns_name;
[334] Fix | Delete
struct {
[335] Fix | Delete
u_int ns_object_len;
[336] Fix | Delete
nis_object *ns_object_val;
[337] Fix | Delete
} ns_object;
[338] Fix | Delete
};
[339] Fix | Delete
typedef struct ns_request ns_request;
[340] Fix | Delete
[341] Fix | Delete
struct ib_request {
[342] Fix | Delete
nis_name ibr_name;
[343] Fix | Delete
struct {
[344] Fix | Delete
u_int ibr_srch_len;
[345] Fix | Delete
nis_attr *ibr_srch_val;
[346] Fix | Delete
} ibr_srch;
[347] Fix | Delete
uint32_t ibr_flags;
[348] Fix | Delete
struct {
[349] Fix | Delete
u_int ibr_obj_len;
[350] Fix | Delete
nis_object *ibr_obj_val;
[351] Fix | Delete
} ibr_obj;
[352] Fix | Delete
struct {
[353] Fix | Delete
u_int ibr_cbhost_len;
[354] Fix | Delete
nis_server *ibr_cbhost_val;
[355] Fix | Delete
} ibr_cbhost;
[356] Fix | Delete
u_int ibr_bufsize;
[357] Fix | Delete
netobj ibr_cookie;
[358] Fix | Delete
};
[359] Fix | Delete
typedef struct ib_request ib_request;
[360] Fix | Delete
[361] Fix | Delete
struct ping_args {
[362] Fix | Delete
nis_name dir;
[363] Fix | Delete
uint32_t stamp;
[364] Fix | Delete
};
[365] Fix | Delete
typedef struct ping_args ping_args;
[366] Fix | Delete
[367] Fix | Delete
enum log_entry_t {
[368] Fix | Delete
LOG_NOP = 0,
[369] Fix | Delete
ADD_NAME = 1,
[370] Fix | Delete
REM_NAME = 2,
[371] Fix | Delete
MOD_NAME_OLD = 3,
[372] Fix | Delete
MOD_NAME_NEW = 4,
[373] Fix | Delete
ADD_IBASE = 5,
[374] Fix | Delete
REM_IBASE = 6,
[375] Fix | Delete
MOD_IBASE = 7,
[376] Fix | Delete
UPD_STAMP = 8,
[377] Fix | Delete
};
[378] Fix | Delete
typedef enum log_entry_t log_entry_t;
[379] Fix | Delete
[380] Fix | Delete
struct log_entry {
[381] Fix | Delete
uint32_t le_time;
[382] Fix | Delete
log_entry_t le_type;
[383] Fix | Delete
nis_name le_princp;
[384] Fix | Delete
nis_name le_name;
[385] Fix | Delete
struct {
[386] Fix | Delete
u_int le_attrs_len;
[387] Fix | Delete
nis_attr *le_attrs_val;
[388] Fix | Delete
} le_attrs;
[389] Fix | Delete
nis_object le_object;
[390] Fix | Delete
};
[391] Fix | Delete
typedef struct log_entry log_entry;
[392] Fix | Delete
[393] Fix | Delete
struct log_result {
[394] Fix | Delete
nis_error lr_status;
[395] Fix | Delete
netobj lr_cookie;
[396] Fix | Delete
struct {
[397] Fix | Delete
u_int lr_entries_len;
[398] Fix | Delete
log_entry *lr_entries_val;
[399] Fix | Delete
} lr_entries;
[400] Fix | Delete
};
[401] Fix | Delete
typedef struct log_result log_result;
[402] Fix | Delete
[403] Fix | Delete
struct cp_result {
[404] Fix | Delete
nis_error cp_status;
[405] Fix | Delete
uint32_t cp_zticks;
[406] Fix | Delete
uint32_t cp_dticks;
[407] Fix | Delete
};
[408] Fix | Delete
typedef struct cp_result cp_result;
[409] Fix | Delete
[410] Fix | Delete
struct nis_tag {
[411] Fix | Delete
uint32_t tag_type;
[412] Fix | Delete
char *tag_val;
[413] Fix | Delete
};
[414] Fix | Delete
typedef struct nis_tag nis_tag;
[415] Fix | Delete
[416] Fix | Delete
struct nis_taglist {
[417] Fix | Delete
struct {
[418] Fix | Delete
u_int tags_len;
[419] Fix | Delete
nis_tag *tags_val;
[420] Fix | Delete
} tags;
[421] Fix | Delete
};
[422] Fix | Delete
typedef struct nis_taglist nis_taglist;
[423] Fix | Delete
[424] Fix | Delete
struct dump_args {
[425] Fix | Delete
nis_name da_dir;
[426] Fix | Delete
uint32_t da_time;
[427] Fix | Delete
struct {
[428] Fix | Delete
u_int da_cbhost_len;
[429] Fix | Delete
nis_server *da_cbhost_val;
[430] Fix | Delete
} da_cbhost;
[431] Fix | Delete
};
[432] Fix | Delete
typedef struct dump_args dump_args;
[433] Fix | Delete
[434] Fix | Delete
struct fd_args {
[435] Fix | Delete
nis_name dir_name;
[436] Fix | Delete
nis_name requester;
[437] Fix | Delete
};
[438] Fix | Delete
typedef struct fd_args fd_args;
[439] Fix | Delete
[440] Fix | Delete
struct fd_result {
[441] Fix | Delete
nis_error status;
[442] Fix | Delete
nis_name source;
[443] Fix | Delete
struct {
[444] Fix | Delete
u_int dir_data_len;
[445] Fix | Delete
char *dir_data_val;
[446] Fix | Delete
} dir_data;
[447] Fix | Delete
struct {
[448] Fix | Delete
u_int signature_len;
[449] Fix | Delete
char *signature_val;
[450] Fix | Delete
} signature;
[451] Fix | Delete
};
[452] Fix | Delete
typedef struct fd_result fd_result;
[453] Fix | Delete
[454] Fix | Delete
/* Generic client creating flags */
[455] Fix | Delete
#define ZMH_VC 1
[456] Fix | Delete
#define ZMH_DG 2
[457] Fix | Delete
#define ZMH_AUTH 4
[458] Fix | Delete
[459] Fix | Delete
/* Testing Access rights for objects */
[460] Fix | Delete
[461] Fix | Delete
#define NIS_READ_ACC 1
[462] Fix | Delete
#define NIS_MODIFY_ACC 2
[463] Fix | Delete
#define NIS_CREATE_ACC 4
[464] Fix | Delete
#define NIS_DESTROY_ACC 8
[465] Fix | Delete
/* Test macros. a == access rights, m == desired rights. */
[466] Fix | Delete
#define NIS_WORLD(a, m) (((a) & (m)) != 0)
[467] Fix | Delete
#define NIS_GROUP(a, m) (((a) & ((m) << 8)) != 0)
[468] Fix | Delete
#define NIS_OWNER(a, m) (((a) & ((m) << 16)) != 0)
[469] Fix | Delete
#define NIS_NOBODY(a, m) (((a) & ((m) << 24)) != 0)
[470] Fix | Delete
/*
[471] Fix | Delete
* EOL Alert - The following non-prefixed test macros are
[472] Fix | Delete
* here for backward compatibility, and will be not be present
[473] Fix | Delete
* in future releases - use the NIS_*() macros above.
[474] Fix | Delete
*/
[475] Fix | Delete
#define WORLD(a, m) (((a) & (m)) != 0)
[476] Fix | Delete
#define GROUP(a, m) (((a) & ((m) << 8)) != 0)
[477] Fix | Delete
#define OWNER(a, m) (((a) & ((m) << 16)) != 0)
[478] Fix | Delete
#define NOBODY(a, m) (((a) & ((m) << 24)) != 0)
[479] Fix | Delete
[480] Fix | Delete
#define OATYPE(d, n) (((d)->do_armask.do_armask_val+n)->oa_otype)
[481] Fix | Delete
#define OARIGHTS(d, n) (((d)->do_armask.do_armask_val+n)->oa_rights)
[482] Fix | Delete
#define WORLD_DEFAULT (NIS_READ_ACC)
[483] Fix | Delete
#define GROUP_DEFAULT (NIS_READ_ACC << 8)
[484] Fix | Delete
#define OWNER_DEFAULT ((NIS_READ_ACC + NIS_MODIFY_ACC + NIS_CREATE_ACC +\
[485] Fix | Delete
NIS_DESTROY_ACC) << 16)
[486] Fix | Delete
#define DEFAULT_RIGHTS (WORLD_DEFAULT | GROUP_DEFAULT | OWNER_DEFAULT)
[487] Fix | Delete
[488] Fix | Delete
/* Result manipulation defines ... */
[489] Fix | Delete
#define NIS_RES_NUMOBJ(x) ((x)->objects.objects_len)
[490] Fix | Delete
#define NIS_RES_OBJECT(x) ((x)->objects.objects_val)
[491] Fix | Delete
#define NIS_RES_COOKIE(x) ((x)->cookie)
[492] Fix | Delete
#define NIS_RES_STATUS(x) ((x)->status)
[493] Fix | Delete
[494] Fix | Delete
/* These defines make getting at the variant part of the object easier. */
[495] Fix | Delete
#define TA_data zo_data.objdata_u.ta_data
[496] Fix | Delete
#define EN_data zo_data.objdata_u.en_data
[497] Fix | Delete
#define DI_data zo_data.objdata_u.di_data
[498] Fix | Delete
#define LI_data zo_data.objdata_u.li_data
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function