From owner-svn-src-head@freebsd.org Wed Jul 15 17:24:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5DB6636B375; Wed, 15 Jul 2020 17:24:42 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6PQK16KHz3VJB; Wed, 15 Jul 2020 17:24:41 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 87D021ACA0; Wed, 15 Jul 2020 17:24:40 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06FHOe4d066335; Wed, 15 Jul 2020 17:24:40 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06FHOebu066332; Wed, 15 Jul 2020 17:24:40 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202007151724.06FHOebu066332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Wed, 15 Jul 2020 17:24:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363230 - head/usr.bin/xinstall X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/usr.bin/xinstall X-SVN-Commit-Revision: 363230 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 17:24:42 -0000 Author: arichardson Date: Wed Jul 15 17:24:39 2020 New Revision: 363230 URL: https://svnweb.freebsd.org/changeset/base/363230 Log: Allow install(1)'s create_tempfile() to work on Linux hosts GLibc expects six 'X' characters in the mkstemp template argument and will return EINVAL otherwise. Reviewed By: emaste, imp, mjg Differential Revision: https://reviews.freebsd.org/D25662 Modified: head/usr.bin/xinstall/install.1 head/usr.bin/xinstall/xinstall.c Modified: head/usr.bin/xinstall/install.1 ============================================================================== --- head/usr.bin/xinstall/install.1 Wed Jul 15 17:24:34 2020 (r363229) +++ head/usr.bin/xinstall/install.1 Wed Jul 15 17:24:39 2020 (r363230) @@ -301,8 +301,8 @@ This is mainly for use in debugging the .Fx Ports Collection. .Sh FILES -.Bl -tag -width "INS@XXXX" -compact -.It Pa INS@XXXX +.Bl -tag -width "INS@XXXXXX" -compact +.It Pa INS@XXXXXX If either .Fl S option is specified, or the @@ -312,9 +312,9 @@ or option is used in conjunction with the .Fl s option, temporary files named -.Pa INS@XXXX , +.Pa INS@XXXXXX , where -.Pa XXXX +.Pa XXXXXX is decided by .Xr mkstemp 3 , are created in the target directory. Modified: head/usr.bin/xinstall/xinstall.c ============================================================================== --- head/usr.bin/xinstall/xinstall.c Wed Jul 15 17:24:34 2020 (r363229) +++ head/usr.bin/xinstall/xinstall.c Wed Jul 15 17:24:39 2020 (r363230) @@ -1161,7 +1161,7 @@ create_tempfile(const char *path, char *temp, size_t t p++; else p = temp; - (void)strncpy(p, "INS@XXXX", &temp[tsize - 1] - p); + (void)strncpy(p, "INS@XXXXXX", &temp[tsize - 1] - p); temp[tsize - 1] = '\0'; return (mkstemp(temp)); }