summaryrefslogtreecommitdiff
path: root/gnu/usr.sbin/sendmail/libsmutil/cf.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-01-01 19:59:25 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-01-01 19:59:25 +0000
commitca99f1ac04361a3826ef7aa2d09eff30344e9b15 (patch)
tree037fd2f9239003a4df00dbf76d8f53671ce45b78 /gnu/usr.sbin/sendmail/libsmutil/cf.c
parente60a23b69678e8ea276e2e2f3e17ecc02b87d3cb (diff)
update to sendmail 8.12.7
Diffstat (limited to 'gnu/usr.sbin/sendmail/libsmutil/cf.c')
-rw-r--r--gnu/usr.sbin/sendmail/libsmutil/cf.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/gnu/usr.sbin/sendmail/libsmutil/cf.c b/gnu/usr.sbin/sendmail/libsmutil/cf.c
index 47ca64c9485..6f4546443e8 100644
--- a/gnu/usr.sbin/sendmail/libsmutil/cf.c
+++ b/gnu/usr.sbin/sendmail/libsmutil/cf.c
@@ -9,7 +9,7 @@
*/
#include <sendmail.h>
-SM_RCSID("@(#)$Sendmail: cf.c,v 8.18 2002/05/25 00:09:16 gshapiro Exp $")
+SM_RCSID("@(#)$Sendmail: cf.c,v 8.18.2.1 2002/09/24 21:48:23 ca Exp $")
#include <sendmail/pathnames.h>
/*
@@ -37,21 +37,13 @@ getcfname(opmode, submitmode, cftype, conffile)
int cftype;
char *conffile;
{
+#if NETINFO
+ char *cflocation;
+#endif /* NETINFO */
if (conffile != NULL)
return conffile;
-#if NETINFO
- {
- char *cflocation;
-
- cflocation = ni_propval("/locations", NULL, "sendmail",
- "sendmail.cf", '\0');
- if (cflocation != NULL)
- return cflocation;
- }
-#endif /* NETINFO */
-
if (cftype == SM_GET_SUBMIT_CF ||
((submitmode != SUBMIT_UNKNOWN ||
opmode == MD_DELIVER ||
@@ -62,10 +54,23 @@ getcfname(opmode, submitmode, cftype, conffile)
struct stat sbuf;
static char cf[MAXPATHLEN];
- (void) sm_strlcpyn(cf, sizeof cf, 2, _DIR_SENDMAILCF,
- "submit.cf");
+#if NETINFO
+ cflocation = ni_propval("/locations", NULL, "sendmail",
+ "submit.cf", '\0');
+ if (cflocation != NULL)
+ (void) sm_strlcpy(cf, cflocation, sizeof cf);
+ else
+#endif /* NETINFO */
+ (void) sm_strlcpyn(cf, sizeof cf, 2, _DIR_SENDMAILCF,
+ "submit.cf");
if (cftype == SM_GET_SUBMIT_CF || stat(cf, &sbuf) == 0)
return cf;
}
+#if NETINFO
+ cflocation = ni_propval("/locations", NULL, "sendmail",
+ "sendmail.cf", '\0');
+ if (cflocation != NULL)
+ return cflocation;
+#endif /* NETINFO */
return _PATH_SENDMAILCF;
}