From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 24464 invoked from network); 22 Apr 2023 04:50:51 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 22 Apr 2023 04:50:51 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 95a08b8e for ; Fri, 21 Apr 2023 23:50:46 -0500 (EST) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id e76f4a85 for ; Fri, 21 Apr 2023 23:50:45 -0500 (EST) Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-247296def99so2012128a91.1 for ; Fri, 21 Apr 2023 21:50:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682139044; x=1684731044; h=mime-version:message-id:date:subject:to:from:user-agent:from:to:cc :subject:date:message-id:reply-to; bh=u1HBbaxe/S3RFLbmGiqYXnsBIZl6554VZ9Rtx4yr0es=; b=eqjLEUISZnRc49Sr27xuCCttGJ0+Mpu0biBnJv7Fp8ZT82wWJWyErOO6TBmsvsp6ei woZaf7KMl9dwGMIJdObW9tSBKI5LrLGw9AfPchPU4nMMNn9zQDQzf/pA/U2ov0PLkHX6 LVBPNn5KGoHI0qlXeNIYWoTgG7vyQf5HwhVIDg1tqIVHr2B5oaMMg4bIUSu4ilXSo8u/ MwPmeznwaMsRHPC4IC2F8yXwtywnIIDHYhr6Xfte06zOtl5jqdkCrdBqx9v6lCk6Wm2e Z9oSbD8EffHGGIaRC1kkiuCrJnPdnJfiNd4iuvHkIS8gUeS68tY6HsJfqAjXSHJZhYjh OwuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682139044; x=1684731044; h=mime-version:message-id:date:subject:to:from:user-agent :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=u1HBbaxe/S3RFLbmGiqYXnsBIZl6554VZ9Rtx4yr0es=; b=TOw8SQg+fQ2I11fPQp0pA90HecEi+xHfikzIWzf3yJPhCaEs2JCXJh8vj6CutagF+E fla0WiJDhI3NoFiQUK8nqrKaee/YXeDsq16kim2tKGM6aOQSQbKdry3Fd5mGNSX0REkh ZhCOKg6nPSEbAq3hRzDKzy3CZDE7e/agvFus1dC3VqJXpif0+Rtlt8kv0mUcPm6NYbfd cNq7fB0JEHo22tliIfK1Owfsv6Bc+RDR/FbCEeTxQ/wV3dVec3qVUsG33ujS6nYMwzI4 yug8t63irCJEix07Ry8QtUMpdTQH4plurlHJzyosRqD67aSPSCXSbC5v9Z1alhOdoGgh Cf2g== X-Gm-Message-State: AAQBX9c2XZFISiYv+xIQPOtbrCf9z0Kd56fZx+Bpw+ixaZNbVU807wN4 u0OjSpSP/K93NtqLY3kWASDw5Ulxtjs= X-Google-Smtp-Source: AKy350YrxEH9M9EHquZ84tWWlpmCQ9oVZBH9hHx1w86bnlCcIsB2op+zC/woywM+q4lxecRp1gjciA== X-Received: by 2002:a17:90a:7c48:b0:246:92e4:bdbd with SMTP id e8-20020a17090a7c4800b0024692e4bdbdmr7519923pjl.15.1682139043809; Fri, 21 Apr 2023 21:50:43 -0700 (PDT) Received: from localhost ([2405:6e00:294:9b84:3085:642d:94e5:ba0]) by smtp.gmail.com with ESMTPSA id c11-20020a170902724b00b001a527761c31sm3390550pll.79.2023.04.21.21.50.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 21:50:43 -0700 (PDT) User-agent: mu4e 1.8.14; emacs 28.3 From: Alexis To: discuss@mandoc.bsd.lv, groff@gnu.org, man-db-devel@nongnu.org Subject: Behaviour of .so differs between mandoc and groff Date: Sat, 22 Apr 2023 14:21:11 +1000 Message-ID: <87ildo5xlr.fsf@ada> X-Mailinglist: mandoc-discuss Reply-To: discuss@mandoc.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; format=flowed Hi all, On my Gentoo system, awk.1 simply contains an .so request whose argument is the man page for the actual awk implementation in use, i.e. just: .so gawk.1 However, although this works when using man-db, it doesn't when one is using mandoc instead, as on my system. Instead of gawk.1 being sourced, processed and displayed, i get output along the lines of: () () See the file gawk.1. () However, if i change the request in awk.1 to: .so man1/gawk.1 then everything works as expected. The example in the entry for .so in mandoc_roff(7) is what led me to try the preceding, but there's no further indication that the requirement for a leading section directory is consciously different from any other roff implementation, or from groff in particular. A comment in roff_so() in mandoc/roff.c[a] says: /* /* Handle `so'. Be EXTREMELY careful, as we shouldn't be * opening anything that's not in our cwd or anything beneath * it. Thus, explicitly disallow traversing up the file-system * or using absolute paths. */ i couldn't find any discussion about .so in the mandoc TODO list[b]. i've no idea what the 'correct' behaviour 'should' be, from whatever perspective (historical / security / groff-compatibility / etc.), so am cross-posting to what i believe to be the relevant lists. Alexis. [a] https://cvsweb.bsd.lv/mandoc/roff.c?rev=1.395&content-type=text/x-cvsweb-markup [b] https://cvsweb.bsd.lv/mandoc/TODO?rev=1.327&content-type=text/x-cvsweb-markup -- To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv