[Samba] Samba 4.2.0rc4 fails to start up
Jeremy Allison
jra at samba.org
Tue Feb 10 21:59:21 MST 2015
On Tue, Feb 10, 2015 at 10:25:06PM -0500, Thomas Schulz wrote:
>
> DEBUG(1, ("unique is %u\n", unique));
> unique_len = snprintf(buf, sizeof(buf), "%ju\n", (uintmax_t)unique);
> DEBUG(1, ("unique_len is: %i\n", unique_len));
>
> /* shorten a potentially preexisting file */
>
> ret = ftruncate(lockfile_fd, unique_len);
> if (ret == -1) {
> ret = errno;
> DEBUG(1, ("%s: ftruncate failed: %s\n", __func__,
> strerror(ret)));
> goto fail_unlink;
> }
>
> And the output of ./smbd -i -d 2 is:
>
> lock file name is: /opt/local/samba4/var/cache/lck/7561
> unique is 0
> unique_len is: -1
> messaging_dgm_lockfile_create: ftruncate failed: Invalid argument
> messaging_dgm_init: messaging_dgm_create_lockfile failed: Invalid argument
> messaging_dgm_init failed: Invalid argument
Ah ok - I expected as much. snprintf seems to be
broken in that it's returning -1.
Is this our snprintf or one from Solaris ? Can
you try and track down why it's returning -1 ?
More information about the samba
mailing list