test forbidden file consistently

This commit is contained in:
IgnorantGuru 2012-07-21 16:42:48 -06:00
parent 0ead43fa84
commit 7435efb31c
2 changed files with 6 additions and 2 deletions

View File

@ -7,6 +7,8 @@
sshfs supplies current user if none specified
cifs no user specified try guest mount then current user
ready for translations - see TRANSLATE
translation independent msg numbers in errors, warnings, and denied msgs
test forbidden file consistently
0.3.0 2012-07-13:
cifs,ftpfs dont quote username, double quote password #3
default udevil.conf: allow option flush

View File

@ -2733,7 +2733,8 @@ _get_type:
g_free( str );
return 2;
}
if ( !validate_in_list( "allowed_files", "file", data->device_file ) )
if ( !validate_in_list( "allowed_files", "file", data->device_file ) ||
validate_in_list( "forbidden_files", "file", data->device_file ) )
{
wlog( _("udevil: denied 49: '%s' is not an allowed file\n"),
data->device_file, 2 );
@ -3220,7 +3221,8 @@ _get_type:
goto _finish;
}
if ( !validate_in_list( "allowed_files", "file", str ) )
if ( !validate_in_list( "allowed_files", "file", str ) ||
validate_in_list( "forbidden_files", "file", str ) )
{
wlog( _("udevil: denied 87: '%s' is not an allowed file\n"),
str, 2 );