From: Ralph Boehme Date: Wed, 16 Jul 2025 14:50:25 +0000 (+0200) Subject: smbstatus: avoid a crash with --json output if the access_mask has SEC_STD_WRITE_OWNER X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b22b84a6948885e69a883e272634d9130c3a5592;p=thirdparty%2Fsamba.git smbstatus: avoid a crash with --json output if the access_mask has SEC_STD_WRITE_OWNER This was missing in access_mask[] triggering an assert when printing the access mask string: ... #4 0x00007ffff79553cc in smb_panic (why=0x207b5c "assert failed: tomap == 0") at ../../lib/util/fault.c:209 #5 0x000000000021ea2c in map_mask_to_json (root_json=0x7fffffffcd60, tomap=524288, table=0x223440 ) at ../../source3/utils/status_json.c:142 ... Signed-off-by: Ralph Boehme Reviewed-by: Volker Lendecke --- diff --git a/source3/utils/status_json.c b/source3/utils/status_json.c index ad25ed5d91b..fba0f40508f 100644 --- a/source3/utils/status_json.c +++ b/source3/utils/status_json.c @@ -157,6 +157,7 @@ static const struct mask2txt access_mask[] = { {SEC_STD_DELETE, "DELETE"}, {SEC_STD_READ_CONTROL, "READ_CONTROL"}, {SEC_STD_WRITE_DAC, "WRITE_DAC"}, + {SEC_STD_WRITE_OWNER, "WRITE_OWNER"}, {SEC_STD_SYNCHRONIZE, "SYNCHRONIZE"}, {SEC_FLAG_SYSTEM_SECURITY, "ACCESS_SYSTEM_SECURITY"}, {0, NULL}