From: Erez Zadok Date: Sat, 1 Oct 2005 05:43:38 +0000 (+0000) Subject: * fsinfo/fsi_util.c (set_ether_if): use INADDR_NONE instead of X-Git-Tag: before-xstr~2 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=e3f68836c2c78827c0f7e72752ef8fa810285125;p=am-utils-6.1.git * fsinfo/fsi_util.c (set_ether_if): use INADDR_NONE instead of hard-coded value of -1. * include/amq_defs.h (AMQ_STRLEN): increase default size from 2KB to 16KB. We can afford it these days. * libamu/strcasecmp.c (strcasecmp): use unsigned chars in tolower() to avoid sign/size promotion bugs. * libamu/xutil.c (switch_to_logfile): don't output to LOG_CONS by default (it's unfriendly). If user really wants to, they can set it in /etc/syslog.conf. --- diff --git a/ChangeLog b/ChangeLog index f4bcea5..5e728ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,21 @@ * config.{guess,sub}: update to latest versions. +2005-09-30 Christos Zoulas + + * fsinfo/fsi_util.c (set_ether_if): use INADDR_NONE instead of + hard-coded value of -1. + + * include/amq_defs.h (AMQ_STRLEN): increase default size from 2KB + to 16KB. We can afford it these days. + + * libamu/strcasecmp.c (strcasecmp): use unsigned chars in + tolower() to avoid sign/size promotion bugs. + + * libamu/xutil.c (switch_to_logfile): don't output to LOG_CONS by + default (it's unfriendly). If user really wants to, they can set + it in /etc/syslog.conf. + 2005-09-29 Erez Zadok * amq/pawd.c (find_mt): if the auto mount type is used, pawd could diff --git a/NEWS b/NEWS index 3cd9592..85176fd 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,9 @@ detail in the README.attrcache file included with this distribution. Include test-attrcache script to test the NFS attribute cache behavior using Amd. +Tell syslog not to log automatically to /dev/console; it's unfriendly. If +user really wants to, they can set it in /etc/syslog.conf. + - minor new ports: i386-pc-linux-deb3.1 i386-unknown-netbsdelf3.0 (BETA) diff --git a/fsinfo/fsi_util.c b/fsinfo/fsi_util.c index 7d2d2b6..b701e38 100644 --- a/fsinfo/fsi_util.c +++ b/fsinfo/fsi_util.c @@ -451,7 +451,7 @@ set_ether_if(ether_if *ep, int k, char *v) case EF_INADDR:{ ep->e_inaddr.s_addr = inet_addr(v); - if ((int) ep->e_inaddr.s_addr == -1) + if ((int) ep->e_inaddr.s_addr == INADDR_NONE) yyerror("malformed IP dotted quad: %s", v); XFREE(v); } diff --git a/include/amq_defs.h b/include/amq_defs.h index c8c85aa..90c4d9b 100644 --- a/include/amq_defs.h +++ b/include/amq_defs.h @@ -50,7 +50,7 @@ #ifndef AMQ_SIZE # define AMQ_SIZE 16384 #endif /* not AMQ_SIZE */ -#define AMQ_STRLEN 2048 +#define AMQ_STRLEN 16384 #define AMQ_PROGRAM ((u_long)300019) #define AMQ_VERSION ((u_long)1) #define AMQPROC_NULL ((u_long)0) diff --git a/libamu/strcasecmp.c b/libamu/strcasecmp.c index 61d17d6..6371b71 100644 --- a/libamu/strcasecmp.c +++ b/libamu/strcasecmp.c @@ -53,8 +53,8 @@ int strcasecmp(const char *s1, const char *s2) { - const char *cp1 = s1; - const char *cp2 = s2; + const unsigned char *cp1 = (const unsigned char *)s1; + const unsigned char *cp2 = (const unsigned char *)s2; while (tolower(*cp1) == tolower(*cp2++)) if (*cp1++ == '\0') diff --git a/libamu/xutil.c b/libamu/xutil.c index 17cdf5f..46fba74 100644 --- a/libamu/xutil.c +++ b/libamu/xutil.c @@ -802,9 +802,6 @@ switch_to_logfile(char *logfile, int old_umask, int truncate_log) new_logfp = stderr; openlog(am_get_progname(), LOG_PID -# ifdef LOG_CONS - | LOG_CONS -# endif /* LOG_CONS */ # ifdef LOG_NOWAIT | LOG_NOWAIT # endif /* LOG_NOWAIT */