summaryrefslogtreecommitdiff
path: root/usr/src/lib/libshare/common/scfutil.c
diff options
context:
space:
mode:
authorBill Krier <William.Krier@Sun.COM>2009-12-16 16:39:00 -0800
committerBill Krier <William.Krier@Sun.COM>2009-12-16 16:39:00 -0800
commitfe1c642d06e14b412cd83ae2179303186ab08972 (patch)
treeb27b2a602ecfbc86043f554cfb59660d024334bd /usr/src/lib/libshare/common/scfutil.c
parent692aa5e7d429b5b340228a2c2f58c034b5e8980c (diff)
downloadillumos-joyent-fe1c642d06e14b412cd83ae2179303186ab08972.tar.gz
6879234 ad-container appends domain to value specified
6891756 one-at-a-time mapping functions should be eliminated in favor of one-entry batch requests 6899950 Able to create a folder with name containing invalid character such as|from DOS cmd 6902745 move pathname processing functions into smb_pathname.c 6902738 does not map [UG]IDs with hard-coded mappings into their names 6582184 Provide MSRPC API to Winchester 6902788 Restrict SMB autohome share access to the owner 6901866 empty domain string prevents guest login via CIFS 6908022 Consolidate pathname pre-processing and validation functions into smb_pathname.c 6907680 nds_initialize assert is too aggressive 6608021 No file change notification on file size change 6904471 sa_optionset_name() leaks memory 6763298 Very first remove-share attempt could fail if the share have smb properties set --HG-- rename : usr/src/lib/smbsrv/libmlsvc/common/lsar_open.c => usr/src/lib/smbsrv/libmlsvc/common/lsar_clnt.c rename : usr/src/lib/smbsrv/libmlsvc/common/mlsvc_lsa.c => usr/src/lib/smbsrv/libmlsvc/common/lsar_svc.c rename : usr/src/lib/smbsrv/libmlsvc/common/samr_open.c => usr/src/lib/smbsrv/libmlsvc/common/samr_clnt.c rename : usr/src/lib/smbsrv/libmlsvc/common/mlsvc_sam.c => usr/src/lib/smbsrv/libmlsvc/common/samr_svc.c rename : usr/src/uts/common/fs/smbsrv/smb_path_name_reduction.c => usr/src/uts/common/fs/smbsrv/smb_pathname.c
Diffstat (limited to 'usr/src/lib/libshare/common/scfutil.c')
-rw-r--r--usr/src/lib/libshare/common/scfutil.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/usr/src/lib/libshare/common/scfutil.c b/usr/src/lib/libshare/common/scfutil.c
index f5fabad540..21395d0731 100644
--- a/usr/src/lib/libshare/common/scfutil.c
+++ b/usr/src/lib/libshare/common/scfutil.c
@@ -20,12 +20,10 @@
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/* helper functions for using libscf with sharemgr */
#include <libscf.h>
@@ -1585,7 +1583,7 @@ sa_set_resource_property(scfutilhandle_t *handle, sa_share_t share)
valstr ? valstr : "");
else
(void) snprintf(propstr, strsize, "%s:%s:%s",
- idstr ? idstr : "", valstr ? valstr : "",
+ idstr, valstr ? valstr : "",
description ? description : "");
if (scf_value_set_astring(value, propstr) != 0) {
ret = SA_SYSTEM_ERR;
@@ -1604,16 +1602,29 @@ sa_set_resource_property(scfutilhandle_t *handle, sa_share_t share)
free(propstr);
}
err:
- if (valstr != NULL)
+ if (valstr != NULL) {
sa_free_attr_string(valstr);
- if (idstr != NULL)
+ valstr = NULL;
+ }
+ if (idstr != NULL) {
sa_free_attr_string(idstr);
- if (description != NULL)
+ idstr = NULL;
+ }
+ if (description != NULL) {
sa_free_share_description(description);
+ description = NULL;
+ }
}
/* the entry is in the transaction */
entry = NULL;
+ if (valstr != NULL)
+ sa_free_attr_string(valstr);
+ if (idstr != NULL)
+ sa_free_attr_string(idstr);
+ if (description != NULL)
+ sa_free_share_description(description);
+
if (ret == SA_SYSTEM_ERR) {
switch (scf_error()) {
case SCF_ERROR_PERMISSION_DENIED: