Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/rpcsvc
File: nislib.h
/* Copyright (C) 1997-2015 Free Software Foundation, Inc.
[0] Fix | Delete
This file is part of the GNU C Library.
[1] Fix | Delete
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
[2] Fix | Delete
[3] Fix | Delete
The GNU C Library is free software; you can redistribute it and/or
[4] Fix | Delete
modify it under the terms of the GNU Lesser General Public
[5] Fix | Delete
License as published by the Free Software Foundation; either
[6] Fix | Delete
version 2.1 of the License, or (at your option) any later version.
[7] Fix | Delete
[8] Fix | Delete
The GNU C Library is distributed in the hope that it will be useful,
[9] Fix | Delete
but WITHOUT ANY WARRANTY; without even the implied warranty of
[10] Fix | Delete
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[11] Fix | Delete
Lesser General Public License for more details.
[12] Fix | Delete
[13] Fix | Delete
You should have received a copy of the GNU Lesser General Public
[14] Fix | Delete
License along with the GNU C Library; if not, see
[15] Fix | Delete
<http://www.gnu.org/licenses/>. */
[16] Fix | Delete
[17] Fix | Delete
#ifndef __RPCSVC_NISLIB_H__
[18] Fix | Delete
#define __RPCSVC_NISLIB_H__
[19] Fix | Delete
[20] Fix | Delete
#ifdef __cplusplus
[21] Fix | Delete
extern "C" {
[22] Fix | Delete
#endif
[23] Fix | Delete
[24] Fix | Delete
typedef const char *const_nis_name;
[25] Fix | Delete
[26] Fix | Delete
/* nis_names: These functions are used to locate and manipulate all NIS+
[27] Fix | Delete
* objects except the NIS+ entry objects.
[28] Fix | Delete
*
[29] Fix | Delete
* nis_lookup (name, flags) resolves a NIS+ name and returns a copy of
[30] Fix | Delete
* that object from a NIS+ server.
[31] Fix | Delete
* const nis_name name: name of the object to be resolved
[32] Fix | Delete
* unsigned int flags: logically ORing zero or more flags (FOLLOW_LINKS,
[33] Fix | Delete
* HARD_LOOKUP, [NO_CACHE], MASTER_ONLY, EXPAND_NAME)
[34] Fix | Delete
*
[35] Fix | Delete
* nis_add (name, obj) adds objects to the NIS+ namespace.
[36] Fix | Delete
* const nis_name name: fully qualified NIS+ name.
[37] Fix | Delete
* const nis_object *obj: object members zo_name and zo_domain will be
[38] Fix | Delete
* constructed from name.
[39] Fix | Delete
*
[40] Fix | Delete
* nis_remove (name, obj) removes objects from the NIS+ namespace.
[41] Fix | Delete
* const nis_name name: fully qualified NIS+ name.
[42] Fix | Delete
* const nis_object *obj: if not NULL, it is assumed to point to a copy
[43] Fix | Delete
* of the object being removed. In this case, if
[44] Fix | Delete
* the object on the server does not have the same
[45] Fix | Delete
* object identifier as the object being passed,
[46] Fix | Delete
* the operation will fail with the NIS_NOTSAMEOBJ
[47] Fix | Delete
* error.
[48] Fix | Delete
*
[49] Fix | Delete
* nis_modify (name, obj) can change specific attributes of an object
[50] Fix | Delete
* that already exists in the namespace.
[51] Fix | Delete
*/
[52] Fix | Delete
extern nis_result *nis_lookup (const_nis_name name, unsigned int flags)
[53] Fix | Delete
;
[54] Fix | Delete
extern nis_result *nis_add (const_nis_name name, const nis_object *obj)
[55] Fix | Delete
;
[56] Fix | Delete
extern nis_result *nis_remove (const_nis_name name,
[57] Fix | Delete
const nis_object *obj);
[58] Fix | Delete
extern nis_result *nis_modify (const_nis_name name,
[59] Fix | Delete
const nis_object *obj);
[60] Fix | Delete
[61] Fix | Delete
/* nis_tables: These functions are used to search and modify NIS+ tables.
[62] Fix | Delete
*
[63] Fix | Delete
* nis_list (table_name, flags, callback(table_name, obj, userdata), userdata)
[64] Fix | Delete
* search a table in the NIS+ namespace.
[65] Fix | Delete
* const nis_name table_name: indexed name ([xx=yy],table.dir)
[66] Fix | Delete
* unsigned int flags: logically ORing one or more flags (FOLLOW_LINKS,
[67] Fix | Delete
* [FOLLOW_PATH], HARD_LOOKUP, [ALL_RESULTS], [NO_CACHE],
[68] Fix | Delete
* MASTER_ONLY, EXPAND_NAME, RETURN_RESULT)
[69] Fix | Delete
* callback(): callback is an optional pointer to a function that will
[70] Fix | Delete
* process the ENTRY type objects that are returned from the
[71] Fix | Delete
* search. If this pointer is NULL, then all entries that match
[72] Fix | Delete
* the search criteria are returned in the nis_result structure,
[73] Fix | Delete
* otherwise this function will be called once for each
[74] Fix | Delete
* entry returned.
[75] Fix | Delete
* void *userdata: passed to callback function along with the returned
[76] Fix | Delete
* entry object.
[77] Fix | Delete
*
[78] Fix | Delete
* nis_add_entry (table_name, obj, flags) will add the NIS+ object to the
[79] Fix | Delete
* NIS+ table_name.
[80] Fix | Delete
* const nis_name table_name
[81] Fix | Delete
* const nis_object *obj
[82] Fix | Delete
* unsigned int flags: 0, ADD_OVERWRITE, RETURN_RESULT
[83] Fix | Delete
*
[84] Fix | Delete
* nis_modify_entry (name, obj, flags) modifies an object identified by name.
[85] Fix | Delete
* const nis_name name: object identifier
[86] Fix | Delete
* const nis_object *obj: should point to an entry with the EN_MODIFIED
[87] Fix | Delete
* flag set in each column that contains new
[88] Fix | Delete
* information.
[89] Fix | Delete
* unsigned int flags: 0, MOD_SAMEOBJ, RETURN_RESULT
[90] Fix | Delete
*
[91] Fix | Delete
* nis_remove_entry (table_name, obj, flags) removes a set of entries
[92] Fix | Delete
* identified by table_name from the table.
[93] Fix | Delete
* const nis_name table_name: indexed NIS+ name
[94] Fix | Delete
* const nis_object *obj: if obj is non-null, it is presumed to point to
[95] Fix | Delete
* a cached copy of the entry. When the removal is
[96] Fix | Delete
* attempted, and the object that would be removed
[97] Fix | Delete
* is not the same as the cached object pointed to
[98] Fix | Delete
* by object then the operation will fail with an
[99] Fix | Delete
* NIS_NOTSAMEOBJ error
[100] Fix | Delete
* unsigned int flags: 0, REM_MULTIPLE
[101] Fix | Delete
*
[102] Fix | Delete
* nis_first_entry (table_name) fetches entries from a table one at a time.
[103] Fix | Delete
* const nis_name table_name
[104] Fix | Delete
*
[105] Fix | Delete
* nis_next_entry (table_name, cookie) retrieves the "next" entry from a
[106] Fix | Delete
* table specified by table_name.
[107] Fix | Delete
* const nis_name table_name:
[108] Fix | Delete
* const netobj *cookie: The value of cookie from the nis_result structure
[109] Fix | Delete
* form the previous call.
[110] Fix | Delete
*/
[111] Fix | Delete
extern nis_result *nis_list (const_nis_name __name, unsigned int __flags,
[112] Fix | Delete
int (*__callback)(const_nis_name __table_name,
[113] Fix | Delete
const nis_object *__obj,
[114] Fix | Delete
const void *__userdata),
[115] Fix | Delete
const void *__userdata);
[116] Fix | Delete
extern nis_result *nis_add_entry (const_nis_name __table_name,
[117] Fix | Delete
const nis_object *__obj,
[118] Fix | Delete
unsigned int __flags);
[119] Fix | Delete
extern nis_result *nis_modify_entry (const_nis_name __name,
[120] Fix | Delete
const nis_object *__obj,
[121] Fix | Delete
unsigned int __flags);
[122] Fix | Delete
extern nis_result *nis_remove_entry (const_nis_name __table_name,
[123] Fix | Delete
const nis_object *__obj,
[124] Fix | Delete
unsigned int __flags);
[125] Fix | Delete
extern nis_result *nis_first_entry (const_nis_name __table_name);
[126] Fix | Delete
extern nis_result *nis_next_entry (const_nis_name __table_name,
[127] Fix | Delete
const netobj *__cookie);
[128] Fix | Delete
/*
[129] Fix | Delete
** nis_server
[130] Fix | Delete
*/
[131] Fix | Delete
extern nis_error nis_mkdir (const_nis_name __dirname,
[132] Fix | Delete
const nis_server *__machine);
[133] Fix | Delete
extern nis_error nis_rmdir (const_nis_name __dirname,
[134] Fix | Delete
const nis_server *__machine);
[135] Fix | Delete
extern nis_error nis_servstate (const nis_server *__machine,
[136] Fix | Delete
const nis_tag *__tags, int __numtags,
[137] Fix | Delete
nis_tag **__result);
[138] Fix | Delete
extern nis_error nis_stats (const nis_server *__machine,
[139] Fix | Delete
const nis_tag *__tags, int __numtags,
[140] Fix | Delete
nis_tag **__result);
[141] Fix | Delete
extern void nis_freetags (nis_tag *__tags, int __numtags);
[142] Fix | Delete
extern nis_server **nis_getservlist (const_nis_name __dirname);
[143] Fix | Delete
extern void nis_freeservlist (nis_server **__machines);
[144] Fix | Delete
[145] Fix | Delete
/*
[146] Fix | Delete
** nis_subr
[147] Fix | Delete
*/
[148] Fix | Delete
extern nis_name nis_leaf_of (const_nis_name __name);
[149] Fix | Delete
extern nis_name nis_leaf_of_r (const_nis_name __name, char *__buffer,
[150] Fix | Delete
size_t __buflen);
[151] Fix | Delete
extern nis_name nis_name_of (const_nis_name __name);
[152] Fix | Delete
extern nis_name nis_name_of_r (const_nis_name __name, char *__buffer,
[153] Fix | Delete
size_t __buflen);
[154] Fix | Delete
extern nis_name nis_domain_of (const_nis_name __name);
[155] Fix | Delete
extern nis_name nis_domain_of_r (const_nis_name __name, char *__buffer,
[156] Fix | Delete
size_t __buflen);
[157] Fix | Delete
extern nis_name *nis_getnames (const_nis_name __name);
[158] Fix | Delete
extern void nis_freenames (nis_name *__namelist);
[159] Fix | Delete
extern name_pos nis_dir_cmp (const_nis_name __n1, const_nis_name __n2);
[160] Fix | Delete
extern nis_object *nis_clone_object (const nis_object *__src,
[161] Fix | Delete
nis_object *__dest);
[162] Fix | Delete
extern void nis_destroy_object (nis_object *__obj);
[163] Fix | Delete
extern void nis_print_object (const nis_object *__obj);
[164] Fix | Delete
[165] Fix | Delete
/*
[166] Fix | Delete
** nis_local_names
[167] Fix | Delete
*/
[168] Fix | Delete
extern nis_name nis_local_group (void);
[169] Fix | Delete
extern nis_name nis_local_directory (void);
[170] Fix | Delete
extern nis_name nis_local_principal (void);
[171] Fix | Delete
extern nis_name nis_local_host (void);
[172] Fix | Delete
[173] Fix | Delete
/*
[174] Fix | Delete
** nis_error
[175] Fix | Delete
*/
[176] Fix | Delete
extern const char *nis_sperrno (const nis_error __status);
[177] Fix | Delete
extern void nis_perror (const nis_error __status, const char *__label);
[178] Fix | Delete
extern void nis_lerror (const nis_error __status, const char *__label);
[179] Fix | Delete
extern char *nis_sperror (const nis_error status, const char *__label);
[180] Fix | Delete
extern char *nis_sperror_r (const nis_error __status, const char *__label,
[181] Fix | Delete
char *__buffer, size_t __buflen);
[182] Fix | Delete
/*
[183] Fix | Delete
** nis_groups
[184] Fix | Delete
*/
[185] Fix | Delete
extern bool_t nis_ismember (const_nis_name __principal,
[186] Fix | Delete
const_nis_name __group);
[187] Fix | Delete
extern nis_error nis_addmember (const_nis_name __member,
[188] Fix | Delete
const_nis_name __group);
[189] Fix | Delete
extern nis_error nis_removemember (const_nis_name __member,
[190] Fix | Delete
const_nis_name __group);
[191] Fix | Delete
extern nis_error nis_creategroup (const_nis_name __group,
[192] Fix | Delete
unsigned int __flags);
[193] Fix | Delete
extern nis_error nis_destroygroup (const_nis_name __group);
[194] Fix | Delete
extern void nis_print_group_entry (const_nis_name __group);
[195] Fix | Delete
extern nis_error nis_verifygroup (const_nis_name __group);
[196] Fix | Delete
[197] Fix | Delete
/*
[198] Fix | Delete
** nis_ping
[199] Fix | Delete
*/
[200] Fix | Delete
extern void nis_ping (const_nis_name __dirname, uint32_t __utime,
[201] Fix | Delete
const nis_object *__dirobj);
[202] Fix | Delete
extern nis_result *nis_checkpoint (const_nis_name __dirname);
[203] Fix | Delete
[204] Fix | Delete
/*
[205] Fix | Delete
** nis_print (XXX INTERNAL FUNCTIONS, SHOULD NOT BE USED !!)
[206] Fix | Delete
*/
[207] Fix | Delete
extern void nis_print_result (const nis_result *__result);
[208] Fix | Delete
extern void nis_print_rights (unsigned int __rights);
[209] Fix | Delete
extern void nis_print_directory (const directory_obj *__dirobj);
[210] Fix | Delete
extern void nis_print_group (const group_obj *__grpobj);
[211] Fix | Delete
extern void nis_print_table (const table_obj *__tblobj);
[212] Fix | Delete
extern void nis_print_link (const link_obj *__lnkobj);
[213] Fix | Delete
extern void nis_print_entry (const entry_obj *__enobj);
[214] Fix | Delete
[215] Fix | Delete
/*
[216] Fix | Delete
** nis_file (XXX INTERNAL FUNCTIONS, SHOULD NOT BE USED !!)
[217] Fix | Delete
*/
[218] Fix | Delete
extern directory_obj *readColdStartFile (void);
[219] Fix | Delete
extern bool_t writeColdStartFile (const directory_obj *__dirobj);
[220] Fix | Delete
extern nis_object *nis_read_obj (const char *__obj);
[221] Fix | Delete
extern bool_t nis_write_obj (const char *__file, const nis_object *__obj);
[222] Fix | Delete
[223] Fix | Delete
/*
[224] Fix | Delete
** nis_clone - (XXX INTERNAL FUNCTIONS, SHOULD NOT BE USED !!)
[225] Fix | Delete
*/
[226] Fix | Delete
extern directory_obj *nis_clone_directory (const directory_obj *__src,
[227] Fix | Delete
directory_obj *__dest);
[228] Fix | Delete
extern nis_result *nis_clone_result (const nis_result *__src,
[229] Fix | Delete
nis_result *__dest);
[230] Fix | Delete
[231] Fix | Delete
/* nis_free - nis_freeresult */
[232] Fix | Delete
extern void nis_freeresult (nis_result *__result);
[233] Fix | Delete
/* (XXX THE FOLLOWING ARE INTERNAL FUNCTIONS, SHOULD NOT BE USED !!) */
[234] Fix | Delete
extern void nis_free_request (ib_request *__req);
[235] Fix | Delete
extern void nis_free_directory (directory_obj *__dirobj);
[236] Fix | Delete
extern void nis_free_object (nis_object *__obj);
[237] Fix | Delete
[238] Fix | Delete
/* (XXX INTERNAL FUNCTIONS, SHOULD NOT BE USED !!) */
[239] Fix | Delete
extern nis_name __nis_default_owner (char *);
[240] Fix | Delete
extern nis_name __nis_default_group (char *);
[241] Fix | Delete
extern uint32_t __nis_default_ttl (char *);
[242] Fix | Delete
extern unsigned int __nis_default_access (char *, unsigned int);
[243] Fix | Delete
extern fd_result *__nis_finddirectory (directory_obj *, const_nis_name);
[244] Fix | Delete
extern void __free_fdresult (fd_result *);
[245] Fix | Delete
extern uint32_t __nis_hash (const void *__keyarg, size_t __len);
[246] Fix | Delete
[247] Fix | Delete
/* NIS+ cache locking */
[248] Fix | Delete
extern int __nis_lock_cache (void);
[249] Fix | Delete
extern int __nis_unlock_cache (void);
[250] Fix | Delete
[251] Fix | Delete
/* (XXX INTERNAL FUNCTIONS, ONLY FOR rpc.nisd AND glibc !!) */
[252] Fix | Delete
#if defined (NIS_INTERNAL)
[253] Fix | Delete
[254] Fix | Delete
struct dir_binding
[255] Fix | Delete
{
[256] Fix | Delete
CLIENT *clnt; /* RPC CLIENT handle */
[257] Fix | Delete
nis_server *server_val; /* List of servers */
[258] Fix | Delete
unsigned int server_len; /* # of servers */
[259] Fix | Delete
unsigned int server_used; /* Which server we are bind in the moment ? */
[260] Fix | Delete
unsigned int current_ep; /* Which endpoint of the server are in use? */
[261] Fix | Delete
unsigned int trys; /* How many server have we tried ? */
[262] Fix | Delete
unsigned int class; /* From which class is server_val ? */
[263] Fix | Delete
bool_t master_only; /* Is only binded to the master */
[264] Fix | Delete
bool_t use_auth; /* Do we use AUTH ? */
[265] Fix | Delete
bool_t use_udp; /* Do we use UDP ? */
[266] Fix | Delete
struct sockaddr_in addr; /* Server's IP address */
[267] Fix | Delete
int socket; /* Server's local socket */
[268] Fix | Delete
};
[269] Fix | Delete
typedef struct dir_binding dir_binding;
[270] Fix | Delete
[271] Fix | Delete
extern nis_error __nisbind_create (dir_binding *, const nis_server *,
[272] Fix | Delete
unsigned int, unsigned int, unsigned int,
[273] Fix | Delete
unsigned int);
[274] Fix | Delete
extern nis_error __nisbind_connect (dir_binding *);
[275] Fix | Delete
extern nis_error __nisbind_next (dir_binding *);
[276] Fix | Delete
extern void __nisbind_destroy (dir_binding *);
[277] Fix | Delete
extern nis_error __nisfind_server (const_nis_name, int, directory_obj **,
[278] Fix | Delete
dir_binding *, unsigned int);
[279] Fix | Delete
[280] Fix | Delete
#endif
[281] Fix | Delete
[282] Fix | Delete
#ifdef __cplusplus
[283] Fix | Delete
}
[284] Fix | Delete
#endif
[285] Fix | Delete
[286] Fix | Delete
#endif /* __RPCSVC_NISLIB_H__ */
[287] Fix | Delete
[288] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function