Change OstreeFetcher to be dirfd-relative

This is a noticeable cleanup, and fixes another big user of GFile* in
performance/security sensitive codepaths.

I'm specifically making this change because the static deltas code was
leaking temporary files, and cleaning that up nicely would be best if
we were fd relative.
This commit is contained in:
Colin Walters committed 2015-01-14 22:12:08 -05:00
1 parent a7300a828d
commit 9020fe2547
7 files changed
+165 -97

No files matched your search

+5 -3
View File
@@ -54,8 +54,10 @@ typedef enum {
GType _ostree_fetcher_get_type (void) G_GNUC_CONST;
OstreeFetcher *_ostree_fetcher_new (GFile *tmpdir,
OstreeFetcherConfigFlags flags);
OstreeFetcher *_ostree_fetcher_new (int tmpdir_dfd,
OstreeFetcherConfigFlags flags);
int _ostree_fetcher_get_dfd (OstreeFetcher *fetcher);
void _ostree_fetcher_set_proxy (OstreeFetcher *fetcher,
const char *proxy);
@@ -76,7 +78,7 @@ void _ostree_fetcher_request_uri_with_partial_async (OstreeFetcher *self
GAsyncReadyCallback callback,
gpointer user_data);
GFile *_ostree_fetcher_request_uri_with_partial_finish (OstreeFetcher *self,
char *_ostree_fetcher_request_uri_with_partial_finish (OstreeFetcher *self,
GAsyncResult *result,
GError **error);