xfsrestore 3.1.2 segfaults when pathname too long for bind of UNIX domain socket

Nigel Tamplin ntamplin at codefaber.co.uk
Sun Dec 23 18:28:50 CST 2012


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



More information about the xfs mailing list