- 26 5月, 2021 8 次提交
-
-
由 Namjae Jeon 提交于
Remove unneeded type casting. Reviewed-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Namjae Jeon 提交于
simplify error handling in ksmbd_auth_ntlm(). Reviewed-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Namjae Jeon 提交于
Move ret check before the out label. Reviewed-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Namjae Jeon 提交于
Just return smbhash() instead of using rc return value. Reviewed-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Namjae Jeon 提交于
Move fips_enabled check before the str_to_key(). Reviewed-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Namjae Jeon 提交于
Add goto fail in neg_token_init_mech_type(). Reviewed-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Namjae Jeon 提交于
Use memcmp instead of for loop check in oid_eq(). Reviewed-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Namjae Jeon 提交于
Add goto fail in asn1_oid_decode() to clean-up exception handling code. Reviewed-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 21 5月, 2021 1 次提交
-
-
由 Wei Yongjun 提交于
Fix build error when CONFIG_OID_REGISTRY is not set: mips-linux-gnu-ld: fs/cifsd/asn1.o: in function `gssapi_this_mech': asn1.c:(.text+0xaa0): undefined reference to `sprint_oid' mips-linux-gnu-ld: fs/cifsd/asn1.o: in function `neg_token_init_mech_type': asn1.c:(.text+0xbec): undefined reference to `sprint_oid' Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 18 5月, 2021 2 次提交
-
-
由 Namjae Jeon 提交于
Add support for FSCTL_DUPLICATE_EXTENTS_TO_FILE in smb2 ioctl. Reviewed-by: NHyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Marios Makassikis 提交于
Returning TreeID=0 is valid behaviour according to [MS-SMB2] 2.2.1.2: TreeId (4 bytes): Uniquely identifies the tree connect for the command. This MUST be 0 for the SMB2 TREE_CONNECT Request. The TreeId can be any unsigned 32-bit integer that is received from a previous SMB2 TREE_CONNECT Response. TreeId SHOULD be set to 0 for the following commands: [...] However, some client implementations reject it as invalid. Windows10 assigns ids starting from 1, and samba4 returns a random uint32_t which suggests there may be other clients that consider it is invalid behaviour. Signed-off-by: NMarios Makassikis <mmakassikis@freebox.fr> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 14 5月, 2021 1 次提交
-
-
由 Namjae Jeon 提交于
If lock length in smb2 lock request from client is over flock max length size, lock length is changed to flock max length and don't return error response. Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 12 5月, 2021 1 次提交
-
-
由 kernel test robot 提交于
fs/cifsd/smb2pdu.c:8098:8-9: WARNING: return of 0/1 in function 'smb2_is_sign_req' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci Reported-by: Nkernel test robot <lkp@intel.com> Signed-off-by: Nkernel test robot <lkp@intel.com> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 11 5月, 2021 27 次提交
-
-
由 Namjae Jeon 提交于
build break from asn1 happened on some environment. CHECK /home/smfrench/smb3-kernel/fs/cifsd/smb2misc.c CC [M] /home/smfrench/smb3-kernel/fs/cifsd/asn1.o /home/smfrench/smb3-kernel/fs/cifsd/asn1.c:21:10: fatal error: spnego_negtokeninit.asn1.h: No such file or directory 21 | #include "spnego_negtokeninit.asn1.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [scripts/Makefile.build:271: /home/smfrench/smb3-kernel/fs/cifsd/asn1.o] Error 1 make: *** [Makefile:1857: /home/smfrench/smb3-kernel/fs/cifsd] Error 2 make: Leaving directory '/usr/src/linux-headers-5.12.0-051200rc8-generic' This patch fix that asn1 compiler build *.asn1 file before compiling asn.c Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Namjae Jeon 提交于
WARNING: Too many leading tabs - consider code refactoring 3066: FILE: fs/cifsd/smb2pdu.c:2733: + if (fattr.cf_dacls) Fix a warning from checkpatch.pl. Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Namjae Jeon 提交于
WARNING: Possible unnecessary 'out of memory' message 902: FILE: fs/cifsd/smb2pdu.c:569: + if (!work->response_buf) { + ksmbd_err("Failed to allocate %zu bytes buffer\n", sz); Fix a warning from checkpatch.pl. Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Hyunchul Lee 提交于
Decode gss token of SMB2_SESSSION_SETUP using lib/asn1_decoder.c Signed-off-by: NHyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Namjae Jeon 提交于
Add missing fp initialzation to prevent invalid memory access in smb2_write(). Reported-by: NCoverity Scan <scan-admin@coverity.com> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Namjae Jeon 提交于
Now that 256 bit encryption can be negotiated, update names of the nonces to match the updated official protocol documentation (e.g. AES_GCM_NONCE instead of AES_128GCM_NONCE) since they apply to both 128 bit and 256 bit encryption. update smb encryption code to set 32 byte key length and to set gcm256/ccm256 when requested on mount. Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Marios Makassikis 提交于
The user field in the session structure is allocated when the client is authenticated. If the client explicitly logs off, the user field is freed, but the session is kept around in case the user reconnects. If the TCP connection hasn't been closed and the client sends a session setup with a PreviousSessionId set, destroy_previous_session() will be called to check if the session needs to be cleaned up. Signed-off-by: NMarios Makassikis <mmakassikis@freebox.fr> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Marios Makassikis 提交于
When processing a SMB2 QUERY_DIRECTORY request, smb2_populate_readdir_entry() is called first to fill the dot/dotdot entries. This moves the d_info->wptr pointer but out_buf_len remains unchanged. As a result, reserve_populate_dentry() may end up writing past the end of the buffer since the bounds checking is done on invalid values. Signed-off-by: NMarios Makassikis <mmakassikis@freebox.fr> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Marios Makassikis 提交于
Currently, a SMB2 client does not receive an error message if ksmbd_session_rpc_open() fails when opening a pipe. Fix this by responding with STATUS_NO_MEMORY or STATUS_INVALID_PARAMETER depending on the error that occurred. Signed-off-by: NMarios Makassikis <mmakassikis@freebox.fr> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Marios Makassikis 提交于
Call smb2_set_err_rsp() in smb2_read/smb2_write error path. Signed-off-by: NMarios Makassikis <mmakassikis@freebox.fr> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Namjae Jeon 提交于
Add ksmbd/nfsd interoperability to feature table and sync with a table in patch cover letter. Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Sebastian Gottschall 提交于
a Windows 10 client isn't able to store files from ksmbd servers due unknown local permission problems (code 0x8007003A) if smb3 encryption is enabled. Windows 10 is requesting for ATTRIBUTE_SECINFO (mask 0x20) which is not yet handled by ksmbd, this leads to a invalid response. For now we just reintroduce the old check to avoid processing of unhandled flags until ATTRIBUTE_SECINFO is properly handled. Signed-off-by: NSebastian Gottschall <s.gottschall@dd-wrt.com> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Marios Makassikis 提交于
Inline it in the only place it is used and remove it. Signed-off-by: NMarios Makassikis <mmakassikis@freebox.fr> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Marios Makassikis 提交于
[MS-SMB2] 3.3.5.21.1 If the object store supports security and FileInfoClass is FileAllocationInformation, FileEndOfFileInformation, or FileValidDataLengthInformation, and Open.GrantedAccess does not include FILE_WRITE_DATA, the server MUST fail the request with STATUS_ACCESS_DENIED. Signed-off-by: NMarios Makassikis <mmakassikis@freebox.fr> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Namjae Jeon 提交于
Remove the dead code of unimplemented durable handle. Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Namjae Jeon 提交于
Use d_inode(). Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Marios Makassikis 提交于
Fix potential null-ptr-deref in smb2_open(). Signed-off-by: NMarios Makassikis <mmakassikis@freebox.fr> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Namjae Jeon 提交于
Move nt time functions in netmisc.c to misc.c to remove netmisc.c file. Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Namjae Jeon 提交于
Remove unused nterr.c file. Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Namjae Jeon 提交于
smberr.h is a leftover of SMB1. This patch remove unused smberr.h. Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Marios Makassikis 提交于
smb2_put_name() is called twice, and both call sites do the IS_ERR() check before. Signed-off-by: NMarios Makassikis <mmakassikis@freebox.fr> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Hyunchul Lee 提交于
__ksmbd_lookup_fd could decrement the reference count of unclaimed ksmbd_file to 0 but not release this ksmbd_file. ksmbd_file cannot be unclaimed except ksmbd_close_inode_fds(), because ksmbd_file is only removed from the m_fp_list list after the reference count of ksmbd_file becomes 0. And if the count is 0, __ksmbd_lookup_fd does not use ksmbd_file found from idr due to atomic_inc_not_zero. Signed-off-by: NHyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Hyunchul Lee 提交于
re-implement ksmbd_vfs_kern_path() to change recursion to iteration. Signed-off-by: NHyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Namjae Jeon 提交于
To remove the file, We have parsed full pathname to divide parent path and filename. It is a better way to get parent dentry from child dentry that obtained by lookup with given pathname. Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Namjae Jeon 提交于
This patch add the check if parent is stable by unexpected rename. Signed-off-by: NHyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Namjae Jeon 提交于
Matthew pointed out that embedding struct ida into the struct is better than having a pointer to it. This patch initialise it statically using DEFINE_IDA() or ida_init() and remove ksmbd_ida_alloc/free(). Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Tian Tao 提交于
Remove including <linux/version.h> that don't need it. Signed-off-by: NTian Tao <tiantao6@hisilicon.com> Signed-off-by: NZhiqi Song <songzhiqi1@huawei.com> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-