Bug 674245 - ALLOWDEVFILE do not accept path with spaces
Summary: ALLOWDEVFILE do not accept path with spaces
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: rkhunter
Version: 13
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-01 07:12 UTC by Harald Reindl
Modified: 2011-02-07 18:31 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-02-06 21:48:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
modified rkhunter script (485.29 KB, application/octet-stream)
2011-02-07 18:30 UTC, Kevin Fenzi
no flags Details

Description Harald Reindl 2011-02-01 07:12:25 UTC
[root@srv-rhsoft:~]$ rkhunter --check
Invalid ALLOWDEVFILE configuration option: Invalid pathname: Studio

[root@srv-rhsoft:~]$ cat /etc/rkhunter.conf.local 
ALLOWHIDDENDIR=/etc/.git
ALLOWHIDDENFILE=/etc/.etckeeper
ALLOWHIDDENFILE=/etc/.gitignore

ALLOWDEVFILE="/dev/shm/sem.SWT_Window_Zend\ Studio"

__________________________________


It does not matter if using quotes, backslash, i do simply not find a way to whitelist this file from my php-ide :-(

Comment 1 Kevin Fenzi 2011-02-01 20:46:59 UTC
Does: 

ALLOWDEVFILE=/dev/shm/sem.SWT*

work?

Comment 2 Harald Reindl 2011-02-01 20:55:52 UTC
Not really, something must be really poor coded here if you look at the foldr-listing and what happens :-)

[root@srv-rhsoft:~]$ rkhunter --check
Invalid ALLOWDEVFILE configuration option: Invalid pathname: Studio
Invalid ALLOWDEVFILE configuration option: Invalid pathname: Studio_Launcher


[root@srv-rhsoft:~]$ cat /etc/rkhunter.conf.local
MAIL-ON-WARNING="rhsoft"
IP_CMD=DISABLED
ALLOWPROMISCIF="eth0 eth1"
ALLOWHIDDENDIR=/etc/.git
ALLOWHIDDENFILE=/etc/.etckeeper
ALLOWHIDDENFILE=/etc/.gitignore
ALLOWDEVFILE=/dev/shm/sem.SWT_Window_Zend*


[root@srv-rhsoft:~]$ /bin/ls -1 /dev/shm/ | grep -i Zend
sem.SWT_Window_Zend Studio
sem.SWT_Window_Zend Studio_Launcher

Comment 3 Kevin Fenzi 2011-02-04 23:40:55 UTC
Right. So the problem here is that these parameters expect to be space delimited. ;( 

I'll talk with upstream about a fix. 

Can you get Zend to use a different filename in the mean time?

Comment 4 Harald Reindl 2011-02-05 03:51:50 UTC
as far as i know them - no
lucky that they released a x86_64 after long years of whineing.....

Comment 5 Kevin Fenzi 2011-02-06 02:21:31 UTC
What happens if you use: 

ALLOWDEVFILE=/dev/shm/sem.SWT_Window_Zend%Studio

Comment 6 Harald Reindl 2011-02-06 05:53:31 UTC
Thank you for your help!

No way, it does not stop directly after start with a config error, but the warnings will not go away - no idea what the upstream code does, but it is horrible to see that spaces are a problem like 20 years ago und taht a * uses both files the same way as write them unescaped in the config file is a real warning
__________________________

Warning: Suspicious file types found in /dev:
         /dev/shm/sem.SWT_Window_Zend Studio_Launcher: data
         /dev/shm/sem.SWT_Window_Zend Studio: data
__________________________

[root@srv-rhsoft:~]$ cat /etc/rkhunter.conf.local 
MAIL-ON-WARNING="rhsoft"

IP_CMD=DISABLED
ALLOWPROMISCIF="eth0 eth1"

ALLOWHIDDENDIR=/etc/.git
ALLOWHIDDENFILE=/etc/.etckeeper
ALLOWHIDDENFILE=/etc/.gitignore

ALLOWDEVFILE=/dev/shm/sem.SWT_Window_Zend%Studio
ALLOWDEVFILE=/dev/shm/sem.SWT_Window_Zend%Studio_Launcher
[root@srv-rhsoft:~]$

Comment 7 Kevin Fenzi 2011-02-06 21:48:40 UTC
ok, talking with upstream folks, it seems there's not any way to currently do this. ;( 

I guess for now I would suggest disabling this check on those machines that have this file?

Hopefully they will grow the ability to use "s or \ or even just line delimited, but it's not there yet. 

You can continue discussion of this on the upstream devel list.

Comment 8 Kevin Fenzi 2011-02-07 18:30:17 UTC
Created attachment 477475 [details]
modified rkhunter script

Comment 9 Kevin Fenzi 2011-02-07 18:31:20 UTC
Someone sent me the above modified rkhunter script with support for %'s in ALLOWDEVFILE. 

I've not reviewed the changes or test it, so use at your own risk. 

It sounds like they plan to solve the spaces issue in the next upstream release...


Note You need to log in before you can comment on or make changes to this bug.