Re: [PATCH] target: remove the auth_type field from iscsi_session

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

 



On Tue, Jun 08, 2021 at 06:40:47PM +0200, Maurizio Lombardi wrote:
> This field is not used anymore so we can remove it.
> 
> Signed-off-by: Maurizio Lombardi <mlombard@xxxxxxxxxx>
> ---
>  drivers/target/iscsi/iscsi_target_nego.c | 5 -----
>  include/target/iscsi/iscsi_target_core.h | 1 -
>  2 files changed, 6 deletions(-)
> 
> diff --git a/drivers/target/iscsi/iscsi_target_nego.c b/drivers/target/iscsi/iscsi_target_nego.c
> index 151e2949bb75..36341ffaffbf 100644
> --- a/drivers/target/iscsi/iscsi_target_nego.c
> +++ b/drivers/target/iscsi/iscsi_target_nego.c
> @@ -144,11 +144,6 @@ static u32 iscsi_handle_authentication(
>  		auth = &iscsit_global->discovery_acl.node_auth;
>  	}
>  
> -	if (strstr("CHAP", authtype))
> -		strcpy(conn->sess->auth_type, "CHAP");
> -	else
> -		strcpy(conn->sess->auth_type, NONE);
> -

Hi Maurizio,

It might still be useful to carry the meaning of "effective auth_type"
in case of complex auth configuration. Otherwise there's no way to check
what auth settings took effect for a particular session/I_T nexus.

I think we should rather print auth_type value someplace in configfs
than delete the field altogether.

Regards,
Roman

>  	if (strstr("None", authtype))
>  		return 1;
>  	else if (strstr("CHAP", authtype))
> diff --git a/include/target/iscsi/iscsi_target_core.h b/include/target/iscsi/iscsi_target_core.h
> index 1eccb2ac7d02..f0495515ca6a 100644
> --- a/include/target/iscsi/iscsi_target_core.h
> +++ b/include/target/iscsi/iscsi_target_core.h
> @@ -647,7 +647,6 @@ struct iscsi_session {
>  
>  	/* LIO specific session ID */
>  	u32			sid;
> -	char			auth_type[8];
>  	/* unique within the target */
>  	int			session_index;
>  	/* Used for session reference counting */
> -- 
> Maurizio Lombardi
> 



[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