From c82ea4a1a6f0175cf7f6aebefdde01910ea8c9c0 Mon Sep 17 00:00:00 2001 From: Mario Sergio Fujikawa Ferreira Date: Tue, 14 Dec 2004 13:46:00 +0000 Subject: Really uphold the WITH_Y_OPTION '-y' command line parameter for the qpopper daemon PR: 74813 Submitted by: Helge Oldach --- mail/qpopper/Makefile | 4 +++- mail/qpopper/files/extra-patch-popper::main.c | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 mail/qpopper/files/extra-patch-popper::main.c (limited to 'mail') diff --git a/mail/qpopper/Makefile b/mail/qpopper/Makefile index 042114b8bbf6..740a407b708f 100644 --- a/mail/qpopper/Makefile +++ b/mail/qpopper/Makefile @@ -165,7 +165,9 @@ CONFIGURE_ARGS+= --enable-standalone # accept -y command line option which allows the user to specify a # different logging facility. .if defined(WITH_Y_OPTION) -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-popper::pop_init.c +EXTRA_PATCHES+= \ + ${FILESDIR}/extra-patch-popper::pop_init.c \ + ${FILESDIR}/extra-patch-popper::main.c .endif # The default is to build without SSL/TLS support. diff --git a/mail/qpopper/files/extra-patch-popper::main.c b/mail/qpopper/files/extra-patch-popper::main.c new file mode 100644 index 000000000000..0eb9258666a8 --- /dev/null +++ b/mail/qpopper/files/extra-patch-popper::main.c @@ -0,0 +1,27 @@ +--- popper/main.c.orig Thu Jan 2 00:38:40 2003 ++++ popper/main.c Tue Dec 14 11:32:49 2004 +@@ -343,6 +343,24 @@ + trace_name, fileno(trace_file) ); + break; + ++ case 'y': /* log facility */ ++ { ++ POP config; ++ POP *p = &config; ++ if ( set_option ( p, "log-facility", optarg ) == POP_SUCCESS ) { ++ closelog(); ++#ifdef SYSLOG42 ++ openlog ( pname, 0 ); ++#else ++ openlog ( pname, POP_LOGOPTS, p->log_facility ); ++#endif ++ } else { ++ fprintf ( stderr, "Error setting '-y' to %s\n", optarg ); ++ return 1; ++ } ++ } ++ break; ++ + default: + break; + } -- cgit v1.2.3