File: 0027-improve-error-for-empty-file.patch

package info (click to toggle)
courier 1.4.1-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 51,168 kB
  • sloc: ansic: 128,314; cpp: 24,312; sh: 10,177; perl: 4,250; makefile: 3,398; sed: 16
file content (28 lines) | stat: -rw-r--r-- 622 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- a/courier/makeimapaccess.in
+++ b/courier/makeimapaccess.in
@@ -14,6 +14,11 @@
 . ${sysconfdir}/imapd
 . ${sysconfdir}/imapd-ssl
 
+if [ -z "${IMAPACCESSFILE}" ]; then
+	echo "ERROR: No IMAPACCESSFILE specified in ${sysconfdir}/imapd(-msa)" >&2
+	exit 1
+fi
+
 umask 022
 ${bindir}/makedat \
 	-src=${IMAPACCESSFILE} \
--- a/courier/module.esmtp/makesmtpaccess.in
+++ b/courier/module.esmtp/makesmtpaccess.in
@@ -24,6 +24,11 @@
 	;;
 esac
 
+if [ -z "${ACCESSFILE}" ]; then
+	echo "ERROR: No ACCESSFILE specified in ${sysconfdir}/esmtpd(-msa)" >&2
+	exit 1
+fi
+
 umask 022
 ${bindir}/makedat \
 	-src=${ACCESSFILE} \