Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/syslogd Allow syslogd to compile when MKCRYPTO=no. ...
details: https://anonhg.NetBSD.org/src/rev/918a9118cd0e
branches: trunk
changeset: 755573:918a9118cd0e
user: riz <riz%NetBSD.org@localhost>
date: Wed Jun 09 21:55:42 2010 +0000
description:
Allow syslogd to compile when MKCRYPTO=no. No promises as to whether
it works or not, as this has been broken since late 2008, when the
"encrypted connections" support was added to syslogd.
diffstat:
usr.sbin/syslogd/Makefile | 4 +++-
usr.sbin/syslogd/extern.h | 4 +++-
usr.sbin/syslogd/syslogd.c | 15 +++++++++++----
3 files changed, 17 insertions(+), 6 deletions(-)
diffs (113 lines):
diff -r 6079a6021359 -r 918a9118cd0e usr.sbin/syslogd/Makefile
--- a/usr.sbin/syslogd/Makefile Wed Jun 09 21:54:21 2010 +0000
+++ b/usr.sbin/syslogd/Makefile Wed Jun 09 21:55:42 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2009/04/22 15:23:08 lukem Exp $
+# $NetBSD: Makefile,v 1.23 2010/06/09 21:55:42 riz Exp $
# from: @(#)Makefile 8.1 (Berkeley) 6/6/93
.include <bsd.own.mk>
@@ -26,6 +26,8 @@
.if ${MKCRYPTO} != "no"
LDADD+= -lssl -lcrypto
+.else
+CPPFLAGS+=-DDISABLE_TLS -DDISABLE_SIGN
.endif
.include <bsd.prog.mk>
diff -r 6079a6021359 -r 918a9118cd0e usr.sbin/syslogd/extern.h
--- a/usr.sbin/syslogd/extern.h Wed Jun 09 21:54:21 2010 +0000
+++ b/usr.sbin/syslogd/extern.h Wed Jun 09 21:55:42 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.2 2008/11/07 07:36:38 minskim Exp $ */
+/* $NetBSD: extern.h,v 1.3 2010/06/09 21:55:42 riz Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -74,7 +74,9 @@
extern void schedule_event(struct event **, struct timeval *,
void (*)(int, short, void *), void *);
extern char *make_timestamp(time_t *, bool);
+#ifndef DISABLE_TLS
extern struct filed *get_f_by_conninfo(struct tls_conn_settings *conn_info);
+#endif
extern bool message_queue_remove(struct filed *, struct buf_queue *);
extern void buf_msg_free(struct buf_msg *msg);
extern void message_queue_freeall(struct filed *);
diff -r 6079a6021359 -r 918a9118cd0e usr.sbin/syslogd/syslogd.c
--- a/usr.sbin/syslogd/syslogd.c Wed Jun 09 21:54:21 2010 +0000
+++ b/usr.sbin/syslogd/syslogd.c Wed Jun 09 21:55:42 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: syslogd.c,v 1.99 2009/02/06 21:09:46 mschuett Exp $ */
+/* $NetBSD: syslogd.c,v 1.100 2010/06/09 21:55:42 riz Exp $ */
/*
* Copyright (c) 1983, 1988, 1993, 1994
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94";
#else
-__RCSID("$NetBSD: syslogd.c,v 1.99 2009/02/06 21:09:46 mschuett Exp $");
+__RCSID("$NetBSD: syslogd.c,v 1.100 2010/06/09 21:55:42 riz Exp $");
#endif
#endif /* not lint */
@@ -2114,7 +2114,7 @@
int e = 0, len = 0;
size_t msglen, linelen, tlsprefixlen, prilen;
char *p, *line = NULL, *lineptr = NULL;
-#ifndef DISABLE_TLS
+#ifndef DISABLE_SIGN
bool newhash = false;
#endif
#define REPBUFSIZE 80
@@ -3248,8 +3248,8 @@
struct filed *f, *newf, **nextp, *f2;
char *p;
sigset_t newmask, omask;
+#ifndef DISABLE_TLS
char *tls_status_msg = NULL;
-#ifndef DISABLE_TLS
struct peer_cred *cred = NULL;
#endif /* !DISABLE_TLS */
@@ -3818,8 +3818,10 @@
break;
case '|':
+#ifndef DISABLE_SIGN
if (GlobalSign.sg == 3)
f->f_flags |= FFLAG_SIGN;
+#endif
f->f_un.f_pipe.f_pid = 0;
(void) strlcpy(f->f_un.f_pipe.f_pname, p + 1,
sizeof(f->f_un.f_pipe.f_pname));
@@ -4200,6 +4202,7 @@
#define SQ_CHUNK_SIZE 250
size_t cnt = 0;
+#ifndef DISABLE_TLS
if (f->f_type == F_TLS) {
/* use a flag to prevent recursive calls to send_queue() */
if (f->f_un.f_tls.tls_conn->send_queue)
@@ -4209,6 +4212,7 @@
}
DPRINTF((D_DATA|D_CALL), "send_queue(f@%p with %zu msgs, "
"cnt@%p = %zu)\n", f, f->f_qelements, &cnt, cnt);
+#endif /* !DISABLE_TLS */
while ((qentry = STAILQ_FIRST(&f->f_qhead))) {
#ifndef DISABLE_TLS
@@ -4246,8 +4250,11 @@
break;
}
}
+#ifndef DISABLE_TLS
if (f->f_type == F_TLS)
f->f_un.f_tls.tls_conn->send_queue = false;
+#endif
+
}
/*
Home |
Main Index |
Thread Index |
Old Index