From c9620107cbc8eb4330e204228e5fd0c0e9a510fd Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Tue, 31 May 2011 07:12:34 +0200 Subject: [PATCH] fix #709034 - work properly when ACLs are not supported --- logrotate-3.7.9-support-no-acls.patch | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 logrotate-3.7.9-support-no-acls.patch diff --git a/logrotate-3.7.9-support-no-acls.patch b/logrotate-3.7.9-support-no-acls.patch new file mode 100644 index 0000000..103c262 --- /dev/null +++ b/logrotate-3.7.9-support-no-acls.patch @@ -0,0 +1,33 @@ +Index: logrotate.c +=================================================================== +--- logrotate.c (revision 323) ++++ logrotate.c (working copy) +@@ -1323,15 +1323,6 @@ + (int) sb.st_uid, (int) sb.st_gid); + + if (!debug) { +-#ifdef WITH_ACL +- if (prev_acl == NULL && (prev_acl = acl_get_file(log->files[logNum], ACL_TYPE_ACCESS)) == NULL) { +- if (errno != ENOTSUP) { +- message(MESS_ERROR, "getting file ACL %s: %s\n", +- log->files[logNum], strerror(errno)); +- hasErrors = 1; +- } +- } +-#endif /* WITH_ACL */ + if (!hasErrors) { + fd = createOutputFile(log->files[logNum], O_CREAT | O_RDWR, + &sb); +@@ -1363,10 +1354,11 @@ + #endif + + if (!hasErrors +- && log->flags & (LOG_FLAG_COPYTRUNCATE | LOG_FLAG_COPY)) ++ && log->flags & (LOG_FLAG_COPYTRUNCATE | LOG_FLAG_COPY)) { + hasErrors = + copyTruncate(log->files[logNum], rotNames->finalName, + &state->sb, log->flags); ++ } + + #ifdef WITH_ACL + if (prev_acl) {