From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.bugs Subject: bug#29001: --disable-tmpnam Date: Sat, 21 Mar 2020 13:22:07 -0700 Message-ID: References: <01E234A3-581D-487B-B928-EEBF26A3DC43@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="109996"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 To: 29001@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sat Mar 21 21:23:10 2020 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jFkeC-000SQ8-IR for guile-bugs@m.gmane-mx.org; Sat, 21 Mar 2020 21:23:08 +0100 Original-Received: from localhost ([::1]:40552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFkeB-0003Xf-Ky for guile-bugs@m.gmane-mx.org; Sat, 21 Mar 2020 16:23:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47710) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFke7-0003X3-7I for bug-guile@gnu.org; Sat, 21 Mar 2020 16:23:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFke6-00031f-5a for bug-guile@gnu.org; Sat, 21 Mar 2020 16:23:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42231) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jFke6-00031a-27 for bug-guile@gnu.org; Sat, 21 Mar 2020 16:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jFke5-0002yY-V9 for bug-guile@gnu.org; Sat, 21 Mar 2020 16:23:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <01E234A3-581D-487B-B928-EEBF26A3DC43@gmail.com> Resent-From: Matt Wette Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 21 Mar 2020 20:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29001 X-GNU-PR-Package: guile Original-Received: via spool by 29001-submit@debbugs.gnu.org id=B29001.158482214111358 (code B ref 29001); Sat, 21 Mar 2020 20:23:01 +0000 Original-Received: (at 29001) by debbugs.gnu.org; 21 Mar 2020 20:22:21 +0000 Original-Received: from localhost ([127.0.0.1]:48204 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFkdR-0002x8-8V for submit@debbugs.gnu.org; Sat, 21 Mar 2020 16:22:21 -0400 Original-Received: from mail-pg1-f176.google.com ([209.85.215.176]:41241) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFkdL-0002wf-Hx for 29001@debbugs.gnu.org; Sat, 21 Mar 2020 16:22:20 -0400 Original-Received: by mail-pg1-f176.google.com with SMTP id b1so4933543pgm.8 for <29001@debbugs.gnu.org>; Sat, 21 Mar 2020 13:22:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=JY7DtZoTi5HAUc7K0xLa+EcWtxqwD3ntP1xxOFRWSjg=; b=T5fQRAkm74dtSH3R+/9A1JnGgU7Mwac9SxnFYIm26y5cOZYE1DYH8CxBUYGtAxjwro NO8KSGmsUVvuf1446cLd1z+oz75Sk14jbVczxl+o/WrNrsf0u3skgVJSQZY+tTaXGLk3 mSowkfofQx4u87we51eBpMbM8tRRQ52D0fhm7V9TG4VTtqhUIUclde0bh0rh8rXpilMJ 3MRZ0PWY+lMFm/m1P/B7GQ24fSZNns1LUSEUxtVwtrjCz0o/xqietVueyPQa1hdUy/u4 iP1mPtaFGFDFFx0YHViCRkkJTdRhUTEKK1JSHkZdlsvIkl/WXa3vKDExJm+CcJAEd8s9 WVzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=JY7DtZoTi5HAUc7K0xLa+EcWtxqwD3ntP1xxOFRWSjg=; b=Mj2jIWdlxOZFv2SQ3zIHlpWh1aACZvxd7+BP/ZX5bKu/Om613hsRo25HvKnpKPIvXk /BSXFcw9PgcqSQSVH+L9/4AglkVgv0/lqer1TjgLSVl5D0O7nsbpuAg0uKk0gmVB+g00 1EfmoHPkIY84972QBpG/hPIvri6OVdWRB04hthMTVqmN0LeK1k959nH4EdHYas8MXbly gpDK8ajEh7pMnxnsGcvoU4KYD8kY+wjdkN7cWPlvtMSA7UT2tr5xKJCtaR0RwWUEEMBm h3DqI5qawlnp82Ty8R48QGlubvJE5AK3pdnWFR6HxV0PVldu+ROyIe7MOCfkuq/bcOXd ZH4Q== X-Gm-Message-State: ANhLgQ1LxBdDykj55dYtV7tYR05XYoRIYBouQoHUPLhFzTT328nJmruV ilshfzUZNUd+QGkC+p8/dIYIi9eM X-Google-Smtp-Source: ADFU+vvo7fo4F8t0IgTMGtJRFB1+s0L2jevOukRuWyhjmFisro+Ws0L5BauJf8xLWID1tjSCLliMtw== X-Received: by 2002:a63:381d:: with SMTP id f29mr8524096pga.49.1584822129034; Sat, 21 Mar 2020 13:22:09 -0700 (PDT) Original-Received: from [192.168.2.183] (64-52-176-132.championbroadband.com. [64.52.176.132]) by smtp.gmail.com with ESMTPSA id b9sm8224966pgi.75.2020.03.21.13.22.08 for <29001@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 21 Mar 2020 13:22:08 -0700 (PDT) Content-Language: en-US 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: 209.51.188.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-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9670 Archived-At: "make" and "make check" succeeds on 3.0.1 / Ubuntu 18.04 / x86_64 with 1) --disable-tmpnam 2) --enable-tmpnam 3) neither This updates libguile/posix.c and configure.ac to allow extra configuration option --disable-tmpnam.   This is made available for installations that don't want to allow the insecure tmpnam function.  (Use mkstemp! instead.) --- libguile/posix.c-orig    2020-03-18 16:55:09.349588085 -0700 +++ libguile/posix.c    2020-03-18 17:07:20.860142083 -0700 @@ -65,6 +65,7 @@  #include "async.h"  #include "bitvectors.h" +#include "deprecation.h"  #include "dynwind.h"  #include "extensions.h"  #include "feature.h" @@ -1588,6 +1589,7 @@  }  #undef FUNC_NAME +#ifdef ENABLE_TMPNAM  #ifdef L_tmpnam  SCM_DEFINE (scm_tmpnam, "tmpnam", 0, 0, 0, @@ -1602,6 +1604,9 @@    char name[L_tmpnam];    char *rv; +  scm_c_issue_deprecation_warning +      ("Use of tmpnam is deprecated.  Use mkstemp! instead."); +    SCM_SYSCALL (rv = tmpnam (name));    if (rv == NULL)      /* not SCM_SYSERROR since errno probably not set.  */ @@ -1611,6 +1616,7 @@  #undef FUNC_NAME  #endif +#endif  SCM_DEFINE (scm_tmpfile, "tmpfile", 0, 0, 0,              (void), --- configure.ac-orig    2020-03-18 17:11:17.977427035 -0700 +++ configure.ac    2020-03-18 17:09:57.850334685 -0700 @@ -166,6 +166,10 @@    [  --disable-regex         omit regular expression interfaces],,    enable_regex=yes) +AC_ARG_ENABLE(tmpnam, +  [  --disable-tmpnam        omit POSIX tmpnam],, +  enable_tmpnam=yes) +  AC_ARG_ENABLE([deprecated],    AS_HELP_STRING([--disable-deprecated],[omit deprecated features])) @@ -909,6 +913,10 @@     AC_DEFINE([ENABLE_REGEX], 1, [Define when regex support is enabled.])  fi +if test "$enable_tmpnam" = yes; then +   AC_DEFINE([ENABLE_TMPNAM], 1, [Define when tmpnam support is enabled.]) +fi +  AC_REPLACE_FUNCS([strerror memmove])  # Reasons for testing: