Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jan 2017 01:29:29 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-amd64@FreeBSD.org
Subject:   [Bug 216127] sbin/restore doesn't honour extended attributes (extattr on ufs)
Message-ID:  <bug-216127-6-OgEiffCHZ1@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-216127-6@https.bugs.freebsd.org/bugzilla/>
References:  <bug-216127-6@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D216127

Conrad Meyer <cem@freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cem@freebsd.org
           Assignee|freebsd-bugs@FreeBSD.org    |cem@freebsd.org

--- Comment #1 from Conrad Meyer <cem@freebsd.org> ---
It appears that dump just dumps raw extattr data from UFS.  The routine in
restore responsible for parsing that raw data and turning it into syscalls =
on
the receiving filesystem is set_extattr_fd() in tape.c.

The intent of the "system, (16 bytes), mb1946a (unable to set)" print is to
print the namespace, extattr data length, and name of the extattr.  The pro=
blem
appears to be that restore is using "%*s" rather than "%.*s" to print the
non-null-terminated eap->ea_name.  The former is the field width, while the
latter is the precision.  Only precision controls the number of characters
printed by a %s format.

The same naive behavior around non-null-terminated ea_name leads to the same
bogus string being passed into extattr_set_fd() (or extattr_set_link, etc f=
or
the other variants) and used to check for ACL attributes.

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-216127-6-OgEiffCHZ1>