Mercurial > illumos > git > illumos-omnios
changeset 21433:416a814ef27e
11000 assertion failed in common/fs/smbsrv/smb_sd.c
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Approved by: Garrett D'Amore <garrett@damore.org>
author | Gordon Ross <gwr@nexenta.com> |
---|---|
date | Sat, 13 Aug 2016 12:31:38 -0400 |
parents | 2fc7af213dcd |
children | a3098b60c2fc |
files | usr/src/uts/common/fs/smbsrv/smb_nt_transact_security.c |
diffstat | 1 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/fs/smbsrv/smb_nt_transact_security.c Mon Jun 03 13:19:23 2019 +0000 +++ b/usr/src/uts/common/fs/smbsrv/smb_nt_transact_security.c Sat Aug 13 12:31:38 2016 -0400 @@ -21,7 +21,7 @@ /* * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2014 Nexenta Systems, Inc. All rights reserved. + * Copyright 2016 Nexenta Systems, Inc. All rights reserved. */ #include <smbsrv/smb_kproto.h> @@ -371,6 +371,7 @@ uint32_t group_offs; uint32_t sacl_offs; uint32_t dacl_offs; + int rc; smb_sd_init(sd, SECURITY_DESCRIPTOR_REVISION); @@ -378,13 +379,15 @@ mbc->chain_offset, mbc->max_bytes - mbc->chain_offset); - if (smb_mbc_decodef(&sdbuf, "b.wllll", + rc = smb_mbc_decodef(&sdbuf, "b.wllll", &sd->sd_revision, &sd->sd_control, - &owner_offs, &group_offs, &sacl_offs, &dacl_offs)) + &owner_offs, &group_offs, &sacl_offs, &dacl_offs); + + /* Prevent disallowed flags in smb_sd_term. */ + sd->sd_control &= ~SE_SELF_RELATIVE; + if (rc != 0) goto decode_error; - sd->sd_control &= ~SE_SELF_RELATIVE; - if (owner_offs != 0) { if (owner_offs < SMB_SD_HDRSIZE) goto decode_error;