mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 02:31:27 +00:00
- Fixes incorrect initiators.allow matching. Reported and tested by Dimitri Puzin <max@psycast.de>.
- Fixes handling of tab character during parsing of initiators.allow and initiators.deny files - IET part of the version updated - TAGS updated - Comments in scst_targ.c about long ago gone scst_unregister_session_ex() fixed git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@812 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
9
TAGS
9
TAGS
@@ -1,7 +1,8 @@
|
||||
In SVN making tags is too heavyweighted. So, I decided instead keep in
|
||||
this file revisions numbers, corresponding to the desired symbolic tags.
|
||||
In SVN making tags is too heavyweighted. So, it was decided to keep
|
||||
instead in this file revisions numbers, corresponding to the desired
|
||||
symbolic tags.
|
||||
|
||||
Tag Revision
|
||||
1.0.0 439
|
||||
1.0.0srpt 450
|
||||
|
||||
SRPT 1.0.0 450
|
||||
1.0.1 805
|
||||
|
||||
@@ -13,4 +13,4 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#define ISCSI_VERSION_STRING "1.0.2/0.4.17r211"
|
||||
#define ISCSI_VERSION_STRING "1.0.2/0.4.17r212"
|
||||
|
||||
@@ -372,7 +372,7 @@ static int __initiator_match(int fd, char *str)
|
||||
return 0;
|
||||
|
||||
while ((p = strsep(&str, ","))) {
|
||||
while (isspace(*p))
|
||||
while (isblank(*p))
|
||||
p++;
|
||||
|
||||
if (!strcmp(p, "ALL"))
|
||||
@@ -423,7 +423,7 @@ static int initiator_match(u32 tid, int fd, char *filename)
|
||||
|
||||
/*
|
||||
* Every time we are called, we read the file. So we don't need to
|
||||
* implement 'reload feature'. It's slow, however, it doesn't matter.
|
||||
* implement the 'reload feature'. It's slow, but that doesn't matter.
|
||||
*/
|
||||
while ((p = fgets(buf, sizeof(buf), fp))) {
|
||||
if (!p || *p == '#')
|
||||
@@ -434,9 +434,14 @@ static int initiator_match(u32 tid, int fd, char *filename)
|
||||
continue;
|
||||
*p = '\0';
|
||||
|
||||
if (!(p = strchr(buf, ' ')))
|
||||
p = buf;
|
||||
while (!isblank(*p) && (*p != '\0'))
|
||||
p++;
|
||||
if (p == '\0')
|
||||
continue;
|
||||
*(p++) = '\0';
|
||||
|
||||
*p = '\0';
|
||||
p++;
|
||||
|
||||
if (target_find_id_by_name(buf) != tid && strcmp(buf, "ALL"))
|
||||
continue;
|
||||
|
||||
@@ -507,15 +507,21 @@ static void login_start(struct connection *conn)
|
||||
}
|
||||
|
||||
target = target_find_by_name(target_name);
|
||||
if ((target == NULL) ||
|
||||
config_initiator_access(conn->tid, conn->fd) ||
|
||||
if (target == NULL) {
|
||||
rsp->status_class = ISCSI_STATUS_INITIATOR_ERR;
|
||||
rsp->status_detail = ISCSI_STATUS_TGT_NOT_FOUND;
|
||||
conn->state = STATE_EXIT;
|
||||
return;
|
||||
}
|
||||
|
||||
conn->tid = target->tid;
|
||||
if (config_initiator_access(conn->tid, conn->fd) ||
|
||||
isns_scn_access(conn->tid, conn->fd, name)) {
|
||||
rsp->status_class = ISCSI_STATUS_INITIATOR_ERR;
|
||||
rsp->status_detail = ISCSI_STATUS_TGT_NOT_FOUND;
|
||||
conn->state = STATE_EXIT;
|
||||
return;
|
||||
}
|
||||
conn->tid = target->tid;
|
||||
|
||||
err = kernel_param_get(conn->tid, conn->sid.id64, key_session,
|
||||
conn->session_param);
|
||||
|
||||
@@ -55,7 +55,7 @@ static inline void scst_schedule_tasklet(struct scst_cmd *cmd)
|
||||
}
|
||||
|
||||
/*
|
||||
* Must not be called in parallel with scst_unregister_session_ex() for the
|
||||
* Must not be called in parallel with scst_unregister_session() for the
|
||||
* same sess
|
||||
*/
|
||||
struct scst_cmd *scst_rx_cmd(struct scst_session *sess,
|
||||
@@ -5110,7 +5110,7 @@ out_unlock:
|
||||
}
|
||||
|
||||
/*
|
||||
* Must not be called in parallel with scst_unregister_session_ex() for the
|
||||
* Must not be called in parallel with scst_unregister_session() for the
|
||||
* same sess
|
||||
*/
|
||||
int scst_rx_mgmt_fn(struct scst_session *sess,
|
||||
|
||||
Reference in New Issue
Block a user