From patchwork Fri Feb 14 18:10:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1238279 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-109769-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha1 header.s=default header.b=x+ZheDxv; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=CUt+Xp0a; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 48K1f30Gk9zB47J for ; Sat, 15 Feb 2020 05:11:06 +1100 (AEDT) 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:message-id:date:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=LP4 lk1FAM4GYe6puLjz3t4BeEdNo5qD3qHvBA1RmAc61ZdrulF2EEN3b4/coyvowVI0 E8BsaowgPXQ4mOJBuYim2xikhOspuOWJIGen6p9Xy37s6bzb1wqGqD62yL8MziqQ KUk6RpnayIJLcDrD19nAR8l6Dv6TsjRcdchCFPtA= 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:message-id:date:mime-version :content-type:content-transfer-encoding; s=default; bh=JsT/HYWjF g6n69B74mqFHyOeagY=; b=x+ZheDxvdfhAGpxKDkNeSHO2l6J4ibuSF++BTtIEt C67HEwDJcHgtcq8whGXtvEitx7dmusLifu8hexTgC5q/1chaS1zTDWXoepfFcokI BPJ83s24bpp7nZyWO8soW1+Ovj3MhDJZrxMonFHbDs+ivqs8vEgn3JIhkjtr29eo sE= Received: (qmail 94116 invoked by alias); 14 Feb 2020 18:10:59 -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 Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 94108 invoked by uid 89); 14 Feb 2020 18:10:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1159 X-HELO: us-smtp-delivery-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581703855; 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; bh=1YvxajkeXEdtmyesbbIszG7evGKAL53lM0QeE1FNT94=; b=CUt+Xp0aFqfNIJUl5g3ZULadntb1wl8ISZcKpM8dAONOWhnHNmpHNpxA+Q7RxDQXmbCIKs aQhd3m8FKXT1b04nvdR7pzzTLEvvuodzmkjd4uHYuSA27GFI3pEn4Tyjdsh53hRoN+rplW nb3WX5Stlvbe7dOWGVuiYl8IklScQm8= From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH 0/3] improvements X-From-Line: ecf74ed0429118ab5b24b3048491dc2a7e7de0de Mon Sep 17 00:00:00 2001 Message-Id: Date: Fri, 14 Feb 2020 19:10:49 +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 This series ports fd_to_filename to Hurd and adds more type safety (to reduce the risk of buffer overflows). Florian Weimer (3): : Add type safety and port to Hurd Linux: Port ttyname, ttyname_r to Linux: Port fexecve to libio/freopen.c | 4 +- libio/freopen64.c | 4 +- misc/Makefile | 6 +- misc/fd_to_filename.c | 104 +++++++++++++++++ misc/tst-fd_to_filename.c | 106 ++++++++++++++++++ sysdeps/generic/arch-fd_to_filename.h | 19 ++++ sysdeps/generic/fd_to_filename.h | 25 +++-- sysdeps/mach/hurd/arch-fd_to_filename.h | 19 ++++ ...fd_to_filename.h => arch-fd_to_filename.h} | 22 +--- sysdeps/unix/sysv/linux/fexecve.c | 6 +- sysdeps/unix/sysv/linux/ttyname.c | 7 +- sysdeps/unix/sysv/linux/ttyname_r.c | 7 +- 12 files changed, 285 insertions(+), 44 deletions(-) create mode 100644 misc/fd_to_filename.c create mode 100644 misc/tst-fd_to_filename.c create mode 100644 sysdeps/generic/arch-fd_to_filename.h create mode 100644 sysdeps/mach/hurd/arch-fd_to_filename.h rename sysdeps/unix/sysv/linux/{fd_to_filename.h => arch-fd_to_filename.h} (58%)