Find the answer to your Linux question:
Results 1 to 4 of 4
Hello, I have a slackware system that I am been having issues using the ISC bind 9.3.1 dnssec-keygen utility. On my REDHAT ES 3.0 box I have the following strace ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2004
    Location
    United Kingdom
    Posts
    50

    dnssec-keygen on slackware


    Hello,

    I have a slackware system that I am been having issues using the ISC bind 9.3.1 dnssec-keygen utility.

    On my REDHAT ES 3.0 box I have the following strace
    Code:
    execve("/usr/sbin/dnssec-keygen", ["dnssec-keygen", "-a", "HMAC-MD5", "-b", "512", "-n", "HOST", "chris"], [/* 20 vars */]) = 0
    uname({sys="Linux", node="apricot.infoserve.com", ...}) = 0
    brk(0)                                  = 0x9b58000
    open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
    open("/etc/ld.so.cache", O_RDONLY)      = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=33917, ...}) = 0
    old_mmap(NULL, 33917, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb75ed000
    close(3)                                = 0
    open("/usr/lib/libdns.so.16", O_RDONLY) = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\"\1"..., 512) = 512
    fstat64(3, {st_mode=S_IFREG|0755, st_size=1026680, ...}) = 0
    old_mmap(NULL, 1030972, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x547000
    old_mmap(0x63f000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xf7000) = 0x63f000
    close(3)                                = 0
    open("/usr/lib/libisc.so.7", O_RDONLY)  = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200z\0"..., 512) = 512
    old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb75ec000
    fstat64(3, {st_mode=S_IFREG|0755, st_size=221592, ...}) = 0
    old_mmap(NULL, 224824, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x3b6000
    old_mmap(0x3ec000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x35000) = 0x3ec000
    close(3)                                = 0
    open("/lib/libcrypto.so.4", O_RDONLY)   = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\252"..., 512) = 512
    fstat64(3, {st_mode=S_IFREG|0755, st_size=972156, ...}) = 0
    old_mmap(NULL, 985368, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x111000
    old_mmap(0x1ed000, 73728, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xdc000) = 0x1ed000
    old_mmap(0x1ff000, 10520, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x1ff000
    close(3)                                = 0
    open("/lib/libnsl.so.1", O_RDONLY)      = 3
    read&#40;3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 <\0\000"..., 512&#41; = 512
    fstat64&#40;3, &#123;st_mode=S_IFREG|0755, st_size=91040, ...&#125;&#41; = 0
    old_mmap&#40;NULL, 84864, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0&#41; = 0x71f000
    old_mmap&#40;0x731000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x11000&#41; = 0x731000
    old_mmap&#40;0x732000, 7040, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0&#41; = 0x732000
    close&#40;3&#41;                                = 0
    open&#40;"/lib/tls/libpthread.so.0", O_RDONLY&#41; = 3
    read&#40;3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20G\0\000"..., 512&#41; = 512
    fstat64&#40;3, &#123;st_mode=S_IFREG|0755, st_size=97712, ...&#125;&#41; = 0
    old_mmap&#40;NULL, 64820, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0&#41; = 0x202000
    old_mmap&#40;0x20f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xc000&#41; = 0x20f000
    old_mmap&#40;0x210000, 7476, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0&#41; = 0x210000
    close&#40;3&#41;                                = 0
    open&#40;"/lib/tls/libc.so.6", O_RDONLY&#41;    = 3
    read&#40;3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200X\1"..., 512&#41; = 512
    fstat64&#40;3, &#123;st_mode=S_IFREG|0755, st_size=1571692, ...&#125;&#41; = 0
    old_mmap&#40;NULL, 1275340, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0&#41; = 0x212000
    old_mmap&#40;0x344000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x132000&#41; = 0x344000
    old_mmap&#40;0x347000, 9676, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0&#41; = 0x347000
    close&#40;3&#41;                                = 0
    open&#40;"/usr/kerberos/lib/libgssapi_krb5.so.2", O_RDONLY&#41; = 3
    read&#40;3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340H\0"..., 512&#41; = 512
    fstat64&#40;3, &#123;st_mode=S_IFREG|0755, st_size=76712, ...&#125;&#41; = 0
    old_mmap&#40;NULL, 75588, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0&#41; = 0x98b000
    old_mmap&#40;0x99d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x12000&#41; = 0x99d000
    close&#40;3&#41;                                = 0
    open&#40;"/usr/kerberos/lib/libkrb5.so.3", O_RDONLY&#41; = 3
    read&#40;3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\362"..., 512&#41; = 512
    fstat64&#40;3, &#123;st_mode=S_IFREG|0755, st_size=385252, ...&#125;&#41; = 0
    old_mmap&#40;NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0&#41; = 0xb75eb000
    old_mmap&#40;NULL, 384636, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0&#41; = 0x34a000
    old_mmap&#40;0x3a6000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x5c000&#41; = 0x3a6000
    close&#40;3&#41;                                = 0
    open&#40;"/usr/kerberos/lib/libcom_err.so.3", O_RDONLY&#41; = 3
    read&#40;3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\t\0"..., 512&#41; = 512
    fstat64&#40;3, &#123;st_mode=S_IFREG|0755, st_size=5540, ...&#125;&#41; = 0
    old_mmap&#40;NULL, 4520, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0&#41; = 0xb26000
    old_mmap&#40;0xb27000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1000&#41; = 0xb27000
    close&#40;3&#41;                                = 0
    open&#40;"/usr/kerberos/lib/libk5crypto.so.3", O_RDONLY&#41; = 3
    read&#40;3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0&\0\000"..., 512&#41; = 512
    fstat64&#40;3, &#123;st_mode=S_IFREG|0755, st_size=72552, ...&#125;&#41; = 0
    old_mmap&#40;NULL, 73108, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0&#41; = 0x78a000
    old_mmap&#40;0x79b000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x11000&#41; = 0x79b000
    close&#40;3&#41;                                = 0
    open&#40;"/lib/libresolv.so.2", O_RDONLY&#41;   = 3
    read&#40;3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20*\0\000"..., 512&#41; = 512
    fstat64&#40;3, &#123;st_mode=S_IFREG|0755, st_size=76540, ...&#125;&#41; = 0
    old_mmap&#40;NULL, 73604, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0&#41; = 0x3ed000
    old_mmap&#40;0x3fc000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xf000&#41; = 0x3fc000
    old_mmap&#40;0x3fd000, 8068, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0&#41; = 0x3fd000
    close&#40;3&#41;                                = 0
    open&#40;"/lib/libdl.so.2", O_RDONLY&#41;       = 3
    read&#40;3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260\32"..., 512&#41; = 512
    fstat64&#40;3, &#123;st_mode=S_IFREG|0755, st_size=14868, ...&#125;&#41; = 0
    old_mmap&#40;NULL, 12244, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0&#41; = 0x9a2000
    old_mmap&#40;0x9a4000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1000&#41; = 0x9a4000
    close&#40;3&#41;                                = 0
    open&#40;"/usr/lib/libz.so.1", O_RDONLY&#41;    = 3
    read&#40;3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\31"..., 512&#41; = 512
    fstat64&#40;3, &#123;st_mode=S_IFREG|0755, st_size=52584, ...&#125;&#41; = 0
    old_mmap&#40;NULL, 55564, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0&#41; = 0xf87000
    old_mmap&#40;0xf93000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xb000&#41; = 0xf93000
    close&#40;3&#41;                                = 0
    old_mmap&#40;NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0&#41; = 0xb75ea000
    old_mmap&#40;NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0&#41; = 0xb75e9000
    set_thread_area&#40;&#123;entry_number&#58;-1 -> 6, base_addr&#58;0xb75e9080, limit&#58;1048575, seg_32bit&#58;1, contents&#58;0, read_exec_only&#58;0, limit_in_pages&#58;1, seg_not_present&#58;0, useable&#58;1&#125;&#41; = 0
    munmap&#40;0xb75ed000, 33917&#41;               = 0
    set_tid_address&#40;0xb75e90c8&#41;             = 31572
    rt_sigaction&#40;SIGRTMIN, &#123;0x206670, &#91;&#93;, SA_RESTORER|SA_SIGINFO, 0x20ce50&#125;, NULL, 8&#41; = 0
    rt_sigprocmask&#40;SIG_UNBLOCK, &#91;RTMIN&#93;, NULL, 8&#41; = 0
    getrlimit&#40;RLIMIT_STACK, &#123;rlim_cur=10240*1024, rlim_max=RLIM_INFINITY&#125;&#41; = 0
    brk&#40;0&#41;                                  = 0x9b58000
    brk&#40;0x9b79000&#41;                          = 0x9b79000
    brk&#40;0&#41;                                  = 0x9b79000
    open&#40;"/usr/share/locale/en_US.UTF-8/libdns.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    open&#40;"/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libdns.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    open&#40;"/usr/share/locale/en/libdns.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    open&#40;"/usr/share/locale/en/LC_MESSAGES/libdns.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    futex&#40;0x63f628, FUTEX_WAKE, 2147483647&#41; = 0
    open&#40;"/usr/share/locale/en_US.UTF-8/libisc.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    open&#40;"/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libisc.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    open&#40;"/usr/share/locale/en/libisc.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    open&#40;"/usr/share/locale/en/LC_MESSAGES/libisc.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    futex&#40;0x3ec504, FUTEX_WAKE, 2147483647&#41; = 0
    futex&#40;0x3ec55c, FUTEX_WAKE, 2147483647&#41; = 0
    futex&#40;0x640ad0, FUTEX_WAKE, 2147483647&#41; = 0
    open&#40;"/dev/random", O_RDONLY|O_NONBLOCK&#41; = 3
    fcntl64&#40;3, F_GETFL&#41;                     = 0x800 &#40;flags O_RDONLY|O_NONBLOCK&#41;
    fcntl64&#40;3, F_SETFL, O_RDONLY|O_NONBLOCK&#41; = 0
    open&#40;"/usr/share/locale/en_US.UTF-8/libdst.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    open&#40;"/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libdst.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    open&#40;"/usr/share/locale/en/libdst.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    open&#40;"/usr/share/locale/en/LC_MESSAGES/libdst.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    futex&#40;0x64162c, FUTEX_WAKE, 2147483647&#41; = 0
    futex&#40;0x6416d8, FUTEX_WAKE, 2147483647&#41; = 0
    read&#40;3, "\260\306\261^I<\351v!\354la\17\332M4\6\2718\17 \2761\332"..., 64&#41; = 64
    read&#40;3, "\336\303=\247lG\f69L\232d\327\252\302\362\341I\366\203"..., 54&#41; = 54
    read&#40;3, "\302\257\357\376&T\371\314Oc\r~V\221\306\345QgX&\216\4"..., 44&#41; = 44
    read&#40;3, "\361\374./7X\316Wk\277%uA\353p&#41;\336\273=H\177\360,\23\247"..., 34&#41; = 34
    read&#40;3, "\2,I\37\277\305e\204\310\221\273\34\260\203\333\353\36"..., 24&#41; = 24
    read&#40;3, "\237\224\10\273\356q\24\320\302U\336\3649@", 14&#41; = 14
    read&#40;3, "&#93;\303y#<\362J\271Y>", 10&#41;      = 10
    open&#40;"Kchris.+157+01945.key", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    open&#40;"Kchris.+157+01945.key", O_WRONLY|O_CREAT|O_TRUNC, 0666&#41; = 4
    stat64&#40;"Kchris.+157+01945.key", &#123;st_mode=S_IFREG|0644, st_size=0, ...&#125;&#41; = 0
    chmod&#40;"Kchris.+157+01945.key", 0600&#41;    = 0
    fstat64&#40;4, &#123;st_mode=S_IFREG|0600, st_size=0, ...&#125;&#41; = 0
    mmap2&#40;NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0&#41; = 0xb75f5000
    write&#40;4, "chris. IN KEY 512 3 157 6UsIBtVB"..., 114&#41; = 114
    close&#40;4&#41;                                = 0
    munmap&#40;0xb75f5000, 4096&#41;                = 0
    open&#40;"Kchris.+157+01945.private", O_WRONLY|O_CREAT|O_TRUNC, 0666&#41; = 4
    stat64&#40;"Kchris.+157+01945.private", &#123;st_mode=S_IFREG|0644, st_size=0, ...&#125;&#41; = 0
    chmod&#40;"Kchris.+157+01945.private", 0600&#41; = 0
    fstat64&#40;4, &#123;st_mode=S_IFREG|0600, st_size=0, ...&#125;&#41; = 0
    mmap2&#40;NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0&#41; = 0xb75f5000
    write&#40;4, "Private-key-format&#58; v1.2\nAlgorit"..., 145&#41; = 145
    close&#40;4&#41;                                = 0
    munmap&#40;0xb75f5000, 4096&#41;                = 0
    fstat64&#40;1, &#123;st_mode=S_IFCHR|0620, st_rdev=makedev&#40;136, 4&#41;, ...&#125;&#41; = 0
    mmap2&#40;NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0&#41; = 0xb75f5000
    write&#40;1, "Kchris.+157+01945\n", 18Kchris.+157+01945
    &#41;     = 18
    close&#40;3&#41;                                = 0
    munmap&#40;0xb75f5000, 4096&#41;                = 0
    exit_group&#40;0&#41;                           = ?
    Now that one works. However when I go and do the same on my slackware box I get the following
    Code:
    execve&#40;"/usr/sbin/dnssec-keygen", &#91;"dnssec-keygen", "-a", "HMAC-MD5", "-b", "512", "-n", "HOST", "chris"&#93;, &#91;/* 26 vars */&#93;&#41; = 0
    uname&#40;&#123;sys="Linux", node="poopey", ...&#125;&#41; = 0
    brk&#40;0&#41;                                  = 0x804e000
    access&#40;"/etc/ld.so.preload", R_OK&#41;      = -1 ENOENT &#40;No such file or directory&#41;
    open&#40;"/etc/ld.so.cache", O_RDONLY&#41;      = 3
    fstat64&#40;3, &#123;st_mode=S_IFREG|0644, st_size=38151, ...&#125;&#41; = 0
    mmap2&#40;NULL, 38151, PROT_READ, MAP_PRIVATE, 3, 0&#41; = 0xb7fe1000
    close&#40;3&#41;                                = 0
    open&#40;"/usr/lib/libdns.so.20", O_RDONLY&#41; = 3
    read&#40;3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`&#41;\1\000"..., 512&#41; = 512
    fstat64&#40;3, &#123;st_mode=S_IFREG|0755, st_size=1152308, ...&#125;&#41; = 0
    mmap2&#40;NULL, 1150980, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0&#41; = 0xb7ec7000
    mmap2&#40;0xb7fdd000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x116&#41; = 0xb7fdd000
    mmap2&#40;0xb7fe0000, 4, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0&#41; = 0xb7fe0000
    close&#40;3&#41;                                = 0
    open&#40;"/usr/lib/libisc.so.9", O_RDONLY&#41;  = 3
    read&#40;3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240&#123;\0"..., 512&#41; = 512
    fstat64&#40;3, &#123;st_mode=S_IFREG|0755, st_size=230108, ...&#125;&#41; = 0
    mmap2&#40;NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0&#41; = 0xb7ec6000
    mmap2&#40;NULL, 227908, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0&#41; = 0xb7e8e000
    mmap2&#40;0xb7ec5000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x37&#41; = 0xb7ec5000
    close&#40;3&#41;                                = 0
    open&#40;"/usr/lib/libcrypto.so.0", O_RDONLY&#41; = 3
    read&#40;3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\277\2"..., 512&#41; = 512
    fstat64&#40;3, &#123;st_mode=S_IFREG|0555, st_size=1038380, ...&#125;&#41; = 0
    mmap2&#40;NULL, 1043512, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0&#41; = 0xb7d8f000
    mmap2&#40;0xb7e79000, 73728, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xea&#41; = 0xb7e79000
    mmap2&#40;0xb7e8b000, 11320, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0&#41; = 0xb7e8b000
    mprotect&#40;0xbffff000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC|0x1000000&#41; = 0
    close&#40;3&#41;                                = 0
    open&#40;"/lib/tls/libnsl.so.1", O_RDONLY&#41;  = 3
    read&#40;3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 5\0\000"..., 512&#41; = 512
    fstat64&#40;3, &#123;st_mode=S_IFREG|0755, st_size=92501, ...&#125;&#41; = 0
    mmap2&#40;NULL, 88064, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0&#41; = 0xb7d79000
    mmap2&#40;0xb7d8b000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11&#41; = 0xb7d8b000
    mmap2&#40;0xb7d8d000, 6144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0&#41; = 0xb7d8d000
    close&#40;3&#41;                                = 0
    open&#40;"/lib/tls/libc.so.6", O_RDONLY&#41;    = 3
    read&#40;3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300P\1"..., 512&#41; = 512
    fstat64&#40;3, &#123;st_mode=S_IFREG|0755, st_size=1366940, ...&#125;&#41; = 0
    mmap2&#40;NULL, 1162428, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0&#41; = 0xb7c5d000
    mprotect&#40;0xb7d72000, 27836, PROT_NONE&#41;  = 0
    mmap2&#40;0xb7d73000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x115&#41; = 0xb7d73000
    mmap2&#40;0xb7d77000, 7356, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0&#41; = 0xb7d77000
    close&#40;3&#41;                                = 0
    open&#40;"/lib/tls/libdl.so.2", O_RDONLY&#41;   = 3
    read&#40;3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\v\0"..., 512&#41; = 512
    fstat64&#40;3, &#123;st_mode=S_IFREG|0755, st_size=13120, ...&#125;&#41; = 0
    mmap2&#40;NULL, 12392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0&#41; = 0xb7c59000
    mmap2&#40;0xb7c5b000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1&#41; = 0xb7c5b000
    close&#40;3&#41;                                = 0
    mmap2&#40;NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0&#41; = 0xb7c58000
    mmap2&#40;NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0&#41; = 0xb7c57000
    mprotect&#40;0xb7d73000, 4096, PROT_READ&#41;   = 0
    set_thread_area&#40;&#123;entry_number&#58;-1 -> 6, base_addr&#58;0xb7c576c0, limit&#58;1048575, seg_32bit&#58;1, contents&#58;0, read_exec_only&#58;0, limit_in_pages&#58;1, seg_not_present&#58;0, useable&#58;1&#125;&#41; = 0
    munmap&#40;0xb7fe1000, 38151&#41;               = 0
    brk&#40;0&#41;                                  = 0x804e000
    brk&#40;0x806f000&#41;                          = 0x806f000
    open&#40;"/usr/share/locale/C/libdns.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    open&#40;"/usr/share/locale/C/LC_MESSAGES/libdns.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    open&#40;"/usr/share/locale/C/libdns.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    open&#40;"/usr/share/locale/C/LC_MESSAGES/libdns.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    open&#40;"/usr/share/locale/C/libisc.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    open&#40;"/usr/share/locale/C/LC_MESSAGES/libisc.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    open&#40;"/usr/share/locale/C/libisc.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    open&#40;"/usr/share/locale/C/LC_MESSAGES/libisc.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    stat64&#40;"/dev/random", &#123;st_mode=S_IFCHR|0444, st_rdev=makedev&#40;1, 8&#41;, ...&#125;&#41; = 0
    open&#40;"/dev/random", O_RDONLY|O_NONBLOCK&#41; = 3
    fcntl64&#40;3, F_GETFL&#41;                     = 0x800 &#40;flags O_RDONLY|O_NONBLOCK&#41;
    fcntl64&#40;3, F_SETFL, O_RDONLY|O_NONBLOCK&#41; = 0
    open&#40;"/usr/share/locale/C/libdst.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    open&#40;"/usr/share/locale/C/LC_MESSAGES/libdst.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    open&#40;"/usr/share/locale/C/libdst.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    open&#40;"/usr/share/locale/C/LC_MESSAGES/libdst.cat", O_RDONLY&#41; = -1 ENOENT &#40;No such file or directory&#41;
    read&#40;3, 0xbfffe910, 64&#41;                 = -1 EAGAIN &#40;Resource temporarily unavailable&#41;
    select&#40;4, &#91;3&#93;, &#91;&#93;, NULL, NULL
    IT just hangs at that point. If I go and check the /dev/random files on both systems are the same.

    Redhat
    Code:
    stat /dev/random
      File&#58; `/dev/random'
      Size&#58; 0               Blocks&#58; 0          IO Block&#58; 4096   Character Device
    Device&#58; 302h/770d       Inode&#58; 67486       Links&#58; 1     Device type&#58; 1,8
    Access&#58; &#40;0644/crw-r--r--&#41;  Uid&#58; &#40;    0/    root&#41;   Gid&#58; &#40;    0/    root&#41;
    Access&#58; 2005-05-18 13&#58;16&#58;25.000000000 +0100
    Modify&#58; 2004-06-24 19&#58;04&#58;38.000000000 +0100
    Change&#58; 2005-03-26 12&#58;25&#58;07.000000000 +0000
    Slackware
    Code:
     stat /dev/random
      File&#58; `/dev/random'
      Size&#58; 0               Blocks&#58; 0          IO Block&#58; 131072 character special file
    Device&#58; 3001h/12289d    Inode&#58; 12266       Links&#58; 1     Device type&#58; 1,8
    Access&#58; &#40;0444/cr--r--r--&#41;  Uid&#58; &#40;    0/    root&#41;   Gid&#58; &#40;    0/    root&#41;
    Access&#58; 2005-05-18 13&#58;22&#58;31.000000000 +0100
    Modify&#58; 2005-05-18 13&#58;22&#58;31.000000000 +0100
    Change&#58; 2005-05-18 13&#58;22&#58;31.000000000 +0100
    I have tried to use the standard packages on Slackware and compiled my own but neither resolved the issue. Im at a loss I have openssl on both systems and I have not had any problems in the past using other key gen software products.

    Can anyone shed any light on this!?

    Further information about the bind config

    The BIND 9.3.1 compiled and setup in a chroot environment in the jail I have these files in the dev folder

    root@localhost:/named/dev# ls -al
    total 0
    drwxr-xr-x 2 named named 144 May 18 13:49 ./
    drwx------ 5 named named 120 Jul 10 2004 ../
    srw-rw-rw- 1 root root 0 Mar 20 08:51 log=
    crw-rw-rw- 1 root root 1, 3 Jun 18 2004 null
    crw-rw-rw- 1 root root 1, 8 Jun 18 2004 random
    crw-r--r-- 1 root root 1, 5 May 18 13:49 zero

    I felt that should be enough but I maybe missing another node. However Im not seeing any alternative dev calls. But I may have missed something!

  2. #2
    Linux Newbie
    Join Date
    Mar 2005
    Posts
    230
    Well, I've looked over what you've got there pretty carefully. Apparently on slackware, the tool is having trouble reading from the /dev/random device as you've probably guessed. On redhat, it sets the file handle to non-blocking and starts reading away. On slackware, it sets the file handle to non-blocking and attempts a read but gets the EAGAIN error which means the handle is not yet ready to be read. Appropriately, the slackware version uses the select() function to wait for readable data for infinity. Apparently, the data is never readable from /dev/random.

    The device that is being used is /dev/random. Not the named/dev/random that is in your chroot. The permissions are properly set, which was proven by the successful open on slackware's part. The file also has the correct nodes defined for it as was proven by the successful requirements check made by the slackware on this line:

    stat64("/dev/random", {st_mode=S_IFCHR|0444, st_rdev=makedev(1, 8), ...}) = 0

    That's how you stand. You may have already known all this. At this point I would be writing a program to see if I can read from /dev/random. If not, then I would be looking at the kernel why I am not able to read from /dev/random.

    Course, I'm not an expert on special character files either.

    This document discusses EAGAIN and the random device:
    http://www.die.net/doc/linux/man/man4/random.4.html

  3. #3
    Just Joined!
    Join Date
    Dec 2004
    Location
    United Kingdom
    Posts
    50

    random number generator

    Hello,

    I feel that is the problem. I can use /dev/urandom without any problems. However If I try and use /dev/random I get nothing. as seen by this

    Code:
     dd if=/dev/urandom of=/root/random-seed count=5
    5+0 records in
    5+0 records out
    vs
    Code:
    dd if=/dev/random of=/root/random-seed count=1
    0+0 records in
    0+0 records out
    the /dev/random one was ctrl c'ed after 5minutes with no luck. I can type cat /dev/random on my laptop but not my server. The device nodes appear to be correct based on man urandom that shows the minor number should be 1 and the major number 8.

    If i go and view the /proc/sys/kernel/random/*

    On my Laptop
    Code:
    /proc/sys/kernel/random$ cat entropy_avail
    3375
    On my Server with the problem I get
    Code:
    cat /proc/sys/kernel/random/entropy_avail
    3
    Any ideas?

  4. #4
    Linux Newbie
    Join Date
    Mar 2005
    Posts
    230
    According to the definition of entropy here:
    http://www.answers.com/entropy&r=67

    I'm assuming that your entropy level is an indicator of how random the output is from the random device. I wouldn't think having a low value like 3 would prevent the device from being read, but then, as I said, I'm not an expert on special device files. I just know how to look things up mostly.

    I do not know how to fix this problem. I'm mostly good for programming or BIND related issues.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •