diff --git a/TAGS b/TAGS index bef071122..bab0dab12 100644 --- a/TAGS +++ b/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 diff --git a/iscsi-scst/include/iscsi_scst_ver.h b/iscsi-scst/include/iscsi_scst_ver.h index 3c613312c..6d221017d 100644 --- a/iscsi-scst/include/iscsi_scst_ver.h +++ b/iscsi-scst/include/iscsi_scst_ver.h @@ -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" diff --git a/iscsi-scst/usr/config.c b/iscsi-scst/usr/config.c index 56cfc20fe..e7ff36bd7 100644 --- a/iscsi-scst/usr/config.c +++ b/iscsi-scst/usr/config.c @@ -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; diff --git a/iscsi-scst/usr/iscsid.c b/iscsi-scst/usr/iscsid.c index fec8fb953..0b2a1de03 100644 --- a/iscsi-scst/usr/iscsid.c +++ b/iscsi-scst/usr/iscsid.c @@ -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); diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index b2e5978c1..6bd888c58 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -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,