From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id D51173858C39 for ; Fri, 29 Oct 2021 11:15:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D51173858C39 Received: by mail-wr1-x429.google.com with SMTP id d5so361763wrc.1 for ; Fri, 29 Oct 2021 04:15:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:from:subject:content-transfer-encoding; bh=GY/bpKU7TmlU09UnTy7kCbf5RrIbq8Ce58ehNrFtKkc=; b=TN2x1Nk72SK1ZlETVxMwSdlKe9fqnahL0paItIWXQGf7UKqw7Q+iWXL49lW5iqLu5F /ns8lAV5EAwbpYVbcoX5GTF33GgABHRHkO8zxn9vGdZG7tIn7GFCnSbXxptHiq76/6p8 ZvrseS8oK3x/V1VB/1dI8Yhy2Tz6+ydm7OzCo0U6OYSeqAw3IrzDYaTAmncB1ykldi8i 7sX7XLw1iAF9WujGKDe23ZuEwhnhGWTtCmw9aPgOqE0hBBlEYr7TCPCUHVvZtgs+GhDA 9n5i/MCIhql0WL/vYn+8XQa4/55wl7MI/j44AEKViwl18BVtgcMeabvhbwM/waShbFz4 MfJg== X-Gm-Message-State: AOAM533g+vS58jd1bTu50WQnWDRjI2bdTOhZ2NyR/lA4aKl1VZrn7vW9 /lCH9o5aqGECMwCRWSQLqyhctP4owV4= X-Google-Smtp-Source: ABdhPJx1mfo4EPh9bqP8VnhmP6aEzKUK/l2bEX1SdVtzWTnI4i+jH3R/6/982RW6m5Fk4NLYJMsFeQ== X-Received: by 2002:a05:6000:15c6:: with SMTP id y6mr13715483wry.210.1635506132906; Fri, 29 Oct 2021 04:15:32 -0700 (PDT) Received: from [10.168.10.11] ([170.253.36.171]) by smtp.gmail.com with ESMTPSA id d8sm5623172wrv.80.2021.10.29.04.15.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 Oct 2021 04:15:32 -0700 (PDT) Message-ID: Date: Fri, 29 Oct 2021 13:15:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Content-Language: en-US To: Libc-alpha , linux-man From: Alejandro Colomar Subject: Is getpass(3) really obsolete? Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Fri, 29 Oct 2021 11:15:35 -0000 Hi, As the manual pages says, SUSv2 marked it as LEGACY, and POSIX doesn't have it at all. The manual page goes further and says "This function is obsolete. Do not use it." in its first lines. But, glibc doesn't seem to have deprecated this function at all. And it seems to be the most portable way to get a password, even if it's not in POSIX. BSDs have readpassphrase(3), but glibc doesn't, so unless you recommend using readpassphrase(3) from libbsd, or plan to add it to glibc, I think getpass(3) should be the recommended function in Linux, and therefore we should remove the hard words against it. As a real example, git(1) uses getpass(3). What are your thoughts? Thanks, Alex -- Alejandro Colomar Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ http://www.alejandro-colomar.es/