xfs
[Top] [All Lists]

xfsrestore 3.1.2 segfaults when pathname too long for bind of UNIX domai

To: xfs@xxxxxxxxxxx
Subject: xfsrestore 3.1.2 segfaults when pathname too long for bind of UNIX domain socket
From: Nigel Tamplin <ntamplin@xxxxxxxxxxxxxxx>
Date: Mon, 24 Dec 2012 00:28:50 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20121027 Icedove/3.0.11

This is caused by the error message when the pathname is too long containing 4 format specifiers when only 3 arguments are provided.

restore/content.c:7796

                        if ( strlen( path ) >= sizeof( addr.sun_path )) {
                                mlog( MLOG_VERBOSE | MLOG_WARNING, _(
                                      "pathname too long for bind of "
                                      "%s ino %llu %s: %s: discarding\n"),
                                      printstr,
                                      fhdrp->fh_stat.bs_ino,
                                      path );
                                ( void )close( sockfd );
                                return BOOL_TRUE;
                        }


This problem was preventing me from restoring a backup.

I produced a core dump, found the cause from the core dump and removed the last %s from the format above to allow my restore to run and output the above warning instead of seg faulting.


Nigel

<Prev in Thread] Current Thread [Next in Thread>