Lee Duncan
2014-08-26 19:02:42 UTC
Hi all:
I have been playing with target discovery authentication (CHAP) for my
iSCSI targets, and I noticed something I don't understand.
Once I set a discovery mutual userid and password in directory
/sys/kernel/config/target/iscsi/discovery_auth, I see that the value for
"authenticate_target" gets set to 1.
But if I clear out the userid_mutual and password_mutual fields,
authenticate_target is still set.
Looking at the code, the only way it seems I can clear this value is by
writing the literal string "NULL" to either userid_mutual or
password_mutual.
If this is correct, can somebody explain why this is not a bug? It seems
like software trying to interpret the value of these attributes will
have to test for both "" and "NULL" to see if the field is logically empty.
I have been playing with target discovery authentication (CHAP) for my
iSCSI targets, and I noticed something I don't understand.
Once I set a discovery mutual userid and password in directory
/sys/kernel/config/target/iscsi/discovery_auth, I see that the value for
"authenticate_target" gets set to 1.
But if I clear out the userid_mutual and password_mutual fields,
authenticate_target is still set.
Looking at the code, the only way it seems I can clear this value is by
writing the literal string "NULL" to either userid_mutual or
password_mutual.
If this is correct, can somebody explain why this is not a bug? It seems
like software trying to interpret the value of these attributes will
have to test for both "" and "NULL" to see if the field is logically empty.
--
Lee Duncan
Lee Duncan