diff options
| author | Sam Varshavchik | 2018-06-21 23:12:17 -0400 |
|---|---|---|
| committer | Sam Varshavchik | 2018-06-21 23:12:17 -0400 |
| commit | 778d07bc34d03e4ad77e7438898a54f3dbb2e31a (patch) | |
| tree | c60ee3cff13fb30b3022469fd6f9304f0b34cfda /tcpd | |
| parent | 004fa65d2fc50e9901859708cfe00d11cf121e25 (diff) | |
| download | courier-libs-778d07bc34d03e4ad77e7438898a54f3dbb2e31a.tar.bz2 | |
Add option to drop root when starting couriertls.
Diffstat (limited to 'tcpd')
| -rw-r--r-- | tcpd/tlsclient.c | 3 | ||||
| -rw-r--r-- | tcpd/tlsclient.h | 3 |
2 files changed, 5 insertions, 1 deletions
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; } ; |
