summaryrefslogtreecommitdiff
path: root/usr/src/lib/libshare/common/plugin.c
diff options
context:
space:
mode:
authorthurlow <none@none>2008-02-13 19:51:22 -0800
committerthurlow <none@none>2008-02-13 19:51:22 -0800
commit4bff34e37def8a90f9194d81bc345c52ba20086a (patch)
tree7bf2710d9da099e3b07fea38e12788bfd565f3c5 /usr/src/lib/libshare/common/plugin.c
parenta916d99c7b27a531bf37c57f83b0b74120fd05bb (diff)
downloadillumos-joyent-4bff34e37def8a90f9194d81bc345c52ba20086a.tar.gz
PSARC 2005/695 CIFS Client on Solaris
PSARC 2007/303 pam_smb_login PSARC 2008/073 CIFS Client on Solaris - Updates 6651904 CIFS Client - PSARC 2005/695
Diffstat (limited to 'usr/src/lib/libshare/common/plugin.c')
-rw-r--r--usr/src/lib/libshare/common/plugin.c35
1 files changed, 32 insertions, 3 deletions
diff --git a/usr/src/lib/libshare/common/plugin.c b/usr/src/lib/libshare/common/plugin.c
index 08856a8951..7e305258cf 100644
--- a/usr/src/lib/libshare/common/plugin.c
+++ b/usr/src/lib/libshare/common/plugin.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -518,8 +518,36 @@ sa_proto_delete_legacy(char *proto, sa_share_t share)
if (ops != NULL) {
if (ops->sa_delete_legacy != NULL)
ret = ops->sa_delete_legacy(share);
- } else if (proto == NULL) {
- ret = SA_INVALID_PROTOCOL;
+ } else {
+ if (proto != NULL)
+ ret = SA_NOT_IMPLEMENTED;
+ else
+ ret = SA_INVALID_PROTOCOL;
+ }
+ return (ret);
+}
+
+/*
+ * sa_proto_delete_section(proto, section)
+ *
+ * Remove the specified section from the protocol specific legacy files,
+ * if supported.
+ */
+
+int
+sa_proto_delete_section(char *proto, char *section)
+{
+ struct sa_plugin_ops *ops = find_protocol(proto);
+ int ret = SA_OK;
+
+ if (ops != NULL) {
+ if (ops->sa_delete_proto_section != NULL)
+ ret = ops->sa_delete_proto_section(section);
+ } else {
+ if (proto != NULL)
+ ret = SA_NOT_IMPLEMENTED;
+ else
+ ret = SA_INVALID_PROTOCOL;
}
return (ret);
}
@@ -540,6 +568,7 @@ sa_proto_change_notify(sa_share_t share, char *proto)
if (ops->sa_change_notify != NULL)
ret = ops->sa_change_notify(share);
} else if (proto == NULL) {
+
ret = SA_INVALID_PROTOCOL;
}
return (ret);