Update libgsystem, use it to set dirfd-relative xattrs on symlinks

This is a bit more efficient in that we're not walking full paths, and
it helps avoid security/reliability issues if an attacker (or just a
misbehaving process) has the ability to mutate paths in the middle.
This commit is contained in:
Colin Walters committed 2014-02-26 16:34:37 -05:00
1 parent 0eb8c37ecb
commit 683a719b7e
3 files changed
+7 -10

No files matched your search

+2 -4
View File
@@ -87,12 +87,10 @@ commit_loose_object_trusted (OstreeRepo *self,
goto out;
}
/* Sadly we can't use at-relative API for symlink xattrs
* because there's no lsetxattrat.
*/
if (xattrs != NULL)
{
if (!gs_file_set_all_xattrs (temp_file, xattrs, cancellable, error))
if (!gs_dfd_and_name_set_all_xattrs (self->tmp_dir_fd, temp_filename,
xattrs, cancellable, error))
goto out;
}
}