diff -rNu dspam-3.9.0-BETA4.ORG/src/agent_shared.c dspam-3.9.0-BETA4/src/agent_shared.c --- dspam-3.9.0-BETA4.ORG/src/agent_shared.c 2009-07-30 07:53:46.000000000 +0900 +++ dspam-3.9.0-BETA4/src/agent_shared.c 2009-09-08 16:00:22.000000000 +0900 @@ -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 -rNu dspam-3.9.0-BETA4.ORG/src/dspamc.c dspam-3.9.0-BETA4/src/dspamc.c --- dspam-3.9.0-BETA4.ORG/src/dspamc.c 2009-07-30 07:53:46.000000000 +0900 +++ dspam-3.9.0-BETA4/src/dspamc.c 2009-09-08 16:00:30.000000000 +0900 @@ -100,6 +100,7 @@ buffer *message = NULL; /* input Message */ int agent_init = 0; /* agent is initialized */ int pwent_cache_init = 0; /* cache for username and uid is initialized */ + struct passwd *pwent; setbuf (stdout, NULL); /* unbuffered output */ #ifdef DEBUG @@ -116,6 +117,17 @@ /* 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; + + /* Cache my username and uid for trusted user security */ + if (!init_pwent_cache()) { LOG(LOG_ERR, ERR_AGENT_RUNTIME_USER); exitcode = EXIT_FAILURE;