Package: anacron
Version: 2.3-11
Severity: normal

If jobs are started directly after reboot (from /etc/init.d/anacron, I
presume), they don't have the normal
'cron' environment, but the one inherited from the init process (I had
problems with chkrootkit evaluating $HOME and finding "/" in it, which
is not what root has in his /etc/passwd entry, so I put some debug code
into it; will file a bug against chkrootkit as well):

/etc/cron.daily/chkrootkit:
+ set
AUTOBOOT='YES'
BOOT_IMAGE='linux'
CONSOLE='/dev/console'
HOME='/'
IFS='
'
INIT_VERSION='sysvinit-2.86'
OPTIND='1'
PATH='/sbin:/bin:/usr/sbin:/usr/bin'
PPID='3522'
PREVLEVEL='N'
PS1='# '
PS2='> '
PS4='+ '
PWD='/'
RUNLEVEL='2'
SHELL='/bin/sh'
TERM='linux'
devfs='nomount'
es1371='0x200'
js='auto'
previous='N'
runlevel='2'
+ id
uid=0(root) gid=0(root)
+ /usr/bin/pstree -aAlu
init
  |-S20xprint /etc/rc2.d/S20xprint start
  |   |-S20xprint /etc/rc2.d/S20xprint start
  |   |   `-Xprt -ac -pn -nolisten tcp -audit 4
+-fp/usr/X11R6/lib/X11/fonts/Type1,/usr/lib/X11/fonts/Type1,/var/lib/defoma/x-tt
+cidfont
  |   `-S20xprint /etc/rc2.d/S20xprint start
  |-anacron -s
  |   `-sh -c nice\040run-parts\040--report\040/etc/cron.daily
  |       `-run-parts --report /etc/cron.daily
  |           `-chkrootkit -e /etc/cron.daily/chkrootkit
  |               `-chkrootkit /usr/sbin/chkrootkit -n -q
  |                   `-pstree -aAlu
--snip--

Wouldn't it be more easy for the cron jobs to always be called with the
environment the normal 'cron' calls them with?

Later invocations are called like:
/etc/cron.daily/chkrootkit:
+ set
HOME='/root'
IFS='
'
LOGNAME='root'
OPTIND='1'
PATH='/sbin:/bin:/usr/sbin:/usr/bin'
PPID='5324'
PS1='# '
PS2='> '
PS4='+ '
PWD='/'
SHELL='/bin/sh'
+ id
uid=0(root) gid=0(root) groups=0(root)
+ /usr/bin/pstree -aAlu
init
  |-S20xprint /etc/rc2.d/S20xprint start
  |   |-S20xprint /etc/rc2.d/S20xprint start
  |   |   `-Xprt -ac -pn -nolisten tcp -audit 4
+-fp/usr/X11R6/lib/X11/fonts/Type1,/usr/lib/X11/fonts/Type1,/var/lib/defoma/x-tt
+cidfont
  |   `-S20xprint /etc/rc2.d/S20xprint start
  |-anacron -s
  |   `-sh -c nice\040run-parts\040--report\040/etc/cron.daily
  |       `-run-parts --report /etc/cron.daily
  |           `-chkrootkit -e /etc/cron.daily/chkrootkit
  |               `-chkrootkit /usr/sbin/chkrootkit -n -q
  |                   `-pstree -aAlu
--snip--

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (801, 'testing'), (300, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.10-noname.2
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1)

Versions of packages anacron depends on:
ii  debconf                     1.4.30.12    Debian configuration management sy
ii  debianutils                 2.8.4        Miscellaneous utilities specific t
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an

-- debconf information:
  anacron/jobs_in_crontab:


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

Reply via email to