You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the following command, chpasswd segfaults: echo "test:test" | chpasswd -R /home/juyin/rootfs
The backtrace:
(gdb) bt
#0 0x00007f26ab9ba570 in fread () from /lib64/libc.so.6 #1 0x00000000004040dc in read_random_bytes () at salt.c:179 #2 0x000000000040438a in gensalt (salt_size=16) at salt.c:440 #3 0x0000000000404652 in crypt_make_salt (meth=0x0, arg=0x0) at salt.c:559 #4 0x00000000004036a9 in main (argc=3, argv=0x7ffc6950ab88) at chpasswd.c:539
The text was updated successfully, but these errors were encountered:
I guess this is happening because chpasswd is unable to open /dev/urandom in salt.c#L177, but we aren't checking the return value. Is the aforementioned file available on your system?
I guess this is happening because chpasswd is unable to open /dev/urandom in salt.c#L177, but we aren't checking the return value. Is the aforementioned file available on your system?
Year, the file ‘/dev/urandom’ exists in my Linux.
But, when chpasswd is used with '-R /home/juyin/rootfs', it will be changed the root directory to '/home/juyin/rootfs'.
The file '/home/juyin/rootfs/etc/urandom' doesn't exist.
When running the following command, chpasswd segfaults:
echo "test:test" | chpasswd -R /home/juyin/rootfs
The backtrace:
(gdb) bt
#0 0x00007f26ab9ba570 in fread () from /lib64/libc.so.6
#1 0x00000000004040dc in read_random_bytes () at salt.c:179
#2 0x000000000040438a in gensalt (salt_size=16) at salt.c:440
#3 0x0000000000404652 in crypt_make_salt (meth=0x0, arg=0x0) at salt.c:559
#4 0x00000000004036a9 in main (argc=3, argv=0x7ffc6950ab88) at chpasswd.c:539
The text was updated successfully, but these errors were encountered: