View | Details | Raw Unified
Collapse All | Expand All

(-) file_not_specified_in_diff (+9 lines)
 Lines 99-104   main (int argc, char *argv[]) Link Here 
  int exitcode = EXIT_SUCCESS;
  int exitcode = EXIT_SUCCESS;
  buffer *message = NULL;       /* input Message */
  buffer *message = NULL;       /* input Message */
  int agent_init = 0;		/* agent is initialized */
  int agent_init = 0;		/* agent is initialized */
  struct passwd *pwent;
  setbuf (stdout, NULL);	/* unbuffered output */
  setbuf (stdout, NULL);	/* unbuffered output */
#ifdef DEBUG
#ifdef DEBUG
 Lines 113-118   main (int argc, char *argv[]) Link Here 
  exit(EXIT_FAILURE);
  exit(EXIT_FAILURE);
#endif
#endif
  /* Cache my username and uid for trusted user security */
  if (!init_pwent_cache()) {
    LOG(LOG_ERR, ERR_AGENT_RUNTIME_USER);
    exitcode = EXIT_FAILURE;
    goto BAIL;
  }
  /* Read dspam.conf into global config structure (ds_config_t) */
  /* Read dspam.conf into global config structure (ds_config_t) */
  agent_config = read_config(NULL);
  agent_config = read_config(NULL);
(-) src/agent_shared.c (+15 lines)
 Lines 913-915   int process_parseto(AGENT_CTX *ATX, cons Link Here 
  return 0;
  return 0;
}
}
int
init_pwent_cache()
{
  struct passwd *pwent;
  pwent = getpwuid(getuid());
  if (pwent == NULL) {
    return 0;
  }
  else {
     __pw_name = strdup(pwent->pw_name);
     __pw_uid  = pwent->pw_uid;
  }
  return 1;
}
(-) src/agent_shared.h (+2 lines)
 Lines 107-112   int initialize_atx (AGENT_CTX *ATX) Link Here 
int process_parseto	(AGENT_CTX *ATX, const char *buf);
int process_parseto	(AGENT_CTX *ATX, const char *buf);
buffer *read_stdin	(AGENT_CTX *ATX);
buffer *read_stdin	(AGENT_CTX *ATX);
int init_pwent_cache();
#ifndef MIN
#ifndef MIN
#   define MAX(a,b)  ((a)>(b)?(a):(b))
#   define MAX(a,b)  ((a)>(b)?(a):(b))
#   define MIN(a,b)  ((a)<(b)?(a):(b))
#   define MIN(a,b)  ((a)<(b)?(a):(b))
(-) src/dspam.c (-5 / +1 lines)
 Lines 108-114   main (int argc, char *argv[]) Link Here 
  int exitcode = EXIT_SUCCESS;
  int exitcode = EXIT_SUCCESS;
  struct nt_node *node_nt;
  struct nt_node *node_nt;
  struct nt_c c_nt;
  struct nt_c c_nt;
  struct passwd *pwent;
  srand ((long) time << (long) getpid ());
  srand ((long) time << (long) getpid ());
  umask (006);                  /* rw-rw---- */
  umask (006);                  /* rw-rw---- */
 Lines 123-136   main (int argc, char *argv[]) Link Here 
  /* Cache my username and uid for trusted user security */
  /* Cache my username and uid for trusted user security */
  pwent = getpwuid(getuid());
  if (!init_pwent_cache()) {
  if (pwent == NULL) {
    LOG(LOG_ERR, ERR_AGENT_RUNTIME_USER);
    LOG(LOG_ERR, ERR_AGENT_RUNTIME_USER);
    exitcode = EXIT_FAILURE;
    exitcode = EXIT_FAILURE;
    goto BAIL;
    goto BAIL;
  }
  }
  __pw_name = strdup(pwent->pw_name);
  __pw_uid  = pwent->pw_uid;
  /* Read dspam.conf into global config structure (ds_config_t) */
  /* Read dspam.conf into global config structure (ds_config_t) */