search for: 622bda1

Displaying 2 results from an estimated 2 matches for "622bda1".

2014 Aug 08
3
[PATCH] daemon: add CLEANUP_CLOSE
...cleanup_unlink_free))) +#define CLEANUP_CLOSE __attribute__((cleanup(cleanup_close))) #else #define CLEANUP_FREE #define CLEANUP_FREE_STRING_LIST #define CLEANUP_UNLINK_FREE +#define CLEANUP_CLOSE #endif #endif /* GUESTFSD_DAEMON_H */ diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index 622bda1..0a59c84 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -1482,3 +1482,12 @@ cleanup_unlink_free (void *ptr) free (filename); } } + +void +cleanup_close (void *ptr) +{ + int fd = * (int *) ptr; + + if (fd >= 0) + close (fd); +} -- 1.9.3
2014 May 20
14
Re: [PATCH] daemon: scrub-file: resolve the path before calling scrub (RHBZ#1099490).
On Tuesday 20 May 2014 15:56:16 Richard W.M. Jones wrote: > On Tue, May 20, 2014 at 03:33:31PM +0200, Pino Toscano wrote: > > Resolve the given path within the chroot, so scrub can be invoked > > outside the chroot on an already-resolved path. > > Given that realpath is used, its availability is checked manually, > > since scrub-file already depends on the