diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-10-02 09:11:49 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-10-30 13:03:59 -0300 |
commit | e6e3c666880847ad908692087ca6d5015895dffa (patch) | |
tree | d8a728bc0a180334644cb62ce3f83905d5ce4c11 /sysdeps/unix | |
parent | bb2ff12abd1ee7945957c6fb6f4c9ee091e446ce (diff) | |
download | glibc-e6e3c666880847ad908692087ca6d5015895dffa.tar glibc-e6e3c666880847ad908692087ca6d5015895dffa.tar.gz glibc-e6e3c666880847ad908692087ca6d5015895dffa.tar.bz2 glibc-e6e3c666880847ad908692087ca6d5015895dffa.zip |
crypt: Remove libcrypt support
All the crypt related functions, cryptographic algorithms, and
make requirements are removed, with only the exception of md5
implementation which is moved to locale folder since it is
required by localedef for integrity protection (libc's
locale-reading code does not check these, but localedef does
generate them).
Besides thec code itself, both internal documentation and the
manual is also adjusted. This allows to remove both --enable-crypt
and --enable-nss-crypt configure options.
Checked with a build for all affected ABIs.
Co-authored-by: Zack Weinberg <zack@owlfolio.org>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/unix')
34 files changed, 0 insertions, 271 deletions
diff --git a/sysdeps/unix/sysv/linux/aarch64/libcrypt.abilist b/sysdeps/unix/sysv/linux/aarch64/libcrypt.abilist deleted file mode 100644 index 4082747aa3..0000000000 --- a/sysdeps/unix/sysv/linux/aarch64/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.17 crypt F -GLIBC_2.17 crypt_r F -GLIBC_2.17 encrypt F -GLIBC_2.17 encrypt_r F -GLIBC_2.17 fcrypt F -GLIBC_2.17 setkey F -GLIBC_2.17 setkey_r F diff --git a/sysdeps/unix/sysv/linux/alpha/libcrypt.abilist b/sysdeps/unix/sysv/linux/alpha/libcrypt.abilist deleted file mode 100644 index cd6ba95280..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.0 crypt F -GLIBC_2.0 crypt_r F -GLIBC_2.0 encrypt F -GLIBC_2.0 encrypt_r F -GLIBC_2.0 fcrypt F -GLIBC_2.0 setkey F -GLIBC_2.0 setkey_r F diff --git a/sysdeps/unix/sysv/linux/alpha/shlib-versions b/sysdeps/unix/sysv/linux/alpha/shlib-versions index cd913c257c..bcbbc5454b 100644 --- a/sysdeps/unix/sysv/linux/alpha/shlib-versions +++ b/sysdeps/unix/sysv/linux/alpha/shlib-versions @@ -10,5 +10,4 @@ libutil=1.1 libresolv=2.1 libnsl=1.1 -libcrypt=1.1 libBrokenLocale=1.1 diff --git a/sysdeps/unix/sysv/linux/arc/libcrypt.abilist b/sysdeps/unix/sysv/linux/arc/libcrypt.abilist deleted file mode 100644 index 6bd253453e..0000000000 --- a/sysdeps/unix/sysv/linux/arc/libcrypt.abilist +++ /dev/null @@ -1,2 +0,0 @@ -GLIBC_2.32 crypt F -GLIBC_2.32 crypt_r F diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index 32db854cbd..e2b5a0eab3 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -17,10 +17,6 @@ endif # Add a syscall function to each library that needs one. -ifeq ($(subdir),crypt) -libcrypt-sysdep_routines += libc-do-syscall -endif - ifeq ($(subdir),rt) librt-sysdep_routines += libc-do-syscall librt-shared-only-routines += libc-do-syscall diff --git a/sysdeps/unix/sysv/linux/arm/be/libcrypt.abilist b/sysdeps/unix/sysv/linux/arm/be/libcrypt.abilist deleted file mode 100644 index 78a25b6df2..0000000000 --- a/sysdeps/unix/sysv/linux/arm/be/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.4 crypt F -GLIBC_2.4 crypt_r F -GLIBC_2.4 encrypt F -GLIBC_2.4 encrypt_r F -GLIBC_2.4 fcrypt F -GLIBC_2.4 setkey F -GLIBC_2.4 setkey_r F diff --git a/sysdeps/unix/sysv/linux/arm/le/libcrypt.abilist b/sysdeps/unix/sysv/linux/arm/le/libcrypt.abilist deleted file mode 100644 index 78a25b6df2..0000000000 --- a/sysdeps/unix/sysv/linux/arm/le/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.4 crypt F -GLIBC_2.4 crypt_r F -GLIBC_2.4 encrypt F -GLIBC_2.4 encrypt_r F -GLIBC_2.4 fcrypt F -GLIBC_2.4 setkey F -GLIBC_2.4 setkey_r F diff --git a/sysdeps/unix/sysv/linux/csky/libcrypt.abilist b/sysdeps/unix/sysv/linux/csky/libcrypt.abilist deleted file mode 100644 index da3abbf8fb..0000000000 --- a/sysdeps/unix/sysv/linux/csky/libcrypt.abilist +++ /dev/null @@ -1,2 +0,0 @@ -GLIBC_2.29 crypt F -GLIBC_2.29 crypt_r F diff --git a/sysdeps/unix/sysv/linux/fips-private.h b/sysdeps/unix/sysv/linux/fips-private.h deleted file mode 100644 index c9e6a58e7a..0000000000 --- a/sysdeps/unix/sysv/linux/fips-private.h +++ /dev/null @@ -1,74 +0,0 @@ -/* FIPS compliance status test for GNU/Linux systems. - Copyright (C) 2012-2023 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _FIPS_PRIVATE_H -#define _FIPS_PRIVATE_H - -#include <errno.h> -#include <fcntl.h> -#include <stdlib.h> -#include <unistd.h> -#include <not-cancel.h> -#include <stdbool.h> - -/* Return true if FIPS mode is enabled. See - sysdeps/generic/fips-private.h for more information. */ - -static bool -fips_enabled_p (void) -{ - static enum - { - FIPS_UNTESTED = 0, - FIPS_ENABLED = 1, - FIPS_DISABLED = -1, - FIPS_TEST_FAILED = -2 - } checked; - - if (checked == FIPS_UNTESTED) - { - int fd = __open_nocancel ("/proc/sys/crypto/fips_enabled", O_RDONLY); - - if (fd != -1) - { - /* This is more than enough, the file contains a single integer. */ - char buf[32]; - ssize_t n; - n = TEMP_FAILURE_RETRY (__read_nocancel (fd, buf, sizeof (buf) - 1)); - __close_nocancel_nostatus (fd); - - if (n > 0) - { - /* Terminate the string. */ - buf[n] = '\0'; - - char *endp; - long int res = strtol (buf, &endp, 10); - if (endp != buf && (*endp == '\0' || *endp == '\n')) - checked = (res > 0) ? FIPS_ENABLED : FIPS_DISABLED; - } - } - - if (checked == FIPS_UNTESTED) - checked = FIPS_TEST_FAILED; - } - - return checked == FIPS_ENABLED; -} - -#endif /* _FIPS_PRIVATE_H */ diff --git a/sysdeps/unix/sysv/linux/hppa/libcrypt.abilist b/sysdeps/unix/sysv/linux/hppa/libcrypt.abilist deleted file mode 100644 index cd6ba95280..0000000000 --- a/sysdeps/unix/sysv/linux/hppa/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.0 crypt F -GLIBC_2.0 crypt_r F -GLIBC_2.0 encrypt F -GLIBC_2.0 encrypt_r F -GLIBC_2.0 fcrypt F -GLIBC_2.0 setkey F -GLIBC_2.0 setkey_r F diff --git a/sysdeps/unix/sysv/linux/i386/libcrypt.abilist b/sysdeps/unix/sysv/linux/i386/libcrypt.abilist deleted file mode 100644 index cd6ba95280..0000000000 --- a/sysdeps/unix/sysv/linux/i386/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.0 crypt F -GLIBC_2.0 crypt_r F -GLIBC_2.0 encrypt F -GLIBC_2.0 encrypt_r F -GLIBC_2.0 fcrypt F -GLIBC_2.0 setkey F -GLIBC_2.0 setkey_r F diff --git a/sysdeps/unix/sysv/linux/ia64/libcrypt.abilist b/sysdeps/unix/sysv/linux/ia64/libcrypt.abilist deleted file mode 100644 index cd6ba95280..0000000000 --- a/sysdeps/unix/sysv/linux/ia64/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.0 crypt F -GLIBC_2.0 crypt_r F -GLIBC_2.0 encrypt F -GLIBC_2.0 encrypt_r F -GLIBC_2.0 fcrypt F -GLIBC_2.0 setkey F -GLIBC_2.0 setkey_r F diff --git a/sysdeps/unix/sysv/linux/loongarch/lp64/libcrypt.abilist b/sysdeps/unix/sysv/linux/loongarch/lp64/libcrypt.abilist deleted file mode 100644 index 4d4332dab7..0000000000 --- a/sysdeps/unix/sysv/linux/loongarch/lp64/libcrypt.abilist +++ /dev/null @@ -1,2 +0,0 @@ -GLIBC_2.36 crypt F -GLIBC_2.36 crypt_r F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libcrypt.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libcrypt.abilist deleted file mode 100644 index 78a25b6df2..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.4 crypt F -GLIBC_2.4 crypt_r F -GLIBC_2.4 encrypt F -GLIBC_2.4 encrypt_r F -GLIBC_2.4 fcrypt F -GLIBC_2.4 setkey F -GLIBC_2.4 setkey_r F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libcrypt.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libcrypt.abilist deleted file mode 100644 index cd6ba95280..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.0 crypt F -GLIBC_2.0 crypt_r F -GLIBC_2.0 encrypt F -GLIBC_2.0 encrypt_r F -GLIBC_2.0 fcrypt F -GLIBC_2.0 setkey F -GLIBC_2.0 setkey_r F diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libcrypt.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libcrypt.abilist deleted file mode 100644 index 4b37b33ee5..0000000000 --- a/sysdeps/unix/sysv/linux/microblaze/be/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.18 crypt F -GLIBC_2.18 crypt_r F -GLIBC_2.18 encrypt F -GLIBC_2.18 encrypt_r F -GLIBC_2.18 fcrypt F -GLIBC_2.18 setkey F -GLIBC_2.18 setkey_r F diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libcrypt.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libcrypt.abilist deleted file mode 100644 index 4b37b33ee5..0000000000 --- a/sysdeps/unix/sysv/linux/microblaze/le/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.18 crypt F -GLIBC_2.18 crypt_r F -GLIBC_2.18 encrypt F -GLIBC_2.18 encrypt_r F -GLIBC_2.18 fcrypt F -GLIBC_2.18 setkey F -GLIBC_2.18 setkey_r F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/libcrypt.abilist b/sysdeps/unix/sysv/linux/mips/mips32/libcrypt.abilist deleted file mode 100644 index cd6ba95280..0000000000 --- a/sysdeps/unix/sysv/linux/mips/mips32/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.0 crypt F -GLIBC_2.0 crypt_r F -GLIBC_2.0 encrypt F -GLIBC_2.0 encrypt_r F -GLIBC_2.0 fcrypt F -GLIBC_2.0 setkey F -GLIBC_2.0 setkey_r F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/libcrypt.abilist b/sysdeps/unix/sysv/linux/mips/mips64/libcrypt.abilist deleted file mode 100644 index cd6ba95280..0000000000 --- a/sysdeps/unix/sysv/linux/mips/mips64/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.0 crypt F -GLIBC_2.0 crypt_r F -GLIBC_2.0 encrypt F -GLIBC_2.0 encrypt_r F -GLIBC_2.0 fcrypt F -GLIBC_2.0 setkey F -GLIBC_2.0 setkey_r F diff --git a/sysdeps/unix/sysv/linux/nios2/libcrypt.abilist b/sysdeps/unix/sysv/linux/nios2/libcrypt.abilist deleted file mode 100644 index 78a9a23dbd..0000000000 --- a/sysdeps/unix/sysv/linux/nios2/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.21 crypt F -GLIBC_2.21 crypt_r F -GLIBC_2.21 encrypt F -GLIBC_2.21 encrypt_r F -GLIBC_2.21 fcrypt F -GLIBC_2.21 setkey F -GLIBC_2.21 setkey_r F diff --git a/sysdeps/unix/sysv/linux/or1k/libcrypt.abilist b/sysdeps/unix/sysv/linux/or1k/libcrypt.abilist deleted file mode 100644 index fc9c3d5428..0000000000 --- a/sysdeps/unix/sysv/linux/or1k/libcrypt.abilist +++ /dev/null @@ -1,2 +0,0 @@ -GLIBC_2.35 crypt F -GLIBC_2.35 crypt_r F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libcrypt.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libcrypt.abilist deleted file mode 100644 index cd6ba95280..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.0 crypt F -GLIBC_2.0 crypt_r F -GLIBC_2.0 encrypt F -GLIBC_2.0 encrypt_r F -GLIBC_2.0 fcrypt F -GLIBC_2.0 setkey F -GLIBC_2.0 setkey_r F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libcrypt.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libcrypt.abilist deleted file mode 100644 index 069212877a..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.3 crypt F -GLIBC_2.3 crypt_r F -GLIBC_2.3 encrypt F -GLIBC_2.3 encrypt_r F -GLIBC_2.3 fcrypt F -GLIBC_2.3 setkey F -GLIBC_2.3 setkey_r F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libcrypt.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libcrypt.abilist deleted file mode 100644 index 4082747aa3..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.17 crypt F -GLIBC_2.17 crypt_r F -GLIBC_2.17 encrypt F -GLIBC_2.17 encrypt_r F -GLIBC_2.17 fcrypt F -GLIBC_2.17 setkey F -GLIBC_2.17 setkey_r F diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/libcrypt.abilist b/sysdeps/unix/sysv/linux/riscv/rv32/libcrypt.abilist deleted file mode 100644 index f6ed52d39f..0000000000 --- a/sysdeps/unix/sysv/linux/riscv/rv32/libcrypt.abilist +++ /dev/null @@ -1,2 +0,0 @@ -GLIBC_2.33 crypt F -GLIBC_2.33 crypt_r F diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libcrypt.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libcrypt.abilist deleted file mode 100644 index 9484dca79e..0000000000 --- a/sysdeps/unix/sysv/linux/riscv/rv64/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.27 crypt F -GLIBC_2.27 crypt_r F -GLIBC_2.27 encrypt F -GLIBC_2.27 encrypt_r F -GLIBC_2.27 fcrypt F -GLIBC_2.27 setkey F -GLIBC_2.27 setkey_r F diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libcrypt.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libcrypt.abilist deleted file mode 100644 index cd6ba95280..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.0 crypt F -GLIBC_2.0 crypt_r F -GLIBC_2.0 encrypt F -GLIBC_2.0 encrypt_r F -GLIBC_2.0 fcrypt F -GLIBC_2.0 setkey F -GLIBC_2.0 setkey_r F diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libcrypt.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libcrypt.abilist deleted file mode 100644 index f7f92ec540..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-64/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.2 crypt F -GLIBC_2.2 crypt_r F -GLIBC_2.2 encrypt F -GLIBC_2.2 encrypt_r F -GLIBC_2.2 fcrypt F -GLIBC_2.2 setkey F -GLIBC_2.2 setkey_r F diff --git a/sysdeps/unix/sysv/linux/sh/be/libcrypt.abilist b/sysdeps/unix/sysv/linux/sh/be/libcrypt.abilist deleted file mode 100644 index cd6ba95280..0000000000 --- a/sysdeps/unix/sysv/linux/sh/be/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.0 crypt F -GLIBC_2.0 crypt_r F -GLIBC_2.0 encrypt F -GLIBC_2.0 encrypt_r F -GLIBC_2.0 fcrypt F -GLIBC_2.0 setkey F -GLIBC_2.0 setkey_r F diff --git a/sysdeps/unix/sysv/linux/sh/le/libcrypt.abilist b/sysdeps/unix/sysv/linux/sh/le/libcrypt.abilist deleted file mode 100644 index cd6ba95280..0000000000 --- a/sysdeps/unix/sysv/linux/sh/le/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.0 crypt F -GLIBC_2.0 crypt_r F -GLIBC_2.0 encrypt F -GLIBC_2.0 encrypt_r F -GLIBC_2.0 fcrypt F -GLIBC_2.0 setkey F -GLIBC_2.0 setkey_r F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libcrypt.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libcrypt.abilist deleted file mode 100644 index cd6ba95280..0000000000 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.0 crypt F -GLIBC_2.0 crypt_r F -GLIBC_2.0 encrypt F -GLIBC_2.0 encrypt_r F -GLIBC_2.0 fcrypt F -GLIBC_2.0 setkey F -GLIBC_2.0 setkey_r F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libcrypt.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libcrypt.abilist deleted file mode 100644 index cd6ba95280..0000000000 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.0 crypt F -GLIBC_2.0 crypt_r F -GLIBC_2.0 encrypt F -GLIBC_2.0 encrypt_r F -GLIBC_2.0 fcrypt F -GLIBC_2.0 setkey F -GLIBC_2.0 setkey_r F diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libcrypt.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libcrypt.abilist deleted file mode 100644 index ae5c7af6c3..0000000000 --- a/sysdeps/unix/sysv/linux/x86_64/64/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.2.5 crypt F -GLIBC_2.2.5 crypt_r F -GLIBC_2.2.5 encrypt F -GLIBC_2.2.5 encrypt_r F -GLIBC_2.2.5 fcrypt F -GLIBC_2.2.5 setkey F -GLIBC_2.2.5 setkey_r F diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libcrypt.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libcrypt.abilist deleted file mode 100644 index 5e9789b32e..0000000000 --- a/sysdeps/unix/sysv/linux/x86_64/x32/libcrypt.abilist +++ /dev/null @@ -1,7 +0,0 @@ -GLIBC_2.16 crypt F -GLIBC_2.16 crypt_r F -GLIBC_2.16 encrypt F -GLIBC_2.16 encrypt_r F -GLIBC_2.16 fcrypt F -GLIBC_2.16 setkey F -GLIBC_2.16 setkey_r F |