Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 96426 invoked from network); 19 Sep 2005 04:14:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Sep 2005 04:14:10 -0000 Received: (qmail 10803 invoked by uid 500); 19 Sep 2005 04:14:07 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 10539 invoked by uid 500); 19 Sep 2005 04:14:05 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 10526 invoked by uid 99); 19 Sep 2005 04:14:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Sep 2005 21:14:05 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of rooneg@gmail.com designates 64.233.162.193 as permitted sender) Received: from [64.233.162.193] (HELO zproxy.gmail.com) (64.233.162.193) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Sep 2005 21:14:15 -0700 Received: by zproxy.gmail.com with SMTP id j2so313881nzf for ; Sun, 18 Sep 2005 21:14:03 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:sender:to:subject:mime-version:content-type; b=WqTkMGQOlEy3MK4u51C2sCEAOVvZLjtJpMillDsD3MvVFrS5HbwwNg0VJc+WWRkP8ft1urkt2d7coVC+kW0W7HPKGZRbHu2aNHhYTxPT9BwCtslhgdKfyoQlUgPOGYI5pnRSZWMYAzz1Ld7HEznMcd+2RtP5fsl3ctOMu1d1/bs= Received: by 10.54.10.67 with SMTP id 67mr828566wrj; Sun, 18 Sep 2005 21:14:03 -0700 (PDT) Received: by 10.54.117.1 with HTTP; Sun, 18 Sep 2005 21:14:03 -0700 (PDT) Message-ID: <7edfeeef050918211441ca1e2d@mail.gmail.com> Date: Sun, 18 Sep 2005 21:14:03 -0700 From: Garrett Rooney Reply-To: Garrett Rooney Sender: rooneg@gmail.com To: dev@httpd.apache.org Subject: [PATCH] mod_smtpd nonportable temp dir Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_19035_21950746.1127103243245" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_19035_21950746.1127103243245 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I noticed that mod_smtpd is hardcoding /tmp as the location to write temporary files that hold message contents while they're being processed. It seems like this directory should be configurable, but even if we want to make it use the system's temp dir, hardcoding /tmp is not portable. Attached is a patch to make it use apr_temp_dir_get instead. -garrett ------=_Part_19035_21950746.1127103243245 Content-Type: text/x-patch; name="use_temp_dir_get.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="use_temp_dir_get.diff" SW5kZXg6IHNtdHBfcHJvdG9jb2wuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBzbXRwX3Byb3RvY29sLmMJKHJl dmlzaW9uIDI5MDA1OSkKKysrIHNtdHBfcHJvdG9jb2wuYwkod29ya2luZyBjb3B5KQpAQCAtNTAw LDcgKzUwMCw3IEBACiAgICAgaW50IHJ2LCByZXR2YWwgPSAwLCBzYXdfZW9zID0gMDsKICAgICBj aGFyICp0ZW1wZmlsZTsKICAgICBjaGFyIG91cl9idWZmZXJbQlVGRkVSX1NUUl9MRU5dOwotICAg IGNvbnN0IGNoYXIgKnN0cmluZzsKKyAgICBjb25zdCBjaGFyICpzdHJpbmcsICp0ZW1wZGlyOwog ICAgIGFwcl9maWxlX3QgKnRmcDsKICAgICBhcHJfc2l6ZV90IGxlbiwgdG90YWxfZGF0YSA9IDA7 CiAgICAgYXByX2J1Y2tldF9icmlnYWRlICpiYjsKQEAgLTU1NSw4ICs1NTUsMTQgQEAKICAgICAg ICAgc210cGRfcmVzcG9uZF9vbmVsaW5lKHNjciwgNTAzLCAiRXJyb3I6IG5lZWQgUkNQVCBjb21t YW5kIik7CiAgICAgICAgIHJldHVybiA1MDM7CiAgICAgfQotICAgIAotICAgIHRlbXBmaWxlID0g YXByX3BzdHJkdXAoc3RyLT5wLCAiL3RtcC90bXAuWFhYWFhYIik7CisKKyAgICBydiA9IGFwcl90 ZW1wX2Rpcl9nZXQoJnRlbXBkaXIsIHN0ci0+cCk7CisgICAgaWYgKHJ2KSB7CisgICAgICAgIHNt dHBkX3Jlc3BvbmRfb25lbGluZShzY3IsIDQyMSwgIkVycm9yOiBJbnRlcm5hbCIpOworICAgICAg ICByZXR1cm4gMDsKKyAgICB9CisKKyAgICB0ZW1wZmlsZSA9IGFwcl9wc3ByaW50ZihzdHItPnAs ICIlcy90bXAuWFhYWFhYIiwgdGVtcGRpcik7CiAgICAgcnYgPSBhcHJfZmlsZV9ta3RlbXAoJnRm cCwgdGVtcGZpbGUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgQVBSX0NSRUFURSB8IEFQUl9X UklURSB8IEFQUl9SRUFEIHwKICAgICAgICAgICAgICAgICAgICAgICAgICBBUFJfREVMT05DTE9T RSwgc2NyLT5wKTsK ------=_Part_19035_21950746.1127103243245--