Re: A Question about setting discovery_auth values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lee,

Apologies for the long delayed response.  Comments below.

On Tue, 2014-08-26 at 12:02 -0700, Lee Duncan wrote:
> 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.

This is correct.  Existing rtslib code does this translation between
"NULL" and "", and masks this peculiarity from end-users in targetcli.

In retrospect the decision to use NULL here to clear the existing value
was not the ideal solution, but at this point changing how this works
(eg: ABI breakage) is not really an option.

--nab

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




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux