Hello community,
here is the log from the commit of package cronie for openSUSE:Factory checked in at 2012-01-25 15:01:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cronie (Old)
and /work/SRC/openSUSE:Factory/.cronie.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cronie", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/cronie/cronie.changes 2011-12-06 17:58:42.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.cronie.new/cronie.changes 2012-01-25 15:01:09.000000000 +0100
@@ -1,0 +2,17 @@
+Wed Jan 18 15:15:14 UTC 2012 - tabraham@novell.com
+
+- removed cronie-1.4.7-syslog_output.patch deprecated by this update
+
+- Update to 1.4.8
+ + Cron writes job output to syslog incorrectly. When cron is
+ invoked in a way to print job output to syslog, it does print
+ only the first character of the output
+ + Check orphanded crontabs for adoption
+ + Unify logging in case SyslogOutput with the rest of crond
+ + The charset of anacron's mail is always ANSI_X3.4-1968. There
+ are no setlocale in anacron's source
+ + Cronie disables inotify when the /etc/crontab file does not
+ exist at startup. Existance of crontab and directories wasn't
+ controlled before creating inotify watches.
+
+-------------------------------------------------------------------
Old:
----
cronie-1.4.7-syslog_output.patch
cronie-1.4.7.tar.gz
New:
----
cronie-1.4.8.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cronie.spec ++++++
--- /var/tmp/diff_new_pack.nXCTHO/_old 2012-01-25 15:01:09.000000000 +0100
+++ /var/tmp/diff_new_pack.nXCTHO/_new 2012-01-25 15:01:09.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package cronie
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -14,6 +14,8 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+
+
# 3 : we don't need to do something with /etc/sysconfig/cron for now
%define cron_configs \{/etc/init.d/cron,/etc/pam.d/crond,/etc/crontab,/etc/cron.deny,/etc/omc/srvinfo.d/cron.xml\}
@@ -30,7 +32,7 @@
Recommends: postfix
PreReq: permissions %fillup_prereq %insserv_prereq cron sysvinit(syslog)
%{?systemd_requires}
-Version: 1.4.7
+Version: 1.4.8
Release: 0
%{expand: %%define cronie_version %version}
Summary: Cron Daemon
@@ -51,8 +53,6 @@
Patch4: %name-nheader_lines.diff
# we use cron.pid instead of crond.pid
Patch5: %name-crond_pid.diff
-# PATCH-FIX-UPSTREAM cronie-1.4.7-syslog_output.patch bnc#692871
-Patch6: cronie-1.4.7-syslog_output.patch
# PATCH-FIX-UPSTREAM mention logging disabling for a command in man
Patch7: cronie-1.4.7-disable_logging.patch
# PATCH-FIX-UPSTREAM use run-crons instead of run-parts for anacron (bnc#689494)
@@ -96,7 +96,6 @@
%patch3 -p1
%patch4
%patch5 -p1
-%patch6 -p1
%patch7 -p1
%patch8 -p1
cp %{S:7} ./cron_to_cronie.README
++++++ cronie-1.4.7.tar.gz -> cronie-1.4.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cronie-1.4.7/ChangeLog new/cronie-1.4.8/ChangeLog
--- old/cronie-1.4.7/ChangeLog 2011-03-15 13:13:17.000000000 +0100
+++ new/cronie-1.4.8/ChangeLog 2011-06-27 16:02:25.000000000 +0200
@@ -1,3 +1,44 @@
+2011-06-24 Marcela Mašláňová
+
+ * src/do_command.c: Cron writes job output to syslog incorrectly.
+ When cron is invoked in a way to print job output to syslog, it does
+ print only the first character of the output. Author: Vitezslav
+ Cizek Signed-off-by: Marcela Mašláňová
+
+2011-06-21 Tomas Mraz
+
+ * src/cron.c, src/database.c, src/funcs.h, src/structs.h: Check
+ orphaned crontabs for adoption.
+
+2011-06-21 Tomas Mraz
+
+ * src/do_command.c: Unify logging in case of SyslogOutput with the
+ rest of crond.
+
+2011-05-26 Marcela Mašláňová
+
+ * man/cron.8, man/crontab.1: Change of email adress of cluster
+ support author.
+
+2011-05-16 Kiyoshi OHGISHI
+
+ * anacron/main.c: The charset of anacron's mail is always
+ ANSI_X3.4-1968. There are no setlocale is anacron's source. Signed-off-by: Marcela Mašláňová
+
+2011-04-28 Marcela Mašláňová
+
+ * src/cron.c: Cronie disables inotify support when the /etc/crontab
+ file does not exist at startup. Existence of crontab and directories wasn't controlled before
+ creating inotify watches.
+
+2011-03-15 Marcela Mašláňová
+
+ * configure.ac: Clean configure.
+
+2011-03-15 Marcela Mašláňová
+
+ * ChangeLog, configure.ac: New release 1.4.7.
+
2011-03-15 Marcela Mašláňová
* configure.ac: Split relro and pie into two options.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cronie-1.4.7/anacron/main.c new/cronie-1.4.8/anacron/main.c
--- old/cronie-1.4.7/anacron/main.c 2011-03-15 10:24:56.000000000 +0100
+++ new/cronie-1.4.8/anacron/main.c 2011-05-16 15:42:17.000000000 +0200
@@ -33,6 +33,7 @@
#include
#include
#include
+#include
#include "global.h"
#include "gregor.h"
@@ -442,6 +443,8 @@
anacrontab = NULL;
spooldir = NULL;
+ setlocale(LC_ALL, "");
+
if (gettimeofday(&tv, &tz) != 0)
explain("Can't get exact time, failure.");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cronie-1.4.7/configure new/cronie-1.4.8/configure
--- old/cronie-1.4.7/configure 2011-03-15 14:54:18.000000000 +0100
+++ new/cronie-1.4.8/configure 2011-06-27 16:03:38.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.66 for cronie 1.4.7.
+# Generated by GNU Autoconf 2.66 for cronie 1.4.8.
#
# Report bugs to .
#
@@ -552,8 +552,8 @@
# Identity of this package.
PACKAGE_NAME='cronie'
PACKAGE_TARNAME='cronie'
-PACKAGE_VERSION='1.4.7'
-PACKAGE_STRING='cronie 1.4.7'
+PACKAGE_VERSION='1.4.8'
+PACKAGE_STRING='cronie 1.4.8'
PACKAGE_BUGREPORT='mmaslano@redhat.com'
PACKAGE_URL=''
@@ -1270,7 +1270,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures cronie 1.4.7 to adapt to many kinds of systems.
+\`configure' configures cronie 1.4.8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1340,7 +1340,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of cronie 1.4.7:";;
+ short | recursive ) echo "Configuration of cronie 1.4.8:";;
esac
cat <<\_ACEOF
@@ -1453,7 +1453,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-cronie configure 1.4.7
+cronie configure 1.4.8
generated by GNU Autoconf 2.66
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1933,7 +1933,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by cronie $as_me 1.4.7, which was
+It was created by cronie $as_me 1.4.8, which was
generated by GNU Autoconf 2.66. Invocation command line was
$ $0 $@
@@ -2752,7 +2752,7 @@
# Define the identity of the package.
PACKAGE='cronie'
- VERSION='1.4.7'
+ VERSION='1.4.8'
cat >>confdefs.h <<_ACEOF
@@ -5629,7 +5629,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by cronie $as_me 1.4.7, which was
+This file was extended by cronie $as_me 1.4.8, which was
generated by GNU Autoconf 2.66. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5695,7 +5695,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-cronie config.status 1.4.7
+cronie config.status 1.4.8
configured by $0, generated by GNU Autoconf 2.66,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cronie-1.4.7/configure.ac new/cronie-1.4.8/configure.ac
--- old/cronie-1.4.7/configure.ac 2011-03-15 14:54:13.000000000 +0100
+++ new/cronie-1.4.8/configure.ac 2011-06-27 16:02:03.000000000 +0200
@@ -1,4 +1,4 @@
-AC_INIT([cronie],[1.4.7],[mmaslano@redhat.com])
+AC_INIT([cronie],[1.4.8],[mmaslano@redhat.com])
AC_CONFIG_HEADER([config.h])
AC_PREREQ(2.60)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cronie-1.4.7/man/cron.8 new/cronie-1.4.8/man/cron.8
--- old/cronie-1.4.7/man/cron.8 2010-12-16 09:59:02.000000000 +0100
+++ new/cronie-1.4.8/man/cron.8 2011-05-26 17:43:16.000000000 +0200
@@ -225,4 +225,4 @@
.nf
Paul Vixie
Marcela Mašláňová
-Colin Dean
+Colin Dean
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cronie-1.4.7/man/crontab.1 new/cronie-1.4.8/man/crontab.1
--- old/cronie-1.4.7/man/crontab.1 2010-12-16 09:59:02.000000000 +0100
+++ new/cronie-1.4.8/man/crontab.1 2011-05-26 17:42:54.000000000 +0200
@@ -183,4 +183,4 @@
.SH AUTHOR
.nf
Paul Vixie
-Colin Dean
+Colin Dean
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cronie-1.4.7/src/cron.c new/cronie-1.4.8/src/cron.c
--- old/cronie-1.4.7/src/cron.c 2011-03-15 10:24:56.000000000 +0100
+++ new/cronie-1.4.8/src/cron.c 2011-06-24 12:04:19.000000000 +0200
@@ -87,21 +87,22 @@
for (i = 0; i < sizeof (wd) / sizeof (wd[0]); ++i) {
int w;
- w = inotify_add_watch(fd, watchpaths[i],
- IN_CREATE | IN_CLOSE_WRITE | IN_ATTRIB | IN_MODIFY | IN_MOVED_TO |
- IN_MOVED_FROM | IN_MOVE_SELF | IN_DELETE | IN_DELETE_SELF);
- if (w < 0) {
- if (wd[i] != -1) {
- log_it("CRON", pid, "This directory or file can't be watched",
- watchpaths[i], errno);
- log_it("CRON", pid, "INFO", "running without inotify support",
- 0);
+ if (open(watchpaths[i], O_RDONLY | O_NONBLOCK, 0) != -1) {
+ w = inotify_add_watch(fd, watchpaths[i],
+ IN_CREATE | IN_CLOSE_WRITE | IN_ATTRIB | IN_MODIFY | IN_MOVED_TO |
+ IN_MOVED_FROM | IN_MOVE_SELF | IN_DELETE | IN_DELETE_SELF);
+ if (w < 0) {
+ if (wd[i] != -1) {
+ log_it("CRON", pid, "This directory or file can't be watched",
+ watchpaths[i], errno);
+ log_it("CRON", pid, "INFO", "running without inotify support", 0);
+ }
+ inotify_enabled = 0;
+ set_cron_unwatched(fd);
+ return;
}
- inotify_enabled = 0;
- set_cron_unwatched(fd);
- return;
+ wd[i] = w;
}
- wd[i] = w;
}
if (!inotify_enabled) {
@@ -306,6 +307,7 @@
* clock. Classify the change into one of 4 cases.
*/
timeDiff = timeRunning - virtualTime;
+ check_orphans(&database);
#if defined WITH_INOTIFY
if (inotify_enabled) {
check_inotify_database(&database);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cronie-1.4.7/src/database.c new/cronie-1.4.8/src/database.c
--- old/cronie-1.4.7/src/database.c 2011-03-15 10:24:56.000000000 +0100
+++ new/cronie-1.4.8/src/database.c 2011-06-24 12:04:19.000000000 +0200
@@ -93,12 +93,81 @@
return (crontab_fd);
}
+static orphan *orphans;
+
+static void
+free_orphan(orphan *o) {
+ free(o->tabname);
+ free(o->fname);
+ free(o->uname);
+ free(o);
+}
+
+void
+check_orphans(cron_db *db) {
+ orphan *prev_orphan = NULL;
+ orphan *o = orphans;
+
+ while (o != NULL) {
+ if (getpwnam(o->uname) != NULL) {
+ orphan *next = o->next;
+
+ if (prev_orphan == NULL) {
+ orphans = next;
+ } else {
+ prev_orphan->next = next;
+ }
+
+ process_crontab(o->uname, o->fname, o->tabname,
+ db, NULL);
+
+ /* process_crontab could have added a new orphan */
+ if (prev_orphan == NULL && orphans != next) {
+ prev_orphan = orphans;
+ }
+ free_orphan(o);
+ o = next;
+ } else {
+ prev_orphan = o;
+ o = o->next;
+ }
+ }
+}
+
+static void
+add_orphan(const char *uname, const char *fname, const char *tabname) {
+ orphan *o;
+
+ o = calloc(1, sizeof(*o));
+ if (o == NULL)
+ return;
+
+ if (uname)
+ if ((o->uname=strdup(uname)) == NULL)
+ goto cleanup;
+
+ if (fname)
+ if ((o->fname=strdup(fname)) == NULL)
+ goto cleanup;
+
+ if (tabname)
+ if ((o->tabname=strdup(tabname)) == NULL)
+ goto cleanup;
+
+ o->next = orphans;
+ orphans = o;
+ return;
+
+cleanup:
+ free_orphan(o);
+}
+
static void
process_crontab(const char *uname, const char *fname, const char *tabname,
cron_db * new_db, cron_db * old_db) {
struct passwd *pw = NULL;
int crontab_fd = -1;
- user *u;
+ user *u = NULL;
time_t mtime;
int crond_crontab = (fname == NULL) && (strcmp(tabname, SYSCRONTAB) != 0);
@@ -111,6 +180,8 @@
/* file doesn't have a user in passwd file.
*/
log_it(uname, getpid(), "ORPHAN", "no passwd entry", 0);
+ add_orphan(uname, fname, tabname);
+
goto next_crontab;
}
@@ -119,6 +190,7 @@
Debug(DLOAD, ("\t%s:", fname))
+ if (old_db != NULL)
u = find_user(old_db, fname, crond_crontab ? tabname : NULL); /* find user in old_db */
if (u != NULL) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cronie-1.4.7/src/do_command.c new/cronie-1.4.8/src/do_command.c
--- old/cronie-1.4.7/src/do_command.c 2011-03-15 10:24:56.000000000 +0100
+++ new/cronie-1.4.8/src/do_command.c 2011-06-24 12:05:35.000000000 +0200
@@ -70,7 +70,6 @@
char *input_data, *usernm, *mailto, *mailfrom;
int children = 0;
pid_t pid = getpid();
- pid_t jobpid;
struct sigaction sa;
/* Ignore SIGPIPE as we will be writing to pipes and do not want to terminate
@@ -158,7 +157,7 @@
/* fork again, this time so we can exec the user's command.
*/
- switch ((jobpid = fork())) {
+ switch (fork()) {
case -1:
log_it("CRON", pid, "CAN'T FORK", "child_process", errno);
return ERROR_EXIT;
@@ -346,14 +345,9 @@
int bytes = 1;
int status = 0;
#if defined(SYSLOG)
- char jobtag[64], logbuf[1024];
+ char logbuf[1024];
int bufidx = 0;
- /* according to the NOTES section of openlog(3), jobtag will be
- * used (implicitly) by future calls to syslog(). That's why it
- * was defined outside of the if block here. */
if (SyslogOutput) {
- snprintf(jobtag, sizeof(jobtag), "CROND[%d]", jobpid);
- openlog(jobtag, 0, LOG_CRON);
if (ch != '\n')
logbuf[bufidx++] = ch;
}
@@ -480,7 +474,6 @@
bytes++;
if (mail)
putc(ch, mail);
- }
#if defined(SYSLOG)
if (SyslogOutput) {
logbuf[bufidx++] = ch;
@@ -489,12 +482,12 @@
logbuf[bufidx-1] = '\0';
else
logbuf[bufidx] = '\0';
- syslog(LOG_INFO, "%s", logbuf);
+ log_it(usernm, getpid(), "CMDOUT", logbuf, 0);
bufidx = 0;
}
}
#endif
-
+ }
/* only close pipe if we opened it -- i.e., we're
* mailing...
*/
@@ -513,9 +506,8 @@
if (SyslogOutput) {
if (bufidx) {
logbuf[bufidx] = '\0';
- syslog(LOG_INFO, "%s", logbuf);
+ log_it(usernm, getpid(), "CMDOUT", logbuf, 0);
}
- closelog();
}
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cronie-1.4.7/src/funcs.h new/cronie-1.4.8/src/funcs.h
--- old/cronie-1.4.7/src/funcs.h 2011-03-15 10:24:56.000000000 +0100
+++ new/cronie-1.4.8/src/funcs.h 2011-06-24 12:04:19.000000000 +0200
@@ -39,7 +39,8 @@
acquire_daemonlock(int),
skip_comments(FILE *),
log_it(const char *, PID_T, const char *, const char *, int),
- log_close(void);
+ log_close(void),
+ check_orphans(cron_db *);
#if defined WITH_INOTIFY
void set_cron_watched(int ),
set_cron_unwatched(int ),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cronie-1.4.7/src/structs.h new/cronie-1.4.8/src/structs.h
--- old/cronie-1.4.7/src/structs.h 2010-12-16 09:59:02.000000000 +0100
+++ new/cronie-1.4.8/src/structs.h 2011-06-24 12:04:19.000000000 +0200
@@ -57,6 +57,13 @@
security_context_t scontext; /* SELinux security context */
} user;
+typedef struct _orphan {
+ struct _orphan *next; /* link */
+ char *uname;
+ char *fname;
+ char *tabname;
+} orphan;
+
typedef struct _cron_db {
user *head, *tail; /* links */
time_t mtime; /* last modtime on spooldir */
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org