[stgt] [PATCH] only unbind outgoing users which are actually bound to a target

Ian Dall ian at beware.dropbear.id.au
Thu Jun 16 11:37:38 CEST 2011


When multiple targets were bound to different (unique) outgoing users,
deleting one outgoing user would unbind the (different) outgoing user
from all targets.

This corresponds to fedora bug
https://bugzilla.redhat.com/show_bug.cgi?id=712638

The following patch fixes the problem:

--- usr/target.c.outgoing-user-check	2010-01-22 10:30:00.000000000 +1030
+++ usr/target.c	2011-06-15 21:51:56.000000000 +0930
@@ -1301,7 +1301,7 @@
 			if (i == target->account.max_inaccount)
 				err = TGTADM_NO_USER;
 		} else
-			if (target->account.out_aid)
+			if (target->account.out_aid == ac->aid)
 				target->account.out_aid = 0;
 			else
 				err = TGTADM_NO_USER;
 


-- 
Ian Dall <ian at beware.dropbear.id.au>

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list