summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaliy Gusev <gusev.vitaliy@gmail.com>2018-10-10 22:20:57 +0300
committerDan McDonald <danmcd@joyent.com>2018-10-19 13:00:17 -0400
commit62f63298eba531d48f87aa8c2089298cb7821962 (patch)
tree6f6b9b82005fa16f7e6f2ba6a3a0ebae54b1ff25
parenta897f28bdf15b072de311fba1dadf86da4f4b420 (diff)
downloadillumos-joyent-62f63298eba531d48f87aa8c2089298cb7821962.tar.gz
9881 smbd terminated by SIGABRT after smb_account_free()
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com> Reviewed by: Jason King <jason.brian.king@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/lib/smbsrv/libsmb/common/smb_sam.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr/src/lib/smbsrv/libsmb/common/smb_sam.c b/usr/src/lib/smbsrv/libsmb/common/smb_sam.c
index e236b56724..68a7aa2131 100644
--- a/usr/src/lib/smbsrv/libsmb/common/smb_sam.c
+++ b/usr/src/lib/smbsrv/libsmb/common/smb_sam.c
@@ -23,6 +23,7 @@
* Use is subject to license terms.
*
* Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2018 RackTop Systems.
*/
#include <strings.h>
@@ -91,7 +92,7 @@ static smb_lwka_t *smb_lwka_lookup_sid(smb_sid_t *);
*
* NT_STATUS_NOT_FOUND This is not a local account
* NT_STATUS_NONE_MAPPED It's a local account but cannot be
- * translated.
+ * translated.
* other error status codes.
*/
uint32_t
@@ -201,7 +202,7 @@ smb_sam_lookup_name(char *domain, char *name, uint16_t type,
*
* NT_STATUS_NOT_FOUND This is not a local account
* NT_STATUS_NONE_MAPPED It's a local account but cannot be
- * translated.
+ * translated.
* other error status codes.
*/
uint32_t
@@ -477,6 +478,7 @@ smb_sam_grp_ismember(const char *gname, smb_sid_t *sid)
/*
* Frees memories allocated for the passed account fields.
+ * Initializes @account after all.
*/
void
smb_account_free(smb_account_t *account)
@@ -485,6 +487,8 @@ smb_account_free(smb_account_t *account)
free(account->a_domain);
smb_sid_free(account->a_sid);
smb_sid_free(account->a_domsid);
+
+ bzero(account, sizeof (smb_account_t));
}
/*