diff -uNr dspam-3.8.0.org/src/agent_shared.c dspam-3.8.0/src/agent_shared.c --- dspam-3.8.0.org/src/agent_shared.c Sun May 28 04:45:11 2006 +++ dspam-3.8.0/src/agent_shared.c Mon Dec 24 15:32:49 2007 @@ -493,7 +493,9 @@ ptr = strtok_r(dup, ",", &ptrptr); while(ptr != NULL) { - if (!strncmp(ptr, "no",2)) + if (!strncmp(ptr, "ch", 2)) + ; + else if (!strncmp(ptr, "no",2)) ATX->flags |= DAF_NOISE; else if (!strncmp(ptr, "wh", 2)) ATX->flags |= DAF_WHITELIST; diff -uNr dspam-3.8.0.org/src/dspamc.c dspam-3.8.0/src/dspamc.c --- dspam-3.8.0.org/src/dspamc.c Sat May 13 10:12:59 2006 +++ dspam-3.8.0/src/dspamc.c Mon Dec 24 15:31:15 2007 @@ -99,6 +99,7 @@ int exitcode = EXIT_SUCCESS; buffer *message = NULL; /* input Message */ int agent_init = 0; /* agent is initialized */ + struct passwd *pwent; setbuf (stdout, NULL); /* unbuffered output */ #ifdef DEBUG @@ -112,6 +113,17 @@ LOG(LOG_ERR, ERR_DAEMON_NO_SUPPORT); exit(EXIT_FAILURE); #endif + + /* Cache my username and uid for trusted user security */ + + pwent = getpwuid(getuid()); + if (pwent == NULL) { + LOG(LOG_ERR, ERR_AGENT_RUNTIME_USER); + exitcode = EXIT_FAILURE; + goto BAIL; + } + __pw_name = strdup(pwent->pw_name); + __pw_uid = pwent->pw_uid; /* Read dspam.conf into global config structure (ds_config_t) */