From d35af3b11cd17d326d6fc19e408da76ec8e628fc Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 2 Apr 2008 20:38:55 +0000 Subject: [PATCH] Merge technotes git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.2@6730 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/filed/acl.c | 20 +++++++++++++++++++- bacula/src/version.h | 6 +++--- bacula/technotes-2.1 | 4 +++- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/bacula/src/filed/acl.c b/bacula/src/filed/acl.c index 0c9ce046c7..9eb017ebb0 100644 --- a/bacula/src/filed/acl.c +++ b/bacula/src/filed/acl.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2004-2007 Free Software Foundation Europe e.V. + Copyright (C) 2004-2008 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -176,6 +176,24 @@ int bacl_get(JCR *jcr, int acltype) acl = acl_get_file(jcr->last_fname, ostype); if (acl) { +#if defined(HAVE_IRIX_OS) + /* + * From observation, IRIX's acl_get_file() seems to return a + * non-NULL acl with a count field of -1 when a file has no ACL + * defined, while IRIX's acl_to_text() returns NULL when presented + * with such an ACL. + * + * Checking the count in the acl structure before calling + * acl_to_text() lets us avoid error messages about files + * with no ACLs, without modifying the flow of the code used for + * other operating systems, and it saves making some calls + * to acl_to_text() besides. + */ + if (acl->acl_cnt <= 0) { + acl_free(acl); + return 0; + } +#endif if ((acl_text = acl_to_text(acl, NULL)) != NULL) { len = pm_strcpy(jcr->acl_text, acl_text); acl_free(acl); diff --git a/bacula/src/version.h b/bacula/src/version.h index 6a39399989..f0bbd2f44c 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -3,9 +3,9 @@ */ #undef VERSION -#define VERSION "2.2.9-b4" -#define BDATE "01 April 2008" -#define LSMDATE "01Apr08" +#define VERSION "2.2.9-b5" +#define BDATE "02 April 2008" +#define LSMDATE "02Apr08" #define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n" #define BYEAR "2008" /* year for copyright messages in progs */ diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index 1b108666b7..98d567553b 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -1,7 +1,9 @@ Technical notes on version 2.2 General: -01Apr08 +02Apr08 +kes Apply patch from bug #1069 that corrects spurious error messages + when ACLs enabled on SGI but no ACL exists. ebl Fix a storage deamon segfault at debug level 500. Beta Release Version 2.2.9-b4 -- 2.39.5