Scheduling option with specified date do not work #18

Closed
opened 3 years ago by blu.256 · 13 comments
Collaborator

Scheduling options with a specified date do not work (they are not written to user's crontab and are lost when the Schedule dialog is closed).

The following is written to stderr:

"/tmp/tde-pericles/klamav5IKM0I.tmp":16: bad day-of-week
errors in crontab file, can't install.

OS: Arch Linux
Cron: cronie

Scheduling options with a specified date do not work (they are not written to user's crontab and are lost when the Schedule dialog is closed). The following is written to stderr: ``` "/tmp/tde-pericles/klamav5IKM0I.tmp":16: bad day-of-week errors in crontab file, can't install. ``` OS: Arch Linux Cron: cronie
blu.256 changed title from Scan scheduling does not work to Scheduling option with specified date do not work 3 years ago
Poster
Collaborator

Strangely I cannot reproduce this issue with Slackware and dcron. Might be cronie-specific.

--
OS: Slackware64-current
Cron: dcron

Strangely I cannot reproduce this issue with Slackware and dcron. Might be cronie-specific. -- OS: Slackware64-current Cron: dcron
Owner

The following is written to stderr:

"/tmp/tde-pericles/klamav5IKM0I.tmp":16: bad day-of-week
errors in crontab file, can't install.

Maybe the expected format is wrong? Looks like somehing incorrect is written rather than "nothing is written" to me.

> The following is written to stderr: > ``` > "/tmp/tde-pericles/klamav5IKM0I.tmp":16: bad day-of-week > errors in crontab file, can't install. > ``` Maybe the expected format is wrong? Looks like somehing incorrect is written rather than "nothing is written" to me.
Poster
Collaborator

Again, I think this mist be specific to the "cronie" variant on Arch because there is no issue with this on Slackware with dcron.

Again, I think this mist be specific to the "cronie" variant on Arch because there is no issue with this on Slackware with dcron.
Poster
Collaborator

Again, I think this mist be specific to the "cronie" variant on Arch because there is no issue with this on Slackware with dcron.
@MicheleC Could you please check this with your distribution?

Again, I think this mist be specific to the "cronie" variant on Arch because there is no issue with this on Slackware with dcron. @MicheleC Could you please check this with your distribution?
Poster
Collaborator

The strange thing is I cannot even reproduce this bug on Arch/cronie. It must be some rare misbehaviour on behalf of my system.
I'm considering closing this issue.

The strange thing is I cannot even reproduce this bug on Arch/cronie. It must be some rare misbehaviour on behalf of my system. I'm considering closing this issue.
Owner

@MicheleC Could you please check this with your distribution?

Will give it a shot here in Debian.

> @MicheleC Could you please check this with your distribution? Will give it a shot here in Debian.
Owner

well, looks like I have a FTBFS using the latest sources.
I will test again once you fix that 😄

Scanning dependencies of target klamav
make[3]: Leaving directory '/home/atmp/__temp_code/klamav/obj-x86_64-linux-gnu'
/usr/bin/make  -f src/CMakeFiles/klamav.dir/build.make src/CMakeFiles/klamav.dir/build
make[3]: Entering directory '/home/atmp/__temp_code/klamav/obj-x86_64-linux-gnu'
[ 57%] Building CXX object src/CMakeFiles/klamav.dir/main.cpp.o
cd /home/atmp/__temp_code/klamav/obj-x86_64-linux-gnu/src && /usr/bin/g++ -DHAVE_CONFIG_H -I/home/atmp/__temp_code/klamav/obj-x86_64-linux-gnu -I/home/atmp/__temp_code/klamav/obj-x86_64-linux-gnu/src -I/home/atmp/__temp_code/klamav/src -I/opt/trinity/include -I/usr/include/tqt3 -I/usr/include/tqt -I/home/atmp/__temp_code/klamav/src/sqlite -g -O2 -ffile-prefix-map=/home/atmp/__temp_code/klamav=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fdebug-prefix-map=/home/atmp/__temp_code/klamav=. -fmacro-prefix-map=/home/atmp/__temp_code/klamav=. -fvisibility=hidden -fvisibility-inlines-hidden  -DTQT_NO_ASCII_CAST -DTQT_NO_STL -DTQT_NO_COMPAT -DTQT_NO_TRANSLATION -DTQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -I/usr/include/tqt3 -I/usr/include/tqt -DTQT_NO_ASCII_CAST -DTQT_NO_STL -DTQT_NO_COMPAT -DTQT_NO_TRANSLATION -DTQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -DNDEBUG -o CMakeFiles/klamav.dir/main.cpp.o -c /home/atmp/__temp_code/klamav/src/main.cpp
[ 58%] Building CXX object src/CMakeFiles/klamav.dir/klamav.cpp.o
cd /home/atmp/__temp_code/klamav/obj-x86_64-linux-gnu/src && /usr/bin/g++ -DHAVE_CONFIG_H -I/home/atmp/__temp_code/klamav/obj-x86_64-linux-gnu -I/home/atmp/__temp_code/klamav/obj-x86_64-linux-gnu/src -I/home/atmp/__temp_code/klamav/src -I/opt/trinity/include -I/usr/include/tqt3 -I/usr/include/tqt -I/home/atmp/__temp_code/klamav/src/sqlite -g -O2 -ffile-prefix-map=/home/atmp/__temp_code/klamav=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fdebug-prefix-map=/home/atmp/__temp_code/klamav=. -fmacro-prefix-map=/home/atmp/__temp_code/klamav=. -fvisibility=hidden -fvisibility-inlines-hidden  -DTQT_NO_ASCII_CAST -DTQT_NO_STL -DTQT_NO_COMPAT -DTQT_NO_TRANSLATION -DTQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -I/usr/include/tqt3 -I/usr/include/tqt -DTQT_NO_ASCII_CAST -DTQT_NO_STL -DTQT_NO_COMPAT -DTQT_NO_TRANSLATION -DTQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -DNDEBUG -o CMakeFiles/klamav.dir/klamav.cpp.o -c /home/atmp/__temp_code/klamav/src/klamav.cpp
/home/atmp/__temp_code/klamav/src/klamav.cpp: In constructor ‘Klamav::Klamav()’
klamav/src/klamav.cpp:59:3: error: ‘slotOnAccessTrayPixmap’ was not declared in this scope```
well, looks like I have a FTBFS using the latest sources. I will test again once you fix that :smile: ``` Scanning dependencies of target klamav make[3]: Leaving directory '/home/atmp/__temp_code/klamav/obj-x86_64-linux-gnu' /usr/bin/make -f src/CMakeFiles/klamav.dir/build.make src/CMakeFiles/klamav.dir/build make[3]: Entering directory '/home/atmp/__temp_code/klamav/obj-x86_64-linux-gnu' [ 57%] Building CXX object src/CMakeFiles/klamav.dir/main.cpp.o cd /home/atmp/__temp_code/klamav/obj-x86_64-linux-gnu/src && /usr/bin/g++ -DHAVE_CONFIG_H -I/home/atmp/__temp_code/klamav/obj-x86_64-linux-gnu -I/home/atmp/__temp_code/klamav/obj-x86_64-linux-gnu/src -I/home/atmp/__temp_code/klamav/src -I/opt/trinity/include -I/usr/include/tqt3 -I/usr/include/tqt -I/home/atmp/__temp_code/klamav/src/sqlite -g -O2 -ffile-prefix-map=/home/atmp/__temp_code/klamav=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fdebug-prefix-map=/home/atmp/__temp_code/klamav=. -fmacro-prefix-map=/home/atmp/__temp_code/klamav=. -fvisibility=hidden -fvisibility-inlines-hidden -DTQT_NO_ASCII_CAST -DTQT_NO_STL -DTQT_NO_COMPAT -DTQT_NO_TRANSLATION -DTQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -I/usr/include/tqt3 -I/usr/include/tqt -DTQT_NO_ASCII_CAST -DTQT_NO_STL -DTQT_NO_COMPAT -DTQT_NO_TRANSLATION -DTQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -DNDEBUG -o CMakeFiles/klamav.dir/main.cpp.o -c /home/atmp/__temp_code/klamav/src/main.cpp [ 58%] Building CXX object src/CMakeFiles/klamav.dir/klamav.cpp.o cd /home/atmp/__temp_code/klamav/obj-x86_64-linux-gnu/src && /usr/bin/g++ -DHAVE_CONFIG_H -I/home/atmp/__temp_code/klamav/obj-x86_64-linux-gnu -I/home/atmp/__temp_code/klamav/obj-x86_64-linux-gnu/src -I/home/atmp/__temp_code/klamav/src -I/opt/trinity/include -I/usr/include/tqt3 -I/usr/include/tqt -I/home/atmp/__temp_code/klamav/src/sqlite -g -O2 -ffile-prefix-map=/home/atmp/__temp_code/klamav=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fdebug-prefix-map=/home/atmp/__temp_code/klamav=. -fmacro-prefix-map=/home/atmp/__temp_code/klamav=. -fvisibility=hidden -fvisibility-inlines-hidden -DTQT_NO_ASCII_CAST -DTQT_NO_STL -DTQT_NO_COMPAT -DTQT_NO_TRANSLATION -DTQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -I/usr/include/tqt3 -I/usr/include/tqt -DTQT_NO_ASCII_CAST -DTQT_NO_STL -DTQT_NO_COMPAT -DTQT_NO_TRANSLATION -DTQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -DNDEBUG -o CMakeFiles/klamav.dir/klamav.cpp.o -c /home/atmp/__temp_code/klamav/src/klamav.cpp /home/atmp/__temp_code/klamav/src/klamav.cpp: In constructor ‘Klamav::Klamav()’ klamav/src/klamav.cpp:59:3: error: ‘slotOnAccessTrayPixmap’ was not declared in this scope```
Poster
Collaborator

Okay, I have now pushed the fix into master and ensured that the latest sources behave nice ;)

Okay, I have now pushed the fix into master and ensured that the latest sources behave nice ;)
Owner

Thanks Philippe. I tested using the latest code and here are my findings.

  1. code builds fine now
  2. I can add a scheduled scan and I see an entry added in /var/spool/cron/crontabs for the selected time
  3. looking at the code of the entry, it will not work is you are root. The code refers to /home/$USER so it fails when run as root
  4. after fixing the code and running the script manually, KlamAV opens. I get a few TDELauncher errors but then the scan actually works.
  5. TDELauncher seems to crash and I can't start any other program from Kicker until I reboot.
  6. the actual schedule scan does not seem to do anything but likely because TDELauncher had crashed previously.
Thanks Philippe. I tested using the latest code and here are my findings. 1. code builds fine now 2. I can add a scheduled scan and I see an entry added in /var/spool/cron/crontabs for the selected time 3. looking at the code of the entry, it will not work is you are root. The code refers to /home/$USER so it fails when run as root 4. after fixing the code and running the script manually, KlamAV opens. I get a few TDELauncher errors but then the scan actually works. 5. TDELauncher seems to crash and I can't start any other program from Kicker until I reboot. 6. the actual schedule scan does not seem to do anything but likely because TDELauncher had crashed previously.
Poster
Collaborator

Apropos 3: Maybe KlamAV was not meant to be run as root (running a DE as root is considered dangerous by some). Still, I'll create a separate issue for this because this also could possibly concern non-standard home directories (e.g. /users/User01/).
=> Addressed in issue #22.

--
My own findings: The script works fine when launched from the command line (even from a linux terminal) without crashing tdelauncher... puzzling

Apropos 3: Maybe KlamAV was not meant to be run as root (running a DE as root is considered dangerous by some). Still, I'll create a separate issue for this because this also could possibly concern non-standard home directories (e.g. /users/User01/). => Addressed in issue #22. -- My own findings: The script works fine when launched from the command line (even from a linux terminal) without crashing tdelauncher... puzzling
Owner

Apropos 3: Maybe KlamAV was not meant to be run as root (running a DE as root is considered dangerous by some). Still, I'll create a separate issue for this because this also could possibly concern non-standard home directories (e.g. /users/User01/).
=> Addressed in issue #22.

Thanks for fixing this (pending comment made by Slavek there).
As rule of thumb, if something is not meant to be run as root, then it should give a working and exit, as some programs do. Otherwise it should work 😄

> Apropos 3: Maybe KlamAV was not meant to be run as root (running a DE as root is considered dangerous by some). Still, I'll create a separate issue for this because this also could possibly concern non-standard home directories (e.g. /users/User01/). > => Addressed in issue #22. Thanks for fixing this (pending comment made by Slavek there). As rule of thumb, if something is not meant to be run as root, then it should give a working and exit, as some programs do. Otherwise it should work :smile:
Owner
  1. the actual schedule scan does not seem to do anything but likely because TDELauncher had crashed previously.

After further testing, the scheduled file is launched and crashes TDELauncher, resulting in the auto scan not be performed. In .xsession-errors a message about TDELauncher being killed is visible.

> 6. the actual schedule scan does not seem to do anything but likely because TDELauncher had crashed previously. After further testing, the scheduled file is launched and crashes TDELauncher, resulting in the auto scan not be performed. In .xsession-errors a message about TDELauncher being killed is visible.
blu.256 referenced this issue from a commit 3 years ago
Poster
Collaborator

After further testing, the scheduled file is launched and crashes TDELauncher, resulting in the auto scan not be performed. In .xsession-errors a message about TDELauncher being killed is visible.

This is relevant to issue #21. The current issue (with specified dates) seems no more valid as the bug described cannot be reproduced. Thus, any issues related to tdelauncher crashing should go to issue #21.

> After further testing, the scheduled file is launched and crashes TDELauncher, resulting in the auto scan not be performed. In .xsession-errors a message about TDELauncher being killed is visible. This is relevant to issue #21. The current issue (with specified dates) seems no more valid as the bug described cannot be reproduced. Thus, any issues related to tdelauncher crashing should go to issue #21.
blu.256 closed this issue 3 years ago
SlavekB added this to the R14.0.10 release milestone 3 years ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/klamav#18
Loading…
There is no content yet.