All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] crypt.3, encrypt.3: Add notes about _XOPEN_CRYPT.
@ 2018-04-12 19:05 Carlos O'Donell
  2018-04-13  9:34 ` Michael Kerrisk (man-pages)
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Carlos O'Donell @ 2018-04-12 19:05 UTC (permalink / raw)
  To: linux-man, Michael Kerrisk
  Cc: Florian Weimer, Zack Weinberg, Rical Jasan, GNU C Library

[-- Attachment #1: Type: text/plain, Size: 210 bytes --]

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 <carlos@redhat.com>
-- 
Cheers,
Carlos.

[-- Attachment #2: 0002-crypt.3-encrypt.3-Add-notes-about-_XOPEN_CRYPT.patch --]
[-- Type: text/x-patch, Size: 2621 bytes --]

>From d099bd9550d28da19dd082d27491f49bd8c721e9 Mon Sep 17 00:00:00 2001
From: Carlos O'Donell <carlos@systemhalted.org>
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 <carlos@redhat.com>
---
 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


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-04-17 13:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-12 19:05 [PATCH 2/2] crypt.3, encrypt.3: Add notes about _XOPEN_CRYPT Carlos O'Donell
2018-04-13  9:34 ` Michael Kerrisk (man-pages)
2018-04-13 13:22   ` Carlos O'Donell
2018-04-13 15:10 ` Carlos O'Donell
2018-04-13 19:24   ` Michael Kerrisk (man-pages)
2018-04-14 19:11     ` Nikos Mavrogiannopoulos
2018-04-14 19:56       ` Florian Weimer
2018-04-16  1:35         ` Zack Weinberg
2018-04-17 13:25         ` Nikos Mavrogiannopoulos
2018-04-17 13:31           ` Florian Weimer
2018-04-14  4:43 ` Rical Jasan
2018-04-14  5:39   ` Michael Kerrisk (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.