From owner-freebsd-doc@FreeBSD.ORG Thu Mar 29 17:40:13 2012 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E1ED01065692 for ; Thu, 29 Mar 2012 17:40:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A234C8FC27 for ; Thu, 29 Mar 2012 17:40:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q2THeDj5018408 for ; Thu, 29 Mar 2012 17:40:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q2THeDUE018407; Thu, 29 Mar 2012 17:40:13 GMT (envelope-from gnats) Resent-Date: Thu, 29 Mar 2012 17:40:13 GMT Resent-Message-Id: <201203291740.q2THeDUE018407@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Mike Kelly Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 29BCD106564A for ; Thu, 29 Mar 2012 17:36:24 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 140E38FC1D for ; Thu, 29 Mar 2012 17:36:24 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q2THaNhC033614 for ; Thu, 29 Mar 2012 17:36:23 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q2THaN3H033613; Thu, 29 Mar 2012 17:36:23 GMT (envelope-from nobody) Message-Id: <201203291736.q2THaN3H033613@red.freebsd.org> Date: Thu, 29 Mar 2012 17:36:23 GMT From: Mike Kelly To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: docs/166497: crypt(3) man page incorrectly documents modular crypt numbers for SHA256, SHA512 X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 17:40:14 -0000 >Number: 166497 >Category: docs >Synopsis: crypt(3) man page incorrectly documents modular crypt numbers for SHA256, SHA512 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Thu Mar 29 17:40:13 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Mike Kelly >Release: 9.0-RELEASE >Organization: >Environment: FreeBSD nas.home.pioto.org 9.0-RELEASE FreeBSD 9.0-RELEASE #5: Tue Jan 17 00:17:39 EST 2012 root@nas.home.pioto.org:/usr/obj/usr/src/sys/NAS i386 >Description: The man page, as currently written, seems to imply that FreeBSD uses $4$ for SHA-256, and $5$ for SHA-512. The section in question currently renders as: Currently supported algorithms are: 1. MD5 2. Blowfish 3. NT-Hash 4. SHA-256 5. SHA-512 That would be different from what Linux uses, and would be a point of potential confusion. That isn't the case, however; the code confirms that things match up with Linux: lib/libcrypt/crypt-sha256.c:48:static const char sha256_salt_prefix[] = "$5$"; lib/libcrypt/crypt-sha512.c:48:static const char sha512_salt_prefix[] = "$6$"; So, rather than using what seems to be an auto-numbering formatting in the man page, things should be enumerated explicitly. Or, maybe, some placeholder like "RESERVED" or "UNUSED" should be put into the fourth spot in the list. >How-To-Repeat: $ man 3 crypt >Fix: diff --git a/lib/libcrypt/crypt.3 b/lib/libcrypt/crypt.3 index d3f89e2..724d482 100644 --- a/lib/libcrypt/crypt.3 +++ b/lib/libcrypt/crypt.3 @@ -189,6 +189,8 @@ Blowfish .It NT-Hash .It +(Reserved for future use) +.It SHA-256 .It SHA-512 >Release-Note: >Audit-Trail: >Unformatted: