X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/25ef0f44a4d150d8a3571906475ed3d567ee7f4a..3d2e82c5729148f3f88fbb7de7e6dcbc20d0c867:/src/src/exim.c diff --git a/src/src/exim.c b/src/src/exim.c index f0feaf5bd..3be3bf039 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -110,7 +110,7 @@ if (use_malloc) pcre_free = function_store_free; } if (caseless) options |= PCRE_CASELESS; -yield = pcre_compile(CCS pattern, options, (const char **)&error, &offset, NULL); +yield = pcre_compile(CCS pattern, options, CCSS &error, &offset, NULL); pcre_malloc = function_store_get; pcre_free = function_dummy_free; if (yield == NULL) @@ -1114,6 +1114,9 @@ show_db_version(fp); #ifdef SUPPORT_I18N utf8_version_report(fp); #endif +#ifdef SUPPORT_SPF + spf_lib_version_report(fp); +#endif for (auth_info * authi = auths_available; *authi->driver_name != '\0'; ++authi) if (authi->version_report) @@ -1262,9 +1265,9 @@ void *dlhandle; void *dlhandle_curses = dlopen("libcurses." DYNLIB_FN_EXT, RTLD_GLOBAL|RTLD_LAZY); dlhandle = dlopen("libreadline." DYNLIB_FN_EXT, RTLD_GLOBAL|RTLD_NOW); -if (dlhandle_curses != NULL) dlclose(dlhandle_curses); +if (dlhandle_curses) dlclose(dlhandle_curses); -if (dlhandle != NULL) +if (dlhandle) { /* Checked manual pages; at least in GNU Readline 6.1, the prototypes are: * char * readline (const char *prompt); @@ -1274,9 +1277,7 @@ if (dlhandle != NULL) *fn_addhist_ptr = (void(*)(const char*))dlsym(dlhandle, "add_history"); } else - { DEBUG(D_any) debug_printf("failed to load readline: %s\n", dlerror()); - } return dlhandle; } @@ -3638,15 +3639,15 @@ an error return. The following code should cope with both types of system. in the call to exim_setugid(). However, if this process isn't running as root, setgroups() can't be used -since you have to be root to run it, even if throwing away groups. Not being -root here happens only in some unusual configurations. We just ignore the -error. */ +since you have to be root to run it, even if throwing away groups. +Except, sigh, for Hurd - where you can. +Not being root here happens only in some unusual configurations. */ -if ( +if ( !unprivileged #ifndef OS_SETGROUPS_ZERO_DROPS_ALL - setgroups(0, NULL) != 0 && + && setgroups(0, NULL) != 0 #endif - setgroups(1, group_list) != 0 && !unprivileged) + && setgroups(1, group_list) != 0) exim_fail("exim: setgroups() failed: %s\n", strerror(errno)); /* If the configuration file name has been altered by an argument on the @@ -4293,8 +4294,8 @@ else if (!(unprivileged || removed_privilege)) exim_fail("exim: changing group failed: %s\n", strerror(errno)); else - DEBUG(D_any) debug_printf("changing group to %ld failed: %d: %s\n", - (long int)exim_gid, errno, strerror(errno)); + DEBUG(D_any) debug_printf("changing group to %ld failed: %s\n", + (long int)exim_gid, strerror(errno)); } /* Handle a request to scan a file for malware */