1998-12-01  Thorsten Kukuk  <kukuk@vt.uni-paderborn.de>

	* sunrpc/auth_des.c: Use new XDR int32 functions for integers.
	* sunrpc/rpc/xdr.h: Add IXDR INT32 functions.
	* sunrpc/rpc_hout.c: Remove (u_long) casts in defines to avoid
	conflicts with new solaris version.
	* sunrpc/rpc_main.c: Fix bug in generating Makefile name (malloc
	doesn't zero allocated memory).
	* sunrpc/rpc_svcout.c: Local variables now starts with a _ to avoid
	conflicts with xdr functions.  Solves PR libc/877.
	* nis/rpcsvc/nis.x: Use always uint32_t.
	* nis/rpcsvc/nis.h: Likewise.
	* nis/rpcsvc/nis_object.x: Likewise.

1998-12-01  Ulrich Drepper  <drepper@cygnus.com>

	* math/libm-test.c: Various cleanups.  Patch by Zack Weinberg.

	* sysdeps/unix/sysv/linux/alpha/setfpucw.c: Use correct type for
	parameter.  Patch by Christian Gafton.

	* string/envz.h: Add prototype for envz_remove.
	Reported by Andreas Jaeger.
This commit is contained in:
Ulrich Drepper 1998-12-01 11:25:26 +00:00
parent 28ab8526f2
commit ee586e0ec4
13 changed files with 1072 additions and 1119 deletions

View File

@ -1,3 +1,27 @@
1998-12-01 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* sunrpc/auth_des.c: Use new XDR int32 functions for integers.
* sunrpc/rpc/xdr.h: Add IXDR INT32 functions.
* sunrpc/rpc_hout.c: Remove (u_long) casts in defines to avoid
conflicts with new solaris version.
* sunrpc/rpc_main.c: Fix bug in generating Makefile name (malloc
doesn't zero allocated memory).
* sunrpc/rpc_svcout.c: Local variables now starts with a _ to avoid
conflicts with xdr functions. Solves PR libc/877.
* nis/rpcsvc/nis.x: Use always uint32_t.
* nis/rpcsvc/nis.h: Likewise.
* nis/rpcsvc/nis_object.x: Likewise.
1998-12-01 Ulrich Drepper <drepper@cygnus.com>
* math/libm-test.c: Various cleanups. Patch by Zack Weinberg.
* sysdeps/unix/sysv/linux/alpha/setfpucw.c: Use correct type for
parameter. Patch by Christian Gafton.
* string/envz.h: Add prototype for envz_remove.
Reported by Andreas Jaeger.
1998-11-30 Mark Kettenis <kettenis@phys.uva.nl>
* mach/Versions [libc, GLIBC_2.0]: Add __spin_lock,

10
FAQ.in
View File

@ -1140,6 +1140,16 @@ taken care in user programs using the firewall structures and therefore
those programs (ipfw is AFAIK the only one) should deal with this problem
themselves.
?? I get floods of warnings when I use -Wconversion and include
<string.h> or <math.h>.
{ZW} <string.h> and <math.h> intentionally use prototypes to override
argument promotion. -Wconversion warns about all these. You can safely
ignore the warnings.
-Wconversion isn't really intended for production use, only for shakedown
compiles after converting an old program to standard C.
? Miscellaneous

File diff suppressed because it is too large Load Diff

View File

@ -119,8 +119,8 @@ enum nstype {
typedef enum nstype nstype;
struct oar_mask {
u_int oa_rights;
zotypes oa_otype;
uint32_t oa_rights;
zotypes oa_otype;
};
typedef struct oar_mask oar_mask;
@ -137,7 +137,7 @@ struct nis_server {
u_int ep_len;
endpoint *ep_val;
} ep;
u_int key_type;
uint32_t key_type;
netobj pkey;
};
typedef struct nis_server nis_server;
@ -164,7 +164,7 @@ typedef struct directory_obj directory_obj;
#define EN_ASN1 64
struct entry_col {
u_int ec_flags;
uint32_t ec_flags;
struct {
u_int ec_value_len;
char *ec_value_val;
@ -182,7 +182,7 @@ struct entry_obj {
typedef struct entry_obj entry_obj;
struct group_obj {
u_int gr_flags;
uint32_t gr_flags;
struct {
u_int gr_members_len;
nis_name *gr_members_val;
@ -210,8 +210,8 @@ typedef struct link_obj link_obj;
struct table_col {
char *tc_name;
u_int tc_flags;
u_int tc_rights;
uint32_t tc_flags;
uint32_t tc_rights;
};
typedef struct table_col table_col;
@ -255,7 +255,7 @@ struct nis_object {
nis_name zo_owner;
nis_name zo_group;
nis_name zo_domain;
u_int zo_access;
uint32_t zo_access;
uint32_t zo_ttl;
objdata zo_data;
};
@ -344,7 +344,7 @@ struct ib_request {
u_int ibr_srch_len;
nis_attr *ibr_srch_val;
} ibr_srch;
u_int ibr_flags;
uint32_t ibr_flags;
struct {
u_int ibr_obj_len;
nis_object *ibr_obj_val;
@ -408,7 +408,7 @@ struct cp_result {
typedef struct cp_result cp_result;
struct nis_tag {
u_int tag_type;
uint32_t tag_type;
char *tag_val;
};
typedef struct nis_tag nis_tag;

View File

@ -37,9 +37,9 @@
% * 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
% * 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)
% *
@ -51,9 +51,6 @@
#if RPC_HDR
%#include <rpc/xdr.h>
#endif
#if RPC_SVC
%#include "nis_svc.h"
#endif
/* Include the RPC Language description of NIS objects */
#include "nis_object.x"
@ -111,11 +108,11 @@ enum nis_error {
};
/*
/*
* 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
* This is the standard result (in the protocol) of most of the nis
* requests.
*/
@ -129,11 +126,11 @@ struct nis_result {
uint32_t cticks; /* Client ticks */
};
/*
* A Name Service request
* This request is used to access the name space, ns_name is the name
/*
* 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.
* add/modify, a copy of the original for remove.
*/
struct ns_request {
@ -141,7 +138,7 @@ struct ns_request {
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
@ -153,7 +150,7 @@ struct ns_request {
struct ib_request {
nis_name ibr_name; /* The name of the Table */
nis_attr ibr_srch<>; /* The search critereia */
u_int ibr_flags; /* Optional flags */
uint32_t ibr_flags; /* Optional flags */
nis_object ibr_obj<1>; /* optional object (add/modify) */
nis_server ibr_cbhost<1>; /* Optional callback info */
u_int ibr_bufsize; /* Optional first/next bufsize */
@ -161,7 +158,7 @@ struct ib_request {
};
/*
* This argument to the PING call notifies the replicas that something in
* 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.
*/
@ -170,8 +167,8 @@ struct ping_args {
uint32_t stamp; /* timestamp of the transaction */
};
/*
* These are the type of entries that are stored in the transaction log,
/*
* 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
* a "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
@ -189,13 +186,13 @@ enum log_entry_t {
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
* 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'.
* 'name'.
*/
struct log_entry {
uint32_t le_time; /* Time in seconds */
@ -211,7 +208,7 @@ struct log_result {
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 */
uint32_t cp_zticks; /* Service 'ticks' */
@ -220,17 +217,17 @@ struct cp_result {
/*
* This structure defines a generic NIS tag list. The taglist contains
* zero or tags, each of which is a type and a value. (u_int).
* zero or tags, each of which is a type and a value. (u_int).
* These are used to report statistics (see tag definitions below)
* and to set or reset state variables.
*/
struct nis_tag {
u_int tag_type; /* Statistic tag (may vary) */
string tag_val<>; /* Statistic value may also vary */
uint32_t tag_type; /* Statistic tag (may vary) */
string tag_val<>; /* Statistic value may also vary */
};
struct nis_taglist {
nis_tag tags<>; /* List of tags */
nis_tag tags<>; /* List of tags */
};
struct dump_args {
@ -247,7 +244,7 @@ struct fd_args {
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 dir_data<>; /* Directory Data (XDR'ed) */
opaque signature<>; /* Signature of the source */
};
@ -258,14 +255,14 @@ struct nis_bound_endpoint {
endpoint ep;
int generation;
int rank;
u_int flags;
uint32_t flags;
int hostnum;
int epnum;
nis_name uaddr;
endpoint cbep;
};
typedef struct nis_bound_endpoint nis_bound_endpoint;
struct nis_bound_directory {
int generation;
int min_rank; /* minimum rank of bound endpoints */
@ -276,7 +273,7 @@ struct nis_bound_directory {
typedef struct nis_bound_directory nis_bound_directory;
%#define bep_len BEP.BEP_len
%#define bep_val BEP.BEP_val
struct nis_active_endpoint {
endpoint ep;
nis_name hostname;
@ -287,27 +284,11 @@ struct nis_active_endpoint {
endpoint cbep;
};
typedef struct nis_active_endpoint nis_active_endpoint;
%/* defines for nis_bound_endpoint.flags */
%#define NIS_BOUND 0x1
%#define NIS_TRANSIENT_ERRORS 0x2
/*
* 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).
*/
#ifdef RPC_SVC
%#include "nis_svc.h"
#endif
#ifdef RPC_CLNT
%#include "nis_clnt.h"
#endif
program NIS_PROG {
/* RPC Language description of the NIS+ protocol */
@ -331,10 +312,10 @@ program NIS_PROG {
/* 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;
@ -349,16 +330,16 @@ program NIS_PROG {
/* 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;
@ -411,8 +392,8 @@ program NIS_PROG {
%#define NIS_GROUP(a, m) (((a) & ((m) << 8)) != 0)
%#define NIS_OWNER(a, m) (((a) & ((m) << 16)) != 0)
%#define NIS_NOBODY(a, m) (((a) & ((m) << 24)) != 0)
%/*
% * EOL Alert - The following non-prefixed test macros are
%/*
% * EOL Alert - The following non-prefixed test macros are
% * here for backward compatability, and will be not be present
% * in future releases - use the NIS_*() macros above.
% */
@ -475,12 +456,12 @@ program NIS_PROG {
%
%/*
% * 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
% * 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.
% */

View File

@ -13,12 +13,12 @@
%#define __nis_object_h
%
#endif
/*
/*
* This file defines the format for a NIS object in RPC language.
* It is included by the main .x file and the database access protocol
* file. It is common because both of them need to deal with the same
* type of object. Generating the actual code though is a bit messy because
* the nis.x file and the nis_dba.x file will generate xdr routines to
* the nis.x file and the nis_dba.x file will generate xdr routines to
* encode/decode objects when only one set is needed. Such is life when
* one is using rpcgen.
*
@ -50,7 +50,7 @@ const NIS_PK_DHEXT = 4; /* Extended Diffie-Hellman for RPC-GSS */
/*
* The fundamental name type of NIS. The name may consist of two parts,
* the first being the fully qualified name, and the second being an
* the first being the fully qualified name, and the second being an
* optional set of attribute/value pairs.
*/
struct nis_attr {
@ -73,7 +73,7 @@ typedef string nis_name<>; /* The NIS name itself. */
*/
enum zotypes {
BOGUS_OBJ = 0, /* Uninitialized object structure */
NO_OBJ = 1, /* NULL object (no data) */
DIRECTORY_OBJ = 2, /* Directory object describing domain */
@ -82,7 +82,7 @@ enum zotypes {
ENTRY_OBJ = 5, /* Entry object (a database record) */
LINK_OBJ = 6, /* A name link. */
PRIVATE_OBJ = 7, /* Private object (all opaque data) */
NIS_BOGUS_OBJ = 0, /* Uninitialized object structure */
NIS_NO_OBJ = 1, /* NULL object (no data) */
NIS_DIRECTORY_OBJ = 2, /* Directory object describing domain */
@ -114,18 +114,18 @@ enum nstype {
* DIRECTORY - The name service object. These objects identify other name
* servers that are serving some portion of the name space. Each has a
* type associated with it. The resolver library will note whether or not
* is has the needed routines to access that type of service.
* The oarmask structure defines an access rights mask on a per object
* type basis for the name spaces. The only bits currently used are
* is has the needed routines to access that type of service.
* The oarmask structure defines an access rights mask on a per object
* type basis for the name spaces. The only bits currently used are
* create and destroy. By enabling or disabling these access rights for
* a specific object type for a one of the accessor entities (owner,
* group, world) the administrator can control what types of objects
* may be freely added to the name space and which require the
* group, world) the administrator can control what types of objects
* may be freely added to the name space and which require the
* administrator's approval.
*/
struct oar_mask {
u_int oa_rights; /* Access rights mask */
zotypes oa_otype; /* Object type */
uint32_t oa_rights; /* Access rights mask */
zotypes oa_otype; /* Object type */
};
struct endpoint {
@ -142,7 +142,7 @@ struct endpoint {
struct nis_server {
nis_name name; /* Principal name of the server */
endpoint ep<>; /* Universal addr(s) for server */
u_int key_type; /* Public key type */
uint32_t key_type; /* Public key type */
netobj pkey; /* server's public key */
};
@ -154,11 +154,11 @@ struct directory_obj {
oar_mask do_armask<>; /* Create/Destroy rights by object type */
};
/*
* ENTRY - This is one row of data from an information base.
* The type value is used by the client library to convert the entry to
/*
* ENTRY - This is one row of data from an information base.
* The type value is used by the client library to convert the entry to
* it's internal structure representation. The Table name is a back pointer
* to the table where the entry is stored. This allows the client library
* to the table where the entry is stored. This allows the client library
* to determine where to send a request if the client wishes to change this
* entry but got to it through a LINK rather than directly.
* If the entry is a "standalone" entry then this field is void.
@ -170,8 +170,8 @@ const EN_MODIFIED = 8; /* Indicates entry is modified. */
const EN_ASN1 = 64; /* Means contents use ASN.1 encoding */
struct entry_col {
u_int ec_flags; /* Flags for this value */
opaque ec_value<>; /* It's textual value */
uint32_t ec_flags; /* Flags for this value */
opaque ec_value<>; /* It's textual value */
};
struct entry_obj {
@ -182,11 +182,11 @@ struct entry_obj {
/*
* GROUP - The group object contains a list of NIS principal names. Groups
* are used to authorize principals. Each object has a set of access rights
* for members of its group. Principal names in groups are in the form
* for members of its group. Principal names in groups are in the form
* name.directory and recursive groups are expressed as @groupname.directory
*/
struct group_obj {
u_int gr_flags; /* Flags controlling group */
uint32_t gr_flags; /* Flags controlling group */
nis_name gr_members<>; /* List of names in group */
};
@ -204,8 +204,8 @@ struct link_obj {
};
/*
* TABLE - This is the table object. It implements a simple
* data base that applications and use for configuration or
* TABLE - This is the table object. It implements a simple
* data base that applications and use for configuration or
* administration purposes. The role of the table is to group together
* a set of related entries. Tables are the simple database component
* of NIS. Like many databases, tables are logically divided into columns
@ -216,7 +216,7 @@ struct link_obj {
* Within the definition of each column there is a flags variable, this
* variable contains flags which determine whether or not the column is
* searchable, contains binary data, and access rights for the entry objects
* column value.
* column value.
*/
const TA_BINARY = 1; /* Means table data is binary */
@ -228,9 +228,9 @@ const TA_MODIFIED = 32; /* Means this columns attrs are modified*/
const TA_ASN1 = 64; /* Means contents use ASN.1 encoding */
struct table_col {
string tc_name<64>; /* Column Name */
u_int tc_flags; /* control flags */
u_int tc_rights; /* Access rights mask */
string tc_name<64>; /* Column Name */
uint32_t tc_flags; /* control flags */
uint32_t tc_rights; /* Access rights mask */
};
struct table_obj {
@ -242,7 +242,7 @@ struct table_obj {
};
/*
* This union joins together all of the currently known objects.
* This union joins together all of the currently known objects.
*/
union objdata switch (zotypes zo_type) {
case NIS_DIRECTORY_OBJ :
@ -269,16 +269,16 @@ union objdata switch (zotypes zo_type) {
* This is the basic NIS object data type. It consists of a generic part
* which all objects contain, and a specialized part which varies depending
* on the type of the object. All of the specialized sections have been
* described above. You might have wondered why they all start with an
* integer size, followed by the useful data. The answer is, when the
* server doesn't recognize the type returned it treats it as opaque data.
* described above. You might have wondered why they all start with an
* integer size, followed by the useful data. The answer is, when the
* server doesn't recognize the type returned it treats it as opaque data.
* And the definition for opaque data is {int size; char *data;}. In this
* way, servers and utility routines that do not understand a given type
* may still pass it around. One has to be careful in setting
* this variable accurately, it must take into account such things as
* XDR padding of structures etc. The best way to set it is to note one's
* position in the XDR encoding stream, encode the structure, look at the
* new position and calculate the size.
* new position and calculate the size.
*/
struct nis_oid {
uint32_t ctime; /* Time of objects creation */
@ -286,12 +286,12 @@ struct nis_oid {
};
struct nis_object {
nis_oid zo_oid; /* object identity verifier. */
nis_oid zo_oid; /* object identity verifier. */
nis_name zo_name; /* The NIS name for this object */
nis_name zo_owner; /* NIS name of object owner. */
nis_name zo_group; /* NIS name of access group. */
nis_name zo_domain; /* The administrator for the object */
u_int zo_access; /* Access rights (owner, group, world) */
uint32_t zo_access; /* Access rights (owner, group, world) */
uint32_t zo_ttl; /* Object's time to live in seconds. */
objdata zo_data; /* Data structure for this type */
};

View File

@ -1,5 +1,5 @@
/* Routines for dealing with '\0' separated environment vectors
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
The GNU C Library is free software; you can redistribute it and/or
@ -55,6 +55,10 @@ extern error_t envz_merge __P ((char **__envz, size_t *__envz_len,
__const char *__envz2, size_t __envz2_len,
int __override));
/* Remove the entry for NAME from ENVZ & ENVZ_LEN, if any. */
extern void envz_remove __P ((char **__envz, size_t *__envz_len,
__const char *__name));
/* Remove null entries. */
extern void envz_strip __P ((char **__envz, size_t *__envz_len));

View File

@ -70,8 +70,7 @@ static void authdes_destroy (AUTH *);
static bool_t synchronize (struct sockaddr *, struct timeval *)
internal_function;
static struct auth_ops authdes_ops =
{
static struct auth_ops authdes_ops = {
authdes_nextverf,
authdes_marshal,
authdes_validate,
@ -83,23 +82,22 @@ static struct auth_ops authdes_ops =
/*
* This struct is pointed to by the ah_private field of an "AUTH *"
*/
struct ad_private
{
char *ad_fullname; /* client's full name */
u_int ad_fullnamelen; /* length of name, rounded up */
char *ad_servername; /* server's full name */
u_int ad_servernamelen; /* length of name, rounded up */
u_int ad_window; /* client specified window */
bool_t ad_dosync; /* synchronize? */
struct sockaddr ad_syncaddr; /* remote host to synch with */
struct timeval ad_timediff; /* server's time - client's time */
u_long ad_nickname; /* server's nickname for client */
struct authdes_cred ad_cred; /* storage for credential */
struct authdes_verf ad_verf; /* storage for verifier */
struct timeval ad_timestamp; /* timestamp sent */
des_block ad_xkey; /* encrypted conversation key */
u_char ad_pkey[1024]; /* Servers actual public key */
};
struct ad_private {
char *ad_fullname; /* client's full name */
u_int ad_fullnamelen; /* length of name, rounded up */
char *ad_servername; /* server's full name */
u_int ad_servernamelen; /* length of name, rounded up */
uint32_t ad_window; /* client specified window */
bool_t ad_dosync; /* synchronize? */
struct sockaddr ad_syncaddr; /* remote host to synch with */
struct timeval ad_timediff; /* server's time - client's time */
u_long ad_nickname; /* server's nickname for client */
struct authdes_cred ad_cred; /* storage for credential */
struct authdes_verf ad_verf; /* storage for verifier */
struct timeval ad_timestamp; /* timestamp sent */
des_block ad_xkey; /* encrypted conversation key */
u_char ad_pkey[1024]; /* Servers actual public key */
};
/*
@ -236,7 +234,7 @@ authdes_marshal (AUTH * auth, XDR * xdrs)
des_block cryptbuf[2];
des_block ivec;
int status;
int len;
unsigned int len;
register long *ixdr;
/*
@ -255,14 +253,15 @@ authdes_marshal (AUTH * auth, XDR * xdrs)
/*
* XDR the timestamp and possibly some other things, then
* encrypt them.
* XXX We have a real Year 2038 problem here.
*/
ixdr = (long *) cryptbuf;
IXDR_PUT_LONG (ixdr, ad->ad_timestamp.tv_sec);
IXDR_PUT_LONG (ixdr, ad->ad_timestamp.tv_usec);
if (ad->ad_cred.adc_namekind == ADN_FULLNAME)
{
IXDR_PUT_U_LONG (ixdr, ad->ad_window);
IXDR_PUT_U_LONG (ixdr, ad->ad_window - 1);
IXDR_PUT_U_INT32 (ixdr, ad->ad_window);
IXDR_PUT_U_INT32 (ixdr, ad->ad_window - 1);
ivec.key.high = ivec.key.low = 0;
status = cbc_crypt ((char *) &auth->ah_key, (char *) cryptbuf,
2 * sizeof (des_block), DES_ENCRYPT | DES_HW, (char *) &ivec);
@ -304,29 +303,29 @@ authdes_marshal (AUTH * auth, XDR * xdrs)
if ((ixdr = xdr_inline (xdrs, 2 * BYTES_PER_XDR_UNIT)) != NULL)
{
IXDR_PUT_LONG (ixdr, AUTH_DES);
IXDR_PUT_LONG (ixdr, len);
IXDR_PUT_INT32 (ixdr, AUTH_DES);
IXDR_PUT_U_INT32 (ixdr, len);
}
else
{
ATTEMPT (xdr_putlong (xdrs, (long *)&auth->ah_cred.oa_flavor));
ATTEMPT (xdr_putlong (xdrs, (long *)&len));
ATTEMPT (xdr_putint32 (xdrs, &auth->ah_cred.oa_flavor));
ATTEMPT (xdr_putint32 (xdrs, &len));
}
ATTEMPT (xdr_authdes_cred (xdrs, cred));
len = (2 + 1) * BYTES_PER_XDR_UNIT;
if ((ixdr = xdr_inline (xdrs, 2 * BYTES_PER_XDR_UNIT)) != NULL)
{
IXDR_PUT_LONG (ixdr, AUTH_DES);
IXDR_PUT_LONG (ixdr, len);
IXDR_PUT_INT32 (ixdr, AUTH_DES);
IXDR_PUT_U_INT32 (ixdr, len);
}
else
{
ATTEMPT (xdr_putlong (xdrs, (long *)&auth->ah_verf.oa_flavor));
ATTEMPT (xdr_putlong (xdrs, (long *)&len));
ATTEMPT (xdr_putint32 (xdrs, &auth->ah_verf.oa_flavor));
ATTEMPT (xdr_putint32 (xdrs, &len));
}
ATTEMPT (xdr_authdes_verf (xdrs, verf));
return (TRUE);
return TRUE;
}
@ -334,7 +333,7 @@ authdes_marshal (AUTH * auth, XDR * xdrs)
* 3. Validate
*/
static bool_t
authdes_validate (AUTH * auth, struct opaque_auth *rverf)
authdes_validate (AUTH *auth, struct opaque_auth *rverf)
{
struct ad_private *ad = AUTH_PRIVATE (auth);
struct authdes_verf verf;
@ -358,7 +357,7 @@ authdes_validate (AUTH * auth, struct opaque_auth *rverf)
if (DES_FAILED (status))
{
debug ("authdes_validate: DES decryption failure");
return (FALSE);
return FALSE;
}
/*
@ -375,7 +374,7 @@ authdes_validate (AUTH * auth, struct opaque_auth *rverf)
sizeof (struct timeval)) != 0)
{
debug ("authdes_validate: verifier mismatch\n");
return (FALSE);
return FALSE;
}
/*
@ -383,14 +382,14 @@ authdes_validate (AUTH * auth, struct opaque_auth *rverf)
*/
ad->ad_nickname = verf.adv_nickname;
ad->ad_cred.adc_namekind = ADN_NICKNAME;
return (TRUE);
return TRUE;
}
/*
* 4. Refresh
*/
static bool_t
authdes_refresh (AUTH * auth)
authdes_refresh (AUTH *auth)
{
netobj pkey;
struct ad_private *ad = AUTH_PRIVATE (auth);
@ -411,19 +410,19 @@ authdes_refresh (AUTH * auth)
if (key_encryptsession_pk (ad->ad_servername, &pkey, &ad->ad_xkey) < 0)
{
debug ("authdes_create: unable to encrypt conversation key");
return (FALSE);
return FALSE;
}
cred->adc_fullname.key = ad->ad_xkey;
cred->adc_namekind = ADN_FULLNAME;
cred->adc_fullname.name = ad->ad_fullname;
return (TRUE);
return TRUE;
}
/*
* 5. Destroy
*/
static void
authdes_destroy (AUTH * auth)
authdes_destroy (AUTH *auth)
{
struct ad_private *ad = AUTH_PRIVATE (auth);
@ -447,7 +446,7 @@ synchronize (struct sockaddr *syncaddr, struct timeval *timep)
timeout.tv_sec = RTIME_TIMEOUT;
timeout.tv_usec = 0;
if (rtime ((struct sockaddr_in *) syncaddr, timep, &timeout) < 0)
return (FALSE);
return FALSE;
__gettimeofday (&mytime, (struct timezone *) NULL);
timep->tv_sec -= mytime.tv_sec;
@ -457,5 +456,5 @@ synchronize (struct sockaddr *syncaddr, struct timeval *timep)
timep->tv_usec += MILLION;
}
timep->tv_usec -= mytime.tv_usec;
return (TRUE);
return TRUE;
}

View File

@ -154,6 +154,7 @@ struct XDR
*/
typedef bool_t (*xdrproc_t) __PMT ((XDR *, void *,...));
/*
* Operations defined on a XDR handle
*
@ -247,20 +248,28 @@ struct xdr_discrim
* N.B. and frozen for all time: each data type here uses 4 bytes
* of external representation.
*/
#define IXDR_GET_LONG(buf) ((long)ntohl((u_long)*((u_int32_t*)buf)++))
#define IXDR_PUT_LONG(buf, v) (*((u_int32_t*)(buf))++ = (long)htonl((u_long)v))
#define IXDR_GET_BOOL(buf) ((bool_t)IXDR_GET_LONG(buf))
#define IXDR_GET_ENUM(buf, t) ((t)IXDR_GET_LONG(buf))
#define IXDR_GET_U_LONG(buf) ((u_long)IXDR_GET_LONG(buf))
#define IXDR_GET_SHORT(buf) ((short)IXDR_GET_LONG(buf))
#define IXDR_GET_U_SHORT(buf) ((u_short)IXDR_GET_LONG(buf))
#define IXDR_GET_INT32(buf) ((int32_t)ntohl((uint32_t)*(buf)++))
#define IXDR_PUT_INT32(buf, v) (*(buf)++ = (int32_t)htonl((uint32_t)v))
#define IXDR_GET_U_INT32(buf) ((uint32_t)IXDR_GET_INT32(buf))
#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_INT32((buf), ((int32_t)(v)))
#define IXDR_PUT_BOOL(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
#define IXDR_PUT_ENUM(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
#define IXDR_PUT_SHORT(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
#define IXDR_PUT_U_SHORT(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
#define IXDR_GET_BOOL(buf) ((bool_t)IXDR_GET_INT32(buf))
#define IXDR_GET_ENUM(buf, t) ((t)IXDR_GET_INT32(buf))
#define IXDR_GET_SHORT(buf) ((short)IXDR_GET_INT32(buf))
#define IXDR_GET_U_SHORT(buf) ((u_short)IXDR_GET_INT32(buf))
#define IXDR_PUT_BOOL(buf, v) IXDR_PUT_INT32((buf), ((int)(v)))
#define IXDR_PUT_ENUM(buf, v) IXDR_PUT_INT32((buf), ((int)(v)))
#define IXDR_PUT_SHORT(buf, v) IXDR_PUT_INT32((buf), ((int)(v)))
#define IXDR_PUT_U_SHORT(buf, v) IXDR_PUT_INT32((buf), ((int)(v)))
/* This defines are removed from Sun for new platforms and shouldn't
be used any longer. */
#define IXDR_GET_LONG(buf) ((long)ntohl((u_long)*((u_int32_t*)buf)++))
#define IXDR_PUT_LONG(buf, v) (*((u_int32_t*)(buf))++ = (long)htonl((u_long)v))
#define IXDR_GET_U_LONG(buf) ((u_long)IXDR_GET_LONG(buf))
#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
/*
* These are the "generic" xdr routines.

View File

@ -48,7 +48,6 @@ static void pargdef (definition * def);
static void pstructdef (definition * def);
static void puniondef (definition * def);
static void pdefine (const char *name, const char *num);
static void puldefine (const char *name, const char *num);
static int define_printed (proc_list * stop, version_list * start);
static void pprogramdef (definition * def);
static void parglist (proc_list * proc, const char *addargtype);
@ -251,12 +250,6 @@ pdefine (const char *name, const char *num)
f_print (fout, "#define %s %s\n", name, num);
}
static void
puldefine (const char *name, const char *num)
{
f_print (fout, "#define %s ((u_long)%s)\n", name, num);
}
static int
define_printed (proc_list *stop, version_list *start)
{
@ -302,7 +295,7 @@ pprogramdef (definition *def)
pargdef (def);
puldefine (def->def_name, def->def.pr.prog_num);
pdefine (def->def_name, def->def.pr.prog_num);
for (vers = def->def.pr.versions; vers != NULL; vers = vers->next)
{
if (tblflag)
@ -312,7 +305,7 @@ pprogramdef (definition *def)
f_print (fout, "extern %s_%s_nproc;\n",
locase (def->def_name), vers->vers_num);
}
puldefine (vers->vers_name, vers->vers_num);
pdefine (vers->vers_name, vers->vers_num);
/*
* Print out 2 definitions, one for ANSI-C, another for
@ -327,7 +320,7 @@ pprogramdef (definition *def)
{
if (!define_printed(proc, def->def.pr.versions))
{
puldefine (proc->proc_name, proc->proc_num);
pdefine (proc->proc_name, proc->proc_num);
}
f_print (fout, "%s", ext);
pprocdef (proc, vers, NULL, 0, 2);
@ -359,7 +352,7 @@ pprogramdef (definition *def)
{
if (!define_printed(proc, def->def.pr.versions))
{
puldefine(proc->proc_name, proc->proc_num);
pdefine(proc->proc_name, proc->proc_num);
}
f_print (fout, "%s", ext);
pprocdef (proc, vers, "CLIENT *", 0, i);

View File

@ -968,7 +968,6 @@ mkfile_output (struct commandline *cmd)
char *mkfilename;
const char *clientname, *clntname, *xdrname, *hdrname;
const char *servername, *svcname, *servprogname, *clntprogname;
char *temp;
svcname = file_name (cmd->infile, "_svc.c");
clntname = file_name (cmd->infile, "_clnt.c");
@ -990,12 +989,12 @@ mkfile_output (struct commandline *cmd)
if (allfiles)
{
mkfilename = alloc (strlen ("Makefile.") +
strlen (cmd->infile) + 1);
temp = (char *) rindex (cmd->infile, '.');
strcat (mkfilename, "Makefile.");
strncat (mkfilename, cmd->infile,
(temp - cmd->infile));
char *cp, *temp;
mkfilename = alloc (strlen ("Makefile.") + strlen (cmd->infile) + 1);
temp = rindex (cmd->infile, '.');
cp = stpcpy (mkfilename, "Makefile.");
strncpy (cp, cmd->infile, (temp - cmd->infile));
}
else
mkfilename = (char *) cmd->outfile;

View File

@ -72,10 +72,10 @@ static void
p_xdrfunc (const char *rname, const char *typename)
{
if (Cflag)
f_print (fout, "\t\txdr_%s = (xdrproc_t) xdr_%s;\n", rname,
f_print (fout, "\t\t_xdr_%s = (xdrproc_t) xdr_%s;\n", rname,
stringfix (typename));
else
f_print (fout, "\t\txdr_%s = xdr_%s;\n", rname, stringfix (typename));
f_print (fout, "\t\t_xdr_%s = xdr_%s;\n", rname, stringfix (typename));
}
void
@ -503,7 +503,7 @@ write_program (const definition * def, const char *storage)
if (Cflag)
{
f_print (fout, "\txdrproc_t xdr_%s, xdr_%s;\n", ARG, RESULT);
f_print (fout, "\txdrproc_t _xdr_%s, _xdr_%s;\n", ARG, RESULT);
if (mtflag)
f_print(fout,
"\tbool_t (*%s)(char *, void *, struct svc_req *);\n",
@ -619,11 +619,11 @@ write_program (const definition * def, const char *storage)
RETVAL, ROUTINE, ARG, RESULT, RQSTP);
if (mtflag)
f_print(fout,
"\tif (%s > 0 && !svc_sendreply(%s, xdr_%s, (char *)&%s)) {\n",
"\tif (%s > 0 && !svc_sendreply(%s, _xdr_%s, (char *)&%s)) {\n",
RETVAL, TRANSP, RESULT, RESULT);
else
f_print(fout,
"\tif (%s != NULL && !svc_sendreply(%s, xdr_%s, %s)) {\n",
"\tif (%s != NULL && !svc_sendreply(%s, _xdr_%s, %s)) {\n",
RESULT, TRANSP, RESULT, RESULT);
printerr ("systemerr", TRANSP);
@ -643,7 +643,7 @@ write_program (const definition * def, const char *storage)
{
f_print(fout,"\tif (!");
pvname(def->def_name, vp->vers_num);
f_print(fout,"_freeresult (%s, xdr_%s, (caddr_t) &%s))\n",
f_print(fout,"_freeresult (%s, _xdr_%s, (caddr_t) &%s))\n",
TRANSP, RESULT, RESULT);
(void) sprintf(_errbuf, "unable to free results");
print_err_message("\t\t");
@ -664,7 +664,7 @@ static void
printif (const char *proc, const char *transp, const char *prefix,
const char *arg)
{
f_print (fout, "\tif (!svc_%s (%s, xdr_%s, %s%s)) {\n",
f_print (fout, "\tif (!svc_%s (%s, _xdr_%s, %s%s)) {\n",
proc, transp, arg, prefix, arg);
}

View File

@ -1,5 +1,5 @@
/* Set FP exception mask and rounding mode.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -41,7 +41,7 @@ wrfpcr (unsigned long fpcr)
void
__setfpucw (unsigned short fpu_control)
__setfpucw (fpu_control_t fpu_control)
{
unsigned long fpcr = 0, fpcw = 0;