Your message dated Fri, 24 Oct 2014 15:35:22 +0000
with message-id <[email protected]>
and subject line Bug#570423: fixed in cron 3.0pl1-125
has caused the Debian Bug report #570423,
regarding cron: hostname abbreviated
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
570423: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=570423
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: cron
Version: 3.0pl1-106
Severity: wishlist
Tags: patch

When cron sends email, it includes the hostname in the subject.  Except,
it abbreviates it to the part before the first ".".  That seems kind of
pointless for me except as a matter of overzealous brevity.  Moreover, I
have systems in different domains with the same first part of the
hostname.  So I would like cron to report the whole thing.

This isn't a big deal as I can easily distinguish the mails by their
email addresses, but it's nice for the subject to be clear.  Anyway, up
to you.

I'm appending a patch.  Nobody else was using the function first_word,
so I removed it.

Andrew

--- cron.h.orig 2010-02-18 18:01:19.000000000 +0000
+++ cron.h      2010-02-18 18:01:21.000000000 +0000
@@ -235,7 +235,6 @@
 char           *env_get __P((char *, char **)),
                *arpadate __P((time_t *)),
                *mkprints __P((unsigned char *, unsigned int)),
-               *first_word __P((char *, char *)),
                **env_init __P((void)),
                **env_copy __P((char **)),
                **env_set __P((char **, char *));
--- do_command.c.orig   2010-02-18 18:00:49.000000000 +0000
+++ do_command.c        2010-02-18 18:01:42.000000000 +0000
@@ -511,7 +511,7 @@
                                fprintf(mail, "From: root (Cron Daemon)\n");
                                fprintf(mail, "To: %s\n", mailto);
                                fprintf(mail, "Subject: Cron <%s@%s> %s\n",
-                                       usernm, first_word(hostname, "."),
+                                       usernm, hostname,
                                        e->cmd);
 # if defined(MAIL_DATE)
                                fprintf(mail, "Date: %s\n",
--- misc.c.orig 2010-02-18 18:01:31.000000000 +0000
+++ misc.c      2010-02-18 18:01:04.000000000 +0000
@@ -580,40 +580,6 @@
 }
 
 
-/* two warnings:
- *     (1) this routine is fairly slow
- *     (2) it returns a pointer to static storage
- */
-char *
-first_word(s, t)
-       register char *s;       /* string we want the first word of */
-       register char *t;       /* terminators, implicitly including \0 */
-{
-       static char retbuf[2][MAX_TEMPSTR + 1]; /* sure wish C had GC */
-       static int retsel = 0;
-       register char *rb, *rp;
-
-       /* select a return buffer */
-       retsel = 1-retsel;
-       rb = &retbuf[retsel][0];
-       rp = rb;
-
-       /* skip any leading terminators */
-       while (*s && (NULL != strchr(t, *s))) {
-               s++;
-       }
-
-       /* copy until next terminator or full buffer */
-       while (*s && (NULL == strchr(t, *s)) && (rp < &rb[MAX_TEMPSTR])) {
-               *rp++ = *s++;
-       }
-
-       /* finish the return-string and return it */
-       *rp = '\0';
-       return rb;
-}
-
-
 /* warning:
  *     heavily ascii-dependent.
  */

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-trunk-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages cron depends on:
ii  adduser                       3.112      add and remove users and groups
ii  debianutils                   3.2.2      Miscellaneous utilities specific t
ii  libc6                         2.10.2-5   Embedded GNU C Library: Shared lib
ii  libpam0g                      1.1.1-1    Pluggable Authentication Modules l
ii  libselinux1                   2.0.89-4   SELinux runtime shared libraries
ii  lsb-base                      3.2-23     Linux Standard Base 3.2 init scrip

Versions of packages cron recommends:
ii  exim4                         4.71-3     metapackage to ease Exim MTA (v4) 
ii  exim4-daemon-light [mail-tran 4.71-3     lightweight Exim MTA (v4) daemon
pn  lockfile-progs                <none>     (no description available)

Versions of packages cron suggests:
pn  anacron                       <none>     (no description available)
pn  checksecurity                 <none>     (no description available)
ii  logrotate                     3.7.8-4    Log rotation utility

-- no debconf information



--- End Message ---
--- Begin Message ---
Source: cron
Source-Version: 3.0pl1-125

We believe that the bug you reported is fixed in the latest version of
cron, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Javier Fernández-Sanguino Peña <[email protected]> (supplier of updated cron 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 24 Oct 2014 16:17:56 +0200
Source: cron
Binary: cron
Architecture: source i386
Version: 3.0pl1-125
Distribution: unstable
Urgency: medium
Maintainer: Javier Fernández-Sanguino Peña <[email protected]>
Changed-By: Javier Fernández-Sanguino Peña <[email protected]>
Description:
 cron       - process scheduling daemon
Closes: 570423 686223 691488 694686 702091 732203 733478 749271 752750 753775 
754279
Changes:
 cron (3.0pl1-125) unstable; urgency=medium
 .
   * Acknowledge NMUs. Thanks, Laurent Bigonville and Ansgar Burchardt.
     Closes: #749271
 .
   [ Christian Kastner ]
   * debian/control:
     - Bump Standards-Version to 3.9.6 (no changes needed)
     - Canonicalize Vcs-* URLs
   * debian/copyright:
     - Bump years
     - Don't use spaces in License short name
   * debian/source/lintian-overrides:
     - Drop overrides from pre-UTF-8 debian/control era
   * debian/rules:
     - Extend documentation
   * debian/cron.init:
     - Include winbind in Should-Start/Stop. Closes: #732203
   * crontab.5:
     - Don't use hyphen as a minus sign
   * cron.8:
     - Drop stray words in cron.8. Thanks, Regid Ichira! Closes: #702091
     - Fix misspelled 'sytem'. Thanks, green! Closes: #753775
   * cron.c,crontab.c:
     - Use basename of argv[0] as syslog tag. Closes: #752750
   * cron.c:
      - Use case-insensitive comparison in charset selection. Thanks,
        Malcolm Scott! LP: #1169160
   * entry.c:
     - Detect invalid entry: step specified without a range. Thanks,
       Justin T. Pryzby! Closes: #733478
     - Error out when a command field is too long instead of silently
       truncating it. Closes: #686223, LP: #826702
   * do_command.c:
     - Fix initialization and increment of mailed bytes counter.
       Closes: #691488
   * cron.c, do_command.c:
     - Add an option -n to include FQDN in mail subject. Closes: #570423
 .
   [ brian m. carlson ]
   * config.h, do_command.c:
     - Send proper 8-bit emails by including an appropriate MIME-Version and
       adjusting the Content-Transfer-Encoding header accordingly.
       Closes: #694686
 .
   [ Javier Fernández-Sanguino ]
   * Change systemd definition in order for the daemon to read an honor
     /etc/default/cron (Closes: #754279)
Checksums-Sha1:
 a1f7283b69b7201c0737f9c453047bd7cdc62066 1914 cron_3.0pl1-125.dsc
 a32ebafdf7010e9d2cf6330eed43f30bd0f496fd 172135 cron_3.0pl1-125.diff.gz
 52204aa0a753f796bfe1e1ccec888ab50a8e6f85 95506 cron_3.0pl1-125_i386.deb
Checksums-Sha256:
 21a8d9c7ea48c25dd50b5e72ababdf1f1b70cc970290ad34f6e3cc498730eadc 1914 
cron_3.0pl1-125.dsc
 2e941bff359b45d362ba37818aea84fbe19d8ccb814da3c1db017b9073716a5c 172135 
cron_3.0pl1-125.diff.gz
 45ebb7fffa1ee2a736ef2e71833c660f8007b34275d3dded0bac3f8ed488b701 95506 
cron_3.0pl1-125_i386.deb
Files:
 30ad0fb9c8b7aecb74346edde49f226c 1914 admin important cron_3.0pl1-125.dsc
 7377d85d61783b0ad51567832a92d902 172135 admin important cron_3.0pl1-125.diff.gz
 6f04f561160672eb12d45f19273d1dc5 95506 admin important cron_3.0pl1-125_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIVAwUBVEpiITg8os7RvajdAQgbaQ//dIyTpMEzlg4YCkC38iwb+RSRHcOxAfu/
rgyYqAPcD0E2mDdj4Y427OYFUqoL3XpXWGOtGkhmRe2dwpTR2C5utdnCeON44mTT
O7esI54tZ4tPxFPXzxJOMTH4+MnY3B5N96s1/79AGWMYfgMQodMBNdlnQQ4EJlfV
KqikHdSKeYDxI1ILZ1Pzt0zfCQmh3UOzJ5U5GriUdS+rkvWlDU/ke9SGXdUHYhv6
HXyl/viVygBPPxb3ZcsxCgUwbsdWvQBlSsmrmZNZRoXQQ5LH8UMgunECRSQ6mEio
7H83BA2HJ+4bkls1klXiHbrOY3AOD4EOLvxxgyE83ryOfuKkceE/LMI5Q/0Seggo
SEAeAZKp/1UoGe2eSd8AigcZwIdwqh4UD1Dy7HEukYeFF7LlNxyQaZ1Ln3e9keE4
Spngx6AGXBiEZWFfXraedoW7L4TzXfrkLI6hDDcoIUzLjCg2DZ63qLOzXq/x7kxz
yX/yvKypwDxoCvS2pwGrn4rI6xr4P+A0NuQlsDjr3xUWJylgbtrQBWMPq4NMtgmW
+oqNUnC5ZZtCTAvnDoOiTyZ3vHOlpImTZJiXMvq7hCuRdQBmgNf4JxWlCOAjB++c
95YA0qR5R2p5dLwYvkN0HoMg2BdFaZk0+vqOFimuUMOugOUTC5gjP5jpmjZHtHuB
ssaJLFGsjPE=
=ZZjb
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to