From 778d07bc34d03e4ad77e7438898a54f3dbb2e31a Mon Sep 17 00:00:00 2001 From: Sam Varshavchik Date: Thu, 21 Jun 2018 23:12:17 -0400 Subject: Add option to drop root when starting couriertls. --- tcpd/tlsclient.c | 3 +++ tcpd/tlsclient.h | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'tcpd') diff --git a/tcpd/tlsclient.c b/tcpd/tlsclient.c index f68bb16..e0c76ef 100644 --- a/tcpd/tlsclient.c +++ b/tcpd/tlsclient.c @@ -343,6 +343,9 @@ static int do_couriertls_start(char **args, struct couriertls_info *cinfo) close(statuspipe_fd[0]); close(x509_fd[0]); + if (cinfo->username) + libmail_changeusername(cinfo->username, 0); + fp=fdopen(statuspipe_fd[1], "w"); if (!fp) diff --git a/tcpd/tlsclient.h b/tcpd/tlsclient.h index 1619449..b8eadbc 100644 --- a/tcpd/tlsclient.h +++ b/tcpd/tlsclient.h @@ -2,7 +2,7 @@ #define tlsclient_h /* -** Copyright 2000-2001 Double Precision, Inc. +** Copyright 2000-2018 Double Precision, Inc. ** See COPYING for distribution information. */ @@ -36,6 +36,7 @@ struct couriertls_info { const char *cipher; const char *version; + const char *username; int bits; } ; -- cgit v1.2.3