Bug 25544 - [Error] fatal error: rpc/des_crypt.h: No such file or director
Summary: [Error] fatal error: rpc/des_crypt.h: No such file or director
Status: RESOLVED INVALID
Alias: None
Product: glibc
Classification: Unclassified
Component: librt (show other bugs)
Version: 2.30
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-13 13:44 UTC by Akhilesh
Modified: 2020-02-13 14:50 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Akhilesh 2020-02-13 13:44:42 UTC
Hello 

My current glibc version is 2.30. 
 
I am getting below Error with my sample test application even with my glibc is compiled with "--enable-obsolete-rpc --enable-obsolete-nsl” 

akhilesh@DELL-BUILD10:~/P4/github/glibc$ armv7l-linux-gnueabi-gcc test.c 
test.c:1:10: fatal error: rpc/des_crypt.h: No such file or directory
    1 | #include <rpc/des_crypt.h>
      |          ^~~~~~~~~~


akhilesh@DELL-BUILD10:~/P4/github/glibc$ cat test.c 

#include <rpc/des_crypt.h>
void main()
{

}
akhilesh.k@DELL-BUILD10:~/P4/github/glibc$ 


When i checked I found this is due to changes in glibc from 2.26 onwards also in scripts/build-many-glibcs.py i found both options are not added for arm  but same are added in x86 

 170         self.add_config(arch='arm',
 171                         os_name='linux-gnueabihf',
 172                         gcc_cfg=['--with-float=hard', '--with-cpu=arm926ej-s'],
 173                         extra_glibcs=[{'variant': 'v7a',
 174                                        'ccopts': '-march=armv7-a -mfpu=vfpv3'},
 175                                       {'variant': 'v7a-disable-multi-arch',
 176                                        'ccopts': '-march=armv7-a -mfpu=vfpv3',
 177                                        'cfg': ['--disable-multi-arch']}])
 178         self.add_config(arch='armeb',
 179                         os_name='linux-gnueabihf',
 180                         gcc_cfg=['--with-float=hard', '--with-cpu=arm926ej-s'])
 181         self.add_config(arch='armeb',
 182                         os_name='linux-gnueabihf',
 183                         variant='be8',
 184                         gcc_cfg=['--with-float=hard', '--with-arch=armv7-a',
 185                                  '--with-fpu=vfpv3'])
 
 Please let me know if this is intentional? Also how to resolve this issue?
Comment 1 Florian Weimer 2020-02-13 14:50:34 UTC
This is a deliberate change in glibc 2.28, as mentioned in the NEWS file:

* The obsolete functions encrypt, encrypt_r, setkey, setkey_r, cbc_crypt,
  ecb_crypt, and des_setparity are no longer available to newly linked
  binaries, and the headers <rpc/des_crypt.h> and <rpc/rpc_des.h> are no
  longer installed.  These functions encrypted and decrypted data with the
  DES block cipher, which is no longer considered secure.  Software that
  still uses these functions should switch to a modern cryptography library,
  such as libgcrypt.