From ca99f1ac04361a3826ef7aa2d09eff30344e9b15 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 1 Jan 2003 19:59:25 +0000 Subject: update to sendmail 8.12.7 --- gnu/usr.sbin/sendmail/libsmutil/cf.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'gnu/usr.sbin/sendmail/libsmutil/cf.c') 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 -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 /* @@ -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; } -- cgit v1.2.3