From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.bugs Subject: bug#29001: [wishlist] configure option to disable tmpnam Date: Wed, 25 Oct 2017 17:26:37 -0700 Message-ID: <01E234A3-581D-487B-B928-EEBF26A3DC43@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_044EAE10-E63C-4231-A726-19DA0D3914FB" X-Trace: blaine.gmane.org 1508977640 23687 195.159.176.226 (26 Oct 2017 00:27:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 26 Oct 2017 00:27:20 +0000 (UTC) To: 29001@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Oct 26 02:27:13 2017 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7W0q-0004WV-Py for guile-bugs@m.gmane.org; Thu, 26 Oct 2017 02:27:09 +0200 Original-Received: from localhost ([::1]:50419 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7W0t-00032t-1k for guile-bugs@m.gmane.org; Wed, 25 Oct 2017 20:27:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7W0n-00031Y-Lo for bug-guile@gnu.org; Wed, 25 Oct 2017 20:27:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7W0k-0000dL-Hu for bug-guile@gnu.org; Wed, 25 Oct 2017 20:27:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53298) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e7W0k-0000d2-Df for bug-guile@gnu.org; Wed, 25 Oct 2017 20:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e7W0k-0001Ou-44 for bug-guile@gnu.org; Wed, 25 Oct 2017 20:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Matt Wette Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 26 Oct 2017 00:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 29001 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15089776155368 (code B ref -1); Thu, 26 Oct 2017 00:27:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Oct 2017 00:26:55 +0000 Original-Received: from localhost ([127.0.0.1]:33746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7W0c-0001OW-Mw for submit@debbugs.gnu.org; Wed, 25 Oct 2017 20:26:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7W0a-0001OE-JI for submit@debbugs.gnu.org; Wed, 25 Oct 2017 20:26:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7W0U-0000Uf-5d for submit@debbugs.gnu.org; Wed, 25 Oct 2017 20:26:47 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:58830) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e7W0U-0000UO-1j for submit@debbugs.gnu.org; Wed, 25 Oct 2017 20:26:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7W0S-00031D-SM for bug-guile@gnu.org; Wed, 25 Oct 2017 20:26:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7W0P-0000Rb-NK for bug-guile@gnu.org; Wed, 25 Oct 2017 20:26:44 -0400 Original-Received: from mail-pg0-x22a.google.com ([2607:f8b0:400e:c05::22a]:53815) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e7W0P-0000R7-DT for bug-guile@gnu.org; Wed, 25 Oct 2017 20:26:41 -0400 Original-Received: by mail-pg0-x22a.google.com with SMTP id s2so1277162pge.10 for ; Wed, 25 Oct 2017 17:26:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:message-id:date:to; bh=OX6+1ieuY3ThmcYPsRvgDzGW6ziJr9QNaH28DLCEMQk=; b=BuV2QNNrqABZNvIzilR5Wc/cjcHHsYJqpLxLcqBeS59Vy3Tn6AtIaFBnVNmO0cS2Mq 7ziyJK5GTDeb2H0Kww84eN69p8jrpsGZq7ncDT/hNyj1RvEikWg8ml+E5yLL43OShfoY a0EuYnUiLoCBtMLLWPce4QctaeXqb18heIrTmBwcP1IpPuh0ZJr2TyBBe5QEpnc512zd E7HWHpWzpGJd0IAfhQZupWGCnreGsm804vCIBw9H80xwgSGDEBw9PwO3d8Efp6kJxgUt TskRXfHtGFGjEzF7A+qbVshgDljFJynhjnvdXyagc6KPArvA0HXN0IQkQGN/y0S6bRN4 NTPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:message-id:date:to; bh=OX6+1ieuY3ThmcYPsRvgDzGW6ziJr9QNaH28DLCEMQk=; b=dQP44dtNalj7y2vnQXk7nRUlm3PE3wg7PlsvL7sfsdWNvR0FtlN5BSUSBmW4PTixxV j/JdgHNYqeGKCiRBIWbYXk0ce4KukSDPM69DG0EZGhCmS9LNd6xUfsti56MIGQHETgya JFOymji8k7C9J/fqkrSfPCiVEPai89bWnzaVhIorsTaLN8aWpD3EitAAszees7Tw2vxW CVzMzZN9eFp2+ba/PxfdojK/x2fBfhe1x2hRob3pwsQVjl91jJGKckbriEu1cLKEGIKf LwZALnc128K+GzZH5n/QbIhWfFxrSPpmNgKLUQQDvp5TAHrLKqxrya09mC3APRzXNRsB O/lA== X-Gm-Message-State: AMCzsaXuT+VI83zExF417Qb6vwk4B5fthuLZNVrNMHgnxUcW58Y4aGK2 L1VW1iY6gDIHybdtEhldm70JMIvv X-Google-Smtp-Source: ABhQp+TIFjnZKKkg9Qfd56KrM7Y1M3NTx16NZVudfXnjjF9EMA9FOFnGbSh3LI/YVMhDY4xhfXtdUA== X-Received: by 10.98.37.68 with SMTP id l65mr3674288pfl.253.1508977599553; Wed, 25 Oct 2017 17:26:39 -0700 (PDT) Original-Received: from nautilus.championbroadband.com (216-165-229-229.championbroadband.com. [216.165.229.229]) by smtp.gmail.com with ESMTPSA id q13sm471683pgt.73.2017.10.25.17.26.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Oct 2017 17:26:39 -0700 (PDT) X-Mailer: Apple Mail (2.3273) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8860 Archived-At: --Apple-Mail=_044EAE10-E63C-4231-A726-19DA0D3914FB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii It would be nice to have a configure option to disable/enable including = the POSIX function tmpnam. It may give Guile a more "code secure" option to have the default be = disabled. I tried to generate a patch, but I could not get it to work both ways = (disable and enable). My autoconf knowledge and skills are lacking.=20 Here is what I tried (THIS DOES NOT WORK) --- libguile/posix.c-orig 2017-10-24 05:28:30.000000000 -0700 +++ libguile/posix.c 2017-10-24 05:28:51.000000000 -0700 @@ -1557,6 +1557,7 @@ } #undef FUNC_NAME =20 +#ifdef ENABLE_TMPNAM #ifdef L_tmpnam =20 SCM_DEFINE (scm_tmpnam, "tmpnam", 0, 0, 0, @@ -1580,6 +1581,7 @@ #undef FUNC_NAME =20 #endif +#endif =20 SCM_DEFINE (scm_tmpfile, "tmpfile", 0, 0, 0, (void), --- configure.ac-orig 2017-10-24 05:21:56.000000000 -0700 +++ configure.ac 2017-10-25 16:07:34.000000000 -0700 @@ -164,6 +164,10 @@ [ --disable-regex omit regular expression interfaces],, enable_regex=3Dyes) =20 +AC_ARG_ENABLE(tmpnam, + [ --enable-tmpnam enable POSIX tmpnam], + enable_tmpnam=3Dyes, enable_tmpnam=3Dno) + AC_ARG_ENABLE([deprecated], AS_HELP_STRING([--disable-deprecated],[omit deprecated features])) ^--- DOES NOT WORK =20 --Apple-Mail=_044EAE10-E63C-4231-A726-19DA0D3914FB Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii It would be nice to have a configure option to disable/enable = including the POSIX function tmpnam.
It may give Guile a = more "code secure" option to have the default be disabled.

I tried to generate a = patch, but I could not get it to work both ways (disable and enable). =  My autoconf
knowledge and skills are = lacking. 

Here is what I tried (THIS DOES NOT WORK)

--- = libguile/posix.c-orig       2017-10-24 05:28:30.000000000 = -0700
+++ libguile/posix.c    = 2017-10-24 05:28:51.000000000 -0700
@@ = -1557,6 +1557,7 @@
 }
 #undef FUNC_NAME

 

+#ifdef = ENABLE_TMPNAM
 #ifdef L_tmpnam

 

 SCM_DEFINE (scm_tmpnam, "tmpnam", 0, 0, = 0,
@@ -1580,6 +1581,7 @@
 #undef FUNC_NAME

 

 #endif
+#endif

 

 SCM_DEFINE (scm_tmpfile, "tmpfile", 0, 0, = 0,
             = (void),

--- configure.ac-orig   2017-10-24 05:21:56.000000000 = -0700
+++ configure.ac      =   2017-10-25 16:07:34.000000000 -0700
@@ = -164,6 +164,10 @@
   [  --disable-regex =         omit regular expression = interfaces],,
   = enable_regex=3Dyes)

 

+AC_ARG_ENABLE(tmpnam,
+  = [  --enable-tmpnam         enable POSIX = tmpnam],
+  enable_tmpnam=3Dyes, = enable_tmpnam=3Dno)
+
 AC_ARG_ENABLE([deprecated],
   AS_HELP_STRING([--disable-deprecated],[omit = deprecated features]))

^--- = DOES NOT WORK

 


= --Apple-Mail=_044EAE10-E63C-4231-A726-19DA0D3914FB--