From patchwork Thu Apr 12 19:05:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos O'Donell X-Patchwork-Id: 26699 Received: (qmail 110023 invoked by alias); 12 Apr 2018 19:05:48 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 109922 invoked by uid 89); 12 Apr 2018 19:05:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=DES X-HELO: mail-yw0-f178.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:organization:message-id:date :user-agent:mime-version:content-language; bh=/2oiEWcLLPM1aoWPml8DQzlhrmgilkTJsU7xUyIjcDk=; b=mUkI9d+zuKxU/FPKov29gTbAen22X0NH9KZa7t5gNpxZgP2JQJUHZEmxJSCMFR4Ny9 v/aPPylriKwWT7Xb5WtdRmLE0LpOzABAZ86j5bRj7dAEdZdy+Pmw/PCcJ5xUGdFQiOk1 cwohs3ggL+5L6WOmC6xDWGBOrEM7H5zrtXjtC4A5Xi1/9IBvxOCgOJSc2vB31PnsHqAt 2oeh6z1ZYLpqYaJLZwW9D6MzUU85+DWp4EgclfpnYHHWdOYOEYSOLvPzrzaUGsC6JC24 b5mZGrwvnosVM0eklfcpAkOF/0Nz4vUhcBHgU8XVm8IhuA2fRM8iBObAFbH0mz8s/GAi +eRg== X-Gm-Message-State: ALQs6tD3YXRsQRZcjUx0c8a+VTQqIOwCLXqUnFwvN9YYQ5ORJnIP1lcg RVuzJvf1xjmx6xd/J/0jVZ8UCddtObU= X-Google-Smtp-Source: AIpwx49oanO9+1KYgVMCF5mE7IyczqFGLYPgG2i6BP/q+QJOH5S2qAZTVnXb2nobPzCZsxS9P3NiuA== X-Received: by 10.129.199.9 with SMTP id m9mr1270741ywi.169.1523559943625; Thu, 12 Apr 2018 12:05:43 -0700 (PDT) To: "linux-man@vger.kernel.org" , Michael Kerrisk Cc: Florian Weimer , Zack Weinberg , Rical Jasan , GNU C Library From: Carlos O'Donell Subject: [PATCH 2/2] crypt.3, encrypt.3: Add notes about _XOPEN_CRYPT. Message-ID: <6d9a7e45-5d31-efbd-78ad-2808d492eb21@redhat.com> Date: Thu, 12 Apr 2018 14:05:40 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 The distribution may choose not to support _XOPEN_CRYPT in the case that the distribution has transitioned from glibc crypt to libxcrypt. Signed-off-by: Carlos O'Donell From d099bd9550d28da19dd082d27491f49bd8c721e9 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 12 Apr 2018 13:58:27 -0500 Subject: [PATCH 2/2] crypt.3, encrypt.3: Add notes about _XOPEN_CRYPT. The distribution may choose not to support _XOPEN_CRYPT in the case that the distribution has transitioned from glibc crypt to libxcrypt. Signed-off-by: Carlos O'Donell --- man3/crypt.3 | 22 ++++++++++++++++++++-- man3/encrypt.3 | 19 +++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/man3/crypt.3 b/man3/crypt.3 index 3e6552ad8..58c62d93d 100644 --- a/man3/crypt.3 +++ b/man3/crypt.3 @@ -188,8 +188,26 @@ POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD. .BR crypt_r () is a GNU extension. .SH NOTES -.SS Glibc notes -The glibc2 version of this function supports additional +.SS Availability in glibc +The +.BR crypt (), +.BR encrypt (), +and +.BR setkey () +functions are part of the POSIX.1-2008 XSI Options Group for Encryption +and are optional. If the interfaces are not available then the symbolic +constant +.BR _XOPEN_CRYPT +is either not defined or defined to -1, and can be checked at runtime with +.BR sysconf (). +This may be the case if the downstream distribution has switched from glibc +crypt to libxcrypt. When recompiling applications in such distributions the +user must detect if +.BR _XOPEN_CRPYT +is not available and include crypt.h for the function prototypes; otherwise +libxcrypt is a ABI compatible drop-in replacement. +.SS Features in glibc +The glibc version of this function supports additional encryption algorithms. .PP If diff --git a/man3/encrypt.3 b/man3/encrypt.3 index 3a1cf9598..3df4870c3 100644 --- a/man3/encrypt.3 +++ b/man3/encrypt.3 @@ -147,6 +147,25 @@ and .BR setkey_r () are GNU extensions. .SH NOTES +.SS Availability in glibc +The +.BR crypt (), +.BR encrypt (), +and +.BR setkey () +functions are part of the POSIX.1-2008 XSI Options Group for Encryption +and are optional. If the interfaces are not available then the symbolic +constant +.BR _XOPEN_CRYPT +is either not defined or defined to -1, and can be checked at runtime with +.BR sysconf (). +This may be the case if the downstream distribution has switched from glibc +crypt to libxcrypt. When recompiling applications in such distributions the +user must detect if +.BR _XOPEN_CRPYT +is not available and include crypt.h for the function prototypes; otherwise +libxcrypt is a ABI compatible drop-in replacement. +.SS Features in glibc In glibc 2.2, these functions use the DES algorithm. .SH EXAMPLE .EX -- 2.14.3