[Samba] Kodi crashes when trying to browse network

Jeremy Allison jra at samba.org
Fri Nov 2 21:28:04 UTC 2018


On Fri, Nov 02, 2018 at 04:08:14PM -0500, Michael Cronenworth via samba wrote:
> On 11/2/18 2:46 PM, Jeremy Allison via samba wrote:
> > the abort(), which gets triggered if urand_fd == -1
> > after open. So you'll need to debug that.
> 
> Correct. The gdb output I pasted was during the abort. Gdb is showing
> urand_fd is not -1.

Well the code is very simple:

static void open_urandom(void)
{
        if (urand_fd != -1) {
                return;
        }
        urand_fd = open( "/dev/urandom", O_RDONLY,0);
        if (urand_fd == -1) {
                abort();
        }
        smb_set_close_on_exec(urand_fd);
}

if you're getting the abort(), then urand_fd == -1.
If urand_fd != -1 and you're hitting the abort then
you have a compiler bug.



More information about the samba mailing list