From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 131CDC433B4 for ; Sun, 9 May 2021 17:20:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D68DE613BB for ; Sun, 9 May 2021 17:20:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229666AbhEIRVr (ORCPT ); Sun, 9 May 2021 13:21:47 -0400 Received: from mail.ispras.ru ([83.149.199.84]:53668 "EHLO mail.ispras.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229662AbhEIRVr (ORCPT ); Sun, 9 May 2021 13:21:47 -0400 Received: from monopod.intra.ispras.ru (unknown [10.10.3.121]) by mail.ispras.ru (Postfix) with ESMTPS id 558F340D3BFF; Sun, 9 May 2021 17:20:40 +0000 (UTC) Date: Sun, 9 May 2021 20:20:40 +0300 (MSK) From: Alexander Monakov To: mtk.manpages@gmail.com cc: Dave Chupreev , "Alejandro Colomar (man-pages)" , linux-man , GNU C Library , Roland McGrath Subject: Re: Bug reporting In-Reply-To: Message-ID: References: <1621111620246345@mail.yandex.ru> <9068beb3-70a7-ad96-e260-f53a886d622c@gmail.com> <1492841620310804@mail.yandex.ru> User-Agent: Alpine 2.20.13 (LNX 116 2015-12-14) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-man@vger.kernel.org On Mon, 10 May 2021, Michael Kerrisk (man-pages) via Libc-alpha wrote: > Hello, > > On Fri, 7 May 2021 at 02:21, Dave Chupreev wrote: > > > > Well I see, I've tried on Linux and yea I didn't find any option to insert multiple definitions. > > I think the only way to insert multiple definitions is by direct > manipulation of 'extern char **environ'. You can cause a program to start with multiple definitions, because it is possible to pass arbitrarily funny stuff as 'envp' argument to execve, such as: - duplicated entries - entries without a '=' - entries starting with '=' - empty strings - "2 x 2 = 4" All of that will be present in the exec'd program's environment array. Alexander