From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id E3D1B1F48A for ; Fri, 14 Feb 2020 18:11:48 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:in-reply-to:references :message-id:date:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=EflcVKQnvZVU1EG5 tdgSZlxX9kvQzXIEW6wOtLZ1obNpTqgBbAikKyWf7F1vnXWhAnHMlcr2YuZfGj+y i/rupI7DECaGCiPoDkQIBfxpMbEvs+SXA3/Aei6zuMn08HgRWwl7DD5XmGcgI72U +WDej6w5oNT5l+CmfrOOVA2x6rI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:in-reply-to:references :message-id:date:mime-version:content-type :content-transfer-encoding; s=default; bh=KbS8qgrJjjyyHIYEQ7PYFD V304I=; b=UV7X+LkdyknGtTlNJPRRYgyTtSyonil+NF9Y55p8nIczrjpL35a5sR nIcnsVZkBuTWC9CQe0cReAz1/imKuh32eCMgB3GFCQwrlrY87FDamcSR4rbBjHe9 w5koCvKjfTL78KmBnRZFt9rdF51DAnFieGcQcvK5pVB1uxFM2GJ+I= Received: (qmail 96074 invoked by alias); 14 Feb 2020 18:11:31 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 95885 invoked by uid 89); 14 Feb 2020 18:11:29 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: us-smtp-delivery-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581703886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XFE4Ym/y9xUGZIcOz/5g8UKcixc8rudX/zxXoZtZWY0=; b=dZPwRctBuD6YLbnzy/o4rMhA504bvoI1s+oHJGg+XnZ7ve4P64uQTrPmq+fFOaAaEtdRcs behJi4lD5z1aSCD5BThzI2nP+ezB1i4VVrhTmaHaW7V25WEsYHk22SoGBD2/v/5P+IgTC2 F/F7Ehe0lL8Kj34CwY3gU/7OfnVxAyE= From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH 3/3] Linux: Port fexecve to In-Reply-To: References: X-From-Line: ecf74ed0429118ab5b24b3048491dc2a7e7de0de Mon Sep 17 00:00:00 2001 Message-Id: Date: Fri, 14 Feb 2020 19:11:20 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: quoted-printable --- sysdeps/unix/sysv/linux/fexecve.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/fexecve.c b/sysdeps/unix/sysv/linux/fe= xecve.c index 23c9799f5d..d8cf924faf 100644 --- a/sysdeps/unix/sysv/linux/fexecve.c +++ b/sysdeps/unix/sysv/linux/fexecve.c @@ -25,6 +25,7 @@ #include #include #include +#include =20 =20 /* Execute the file FD refers to, overlaying the running program image. @@ -50,11 +51,10 @@ fexecve (int fd, char *const argv[], char *const envp[]= ) #ifndef __ASSUME_EXECVEAT /* We use the /proc filesystem to get the information. If it is not mounted we fail. */ - char buf[sizeof "/proc/self/fd/" + sizeof (int) * 3]; - __snprintf (buf, sizeof (buf), "/proc/self/fd/%d", fd); + struct fd_to_filename storage; =20 /* We do not need the return value. */ - __execve (buf, argv, envp); + __execve (__fd_to_filename (fd, &storage), argv, envp); =20 int save =3D errno; =20 --=20 2.24.1