@@ -3031,18 +3031,19 @@ int smb2_open(struct ksmbd_work *work)
3031
3031
}
3032
3032
3033
3033
ksmbd_debug (SMB , "converted name = %s\n" , name );
3034
- if (strchr (name , ':' )) {
3035
- if (!test_share_config_flag (work -> tcon -> share_conf ,
3036
- KSMBD_SHARE_FLAG_STREAMS )) {
3037
- rc = - EBADF ;
3038
- goto err_out2 ;
3039
- }
3040
- rc = parse_stream_name (name , & stream_name , & s_type );
3041
- if (rc < 0 )
3042
- goto err_out2 ;
3043
- }
3044
3034
3045
3035
if (posix_ctxt == false) {
3036
+ if (strchr (name , ':' )) {
3037
+ if (!test_share_config_flag (work -> tcon -> share_conf ,
3038
+ KSMBD_SHARE_FLAG_STREAMS )) {
3039
+ rc = - EBADF ;
3040
+ goto err_out2 ;
3041
+ }
3042
+ rc = parse_stream_name (name , & stream_name , & s_type );
3043
+ if (rc < 0 )
3044
+ goto err_out2 ;
3045
+ }
3046
+
3046
3047
rc = ksmbd_validate_filename (name );
3047
3048
if (rc < 0 )
3048
3049
goto err_out2 ;
@@ -3595,6 +3596,8 @@ int smb2_open(struct ksmbd_work *work)
3595
3596
fp -> attrib_only = !(req -> DesiredAccess & ~(FILE_READ_ATTRIBUTES_LE |
3596
3597
FILE_WRITE_ATTRIBUTES_LE | FILE_SYNCHRONIZE_LE ));
3597
3598
3599
+ fp -> is_posix_ctxt = posix_ctxt ;
3600
+
3598
3601
/* fp should be searchable through ksmbd_inode.m_fp_list
3599
3602
* after daccess, saccess, attrib_only, and stream are
3600
3603
* initialized.
@@ -6280,7 +6283,7 @@ static int smb2_rename(struct ksmbd_work *work,
6280
6283
if (IS_ERR (new_name ))
6281
6284
return PTR_ERR (new_name );
6282
6285
6283
- if (strchr (new_name , ':' )) {
6286
+ if (fp -> is_posix_ctxt == false && strchr (new_name , ':' )) {
6284
6287
int s_type ;
6285
6288
char * xattr_stream_name , * stream_name = NULL ;
6286
6289
size_t xattr_stream_size ;
0 commit comments