mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-22 21:21:28 +00:00
scst: Add support for wildcard matching to the copy manager
Reported-by: L <514005989@qq.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9150 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2823,7 +2823,7 @@ static bool scst_cm_check_access_acg(const char *initiator_name,
|
||||
if (default_acg)
|
||||
goto found;
|
||||
list_for_each_entry(acn, &acg->acn_list, acn_list_entry) {
|
||||
if (strcmp(acn->name, initiator_name) == 0)
|
||||
if (wildcmp(acn->name, initiator_name))
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -379,6 +379,8 @@ int scst_del_free_acg(struct scst_acg *acg, bool close_sessions);
|
||||
void scst_get_acg(struct scst_acg *acg);
|
||||
void scst_put_acg(struct scst_acg *acg);
|
||||
|
||||
bool wildcmp(const char *wild, const char *string);
|
||||
|
||||
struct scst_acg *scst_tgt_find_acg(struct scst_tgt *tgt, const char *name);
|
||||
struct scst_acg *scst_find_acg(const struct scst_session *sess);
|
||||
|
||||
|
||||
@@ -7132,7 +7132,7 @@ static bool __wildcmp(const char *wild, const char *string, int recursion_level)
|
||||
*
|
||||
* Also see comment for __wildcmp().
|
||||
*/
|
||||
static bool wildcmp(const char *wild, const char *string)
|
||||
bool wildcmp(const char *wild, const char *string)
|
||||
{
|
||||
return __wildcmp(wild, string, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user