mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
ksmbd: rate limit unmapped SID errors
A client can include many structurally valid but unmapped SIDs in a DACL.
Logging every mapping failure lets one request generate hundreds of kernel
error messages.
Rate limit the message to prevent an authenticated client from flooding
the kernel log.
Fixes: e2f34481b2 ("cifsd: add server-side procedures for SMB3")
Reported-by: Cheryl Babcock <cheryl@renat.io>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
This commit is contained in:
parent
c61dc7b1b4
commit
feca5e70fc
|
|
@ -528,8 +528,8 @@ static int parse_dacl(struct mnt_idmap *idmap,
|
|||
temp_fattr.cf_uid = INVALID_UID;
|
||||
ret = sid_to_id(idmap, &ppace[i]->sid, SIDOWNER, &temp_fattr);
|
||||
if (ret || uid_eq(temp_fattr.cf_uid, INVALID_UID)) {
|
||||
pr_err("%s: Error %d mapping Owner SID to uid\n",
|
||||
__func__, ret);
|
||||
pr_err_ratelimited("%s: Error %d mapping Owner SID to uid\n",
|
||||
__func__, ret);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user