aboutsummaryrefslogtreecommitdiff
path: root/sunrpc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-04-28 23:13:52 +0000
committerUlrich Drepper <drepper@redhat.com>1999-04-28 23:13:52 +0000
commitc4563d2d668675c2d5083f6ad01c801d6ccbe013 (patch)
tree1e6af86f8c33743c81080dffb17a8e8209825c06 /sunrpc
parent89afc233db58d3de7669332d141113ec2ca4991d (diff)
downloadglibc-c4563d2d668675c2d5083f6ad01c801d6ccbe013.zip
glibc-c4563d2d668675c2d5083f6ad01c801d6ccbe013.tar.gz
glibc-c4563d2d668675c2d5083f6ad01c801d6ccbe013.tar.bz2
Update.
1999-04-28 Ulrich Drepper <drepper@cygnus.com> * argp/argp-ba.c (argp_program_bug_address): Don't initialize with 0. * argp/argp-parse.c (_argp_hang): Likewise. * argp/argp-pv.c (argp_program_version): Likewise. * argp/argp-pvh.c (argp_program_version_hook): Likewise. * inet/ether_hton.c (ether_hton, startp): Likewise. * inet/ether_ntoh.c (ether_ntoh, startp): Likewise. * inet/getnetgrent_r.c (setup, startp): Likewise. * intl/loadmsgcat.c (_nl_msg_cat_cntr): Likewise. * intl/localealias.c (string_space, string_space_act, string_space_max, nmap, maxmap): Likewise. * libio/iopopen.c (proc_file_chain): Likewise. * libio/oldiopopen.c (old_proc_file_chain): Likewise. * locale/lc-collate.c (__collate_table, __collate_extra, __collate_element_hash, __collate_element_strings, __collate_element_values): Likewise. * malloc/mcheck.c (mcheck_used): Likewise. * malloc/mtrace.c (added_atexit_handler): Likewise. * malloc/set-freeres.c (already_called): Likewise. * misc/getpass.c (getpass) [buf, bufsize]: Likewise. * misc/syslog.c (LogStat, LogTag): Likewise. * nss/XXX-lookup.c (DATABASE_NAME_SYMBOL): Likewise. * nss/getXXbyYY_r.c (startp): Likewise. * posix/getopt.c (optarg, __getopt_initialized): Likewise. * posix/regex.c (init_syntax_once) [done]: Likewise. (debug): Likewise. * string/strfry.c (init): Likewise. * sunrpc/svc_run.c (svc_top): Likewise. * posix/euidaccess.c (have_ids): Likewise. * sysdeps/unix/sysv/linux/poll.c (must_emulate): Likewise. * sysdeps/unix/sysv/linux/ttyname.c (__ttyname, namelen): Likewise. * time/getdate.c (getdate_err): Likewise. * time/tzfile.c (transitions, type_idxs, types, zone_names, leaps): Likewise. * time/tzset.c (old_tz, is_initialized): Likewise. * inet/getnameinfo.c (nrl_domainname): Rewrite to allow initialization of static data with zero. * signal/allocrtsig.c (init): Likewise. * string/Makefile (routines): Add strchrnul. * string/Versions [GLIBC_2.1.1]: Add strchrnul. * string/string.c: Add strchrnul prototype. * include/string.h: Add __strchrnul prototype. * sysdeps/generic/strchrnul.c: New file. * sysdeps/i386/strchrnul.S: New file. * sysdeps/i386/bits/string.c: Add strchrnul optimization. * sysdeps/i386/i486/bits/string.c: Likewise. * argp/argp-help.c (argp_args_usage): Use __strchrnul. * inet/ether_line.c (ether_line): Likewise. * nscd/nscd_conf.c (nscd_parse_file): Likewise. * nss/nsswitch.c (nss_parse_file): Likewise. * posix/execvp.c (execvp): Likewise. * posix/fnmatch.c (internal_fnmatch): Likewise. * resolv/res_hconf.c (_res_hconv_init): Likewise. * resolv/res_init.c (res_init): Likewise. * stdlib/fmtmsg.c (init): Likewise. * stdlib/getsubopt.c (getsubopt): Likewise. * catgets/catgets.c (catopen): Only allocate one memory block. (catclose): Only one free call necessary. * catgets/open_catalog.c (__open_catalog): Simplify handling of file descriptor. * ctype/ctype-extn.c: Make __toascii_l and __isascii_l alias instead of real functions. Simplify _tolower and _toupper. * grp/initgroups.c (compat_call): Remove unnecessary use of pointer variable. * iconv/gconv.h (struct gconv_info): Change data element from pointer to array of size 0. * iconv/gconv_open.c (__gconv_open): Allocate structures accordingly. * iconv/gconv_close.c (__gconv_close): Don't free data. * iconv/gconv_conf.c (add_alias): Avoid searching in tree twice to insert new alias. * iconv/gconv_db.c (add_derivation): More efficient copying. Check for error while inserting in tree. * include/time.h: Pretty print. * inet/ruserpass.c: Rewrite use of toktab to avoid string pointers in table and lots of relocations. * posix/regex.c (regerror): Rewrite use of re_error_msgid to avoid string pointers in table and lots of relocations. * intl/finddomain.c: Remove definition of strchr macro. * io/ftw.c (nftw_arr, ftw_arr): Make const. * locale/loadlocale.c (_nl_load_locale): Optimize string copying. * locale/localeinfo.h (_nl_category_names): Change into an array with fixed width char string elements. * locale/setlocale.c (_nl_category_names): Likewise. (_nl_current): Make global. * locale/nl_langinfo.c (nldata): Removed. Use _nl_current now. * malloc/Makefile (distribute): Add stackinfo.h. * sysdeps/generic/stackinfo.h: New file. * sysdeps/i386/stackinfo.h: New file. * posix/execl.c: Use stackinfo.h in optimizing alloca use. * posix/execle.c: Likewise. * posix/execlp.c: Likewise. * nis/nis_table.c (__create_ib_request): Always use realloc. * posix/execvp.c (execute): Rename to script_execute and keep only code to execute using shell. (execvp): Call execv directly and only fall back on script_execute. * resolv/inet_net_pton.c (inet_net_pton_ipv4): Remove digits define and always use xdigits instead. * resolv/res_init.c (res_init): Use rawmemchr instead of strchr where appropriate. * stdlib/fpioconst.h (__tens): New declaration. (struct mp_power): Remove array, add arrayoff element. * stdlib/fpioconst.c: Replace definitions of _ten_p* arrays by one __tens array and add in _fpioconst_pow10 offsets into __tens. * stdio-common/printf_fp.c: Rewrite to use new __tens array. * stdlib/strtod.c: Likewise. * stdlib/a64l.c (a64l_table): Avoid unnecessary elements. * stdlib/exit.c: Rewrite to use __exit_funcs being as sign for end of the list. * stdlib/atexit.c (__exit_funcs): Don't initialize. * stdlib/fmtmsg.c (keywords): Make name element fixed width array. * sunrpc/clnt_perr.c: Rewrite clnt_sperrno and auth_errmsg to use a single and an array with offsets. * sunrpc/des_soft.c (partab): Make it const. * sunrpc/key_call.c (trytimeout, tottimeout): Make const. (__key_encryptsession_pk_LOCAL): Don't initialize with 0. (__key_decryptsession_pk_LOCAL): Likewise. (__key_gendes_LOCAL): Likewise. (MESSENGER): Mark const. (key_call_private_main): Don't initialize with 0. (use_keyenvoy): Don't initialize with 0. (key_call): Rewrite to reverse logic of use_doors variable. * sunrpc/netname.c (OPSYS): Define as array, not pointer. (startp): Don't initialize with zero. * sunrpc/openchild.c (_openchild): Make first argument const. * sunrpc/pmap_rmt.c (timeout): Mark const. * sunrpc/xcrypt.c (hex): Likewise. * sysdeps/unix/sysv/linux/getcwd.c: Rewrite to allow omitting initialization of global variables. * sysdeps/unix/sysv/linux/getpt.c: Likewise. * sysdeps/unix/sysv/linux/if_index.c: Likewise. * termios/tcgetsid.c: Likewise. * sysdeps/unix/sysv/linux/i386/dl-procinfo.h (x86_cap_flags): Change fxsr to osfxsr. * time/tzfile.c (__tzfile_read): Rewrite to allocate only one memory block. Add function to free memory if wanted. * time/tzset.c (tzset_internal): Pass extra argument to __tzfile_read. * wcsmbs/wcsmbsload.c (to_wc, to_mb): Correct initializers. * wcsmbs/wmemset.c: Little code optimization.
Diffstat (limited to 'sunrpc')
-rw-r--r--sunrpc/clnt_perr.c192
-rw-r--r--sunrpc/des_soft.c12
-rw-r--r--sunrpc/key_call.c24
-rw-r--r--sunrpc/netname.c6
-rw-r--r--sunrpc/openchild.c2
-rw-r--r--sunrpc/pmap_rmt.c2
-rw-r--r--sunrpc/publickey.c6
-rw-r--r--sunrpc/svc_run.c2
-rw-r--r--sunrpc/xcrypt.c2
9 files changed, 164 insertions, 84 deletions
diff --git a/sunrpc/clnt_perr.c b/sunrpc/clnt_perr.c
index d756cb1..ae6a1da 100644
--- a/sunrpc/clnt_perr.c
+++ b/sunrpc/clnt_perr.c
@@ -153,47 +153,102 @@ clnt_perror (CLIENT * rpch, const char *msg)
struct rpc_errtab
{
enum clnt_stat status;
- const char *message;
+ unsigned int message_off;
+};
+
+static const char rpc_errstr[] =
+{
+#define RPC_SUCCESS_IDX 0
+ N_("RPC: Success")
+ "\0"
+#define RPC_CANTENCODEARGS_IDX (RPC_SUCCESS_IDX + sizeof "RPC: Success")
+ N_("RPC: Can't encode arguments")
+ "\0"
+#define RPC_CANTDECODERES_IDX (RPC_CANTENCODEARGS_IDX \
+ + sizeof "RPC: Can't encode arguments")
+ N_("RPC: Can't decode result")
+ "\0"
+#define RPC_CANTSEND_IDX (RPC_CANTDECODERES_IDX \
+ + sizeof "RPC: Can't decode result")
+ N_("RPC: Unable to send")
+ "\0"
+#define RPC_CANTRECV_IDX (RPC_CANTSEND_IDX \
+ + sizeof "RPC: Unable to send")
+ N_("RPC: Unable to receive")
+ "\0"
+#define RPC_TIMEDOUT_IDX (RPC_CANTRECV_IDX \
+ + sizeof "RPC: Unable to receive")
+ N_("RPC: Timed out")
+ "\0"
+#define RPC_VERSMISMATCH_IDX (RPC_TIMEDOUT_IDX \
+ + sizeof "RPC: Timed out")
+ N_("RPC: Incompatible versions of RPC")
+ "\0"
+#define RPC_AUTHERROR_IDX (RPC_VERSMISMATCH_IDX \
+ + sizeof "RPC: Incompatible versions of RPC")
+ N_("RPC: Authentication error")
+ "\0"
+#define RPC_PROGUNAVAIL_IDX (RPC_AUTHERROR_IDX \
+ + sizeof "RPC: Authentication error")
+ N_("RPC: Program unavailable")
+ "\0"
+#define RPC_PROGVERSMISMATCH_IDX (RPC_PROGUNAVAIL_IDX \
+ + sizeof "RPC: Program unavailable")
+ N_("RPC: Program/version mismatch")
+ "\0"
+#define RPC_PROCUNAVAIL_IDX (RPC_PROGVERSMISMATCH_IDX \
+ + sizeof "RPC: Program/version mismatch")
+ N_("RPC: Procedure unavailable")
+ "\0"
+#define RPC_CANTDECODEARGS_IDX (RPC_PROCUNAVAIL_IDX \
+ + sizeof "RPC: Procedure unavailable")
+ N_("RPC: Server can't decode arguments")
+ "\0"
+#define RPC_SYSTEMERROR_IDX (RPC_CANTDECODEARGS_IDX \
+ + sizeof "RPC: Server can't decode arguments")
+ N_("RPC: Remote system error")
+ "\0"
+#define RPC_UNKNOWNHOST_IDX (RPC_SYSTEMERROR_IDX \
+ + sizeof "RPC: Remote system error")
+ N_("RPC: Unknown host")
+ "\0"
+#define RPC_UNKNOWNPROTO_IDX (RPC_UNKNOWNHOST_IDX \
+ + sizeof "RPC: Unknown host")
+ N_("RPC: Unknown protocol")
+ "\0"
+#define RPC_PMAPFAILURE_IDX (RPC_UNKNOWNPROTO_IDX \
+ + sizeof "RPC: Unknown protocol")
+ N_("RPC: Port mapper failure")
+ "\0"
+#define RPC_PROGNOTREGISTERED_IDX (RPC_PMAPFAILURE_IDX \
+ + sizeof "RPC: Port mapper failure")
+ N_("RPC: Program not registered")
+ "\0"
+#define RPC_FAILED_IDX (RPC_PROGNOTREGISTERED_IDX \
+ + sizeof "RPC: Program not registered")
+ N_("RPC: Failed (unspecified error)")
};
static const struct rpc_errtab rpc_errlist[] =
{
- {RPC_SUCCESS,
- N_("RPC: Success")},
- {RPC_CANTENCODEARGS,
- N_("RPC: Can't encode arguments")},
- {RPC_CANTDECODERES,
- N_("RPC: Can't decode result")},
- {RPC_CANTSEND,
- N_("RPC: Unable to send")},
- {RPC_CANTRECV,
- N_("RPC: Unable to receive")},
- {RPC_TIMEDOUT,
- N_("RPC: Timed out")},
- {RPC_VERSMISMATCH,
- N_("RPC: Incompatible versions of RPC")},
- {RPC_AUTHERROR,
- N_("RPC: Authentication error")},
- {RPC_PROGUNAVAIL,
- N_("RPC: Program unavailable")},
- {RPC_PROGVERSMISMATCH,
- N_("RPC: Program/version mismatch")},
- {RPC_PROCUNAVAIL,
- N_("RPC: Procedure unavailable")},
- {RPC_CANTDECODEARGS,
- N_("RPC: Server can't decode arguments")},
- {RPC_SYSTEMERROR,
- N_("RPC: Remote system error")},
- {RPC_UNKNOWNHOST,
- N_("RPC: Unknown host")},
- {RPC_UNKNOWNPROTO,
- N_("RPC: Unknown protocol")},
- {RPC_PMAPFAILURE,
- N_("RPC: Port mapper failure")},
- {RPC_PROGNOTREGISTERED,
- N_("RPC: Program not registered")},
- {RPC_FAILED,
- N_("RPC: Failed (unspecified error)")}
+ { RPC_SUCCESS, RPC_SUCCESS_IDX },
+ { RPC_CANTENCODEARGS, RPC_CANTENCODEARGS_IDX },
+ { RPC_CANTDECODERES, RPC_CANTDECODERES_IDX },
+ { RPC_CANTSEND, RPC_CANTSEND_IDX },
+ { RPC_CANTRECV, RPC_CANTRECV_IDX },
+ { RPC_TIMEDOUT, RPC_TIMEDOUT_IDX },
+ { RPC_VERSMISMATCH, RPC_VERSMISMATCH_IDX },
+ { RPC_AUTHERROR, RPC_AUTHERROR_IDX },
+ { RPC_PROGUNAVAIL, RPC_PROGUNAVAIL_IDX },
+ { RPC_PROGVERSMISMATCH, RPC_PROGVERSMISMATCH },
+ { RPC_PROCUNAVAIL, RPC_PROCUNAVAIL_IDX },
+ { RPC_CANTDECODEARGS, RPC_CANTDECODEARGS_IDX },
+ { RPC_SYSTEMERROR, RPC_SYSTEMERROR_IDX },
+ { RPC_UNKNOWNHOST, RPC_UNKNOWNHOST_IDX },
+ { RPC_UNKNOWNPROTO, RPC_UNKNOWNPROTO_IDX },
+ { RPC_PMAPFAILURE, RPC_PMAPFAILURE_IDX },
+ { RPC_PROGNOTREGISTERED, RPC_PROGNOTREGISTERED_IDX },
+ { RPC_FAILED, RPC_FAILED_IDX }
};
@@ -209,7 +264,7 @@ clnt_sperrno (enum clnt_stat stat)
{
if (rpc_errlist[i].status == stat)
{
- return _(rpc_errlist[i].message);
+ return _(rpc_errstr + rpc_errlist[i].message_off);
}
}
return _("RPC: (unknown error code)");
@@ -264,27 +319,52 @@ clnt_pcreateerror (const char *msg)
struct auth_errtab
{
enum auth_stat status;
- const char *message;
+ unsigned int message_off;
+};
+
+static const char auth_errstr[] =
+{
+#define AUTH_OK_IDX 0
+ N_("Authentication OK")
+ "\0"
+#define AUTH_BADCRED_IDX (AUTH_OK_IDX + sizeof "Authentication OK")
+ N_("Invalid client credential")
+ "\0"
+#define AUTH_REJECTEDCRED_IDX (AUTH_BADCRED_IDX \
+ + sizeof "Invalid client credential")
+ N_("Server rejected credential")
+ "\0"
+#define AUTH_BADVERF_IDX (AUTH_REJECTEDCRED_IDX \
+ + sizeof "Server rejected credential")
+ N_("Invalid client verifier")
+ "\0"
+#define AUTH_REJECTEDVERF_IDX (AUTH_BADVERF_IDX \
+ + sizeof "Invalid client verifier")
+ N_("Server rejected verifier")
+ "\0"
+#define AUTH_TOOWEAK_IDX (AUTH_REJECTEDVERF_IDX \
+ + sizeof "Server rejected verifier")
+ N_("Client credential too weak")
+ "\0"
+#define AUTH_INVALIDRESP_IDX (AUTH_TOOWEAK_IDX \
+ + sizeof "Client credential too weak")
+ N_("Invalid server verifier")
+ "\0"
+#define AUTH_FAILED_IDX (AUTH_INVALIDRESP_IDX \
+ + sizeof "Invalid server verifier")
+ N_("Failed (unspecified error)")
};
static const struct auth_errtab auth_errlist[] =
{
- {AUTH_OK,
- N_("Authentication OK")},
- {AUTH_BADCRED,
- N_("Invalid client credential")},
- {AUTH_REJECTEDCRED,
- N_("Server rejected credential")},
- {AUTH_BADVERF,
- N_("Invalid client verifier")},
- {AUTH_REJECTEDVERF,
- N_("Server rejected verifier")},
- {AUTH_TOOWEAK,
- N_("Client credential too weak")},
- {AUTH_INVALIDRESP,
- N_("Invalid server verifier")},
- {AUTH_FAILED,
- N_("Failed (unspecified error)")},
+ { AUTH_OK, AUTH_OK_IDX },
+ { AUTH_BADCRED, AUTH_BADCRED_IDX },
+ { AUTH_REJECTEDCRED, AUTH_REJECTEDCRED_IDX },
+ { AUTH_BADVERF, AUTH_BADVERF_IDX },
+ { AUTH_REJECTEDVERF, AUTH_REJECTEDVERF_IDX },
+ { AUTH_TOOWEAK, AUTH_TOOWEAK_IDX },
+ { AUTH_INVALIDRESP, AUTH_INVALIDRESP_IDX },
+ { AUTH_FAILED, AUTH_FAILED_IDX }
};
static char *
@@ -297,7 +377,7 @@ auth_errmsg (enum auth_stat stat)
{
if (auth_errlist[i].status == stat)
{
- return _(auth_errlist[i].message);
+ return _(auth_errstr + auth_errlist[i].message_off);
}
}
return NULL;
diff --git a/sunrpc/des_soft.c b/sunrpc/des_soft.c
index ae12d7b..f358cac 100644
--- a/sunrpc/des_soft.c
+++ b/sunrpc/des_soft.c
@@ -8,23 +8,23 @@ static char sccsid[] = "@(#)des_soft.c 2.2 88/08/10 4.0 RPCSRC; from 1.13 88/02/
* 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
@@ -32,7 +32,7 @@ static char sccsid[] = "@(#)des_soft.c 2.2 88/08/10 4.0 RPCSRC; from 1.13 88/02/
/*
* Table giving odd parity in the low bit for ASCII characters
*/
-static char partab[128] =
+static const char partab[128] =
{
0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x07, 0x07,
0x08, 0x08, 0x0b, 0x0b, 0x0d, 0x0d, 0x0e, 0x0e,
diff --git a/sunrpc/key_call.c b/sunrpc/key_call.c
index 6157e57..5aef933 100644
--- a/sunrpc/key_call.c
+++ b/sunrpc/key_call.c
@@ -59,14 +59,14 @@
#define debug(msg) /* turn off debugging */
-extern int _openchild (char *command, FILE **fto, FILE **ffrom);
+extern int _openchild (const char *command, FILE **fto, FILE **ffrom);
static int key_call (u_long, xdrproc_t xdr_arg, char *,
xdrproc_t xdr_rslt, char *) internal_function;
-static struct timeval trytimeout = {KEY_TIMEOUT, 0};
-static struct timeval tottimeout = {KEY_TIMEOUT *KEY_NRETRY, 0};
+static const struct timeval trytimeout = {KEY_TIMEOUT, 0};
+static const struct timeval tottimeout = {KEY_TIMEOUT *KEY_NRETRY, 0};
int
key_setsecret (char *secretkey)
@@ -268,9 +268,9 @@ key_get_conv (char *pkey, des_block *deskey)
* implementations of these functions, and to call those in key_call().
*/
-cryptkeyres *(*__key_encryptsession_pk_LOCAL) (uid_t, char *) = 0;
-cryptkeyres *(*__key_decryptsession_pk_LOCAL) (uid_t, char *) = 0;
-des_block *(*__key_gendes_LOCAL) (uid_t, char *) = 0;
+cryptkeyres *(*__key_encryptsession_pk_LOCAL) (uid_t, char *);
+cryptkeyres *(*__key_decryptsession_pk_LOCAL) (uid_t, char *);
+des_block *(*__key_gendes_LOCAL) (uid_t, char *);
static int
internal_function
@@ -287,7 +287,7 @@ key_call_keyenvoy (u_long proc, xdrproc_t xdr_arg, char *arg,
int success;
uid_t ruid;
uid_t euid;
- static char MESSENGER[] = "/usr/etc/keyenvoy";
+ static const char MESSENGER[] = "/usr/etc/keyenvoy";
success = 1;
sigemptyset (&mask);
@@ -355,7 +355,7 @@ struct key_call_private {
pid_t pid; /* process-id at moment of creation */
uid_t uid; /* user-id at last authorization */
};
-static struct key_call_private *key_call_private_main = NULL;
+static struct key_call_private *key_call_private_main;
__libc_lock_define_initialized (static, keycall_lock)
/*
@@ -555,9 +555,9 @@ internal_function
key_call (u_long proc, xdrproc_t xdr_arg, char *arg,
xdrproc_t xdr_rslt, char *rslt)
{
- static int use_keyenvoy = 0;
+ static int use_keyenvoy;
#ifdef HAVE_DOORS
- static int use_doors = 1;
+ static int not_use_doors;
#endif
if (proc == KEY_ENCRYPT_PK && __key_encryptsession_pk_LOCAL)
@@ -583,11 +583,11 @@ key_call (u_long proc, xdrproc_t xdr_arg, char *arg,
}
#ifdef HAVE_DOORS
- if (use_doors)
+ if (!not_use_doors)
{
if (key_call_door (proc, xdr_arg, arg, xdr_rslt, rslt))
return 1;
- use_doors = 0;
+ not_use_doors = 1;
}
#endif
if (!use_keyenvoy)
diff --git a/sunrpc/netname.c b/sunrpc/netname.c
index 1578108..3a2025d 100644
--- a/sunrpc/netname.c
+++ b/sunrpc/netname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
@@ -26,7 +26,7 @@
#define OPSYS_LEN 4
#define MAXIPRINT (11) /* max length of printed integer */
-static const char *OPSYS = "unix";
+static const char OPSYS[] = "unix";
int
user2netname (char netname[MAXNETNAMELEN + 1], const uid_t uid,
@@ -141,7 +141,7 @@ int
netname2user (const char netname[MAXNETNAMELEN + 1], uid_t * uidp, gid_t * gidp,
int *gidlenp, gid_t * gidlist)
{
- static service_user *startp = NULL;
+ static service_user *startp;
static netname2user_function start_fct;
service_user *nip;
netname2user_function fct;
diff --git a/sunrpc/openchild.c b/sunrpc/openchild.c
index 8399b26..4b5a0a5 100644
--- a/sunrpc/openchild.c
+++ b/sunrpc/openchild.c
@@ -53,7 +53,7 @@
* returns pid, or -1 for failure
*/
int
-_openchild (char *command, FILE ** fto, FILE ** ffrom)
+_openchild (const char *command, FILE ** fto, FILE ** ffrom)
{
int i;
int pid;
diff --git a/sunrpc/pmap_rmt.c b/sunrpc/pmap_rmt.c
index c35540e..f361ac3 100644
--- a/sunrpc/pmap_rmt.c
+++ b/sunrpc/pmap_rmt.c
@@ -58,7 +58,7 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro";
extern u_long _create_xid (void);
-static struct timeval timeout = {3, 0};
+static const struct timeval timeout = {3, 0};
/*
* pmapper remote-call-service interface.
diff --git a/sunrpc/publickey.c b/sunrpc/publickey.c
index 16664b6..94d5499 100644
--- a/sunrpc/publickey.c
+++ b/sunrpc/publickey.c
@@ -1,5 +1,5 @@
/* Get public or secret key from key server.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -38,7 +38,7 @@ extern int __nss_publickey_lookup (service_user **nip, const char *name,
int
getpublickey (const char *name, char *key)
{
- static service_user *startp = NULL;
+ static service_user *startp;
static public_function start_fct;
service_user *nip;
public_function fct;
@@ -76,7 +76,7 @@ getpublickey (const char *name, char *key)
int
getsecretkey (const char *name, char *key, const char *passwd)
{
- static service_user *startp = NULL;
+ static service_user *startp;
static secret_function start_fct;
service_user *nip;
secret_function fct;
diff --git a/sunrpc/svc_run.c b/sunrpc/svc_run.c
index 1a76b10..d854fb4 100644
--- a/sunrpc/svc_run.c
+++ b/sunrpc/svc_run.c
@@ -39,7 +39,7 @@ static char sccsid[] = "@(#)svc_run.c 1.1 87/10/13 Copyr 1984 Sun Micro";
#include <errno.h>
#include <rpc/rpc.h>
-static int svc_stop = 0;
+static int svc_stop;
/* This function can be used as a signal handler to terminate the
server loop. */
diff --git a/sunrpc/xcrypt.c b/sunrpc/xcrypt.c
index bee38ad..a6b2499 100644
--- a/sunrpc/xcrypt.c
+++ b/sunrpc/xcrypt.c
@@ -50,7 +50,7 @@ static char sccsid[] = "@(#)xcrypt.c 1.3 89/03/24 Copyr 1986 Sun Micro";
#include <sys/types.h>
#include <rpc/des_crypt.h>
-static char hex[16] =
+static const char hex[16] =
{
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f',