[Pkg-iscsi-maintainers] [SCM] Debian Open-iSCSI Packaging branch, upstream-mnc, updated. 2.0-872-193-gde2c0e7

Mike Christie michaelc at cs.wisc.edu
Sat Apr 7 15:44:19 UTC 2012


The following commit has been merged in the upstream-mnc branch:
commit 3d87f013c53c3e229e16c79f5d5fa29a9e3fcef8
Author: Mike Christie <michaelc at cs.wisc.edu>
Date:   Wed Mar 28 17:38:41 2012 -0500

    iscsistart: fix invalid param handling
    
    If a invalid param was passed in iscsistart would just exit
    and not cleanup its resources.

diff --git a/usr/idbm.c b/usr/idbm.c
index 971f1e4..d4bb150 100644
--- a/usr/idbm.c
+++ b/usr/idbm.c
@@ -599,11 +599,14 @@ int idbm_rec_update_param(recinfo_t *info, char *name, char *value,
 	int i;
 	int passwd_done = 0;
 	char passwd_len[8];
+	int found = 0;
 
 setup_passwd_len:
 	for (i=0; i<MAX_KEYS; i++) {
 		if (!strcmp(name, info[i].name)) {
 			int j;
+
+			found = 1;
 			log_debug(7, "updated '%s', '%s' => '%s'", name,
 				  info[i].value, value);
 			/* parse recinfo by type */
@@ -658,6 +661,9 @@ setup_passwd_len:
 		}
 	}
 
+	if (!found)
+		log_error("Unknown parameter %s.", name);
+
 	return ISCSI_ERR_INVAL;
 
 updated:
diff --git a/usr/iscsistart.c b/usr/iscsistart.c
index 7eebfbf..6924d49 100644
--- a/usr/iscsistart.c
+++ b/usr/iscsistart.c
@@ -225,7 +225,7 @@ static int login_session(struct node_rec *rec)
 
 	rc = apply_params(rec);
 	if (rc)
-		exit(rc);
+		return rc;
 
 	printf("%s: Logging into %s %s:%d,%d\n", program_name, rec->name,
 		rec->conn[0].address, rec->conn[0].port,

-- 
Debian Open-iSCSI Packaging



More information about the Pkg-iscsi-maintainers mailing list