-/* $Cambridge: exim/src/src/exim.c,v 1.68 2010/06/06 02:08:50 pdp Exp $ */
+/* $Cambridge: exim/src/src/exim.c,v 1.71 2010/06/07 00:12:42 pdp Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
fprintf(f, "%d\n", (unsigned int)fixed_never_users[i]);
}
-fprintf(f, "Size of off_t: %d\n", sizeof(off_t));
+fprintf(f, "Size of off_t: " SIZE_T_FMT "\n", sizeof(off_t));
/* This runtime check is to help diagnose library linkage mismatches which
result in segfaults and the like; as such, it's left until the end,
#ifdef EXIM_USERNAME
if (route_finduser(US EXIM_USERNAME, &pw, &exim_uid))
{
+ if (exim_uid == 0)
+ {
+ fprintf(stderr, "exim: refusing to run with uid 0 for \"%s\"\n",
+ EXIM_USERNAME);
+ exit(EXIT_FAILURE);
+ }
exim_gid = pw->pw_gid;
}
else
else if (Ustrcmp(argrest, "version") == 0)
{
switchchar = 'b';
- argrest = "V";
+ argrest = US"V";
}
}
/* Handle a request to scan a file for malware */
if (malware_test_file)
{
+#ifdef WITH_CONTENT_SCAN
int result;
set_process_info("scanning file for malware");
result = malware_in_file(malware_test_file);
printf("Malware found: %s\n", malware_name);
else
printf("Malware scan detected malware of unknown name.\n");
+#else
+ printf("Malware scanning not enabled at compile time.\n");
+#endif
exit(EXIT_FAILURE);
}