SCCS-vsn: usr.sbin/sendmail/src/conf.c 8.36
SCCS-vsn: usr.sbin/sendmail/src/sendmail.h 8.20
SCCS-vsn: usr.sbin/sendmail/src/main.c 8.27
-static char sccsid[] = "@(#)conf.c 8.35 (Berkeley) %G%";
+static char sccsid[] = "@(#)conf.c 8.36 (Berkeley) %G%";
#endif /* not lint */
# include "sendmail.h"
#endif /* not lint */
# include "sendmail.h"
** Location of system files/databases/etc.
*/
** Location of system files/databases/etc.
*/
-char *ConfFile = _PATH_SENDMAILCF; /* runtime configuration */
char *PidFile = _PATH_SENDMAILPID; /* stores daemon proc id */
char *PidFile = _PATH_SENDMAILPID; /* stores daemon proc id */
printf("FAIL\n");
return FALSE;
}
printf("FAIL\n");
return FALSE;
}
+\f/*
+** GETCFNAME -- return the name of the .cf file.
+**
+** Some systems (e.g., NeXT) determine this dynamically.
+*/
+
+char *
+getcfname()
+{
+ if (ConfFile != NULL)
+ return ConfFile;
+ return _PATH_SENDMAILCF;
+}
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)main.c 8.26 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c 8.27 (Berkeley) %G%";
#endif /* not lint */
#define _DEFINE
#endif /* not lint */
#define _DEFINE
extern char **myhostname();
extern char *arpadate();
extern char *getauthinfo();
extern char **myhostname();
extern char *arpadate();
extern char *getauthinfo();
+ extern char *getcfname();
extern char *optarg;
extern char **environ;
extern char *optarg;
extern char **environ;
** Extract special fields for local use.
*/
** Extract special fields for local use.
*/
- readcf(ConfFile, safecf, CurEnv);
+ readcf(getcfname(), safecf, CurEnv);
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)sendmail.h 8.19 (Berkeley) %G%
+ * @(#)sendmail.h 8.20 (Berkeley) %G%
# ifdef _DEFINE
# define EXTERN
# ifndef lint
# ifdef _DEFINE
# define EXTERN
# ifndef lint
-static char SmailSccsId[] = "@(#)sendmail.h 8.19 %G%";
+static char SmailSccsId[] = "@(#)sendmail.h 8.20 %G%";
# endif
# else /* _DEFINE */
# define EXTERN extern
# endif
# else /* _DEFINE */
# define EXTERN extern
EXTERN bool TryNullMXList; /* if we are the best MX, try host directly */
EXTERN char SpaceSub; /* substitution for <lwsp> */
EXTERN int PrivacyFlags; /* privacy flags */
EXTERN bool TryNullMXList; /* if we are the best MX, try host directly */
EXTERN char SpaceSub; /* substitution for <lwsp> */
EXTERN int PrivacyFlags; /* privacy flags */
-extern char *ConfFile; /* location of configuration file [conf.c] */
+EXTERN char *ConfFile; /* location of configuration file [conf.c] */
extern char *PidFile; /* location of proc id file [conf.c] */
extern ADDRESS NullAddress; /* a null (template) address [main.c] */
EXTERN long WkClassFact; /* multiplier for message class -> priority */
extern char *PidFile; /* location of proc id file [conf.c] */
extern ADDRESS NullAddress; /* a null (template) address [main.c] */
EXTERN long WkClassFact; /* multiplier for message class -> priority */