From patchwork Fri Apr 3 12:02:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: develop--- via Libc-alpha X-Patchwork-Id: 1266010 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=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=sourceware.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=BDbgWg9w; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48tz8b4dN0z9sRN for ; Fri, 3 Apr 2020 23:02:55 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F1F7B385BF92; Fri, 3 Apr 2020 12:02:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F1F7B385BF92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1585915373; bh=9Kzn9jD2/6PfOMOD1GINYCojyX5v+98lIF2omESdUSQ=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=BDbgWg9wP0l40+PpFi3PD+AuUj25t+r8Ej7PU6EgiJ5igyYuHQG5l3K7XQF+Ilhbc 9HAL3xjD8Oc5XADqoKFQcePcWWVSoXf2uPNl/dvkho+gLOwzMLKQaQkGC0+1BOV7Bm cRRhn5ob+qRtodUDSxo4/PP30o7FQtG/O+bATGUk= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by sourceware.org (Postfix) with ESMTP id A91F0385B833 for ; Fri, 3 Apr 2020 12:02:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A91F0385B833 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-122-zrwEiA1MPoKSN9hR2fOX3Q-1; Fri, 03 Apr 2020 08:02:48 -0400 X-MC-Unique: zrwEiA1MPoKSN9hR2fOX3Q-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B78761005509 for ; Fri, 3 Apr 2020 12:02:47 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-113-15.ams2.redhat.com [10.36.113.15]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1EF2D5DDB1 for ; Fri, 3 Apr 2020 12:02:46 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 0/3] Add DT_AUDIT support [BZ #24943] Message-Id: Date: Fri, 03 Apr 2020 14:02:45 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-18.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: develop--- via Libc-alpha Reply-To: Florian Weimer Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" xgetline has been committed separately with slightly different behavior. I think the zero-on-EOF behavior is preferable, so I'm switching the implementation to that. It turns out that it is possible to simplify the audit string list processing, so the second commit does that. Tested on x86_64-linux-gnu and i686-linux-gnu. Thanks, Florian Florian Weimer (3): support: Change xgetline to return 0 on EOF elf: Simplify handling of lists of audit strings elf: Implement DT_AUDIT, DT_DEPAUDIT support [BZ #24943] NEWS | 3 + elf/Makefile | 22 ++- elf/rtld.c | 247 +++++++++++++++++--------------- elf/tst-audit14.c | 46 ++++++ elf/tst-audit15.c | 50 +++++++ elf/tst-audit16.c | 54 +++++++ elf/tst-auditlogmod-1.c | 27 ++++ elf/tst-auditlogmod-2.c | 27 ++++ elf/tst-auditlogmod-3.c | 27 ++++ support/support_process_state.c | 2 +- support/xgetline.c | 22 +-- support/xstdio.h | 5 +- 12 files changed, 405 insertions(+), 127 deletions(-) create mode 100644 elf/tst-audit14.c create mode 100644 elf/tst-audit15.c create mode 100644 elf/tst-audit16.c create mode 100644 elf/tst-auditlogmod-1.c create mode 100644 elf/tst-auditlogmod-2.c create mode 100644 elf/tst-auditlogmod-3.c