From: Kern Sibbald Date: Thu, 9 Mar 2017 16:27:51 +0000 (+0100) Subject: Possible fix for acl seg fault on OpenBSD where no acl code defined X-Git-Tag: Release-7.4.6~7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2010b7ae4fe3ff0ac300c8e3f2154c8a13e5aa39;p=bacula%2Fbacula Possible fix for acl seg fault on OpenBSD where no acl code defined --- diff --git a/bacula/src/filed/xacl.c b/bacula/src/filed/xacl.c index 5b60d7d4d6..a66f95a49a 100644 --- a/bacula/src/filed/xacl.c +++ b/bacula/src/filed/xacl.c @@ -1,7 +1,7 @@ /* Bacula(R) - The Network Backup Solution - Copyright (C) 2000-2016 Kern Sibbald + Copyright (C) 2000-2017 Kern Sibbald The original author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -1311,7 +1311,9 @@ bRC_XACL XACL::afs_restore_acl (JCR *jcr, int stream){ /* * Creating the corrent instance of the XACL for a supported OS */ -void *new_xacl(){ +void *new_xacl() +{ + XACL *xacl; #if defined(HAVE_DARWIN_OS) return new XACL_OSX(); #elif defined(HAVE_LINUX_OS) @@ -1328,5 +1330,11 @@ void *new_xacl(){ return new XACL_OSF1(); #elif defined(HAVE_SUN_OS) return new XACL_Solaris(); +#else + /* No driver defined */ + xacl = new XACL(); + xacl->disable_acl(); + xacl->disable_xattr(); + return xacl; #endif };