mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 10:44:14 +08:00
ksmbd: return STATUS_BAD_NETWORK_NAME error status if share is not configured
If share is not configured in smb.conf, smb2 tree connect should return STATUS_BAD_NETWORK_NAME instead of STATUS_BAD_NETWORK_PATH. Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
eb555cb5b7
commit
fe54833dc8
@ -19,7 +19,7 @@ struct ksmbd_tree_conn_status
|
||||
ksmbd_tree_conn_connect(struct ksmbd_conn *conn, struct ksmbd_session *sess,
|
||||
char *share_name)
|
||||
{
|
||||
struct ksmbd_tree_conn_status status = {-EINVAL, NULL};
|
||||
struct ksmbd_tree_conn_status status = {-ENOENT, NULL};
|
||||
struct ksmbd_tree_connect_response *resp = NULL;
|
||||
struct ksmbd_share_config *sc;
|
||||
struct ksmbd_tree_connect *tree_conn = NULL;
|
||||
|
@ -1944,8 +1944,9 @@ out_err1:
|
||||
rsp->hdr.Status = STATUS_SUCCESS;
|
||||
rc = 0;
|
||||
break;
|
||||
case -ENOENT:
|
||||
case KSMBD_TREE_CONN_STATUS_NO_SHARE:
|
||||
rsp->hdr.Status = STATUS_BAD_NETWORK_PATH;
|
||||
rsp->hdr.Status = STATUS_BAD_NETWORK_NAME;
|
||||
break;
|
||||
case -ENOMEM:
|
||||
case KSMBD_TREE_CONN_STATUS_NOMEM:
|
||||
|
Loading…
Reference in New Issue
Block a user