Package: debianutils
Version: 4.4+b1
Severity: important

Dear Maintainer,

I think I've found a bug in run-parts and this bug affecs also the cron package.

The man page of run-parts says:
" If  the  --lsbsysinit  option  is given, then the names must not end in
       .dpkg-old  or .dpkg-dist or .dpkg-new or .dpkg-tmp, and must belong  to
       one  or more of the following namespaces: the LANANA-assigned namespace
       (^[a-z0-9]+$);   the   LSB   hierarchical   and   reserved   namespaces
       (^_?([a-z0-9_.]+-)+[a-z0-9]+$);  and  the  Debian cron script namespace
       (^[a-zA-Z0-9_-]+$)
"

So, if I run run-parts with --lsbsysinit option, it should select files with 
filename like "test_file"
because this file belongs to the Debian cron script namespace. But it doesn't 
select it.

For example, I have the next files in /etc/cron.d directory:
$ ls -l /etc/cron.d
total 8
-rw-r--r-- 1 root root 119 oct 23  2013 apticron
-rw-r--r-- 1 root root 355 mar 19  2012 cron-apt
-rw-r--r-- 1 root root  55 jun 26 11:52 test_file


If I run run-parts with --lsbsysinit option and without it, run-parts always 
should select the test_file, 
but it only selects it if --lsbsysinit is not used:
$ run-parts --list /etc/cron.d
/etc/cron.d/apticron
/etc/cron.d/cron-apt
/etc/cron.d/test_file

$ run-parts --list --lsbsysinit /etc/cron.d
/etc/cron.d/apticron
/etc/cron.d/cron-apt

$


According to man page of run-parts, the regexp of Debian cron script namespace 
is 
"^[a-zA-Z0-9_-]+$", so you can check the "test_file" filename belong to this 
namespace:
$ echo test_file | egrep "^[a-zA-Z0-9_-]+$"
test_file

An another problem of this behaviour is that cron doesn't run cronjobs of 
/etc/cron.d with 
filenames belong to the Debian cron script namespace if cron is executed with 
"-l" option.

I've seen this issue, at less, from Debian Wheezy.

Therefore, I think run-parts doesn't behave like run-parts man page says or 
this man page should be fixed
to show that --lsbsysinit option doesn't use the Debian cron script namespace.


Best regards,

Jorge


-- System Information:
Debian Release: 8.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 3.16.0-4-686-pae (SMP w/2 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to es_ES.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages debianutils depends on:
ii  libc6           2.19-18
ii  sensible-utils  0.0.9

debianutils recommends no packages.

debianutils suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to