Skip to content

remove obsolete crypt.h header inclusion#2879

Closed
rdmark wants to merge 1 commit intomainfrom
rdmark-remove-crypt.h
Closed

remove obsolete crypt.h header inclusion#2879
rdmark wants to merge 1 commit intomainfrom
rdmark-remove-crypt.h

Conversation

@rdmark
Copy link
Copy Markdown
Member

@rdmark rdmark commented Apr 11, 2026

libcrypt is a 25 year old dependency that is long since obsolete, so sign that any symbols from this library is required anymore (supplanted by libgcrypt)

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

🔥 Spectest (AFP 3.4) - Flamegraph (AFP_ASSERT active)

Commit: c28f643cbedd83115c65ca7fdbdb7bac6b3a0e0e
Profiling: On-CPU sampling @ 1009 Hz (prime), DWARF call-graph, x86_64
Build: debugoptimized (-O2 -g -fno-omit-frame-pointer)
Total Runtime: 66s, Netatalk Code-time: 4.2%,
Stacks: 1957, SVG size: 1.2M

🔥 Open interactive Flamegraph (SVG)

Flamegraph preview

📥 Download from artifacts →

🔝 Top 10 leaf functions
Function Samples
finish_task_switch.isra.0 550049400
do_syscall_64 419226840
_raw_spin_unlock_irqrestore 274529160
__cp_end 172447920
srso_alias_safe_ret 84241800
x64_sys_call 43607520
__syscall_cp_c 35678880
dircache_process_deferred_chain 31714560
find_get_block_common 27750240
schedule 22794840

@rdmark rdmark marked this pull request as ready for review April 11, 2026 19:00
@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Apr 11, 2026

🤖 Augment PR Summary

Summary: Removes the crypt.h header check and the conditional <crypt.h> includes from the passwd-based UAM modules.
Why: Aims to eliminate an obsolete libcrypt header dependency now that other auth paths rely on libgcrypt/platform mechanisms.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

#include <unistd.h>

#ifdef HAVE_CRYPT_H
#include <crypt.h>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

crypt()/crypt_checkpass() are used later in this file; removing <crypt.h> can leave them without a prototype on platforms where they aren’t declared via other headers, causing implicit declarations / wrong return types. This is likely to become a hard build failure under C99/-Werror or lead to runtime issues on 64-bit.

Severity: high

Other Locations
  • etc/uams/uams_dhx_passwd.c:22
  • etc/uams/uams_dhx2_passwd.c:24

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@rdmark
Copy link
Copy Markdown
Member Author

rdmark commented Apr 11, 2026

I was wrong, libcrypt provides f.e. crypt_checkpass

@rdmark rdmark closed this Apr 11, 2026
@rdmark rdmark deleted the rdmark-remove-crypt.h branch April 11, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant