<div dir="ltr"><div><div>I will also attach gdb's output, here my program is called tool.c. When it attempts to initialize libcurl, it changes errno to ENOENT because of /etc/gcrypt/fips_enabled, this also changes errno attached to libcurl, which, in turn, makes my program exit with an "FIle/ directory not found message".<br>I almost forgot, answering your previous question:<br></div>No, I am not under the impression that libgcrypt may not change errno when I call any arbitrary function, but that this specific circumstance differs from the documented behaviour by not considering /etc/gcrypt/fips_enabled *may* not exist.<br></div>Also, my setup doesn't have neither files that gcrypt tries to open to check fips mode, which is the debian default configuration.<br><div><div><div><div><br>Breakpoint 2, main (argc=1, argv=0x7fffffffe128) at tool.c:656<br>656             if ( curl_global_init(CURL_GLOBAL_ALL) != 0 ) { // init libcurl<br>(gdb) watch *errno_p<br>Hardware watchpoint 3: *errno_p<br>(gdb) c<br>Continuing.<br><br>Hardware watchpoint 3: *errno_p<br><br>Old value = 0<br>New value = 2<br>0x00007ffff7e0171c in __access (file=0x7ffff76c335b "/etc/gcrypt/fips_enabled", type=0) at ../sysdeps/unix/sysv/linux/access.c:27<br>27      ../sysdeps/unix/sysv/linux/access.c: No such file or directory.<br>(gdb) bt<br>#0  0x00007ffff7e0171c in __access (file=0x7ffff76c335b "/etc/gcrypt/fips_enabled", type=0)<br>    at ../sysdeps/unix/sysv/linux/access.c:27<br>#1  0x00007ffff760024e in ?? () from /lib/x86_64-linux-gnu/libgcrypt.so.20<br>#2  0x00007ffff75f88ea in ?? () from /lib/x86_64-linux-gnu/libgcrypt.so.20<br>#3  0x00007ffff75f9a5f in ?? () from /lib/x86_64-linux-gnu/libgcrypt.so.20<br>#4  0x00007ffff75f5789 in gcry_control () from /lib/x86_64-linux-gnu/libgcrypt.so.20<br>#5  0x00007ffff7c76794 in libssh2_init () from /lib/x86_64-linux-gnu/libssh2.so.1<br>#6  0x00007ffff7f428fb in ?? () from /lib/x86_64-linux-gnu/libcurl-gnutls.so.4<br>#7  0x00007ffff7f032d7 in ?? () from /lib/x86_64-linux-gnu/libcurl-gnutls.so.4<br>#8  0x0000555555556110 in main (argc=1, argv=0x7fffffffe128) at tool.c:656<br>(gdb) <br></div></div></div></div></div>