--- pmount-0.9.13/src/policy.c 2006-08-16 00:00:37.000000000 +0300 +++ pmount-0.9.13.new/src/policy.c 2007-01-18 01:51:50.468998250 +0200 @@ -22,6 +22,7 @@ #include #include #include +#include /************************************************************************* * @@ -402,7 +403,7 @@ regex_t re; regmatch_t match[3]; int result; - const char* whitelist_regex = "^[[:space:]]*([[:alnum:]/_+.\-]+)[[:space:]]*(#.*)?$"; + const char* whitelist_regex = "^[[:space:]]*([[:alnum:]/_+*.\-]+)[[:space:]]*(#.*)?$"; fwl = fopen( WHITELIST, "r" ); if( !fwl ) @@ -428,7 +429,7 @@ line[match[1].rm_eo] = 0; d = line+match[1].rm_so; debug( "comparing %s against whitelisted '%s'\n", device, d); - if( !strcmp( d, device ) ) { + if( !fnmatch(d, device, FNM_PATHNAME) ) { debug( "device_whitlisted(): match, returning 1\n" ); fclose( fwl ); return 1;