projects
/
oweals
/
busybox.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
New common unarchive code.
[oweals/busybox.git]
/
archival
/
libunarchive
/
filter_accept_list.c
1
#include <fnmatch.h>
2
#include <stdlib.h>
3
#include "unarchive.h"
4
/*
5
* Accept names that are in the accept list
6
*/
7
extern char filter_accept_list(const llist_t *accept_list, const llist_t *reject_list, const char *key)
8
{
9
while (accept_list) {
10
if (fnmatch(accept_list->data, key, 0) == 0) {
11
return(EXIT_SUCCESS);
12
}
13
accept_list = accept_list->link;
14
}
15
return(EXIT_FAILURE);
16
}