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-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 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 dcvr.yhbt.net (Postfix) with ESMTPS id C83361F9FD for ; Mon, 15 Mar 2021 22:17:38 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 08C4D3857027; Mon, 15 Mar 2021 22:17:38 +0000 (GMT) Received: from vmicros1.altlinux.org (vmicros1.altlinux.org [194.107.17.57]) by sourceware.org (Postfix) with ESMTP id D07FB3857800 for ; Mon, 15 Mar 2021 22:17:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D07FB3857800 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=altlinux.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ldv@altlinux.org Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id C9AEF72C8B9; Tue, 16 Mar 2021 01:17:34 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id BBE4B7CC8A7; Tue, 16 Mar 2021 01:17:34 +0300 (MSK) Date: Tue, 16 Mar 2021 01:17:34 +0300 From: "Dmitry V. Levin" To: Alexandra =?utf-8?B?SMOhamtvdsOh?= Subject: Re: [PATCH] Linux: Add execveat system call wrapper Message-ID: <20210315221734.GA19335@altlinux.org> References: <20200428122019.26826-1-ahajkova@redhat.com> <20210315214205.2107019-1-ahajkova@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210315214205.2107019-1-ahajkova@redhat.com> 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: , Cc: libc-alpha@sourceware.org, Alexandra =?utf-8?B?SMOhamtvdsOh?= Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" On Mon, Mar 15, 2021 at 10:42:05PM +0100, Alexandra Hájková via Libc-alpha wrote: [...] > +/* Replace the current process, executing PATH relative to DIFRD with > + * arguments ARGV and environment ENVP. > + * ARGV and ENVP are terminated by NULL pointers. */ > +int > +__execveat (int dirfd, const char *path, char *const argv[], char *const envp[], > + int flags) > +{ > + if (difrd < 0 || path == NULL || argv == NULL || envp == NULL) > + { > + __set_errno (EINVAL); > + return -1; > + } > + > + __set_errno (ENOSYS); > + return -1; > +} > +stub_warning (execveat) I'm not sure how picky we are about stubs, but "difrd < 0" looks odd anyway: it rules out AT_FDCWD, and if "path" is absolute, then "dirfd" shall be ignored anyway. I suggest to drop this "difrd < 0" check. -- ldv