~ubuntu-branches/ubuntu/oneiric/exim4/oneiric

« back to all changes in this revision

Viewing changes to src/transports/pipe.c

  • Committer: Bazaar Package Importer
  • Author(s): Artur Rona
  • Date: 2010-12-28 22:20:17 UTC
  • mfrom: (2.3.4 experimental)
  • Revision ID: james.westby@ubuntu.com-20101228222017-r6vg4eqlqy2fk4ul
Tags: 4.73~rc1-1ubuntu1
* Merge from debian unstable.  Remaining changes: (LP: #697934)
  - debian/patches/71_exiq_grep_error_on_messages_without_size.patch:
    + Improve handling of broken messages when "exim4 -bp" (mailq)
      reports lines without size info.
  - debian/control: Don't declare a Provides: default-mta; in Ubuntu,
    we want postfix to be the default.
  - debian/{control,rules}: Add and enable hardened build for PIE.
    (Closes: #542726)
* Drop B-D on libmysqlclient15-dev, resolved in Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Cambridge: exim/exim-src/src/transports/pipe.c,v 1.14 2009/11/16 19:50:39 nm4 Exp $ */
 
1
/* $Cambridge: exim/src/src/transports/pipe.c,v 1.15 2010/06/05 10:04:44 pdp Exp $ */
2
2
 
3
3
/*************************************************
4
4
*     Exim - an Internet mail transport agent    *
57
57
      (void *)offsetof(pipe_transport_options_block, message_suffix) },
58
58
  { "path",              opt_stringptr,
59
59
      (void *)offsetof(pipe_transport_options_block, path) },
 
60
  { "permit_coredump",   opt_bool,
 
61
      (void *)offsetof(pipe_transport_options_block, permit_coredump) },
60
62
  { "pipe_as_creator",   opt_bool | opt_public,
61
63
      (void *)offsetof(transport_instance, deliver_as_creator) },
62
64
  { "restrict_to_path",  opt_bool,
110
112
  0,              /* options */
111
113
  FALSE,          /* freeze_exec_fail */
112
114
  FALSE,          /* ignore_status */
 
115
  FALSE,          /* permit_coredump */
113
116
  FALSE,          /* restrict_to_path */
114
117
  FALSE,          /* timeout_defer */
115
118
  FALSE,          /* use_shell */
127
130
/* Called for each delivery in the privileged state, just before the uid/gid
128
131
are changed and the main entry point is called. In a system that supports the
129
132
login_cap facilities, this function is used to set the class resource limits
130
 
for the user.
 
133
for the user.  It may also re-enable coredumps.
131
134
 
132
135
Arguments:
133
136
  tblock     points to the transport instance
170
173
  }
171
174
#endif
172
175
 
 
176
#ifdef RLIMIT_CORE
 
177
if (ob->permit_coredump)
 
178
  {
 
179
  struct rlimit rl;
 
180
  rl.rlim_cur = RLIM_INFINITY;
 
181
  rl.rlim_max = RLIM_INFINITY;
 
182
  if (setrlimit(RLIMIT_CORE, &rl) < 0)
 
183
    {
 
184
#ifdef SETRLIMIT_NOT_SUPPORTED
 
185
    if (errno != ENOSYS && errno != ENOTSUP)
 
186
#endif
 
187
      log_write(0, LOG_MAIN,
 
188
          "delivery setrlimit(RLIMIT_CORE, RLIMI_INFINITY) failed: %s",
 
189
          strerror(errno));
 
190
    }
 
191
  }
 
192
#endif
 
193
 
173
194
return OK;
174
195
}
175
196