diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-04 00:10:24 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-04 00:10:24 +0200 |
commit | 66404f0bfbd78e635ff6381ca30b25157e0e1a09 (patch) | |
tree | 2e55670da27019b2c80efa58f3e2159ca888a530 | |
parent | cb9bff92107d168ff6dd0c12dc34bc7bacc8eb7d (diff) |
remove unused headers
-rw-r--r-- | src/chkshsgr.c | 15 | ||||
-rw-r--r-- | src/chkspawn.c | 53 | ||||
-rw-r--r-- | src/dnsdoe.c | 2 | ||||
-rw-r--r-- | src/include/auto_patrn.h | 6 | ||||
-rw-r--r-- | src/include/auto_qmail.h | 6 | ||||
-rw-r--r-- | src/include/auto_spawn.h | 6 | ||||
-rw-r--r-- | src/include/auto_split.h | 6 | ||||
-rw-r--r-- | src/include/auto_uids.h | 16 | ||||
-rw-r--r-- | src/include/auto_usera.h | 6 | ||||
-rw-r--r-- | src/include/exit.h | 16 | ||||
-rw-r--r-- | src/include/fifo.h | 6 | ||||
-rw-r--r-- | src/include/meson.build | 3 | ||||
-rw-r--r-- | src/include/readwrite.h | 11 | ||||
-rw-r--r-- | src/include/ucspitls.h | 46 | ||||
-rw-r--r-- | src/matchup.c | 1 | ||||
-rw-r--r-- | src/qmail-dksign.c | 1 | ||||
-rw-r--r-- | src/qmail-dkverify.c | 1 | ||||
-rw-r--r-- | src/qmail-qmaint.c | 2 | ||||
-rw-r--r-- | src/qmail.c | 1 | ||||
-rw-r--r-- | src/srsforward.c | 1 | ||||
-rw-r--r-- | src/srsreverse.c | 1 | ||||
-rw-r--r-- | src/tai64nfrac.c | 3 |
22 files changed, 6 insertions, 203 deletions
diff --git a/src/chkshsgr.c b/src/chkshsgr.c deleted file mode 100644 index a98089b..0000000 --- a/src/chkshsgr.c +++ /dev/null @@ -1,15 +0,0 @@ -#include <grp.h> -#include <sys/types.h> -#include <unistd.h> - -#include "exit.h" - -int main() -{ - short x[4]; - - x[0] = x[1] = 0; - if (getgroups(1, x) == 0) - if (setgroups(1, x) == -1) _exit(1); - _exit(0); -} diff --git a/src/chkspawn.c b/src/chkspawn.c deleted file mode 100644 index 0760ff4..0000000 --- a/src/chkspawn.c +++ /dev/null @@ -1,53 +0,0 @@ -#include "buffer.h" -#include "exit.h" -#include "fmt.h" -#include "select.h" - -#include "auto_spawn.h" -#define MAXSPAWN 1000 /* Silent spawn limit increased to 1000 */ - -char num[FMT_ULONG]; -fd_set fds; - -int main() -{ - unsigned long hiddenlimit; - unsigned long maxnumd; - - hiddenlimit = sizeof(fds) * 8; - maxnumd = (hiddenlimit - 5) / 2; - - if (auto_spawn < 1) { - buffer_puts(buffer_2, "Oops. You have set conf-spawn lower than 1.\n"); - buffer_flush(buffer_2); - _exit(1); - } - - if (auto_spawn > MAXSPAWN) { - buffer_puts(buffer_2, "Oops. You have set conf-spawn higher than MAXSPAWN.\n"); - buffer_flush(buffer_2); - _exit(1); - } - - if (auto_spawn > maxnumd) { - buffer_puts(buffer_2, "Oops. Your system's FD_SET() has a hidden limit of "); - buffer_put(buffer_2, num, fmt_ulong(num, hiddenlimit)); - buffer_puts( - buffer_2, - " descriptors.\n" - "This means that the qmail daemons could crash if you set the run-time\n" - "concurrency higher than "); - buffer_put(buffer_2, num, fmt_ulong(num, maxnumd)); - buffer_puts( - buffer_2, - ". So I'm going to insist that the concurrency\n" - "limit in conf-spawn be at most "); - buffer_put(buffer_2, num, fmt_ulong(num, maxnumd)); - buffer_puts(buffer_2, ". Right now it's "); - buffer_put(buffer_2, num, fmt_ulong(num, (unsigned long)auto_spawn)); - buffer_puts(buffer_2, ".\n"); - buffer_flush(buffer_2); - _exit(1); - } - _exit(0); -} diff --git a/src/dnsdoe.c b/src/dnsdoe.c index 579eb04..8d9be5a 100644 --- a/src/dnsdoe.c +++ b/src/dnsdoe.c @@ -1,3 +1,5 @@ +#include "dnsdoe.h" + #include <unistd.h> #include "buffer.h" diff --git a/src/include/auto_patrn.h b/src/include/auto_patrn.h deleted file mode 100644 index 77cdf1f..0000000 --- a/src/include/auto_patrn.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef AUTO_PATRN_H -#define AUTO_PATRN_H - -extern int auto_patrn; - -#endif diff --git a/src/include/auto_qmail.h b/src/include/auto_qmail.h deleted file mode 100644 index 0c56001..0000000 --- a/src/include/auto_qmail.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef AUTO_QMAIL_H -#define AUTO_QMAIL_H - -extern char auto_qmail[]; - -#endif diff --git a/src/include/auto_spawn.h b/src/include/auto_spawn.h deleted file mode 100644 index 165d988..0000000 --- a/src/include/auto_spawn.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef AUTO_SPAWN_H -#define AUTO_SPAWN_H - -extern int auto_spawn; - -#endif diff --git a/src/include/auto_split.h b/src/include/auto_split.h deleted file mode 100644 index 3754129..0000000 --- a/src/include/auto_split.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef AUTO_SPLIT_H -#define AUTO_SPLIT_H - -extern int auto_split; - -#endif diff --git a/src/include/auto_uids.h b/src/include/auto_uids.h deleted file mode 100644 index 1252ecb..0000000 --- a/src/include/auto_uids.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef AUTO_UIDS_H -#define AUTO_UIDS_H - -extern int auto_uida; -extern int auto_uidd; -extern int auto_uidl; -extern int auto_uido; -extern int auto_uidp; -extern int auto_uidq; -extern int auto_uidr; -extern int auto_uids; - -extern int auto_gidn; -extern int auto_gidq; - -#endif diff --git a/src/include/auto_usera.h b/src/include/auto_usera.h deleted file mode 100644 index 49d7755..0000000 --- a/src/include/auto_usera.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef AUTO_USERA_H -#define AUTO_USERA_H - -extern char auto_usera[]; - -#endif diff --git a/src/include/exit.h b/src/include/exit.h deleted file mode 100644 index d7351ba..0000000 --- a/src/include/exit.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef EXIT_H -#define EXIT_H - -/* Return code conventions: - - 110: Unable to access dir - 111: General (memory) error - 112: Unable to access file -*/ - -void _exit(); - -int rename(const char *, const char *); - - -#endif diff --git a/src/include/fifo.h b/src/include/fifo.h deleted file mode 100644 index cfaa801..0000000 --- a/src/include/fifo.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef FIFO_H -#define FIFO_H - -int fifo_make(char *, int); - -#endif diff --git a/src/include/meson.build b/src/include/meson.build index 5f621f5..3677692 100644 --- a/src/include/meson.build +++ b/src/include/meson.build @@ -12,9 +12,7 @@ sqmail_hdrs = [ 'dnsdoe.h', 'dnsgettxt.h', 'dns.h', - 'exit.h', 'extra.h', - 'fifo.h', 'fmtqfn.h', 'gfrom.h', 'global.h', @@ -38,7 +36,6 @@ sqmail_hdrs = [ 'quote.h', 'rcpthosts.h', 'readsubdir.h', - 'readwrite.h', 'received.h', 'recipients.h', 'sendtodo.h', diff --git a/src/include/readwrite.h b/src/include/readwrite.h deleted file mode 100644 index 4fdb771..0000000 --- a/src/include/readwrite.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef READWRITE_H -#define READWRITE_H - -#include <unistd.h> -/* Already in unistd.h */ -/* -int read(); -int write(); -*/ - -#endif diff --git a/src/include/ucspitls.h b/src/include/ucspitls.h deleted file mode 100644 index f0505c7..0000000 --- a/src/include/ucspitls.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef UCSPITLS_H -#define UCSPITLS_H - -#include <openssl/ec.h> -#include <openssl/opensslv.h> -#include <openssl/ssl.h> - -#include "stralloc.h" - -#define SSL_NAME_LEN 256 -#define OPENSSL_VERSION_NUMBER 0x101010100L - -#if (OPENSSL_VERSION_NUMBER < 0x10100000L) - #define ssl_client() (ssl_context(SSLv23_client_method())) - #define ssl_server() (ssl_context(SSLv23_server_method())) -#else - #define ssl_client() (ssl_context(TLS_client_method())) - #define ssl_server() (ssl_context(TLS_server_method())) -#endif - -extern int ssl_errno; -int ssl_io(SSL *, int, int, unsigned int); -SSL_CTX *ssl_context(SSL_METHOD *); -int ssl_timeoutconn(SSL *, unsigned int); -int ssl_timeoutaccept(SSL *, unsigned int); -SSL *ssl_new(SSL_CTX *, int); -int ssl_certkey(SSL_CTX *, const char *, const char *, pem_password_cb *); -int ssl_ca(SSL_CTX *, const char *, const char *, int); -int ssl_cca(SSL_CTX *, const char *); -int ssl_ciphers(SSL_CTX *, const char *); -int ssl_verify(SSL *, const char *); -int ssl_params(SSL_CTX *, const char *, int); -int ssl_server_env(SSL *, stralloc *); -int ssl_client_env(SSL *, stralloc *); -char *ssl_error_str(int); - -#define ssl_errstr() (SSL_load_error_strings()) -#define ssl_free(ssl) (SSL_free((ssl))) -#define ssl_close(ssl) (close(SSL_get_fd((ssl)))) - -#define ssl_pending(ssl) (SSL_pending((ssl))) -#define ssl_shutdown(ssl) (SSL_shutdown((ssl))) -#define ssl_shutdown_pending(ssl) (SSL_get_shutdown((ssl)) & SSL_RECEIVED_SHUTDOWN) -#define ssl_shutdown_sent(ssl) (SSL_get_shutdown((ssl)) & SSL_SENT_SHUTDOWN) - -#endif diff --git a/src/matchup.c b/src/matchup.c index d68d5f8..5a01aac 100644 --- a/src/matchup.c +++ b/src/matchup.c @@ -8,7 +8,6 @@ #include "genalloc.h" #include "getln.h" #include "logmsg.h" -#include "readwrite.h" #include "scan.h" #include "str.h" #include "stralloc.h" diff --git a/src/qmail-dksign.c b/src/qmail-dksign.c index c3ddeca..50d1394 100644 --- a/src/qmail-dksign.c +++ b/src/qmail-dksign.c @@ -15,7 +15,6 @@ #include "logmsg.h" #include "open.h" #include "pathexec.h" -#include "readwrite.h" #include "sig.h" #include "str.h" #include "stralloc.h" diff --git a/src/qmail-dkverify.c b/src/qmail-dkverify.c index f26d388..0438f58 100644 --- a/src/qmail-dkverify.c +++ b/src/qmail-dkverify.c @@ -16,7 +16,6 @@ #include "logmsg.h" #include "open.h" #include "pathexec.h" -#include "readwrite.h" #include "sig.h" #include "str.h" #include "stralloc.h" diff --git a/src/qmail-qmaint.c b/src/qmail-qmaint.c index 9f6511b..c0dac40 100644 --- a/src/qmail-qmaint.c +++ b/src/qmail-qmaint.c @@ -6,6 +6,8 @@ #include <sys/stat.h> #include <unistd.h> +#include <stdio.h> + #include "buffer.h" #include "direntry.h" #include "error.h" diff --git a/src/qmail.c b/src/qmail.c index f681805..70a4281 100644 --- a/src/qmail.c +++ b/src/qmail.c @@ -6,7 +6,6 @@ #include "env.h" #include "exit.h" #include "fd.h" -#include "readwrite.h" #include "wait.h" #ifdef USE_CONFIG diff --git a/src/srsforward.c b/src/srsforward.c index 1290a75..f15a8ad 100644 --- a/src/srsforward.c +++ b/src/srsforward.c @@ -7,7 +7,6 @@ #include "exit.h" #include "fmt.h" #include "logmsg.h" -#include "readwrite.h" #include "sig.h" #include "str.h" #include "stralloc.h" diff --git a/src/srsreverse.c b/src/srsreverse.c index 1f2e50d..bee168a 100644 --- a/src/srsreverse.c +++ b/src/srsreverse.c @@ -8,7 +8,6 @@ #include "exit.h" #include "fmt.h" #include "logmsg.h" -#include "readwrite.h" #include "sig.h" #include "str.h" #include "stralloc.h" diff --git a/src/tai64nfrac.c b/src/tai64nfrac.c index c433e4f..d3b1a31 100644 --- a/src/tai64nfrac.c +++ b/src/tai64nfrac.c @@ -1,9 +1,10 @@ +#include <unistd.h> + #include "buffer.h" #include "exit.h" #include "fmt.h" #include "getln.h" #include "open.h" -#include "readwrite.h" #include "scan.h" #include "stralloc.h" |