Fixed fd leak where files were unlinked w/o being closed first.

patch from upstream
ok sebastia@
This commit is contained in:
giovanni 2014-05-16 14:54:16 +00:00
parent 2d608ca63b
commit a8cb7bdca7
3 changed files with 22 additions and 5 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.37 2014/01/03 18:37:48 sebastia Exp $
# $OpenBSD: Makefile,v 1.38 2014/05/16 14:54:16 giovanni Exp $
COMMENT-main= Skyrix Object Publishing Environment
COMMENT-mysql= SOPE MySQL adaptor
@ -7,6 +7,7 @@ COMMENT-postgres= SOPE PostgreSQL adaptor
VERSION = 2.1.1
DISTNAME = SOPE-${VERSION}b
PKGNAME-main = sope-${VERSION}.1
REVISION-main = 0
PKGNAME-mysql = sope-mysql-${VERSION}.1
PKGNAME-postgres = sope-postgres-${VERSION}.1

View File

@ -1,10 +1,10 @@
$OpenBSD: patch-sope-appserver_NGObjWeb_NSObject+WO_m,v 1.1 2013/10/19 09:48:23 sebastia Exp $
$OpenBSD: patch-sope-appserver_NGObjWeb_NSObject+WO_m,v 1.2 2014/05/16 14:54:16 giovanni Exp $
fix for build with libobjc2-1.7
patch from David Chisnall
--- sope-appserver/NGObjWeb/NSObject+WO.m.orig Thu Oct 17 12:25:53 2013
+++ sope-appserver/NGObjWeb/NSObject+WO.m Thu Oct 17 12:25:53 2013
--- sope-appserver/NGObjWeb/NSObject+WO.m.orig Wed Dec 4 17:51:26 2013
+++ sope-appserver/NGObjWeb/NSObject+WO.m Thu May 15 18:21:20 2014
@@ -259,7 +259,7 @@ IMP WOGetKVCGetMethod(id object, NSString *_key) {
if (object == nil) return NULL;
if (_key == nil) return NULL;
@ -14,7 +14,7 @@ patch from David Chisnall
{
unsigned keyLen;
char *buf;
@@ -313,7 +313,9 @@ id WOGetKVCValueUsingMethod(id object, NSString *_key)
@@ -317,7 +317,9 @@ id WOGetKVCValueUsingMethod(id object, NSString *_key)
return nil;
free(buf); buf = NULL;
}

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-sope-mime_NGMime_NGMimeFileData_m,v 1.1 2014/05/16 14:54:16 giovanni Exp $
Fixed fd leak where files were unlinked w/o being closed first.
https://github.com/inverse-inc/sope/commit/60caf252df2eed12115f05ff5025b54f01b42efb
--- sope-mime/NGMime/NGMimeFileData.m.orig Thu May 15 18:22:04 2014
+++ sope-mime/NGMime/NGMimeFileData.m Thu May 15 18:23:19 2014
@@ -95,6 +95,9 @@ static unsigned tmpmask = 0600;
[self release];
return nil;
}
+
+ close(fd);
+
return [self initWithPath:filename removeFile:YES];
}