Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 455412 - sys-process/fcron ignores crontabs based on usernames that contain periods
Summary: sys-process/fcron ignores crontabs based on usernames that contain periods
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Wolfram Schlich (RETIRED)
URL:
Whiteboard:
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2013-02-04 11:11 UTC by Alex
Modified: 2013-02-04 19:26 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2013-02-04 11:11:24 UTC
Below is the e-mail I send to the developer at fcron@free.fr

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 Dear Sir,

 I found a wrong behavior in fcron.

 I have problems with crontabs for users which have dots in their usernames.

 For instance I have a user "alexey.koshelev" and its cron tab just not
read AT ALL.

 I found the reason:

lines 109-110 of conf.c say
__________________________________________________________
            else if (strchr(den->d_name, '.') != NULL)
                continue;
__________________________________________________________

 meaning that you just SKIP files in fcron spool dir if filenames
contain a dot.

 Then I have:
__________________________________________________________
kas@phantom ~/fcron-3.1.1 $ sudo /usr/libexec/fcron -fd
2013-02-04 11:55:43 DEBUG   fcronconf=/etc/fcron/fcron.conf
2013-02-04 11:55:43  INFO fcron[3642] 3.1.1 started
2013-02-04 11:55:43 DEBUG Socket initialized : listen_fd : 5 set_max_fd : 5
2013-02-04 11:55:43 DEBUG Entering main loop
2013-02-04 11:55:43  INFO @reboot jobs will only be run at computer's
startup.
2013-02-04 11:55:43  INFO updating configuration from /var/spool/fcron
2013-02-04 11:55:43  INFO adding file systab
2013-02-04 11:55:43 DEBUG User systab Entry
2013-02-04 11:55:43 DEBUG   cmd /etc/cron.daily/prelink next exec
2/5/2013 wday:2 06:00:00 (system time)
2013-02-04 11:55:43 DEBUG   cmd /etc/cron.daily/mlocate next exec
2/5/2013 wday:2 06:00:00 (system time)
2013-02-04 11:55:43 DEBUG   cmd /etc/cron.daily/makewhatis next exec
2/5/2013 wday:2 06:00:00 (system time)
2013-02-04 11:55:43 DEBUG   cmd /etc/cron.daily/logrotate.cron next exec
2/5/2013 wday:2 06:00:00 (system time)
2013-02-04 11:55:43 DEBUG   cmd /etc/cron.weekly/eix-sync next exec
2/10/2013 wday:0 18:00:00 (system time)
2013-02-04 11:55:43 DEBUG   cmd /etc/cron.hourly/psd-resync next exec
2/4/2013 wday:1 11:58:44 (system time)
2013-02-04 11:55:43  INFO adding file alex-kas
2013-02-04 11:55:43 DEBUG User alex-kas Entry
2013-02-04 11:55:43 DEBUG   cmd /home/shared/cron/mail-sync next exec
2/4/2013 wday:1 20:00:00 (system time)
2013-02-04 11:55:43 DEBUG initial sleep time : 181
^Ckas@phantom ~/fcron-3.1.1 $ sudo fcrontab -u alexey.koshelev -l
2013-02-04 11:56:02  INFO listing alexey.koshelev's fcrontab
## SHELL=/bin/bash
#
# Global options
#
!mail(true),mailto(kas),forcemail(true),noticenotrun(true),bootrun(true),nolog(false)
#
# Daily jobs
#
& 15 08,20 * * * /home/shared/cron/mail-sync
#
# Weekly jobs
#
#
# Hourly jobs
#
kas@phantom ~/fcron-3.1.1 $ sudo ls -al /var/spool/fcron
total 32
drwsrws--- 2 fcron fcron 4096 февр.  4 11:12 .
drwxr-xr-x 7 root  root  4096 мая   21  2012 ..
-rw-r--r-- 1 root  root     0 янв.  28 00:11 .keep_sys-process_fcron-0
-rw------- 1 root  root   148 февр.  4 11:12 alex-kas
-rw-r----- 1 fcron fcron  224 февр.  1 10:16 alex-kas.orig
-rw------- 1 root  root   162 февр.  4 01:43 alexey.koshelev
-rw-r----- 1 fcron fcron  224 февр.  4 00:46 alexey.koshelev.orig
-rw------- 1 root  root   666 февр.  4 11:12 systab
-rw------- 1 root  fcron  469 нояб. 19 16:36 systab.orig
kas@phantom ~/fcron-3.1.1 $
__________________________________________________________

 You see from this sequence of outputs that the crontab for
"alexey.koshelev" does not come up at fcron start BUT the crontab for
"alexey.koshelev" exists

 I believe this must be fixed somehow.

 I understand that you wanted to make the dot "." as an indicator of the
"*.orig" files. I also understand that allowing dot "." you will have to
create some other distinguishing feature for the ORIGINAL crontabs. Let
say, allowing the dot may cause problems if come username is
"funny.orig". BUT, since usernames with dots are legitimate some
solution for this should be.

 To be clear, I extremely need this. I cannot prevent users having dot
"." in their usernames.

 I would be happy to have any idea about this implemented. I also will
try myself to figure out the problem. May be, I'll find something.

 Thanks in advance,

With best regards,
Alex
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2013-02-04 19:26:36 UTC
Reopen if upstream releases a new version or you have a patch.