[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-175-gfc828
From: |
Mats Erik Andersson |
Subject: |
[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-175-gfc8280b |
Date: |
Wed, 19 Sep 2012 10:17:44 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".
The branch, master has been updated
via fc8280bc58b5575e7187eec77fadfffcc28fde1a (commit)
from 92cabdc297bae52dc8c7d63647d8fce8dfba30b4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=fc8280bc58b5575e7187eec77fadfffcc28fde1a
commit fc8280bc58b5575e7187eec77fadfffcc28fde1a
Author: Mats Erik Andersson <address@hidden>
Date: Wed Sep 19 12:14:55 2012 +0200
Consistency checks.
diff --git a/ChangeLog b/ChangeLog
index 31c3092..a1208d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2012-09-19 Mats Erik Andersson <address@hidden>
+
+ * configure.ac <libwrap check>: Call AC_CHECK_DECLS
+ with hosts_ctl.
+ * ftpd/server_mode.c (hosts_ctl)
+ [WITH_WRAP && !HAVE_DECL_HOSTS_CTL]: Add external
+ prototype whenever undeclared.
+
+ * ftpd/ftpd.c (complete_login): Cast pid_t as int
+ in formatted print.
+ * src/inetd.c (run_service, readchild, print_service)
+ (main): Likewise.
+ * src/syslogd.c (main): Likewise.
+ * src/uucpd.c (dologout, dologin): Likewise.
+ (dologout) [PATH_LASTLOG && HAVE_STRUCT_LASTLOG]:
+ Declare F conditionally.
+
+ * ifconfig/changeif.c: Access `HAVE_DECL_*' using `#if',
+ not using `#ifdef' constructs.
+ * libinetutils/kcmd.c, libinetutils/localhost.c: Likewise.
+ * src/rlogind.c, src/rshd.c: Likewise.
+
2012-09-17 Mats Erik Andersson <address@hidden>
talk: Delay start of curses interface until
diff --git a/configure.ac b/configure.ac
index 2ad090b..63f84dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -550,6 +550,7 @@ if test "$with_wrap" = yes; then
# for the wrap lib you have to define some global variables.
#AC_CHECK_LIB(wrap, hosts_ctl, LIBWRAP=-lwrap)
AC_CHECK_HEADERS([tcpd.h])
+ AC_CHECK_DECLS([hosts_ctl], , , [#include <tcpd.h>])
AC_MSG_CHECKING(hosts_ctl in -lwrap);
save_LIBS=$LIBS
LIBS="$save_LIBS -lwrap"
diff --git a/ftpd/ftpd.c b/ftpd/ftpd.c
index d796fc0..d8a63d9 100644
--- a/ftpd/ftpd.c
+++ b/ftpd/ftpd.c
@@ -656,7 +656,7 @@ complete_login (struct credentials *pcred)
#endif
/* open wtmp before chroot */
- snprintf (ttyline, sizeof (ttyline), "ftp%d", getpid ());
+ snprintf (ttyline, sizeof (ttyline), "ftp%d", (int) getpid ());
logwtmp_keep_open (ttyline, pcred->name, pcred->remotehost);
if (pcred->guest)
diff --git a/ftpd/server_mode.c b/ftpd/server_mode.c
index 7b7771e..113ee79 100644
--- a/ftpd/server_mode.c
+++ b/ftpd/server_mode.c
@@ -54,6 +54,10 @@ static void reapchild (int);
#ifdef WITH_WRAP
+# if !HAVE_DECL_HOSTS_CTL
+extern int hosts_ctl (char *, char *, char *, char *);
+# endif
+
int allow_severity = LOG_INFO;
int deny_severity = LOG_NOTICE;
@@ -204,7 +208,7 @@ server_mode (const char *pidfile, struct sockaddr
*phis_addr,
syslog (LOG_ERR, "can't open %s: %m", PATH_FTPDPID);
else
{
- fprintf (pid_fp, "%d\n", getpid ());
+ fprintf (pid_fp, "%d\n", (int) getpid ());
fchmod (fileno (pid_fp), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
fclose (pid_fp);
}
diff --git a/ifconfig/changeif.c b/ifconfig/changeif.c
index c474883..1f1f6a8 100644
--- a/ifconfig/changeif.c
+++ b/ifconfig/changeif.c
@@ -52,7 +52,7 @@
return -1; \
}
-#ifndef HAVE_DECL_GETADDRINFO
+#if !HAVE_DECL_GETADDRINFO
extern void herror (const char *pfx);
#endif
@@ -67,7 +67,7 @@ set_address (int sfd, struct ifreq *ifr, char *address)
"don't know how to set an interface address on this system");
return -1;
#else
-# ifdef HAVE_DECL_GETADDRINFO
+# if HAVE_DECL_GETADDRINFO
int rc;
char addr[INET_ADDRSTRLEN];
struct addrinfo hints, *ai, *res;
diff --git a/libinetutils/kcmd.c b/libinetutils/kcmd.c
index 26ee739..0e280fe 100644
--- a/libinetutils/kcmd.c
+++ b/libinetutils/kcmd.c
@@ -120,7 +120,7 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short
rport, char *locuser,
# else
int lport = START_PORT;
# endif
-# ifdef HAVE_DECL_GETADDRINFO
+# if HAVE_DECL_GETADDRINFO
struct addrinfo hints, *ai, *res;
char portstr[8], fqdn[NI_MAXHOST];
# else /* !HAVE_DECL_GETADDRINFO */
@@ -143,7 +143,7 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short
rport, char *locuser,
else
host = *ahost;
-# ifdef HAVE_DECL_GETADDRINFO
+# if HAVE_DECL_GETADDRINFO
memset (&hints, 0, sizeof (hints));
hints.ai_family = af;
hints.ai_socktype = SOCK_STREAM;
@@ -227,7 +227,7 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short
rport, char *locuser,
# endif /* !HAVE_SIGACTION */
for (;;)
{
-# ifdef HAVE_DECL_GETADDRINFO
+# if HAVE_DECL_GETADDRINFO
s = getport (&lport, ai->ai_family);
# else /* !HAVE_DECL_GETADDRINFO */
s = getport (&lport, hp->h_addrtype);
@@ -247,7 +247,7 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short
rport, char *locuser,
}
fcntl (s, F_SETOWN, pid);
-# ifdef HAVE_DECL_GETADDRINFO
+# if HAVE_DECL_GETADDRINFO
len = ai->ai_addrlen;
memcpy (&sin, ai->ai_addr, ai->ai_addrlen);
# else /* !HAVE_DECL_GETADDRINFO */
@@ -293,7 +293,7 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short
rport, char *locuser,
continue;
}
# if ! defined ultrix || defined sun
-# ifdef HAVE_DECL_GETADDRINFO
+# if HAVE_DECL_GETADDRINFO
if (ai->ai_next)
# else /* !HAVE_DECL_GETADDRINFO */
if (hp->h_addr_list[1] != NULL)
@@ -302,7 +302,7 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short
rport, char *locuser,
int oerrno = errno;
char addrstr[INET6_ADDRSTRLEN];
-# ifdef HAVE_DECL_GETADDRINFO
+# if HAVE_DECL_GETADDRINFO
getnameinfo (ai->ai_addr, ai->ai_addrlen,
addrstr, sizeof (addrstr), NULL, 0,
NI_NUMERICHOST);
@@ -328,7 +328,7 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short
rport, char *locuser,
continue;
}
# endif /* !(defined(ultrix) || defined(sun)) */
-# ifdef HAVE_DECL_GETADDRINFO
+# if HAVE_DECL_GETADDRINFO
if (errno != ECONNREFUSED)
perror (res->ai_canonname);
@@ -347,7 +347,7 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short
rport, char *locuser,
return (-1);
}
-# ifdef HAVE_DECL_GETADDRINFO
+# if HAVE_DECL_GETADDRINFO
if (res)
freeaddrinfo (res);
#endif
diff --git a/libinetutils/localhost.c b/libinetutils/localhost.c
index 1228e08..14e17d6 100644
--- a/libinetutils/localhost.c
+++ b/libinetutils/localhost.c
@@ -78,7 +78,7 @@ localhost (void)
else
/* Determine FQDN. */
{
-#ifdef HAVE_DECL_GETADDRINFO
+#if HAVE_DECL_GETADDRINFO
int rc;
struct addrinfo hints, *res;
char fqdn[NI_MAXHOST];
diff --git a/src/inetd.c b/src/inetd.c
index bb1181c..51b812b 100644
--- a/src/inetd.c
+++ b/src/inetd.c
@@ -426,7 +426,7 @@ run_service (int ctrl, struct servtab *sep)
else
{
if (debug)
- fprintf (stderr, "%d execl %s\n", getpid (), sep->se_server);
+ fprintf (stderr, "%d execl %s\n", (int) getpid (), sep->se_server);
dup2 (ctrl, 0);
close (ctrl);
dup2 (0, 1);
@@ -505,7 +505,7 @@ reapchild (int signo _GL_UNUSED_PARAMETER)
if (pid <= 0)
break;
if (debug)
- fprintf (stderr, "%d reaped, status %#x\n", pid, status);
+ fprintf (stderr, "%d reaped, status %#x\n", (int) pid, status);
for (sep = servtab; sep; sep = sep->se_next)
if (sep->se_wait == pid)
{
@@ -564,13 +564,15 @@ void
print_service (const char *action, struct servtab *sep)
{
fprintf (stderr,
- "%s:%d: %s: %s:%s proto=%s, wait=%d, max=%u, user=%s group=%s
builtin=%s server=%s\n",
+ "%s:%d: %s: %s:%s proto=%s, wait=%d, max=%u, "
+ "user=%s group=%s builtin=%s server=%s\n",
sep->se_file, sep->se_line,
action,
ISMUX (sep) ? (ISMUXPLUS (sep) ? "tcpmuxplus" : "tcpmux")
: (sep->se_node ? sep->se_node : "*"),
sep->se_service, sep->se_proto,
- sep->se_wait, sep->se_max, sep->se_user, sep->se_group,
+ (int) sep->se_wait, sep->se_max,
+ sep->se_user, sep->se_group,
sep->se_bi ? sep->se_bi->bi_service : "no",
sep->se_server);
}
@@ -1947,7 +1949,7 @@ main (int argc, char *argv[], char *envp[])
{
if (debug)
fprintf(stderr, "Using pid-file at \"%s\".\n", pid_file);
- fprintf (fp, "%d\n", getpid ());
+ fprintf (fp, "%d\n", (int) getpid ());
fclose (fp);
}
else
diff --git a/src/rlogind.c b/src/rlogind.c
index cb9a541..6e2847c 100644
--- a/src/rlogind.c
+++ b/src/rlogind.c
@@ -554,7 +554,7 @@ rlogin_daemon (int maxchildren, int port)
int
rlogind_auth (int fd, struct auth_data *ap)
{
-#if defined HAVE_DECL_GETNAMEINFO && defined HAVE_DECL_GETADDRINFO
+#if HAVE_DECL_GETNAMEINFO && HAVE_DECL_GETADDRINFO
int rc;
char hoststr[NI_MAXHOST];
#else
@@ -584,7 +584,7 @@ rlogind_auth (int fd, struct auth_data *ap)
confirmed = 0;
/* Check the remote host name */
-#ifdef HAVE_DECL_GETNAMEINFO
+#if HAVE_DECL_GETNAMEINFO
rc = getnameinfo ((struct sockaddr *) &ap->from, ap->fromlen,
hoststr, sizeof (hoststr), NULL, 0, NI_NAMEREQD);
if (!rc)
@@ -617,7 +617,7 @@ rlogind_auth (int fd, struct auth_data *ap)
if (verify_hostname || in_local_domain (ap->hostname))
{
int match = 0;
-#if defined HAVE_DECL_GETADDRINFO && defined HAVE_DECL_GETNAMEINFO
+#if HAVE_DECL_GETADDRINFO && HAVE_DECL_GETNAMEINFO
struct addrinfo hints, *ai, *res;
char astr[INET6_ADDRSTRLEN];
diff --git a/src/rshd.c b/src/rshd.c
index a927342..27d4017 100644
--- a/src/rshd.c
+++ b/src/rshd.c
@@ -408,7 +408,7 @@ doit (int sockfd, struct sockaddr *fromp, socklen_t fromlen)
int cc, nfd, pv[2], pid, s = sockfd;
int rc, one = 1;
char portstr[8], addrstr[INET6_ADDRSTRLEN];
-#ifdef HAVE_DECL_GETNAMEINFO
+#if HAVE_DECL_GETNAMEINFO
char addrname[NI_MAXHOST];
#else /* !HAVE_DECL_GETNAMEINFO */
struct hostent *hp;
@@ -462,7 +462,7 @@ doit (int sockfd, struct sockaddr *fromp, socklen_t fromlen)
}
#endif
-#ifdef HAVE_DECL_GETNAMEINFO
+#if HAVE_DECL_GETNAMEINFO
rc = getnameinfo (fromp, fromlen,
addrstr, sizeof (addrstr),
portstr, sizeof (portstr),
@@ -661,7 +661,7 @@ doit (int sockfd, struct sockaddr *fromp, socklen_t fromlen)
* used for the authentication below.
*/
errorstr = NULL;
-#ifdef HAVE_DECL_GETNAMEINFO
+#if HAVE_DECL_GETNAMEINFO
rc = getnameinfo (fromp, fromlen, addrname, sizeof (addrname),
NULL, 0, NI_NAMEREQD);
if (rc == 0)
diff --git a/src/syslogd.c b/src/syslogd.c
index 01a97de..37dfd8a 100644
--- a/src/syslogd.c
+++ b/src/syslogd.c
@@ -632,7 +632,7 @@ main (int argc, char *argv[])
fp = fopen (PidFile, "w");
if (fp != NULL)
{
- fprintf (fp, "%d\n", getpid ());
+ fprintf (fp, "%d\n", (int) getpid ());
fclose (fp);
}
diff --git a/src/uucpd.c b/src/uucpd.c
index d811682..70b38cd 100644
--- a/src/uucpd.c
+++ b/src/uucpd.c
@@ -229,7 +229,7 @@ dologout (void)
#endif /* HAVE_WAITPID */
{
char line[100];
- sprintf (line, "uucp%.4d", pid);
+ sprintf (line, "uucp%.4d", (int) pid);
#ifdef HAVE_LOGWTMPX
logwtmpx (line, "", "", 0, DEAD_PROCESS);
#elif defined HAVE_LOGWTMP
@@ -265,7 +265,9 @@ dologin (struct passwd *pw, struct sockaddr_in *sin)
{
char line[32];
char remotehost[32];
+#if defined PATH_LASTLOG && defined HAVE_STRUCT_LASTLOG
int f;
+#endif
struct hostent *hp = gethostbyaddr ((char *) &sin->sin_addr,
sizeof (struct in_addr), AF_INET);
@@ -277,7 +279,7 @@ dologin (struct passwd *pw, struct sockaddr_in *sin)
else
strncpy (remotehost, inet_ntoa (sin->sin_addr), sizeof (remotehost));
- sprintf (line, "uucp%.4d", getpid ());
+ sprintf (line, "uucp%.4d", (int) getpid ());
#ifdef HAVE_LOGWTMPX
logwtmpx (line, pw->pw_name, remotehost, 0, USER_PROCESS);
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 22 ++++++++++++++++++++++
configure.ac | 1 +
ftpd/ftpd.c | 2 +-
ftpd/server_mode.c | 6 +++++-
ifconfig/changeif.c | 4 ++--
libinetutils/kcmd.c | 16 ++++++++--------
libinetutils/localhost.c | 2 +-
src/inetd.c | 12 +++++++-----
src/rlogind.c | 6 +++---
src/rshd.c | 6 +++---
src/syslogd.c | 2 +-
src/uucpd.c | 6 ++++--
12 files changed, 58 insertions(+), 27 deletions(-)
hooks/post-receive
--
GNU Inetutils
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-175-gfc8280b,
Mats Erik Andersson <=