Description of problem: When booting an atomic cloud image cloud-init can't set passwords because chpasswd segfaults: ``` [ 12.847054] chpasswd[1241]: segfault at fffffffff1517020 ip 00007f8af0fd06a6 sp 00007ffd9db8c6e8 error 5 in libc-2.26.9000.so[7f8af0f38000+1b5000] ``` If you can get in to the system you can also see the same problem: ``` [root@vanilla-f28atomic ~]# rpm -q shadow-utils shadow-utils-4.5-8.fc28.x86_64 [root@vanilla-f28atomic ~]# echo 'vagrant:password' | chpasswd Segmentation fault (core dumped) ``` How reproducible: Always
Reproduced this myself: # coredumpctl info chpasswd PID: 2325 (chpasswd) UID: 0 (root) GID: 0 (root) Signal: 11 (SEGV) Timestamp: Mon 2018-02-05 21:44:29 UTC (28s ago) Command Line: chpasswd Executable: /usr/sbin/chpasswd Control Group: /user.slice/user-1000.slice/session-7.scope Unit: session-7.scope Slice: user-1000.slice Session: 7 Owner UID: 1000 (cloud-user) Boot ID: 958c848d7b5c4934934a783d833c5b44 Machine ID: 2f3c3b3dcf374c2e8485a788fc8fa95a Hostname: atomichost-by-dustymabe Storage: /var/lib/systemd/coredump/core.chpasswd.0.958c848d7b5c4934934a783d833c5b44.2325.1517867069000000.lz4 Message: Process 2325 (chpasswd) of user 0 dumped core. Stack trace of thread 2325: #0 0x00007f7354d51de1 __strlen_avx2 (libc.so.6) #1 0x000055d2d0d74223 pw_encrypt (chpasswd) #2 0x000055d2d0d7271b main (chpasswd) #3 0x00007f7354c181bb __libc_start_main (libc.so.6) #4 0x000055d2d0d7311a _start (chpasswd)
FWIW, this is not an issue in 4.5-7, so this is probably related to the libxcrypt system-wide change?
Yes, it is. Apparently it is no longer sufficient to include unistd.h for crypt() function prototype declaration. Is that intentional?
It looks to me like posix breakage.
(In reply to Tomas Mraz from comment #4) > It looks to me like posix breakage. Nope, see [1]. One can rely on having crypt(), etc. to be present only, if _XOPEN_CRYPT is defined and if it is defined to have a value other than -1. I'll add a fix to shadow-utils fixing this. [1] http://pubs.opengroup.org/onlinepubs/007904875/basedefs/xbd_chap02.html#tag_02_01_05_02
https://koji.fedoraproject.org/koji/buildinfo?buildID=1024219
Why did you reformat all the patches? It is just unnecessary noise. Please refrain from doing such non-sense changes on packages just because you're provenpackager.
Sry, I didn't mean to reformat them, but I regenerated them in one run to align many of them to some changes in lines numbering.