From c131718ccc1db101df54fb04f34f5611c3678450 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 8 Apr 1997 23:42:08 +0000 Subject: Update. 1997-04-09 01:24 Ulrich Drepper * rellns-sh: Rewrite to work also in presence of symlinks. * arpg/argp-fmtstream.c: Add casts to prevent warnings. * argp/argp-fmtstream.h: Likewise. * argp/argp-help.c: Likewise. * elf/dl-minimal.c: Add definition of calloc. * elf/version.c: Add casts to prevent warnings. (_dl_check_map_versions): Use calloc instead of malloc+memset. * locale/setlocale.c (_nl_current): Add element with index LC_ALL. Reported by Greg McGary . * manual/libc.texinfo: Update malloc documentation for new malloc. * manual/memory.texi: Likewise. Patch by Wolfram Gloger . * math/libm-test.c (check_long): New function. (check_longlong): New function. (rinttol_test): New function. (rinttoll_test): New function. * nis/nss_compat/compat-grp.c (in_blacklist): Improve a bit. * nis/nss_compat/compat-pwd.c: Likewise. * nis/nss_compat/compat-spwd.c: Likewise. * stdlib/erand48_r.c (erand48_r): Build double value using ieee754_double union and use random bits in different order to increase effect of seed. Reported by David Mosberger-Tang . * sunrpc/svc_auth.c: Moved to ... * sysdeps/generic/svc_auth.c: ...here. * time/time.h: Pretty print. 1997-04-08 07:19 H.J. Lu * libio/genops.c (_IO_flush_all_linebuffered): don't flush on a read-only stream. 1997-04-09 01:19 Ulrich Drepper * malloc/malloc.c (mALLOC_STATs) [MALLOC_DEBUG>1]: Put declaration in correct place. Patch by Marcus G. Daniels . 1997-04-07 15:34 Ulrich Drepper * stdio-common/Makefile (tests): Add tst-ferror. * stdio-common/tst-ferror.c: New file. Some tests for error indicator of streams. * stdio-common/tst-ferror.input: New file. * isomac.c: Let tests not fail because the compiler defines itself symbols which violate the name space rules. gcc defines symbols for the architecture which are not protected by an underscore character. * math/Makefile (libm-support): Add s_rinttol and s_rinttoll. (libm-calls): Add s_clog. * sysdeps/libm-ieee754/s_clog.c: New file. Implementation of logarithm of complex value. * sysdeps/libm-ieee754/s_clogf.c: New file. * sysdeps/libm-ieee754/s_clogl.c: New file. * math/libm-test.c (clog_test): Compile this function. Fix a few typos. (main): Call clog_test. * sysdeps/libm-ieee754/s_rinttol.c: New file. Round long double value to long int. * sysdeps/libm-i387/s_rinttol.S: New file. * sysdeps/libm-ieee754/s_rinttoll.c: new file. Round long double value to long long int. * sysdeps/libm-i387/s_rinttoll.S: New file. * sysdeps/libm-ieee754/s_rintl.c: Many corrections. The previous version was full of errors. * math/math.h (rinttol): Argument is of type `long double' not `double'. (rinttoll): Likewise. (roundtol): Likewise. (roundtoll): Likewise. 1997-04-06 11:32 H.J. Lu * posix/getopt.c (_getopt_initialize): Preserve optind. (_getopt_internal): Set optind to 1 if optind == 0 before calling _getopt_initialize (). 1997-04-05 16:45 Thorsten Kukuk * nis/rpcsvc/nislib.h: Change const nis_name to new type const_nis_name. * nis/nis_intern.c: Likewise. * nis/nis_intern.h: Likewise. * nis/nis_server.c: Likewise. * nis/nis_subr.c: Likewise. * nis/nis_table.c: Likewise. * nis/nis_names.c: Likewise. Fill out ns_request structure in nis_add(). * nis/nss_compat/compat-pwd.c: Use reentrant netgroup functions. * nis/nss_compat/compat-spwd.c: Likewise. 1997-03-27 07:37 H.J. Lu * libio/fileops.c (_IO_file_overflow): Set error when try to write on a read-only stream. * sysdeps/gnu/utmpbits.h (ut_xtime): New symbol. (ut_time): Define it only if _NO_UT_TIME is not defined. 1997-04-06 00:42 Ulrich Drepper * misc/tst-tsearch.c: Include . Define _GNU_SOURCE only if not already defined. 1997-04-05 16:14 Ulrich Drepper * sysdeps/unix/sysv/linux/netatalk/at.h: Include to get definition of sa_family_t for . Reported by a sun . * malloc/malloc.c (cALLOc): Little optimization. --- sysdeps/generic/signame.c | 5 +- sysdeps/generic/svc_auth.c | 117 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 sysdeps/generic/svc_auth.c (limited to 'sysdeps/generic') diff --git a/sysdeps/generic/signame.c b/sysdeps/generic/signame.c index 0db511c092..8fb78a301c 100644 --- a/sysdeps/generic/signame.c +++ b/sysdeps/generic/signame.c @@ -1,5 +1,5 @@ /* Convert between signal names and numbers. - Copyright (C) 1990, 1992, 1993, 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1990, 92, 93, 95, 96, 97 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -231,6 +231,9 @@ signame_init () #if defined (SIGINFO) init_sig (SIGINFO, "INFO", "Information request"); #endif +#if defined (SIGNOFP) + init_sig (SIGNOFP, "NOFP", "Floating point co-processor not available"); +#endif } /* Return the abbreviation for signal NUMBER. */ diff --git a/sysdeps/generic/svc_auth.c b/sysdeps/generic/svc_auth.c new file mode 100644 index 0000000000..9f7ed5eca6 --- /dev/null +++ b/sysdeps/generic/svc_auth.c @@ -0,0 +1,117 @@ +/* @(#)svc_auth.c 2.4 88/08/15 4.0 RPCSRC */ +/* + * Sun RPC is a product of Sun Microsystems, Inc. and is provided for + * unrestricted use provided that this legend is included on all tape + * media and as a part of the software program in whole or part. Users + * may copy or modify Sun RPC without charge, but are not authorized + * to license or distribute it to anyone else except as part of a product or + * program developed by the user. + * + * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE + * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + * + * Sun RPC is provided with no support and without any obligation on the + * part of Sun Microsystems, Inc. to assist in its use, correction, + * modification or enhancement. + * + * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC + * OR ANY PART THEREOF. + * + * In no event will Sun Microsystems, Inc. be liable for any lost revenue + * or profits or other special, indirect and consequential damages, even if + * Sun has been advised of the possibility of such damages. + * + * Sun Microsystems, Inc. + * 2550 Garcia Avenue + * Mountain View, California 94043 + */ +#if !defined(lint) && defined(SCCSIDS) +static char sccsid[] = "@(#)svc_auth.c 1.19 87/08/11 Copyr 1984 Sun Micro"; +#endif + +/* + * svc_auth.c, Server-side rpc authenticator interface. + * *WITHOUT* DES authentication. + * + * Copyright (C) 1984, Sun Microsystems, Inc. + */ + +#include +#include +#include + +/* + * svcauthsw is the bdevsw of server side authentication. + * + * Server side authenticators are called from authenticate by + * using the client auth struct flavor field to index into svcauthsw. + * The server auth flavors must implement a routine that looks + * like: + * + * enum auth_stat + * flavorx_auth(rqst, msg) + * register struct svc_req *rqst; + * register struct rpc_msg *msg; + * + */ + +static enum auth_stat _svcauth_null (struct svc_req *, struct rpc_msg *); + /* no authentication */ +extern enum auth_stat _svcauth_unix (struct svc_req *, struct rpc_msg *); + /* unix style (uid, gids) */ +extern enum auth_stat _svcauth_short (struct svc_req *, struct rpc_msg *); + /* short hand unix style */ + +static const struct + { + enum auth_stat (*authenticator) (struct svc_req *, struct rpc_msg *); + } +svcauthsw[] = +{ + { _svcauth_null }, /* AUTH_NULL */ + { _svcauth_unix }, /* AUTH_UNIX */ + { _svcauth_short } /* AUTH_SHORT */ +}; +#define AUTH_MAX 2 /* HIGHEST AUTH NUMBER */ + + +/* + * The call rpc message, msg has been obtained from the wire. The msg contains + * the raw form of credentials and verifiers. authenticate returns AUTH_OK + * if the msg is successfully authenticated. If AUTH_OK then the routine also + * does the following things: + * set rqst->rq_xprt->verf to the appropriate response verifier; + * sets rqst->rq_client_cred to the "cooked" form of the credentials. + * + * NB: rqst->rq_cxprt->verf must be pre-allocated; + * its length is set appropriately. + * + * The caller still owns and is responsible for msg->u.cmb.cred and + * msg->u.cmb.verf. The authentication system retains ownership of + * rqst->rq_client_cred, the cooked credentials. + * + * There is an assumption that any flavour less than AUTH_NULL is + * invalid. + */ +enum auth_stat +_authenticate (register struct svc_req *rqst, struct rpc_msg *msg) +{ + register int cred_flavor; + + rqst->rq_cred = msg->rm_call.cb_cred; + rqst->rq_xprt->xp_verf.oa_flavor = _null_auth.oa_flavor; + rqst->rq_xprt->xp_verf.oa_length = 0; + cred_flavor = rqst->rq_cred.oa_flavor; + if ((cred_flavor <= AUTH_MAX) && (cred_flavor >= AUTH_NULL)) + return (*(svcauthsw[cred_flavor].authenticator)) (rqst, msg); + + return AUTH_REJECTEDCRED; +} + +static enum auth_stat +_svcauth_null (struct svc_req *rqst, struct rpc_msg *msg) +{ + return AUTH_OK; +} -- cgit 1.4.1