return -1;
}
+/**********************************************************
+ *
+ * helper functions
+ *
+ **********************************************************/
+
static bool rpc_conf_reg_valname_forbidden(const char * valname)
{
const char *forbidden_valnames[] = {
return false;
}
+
+/*
+ * The function deletes a registry value with the name 'value' from the share
+ * with the name 'share_name'. 'parent_hnd' is the handle for the smbconf key.
+ */
static NTSTATUS rpc_conf_del_value(TALLOC_CTX *mem_ctx,
struct dcerpc_binding_handle *b,
struct policy_handle *parent_hnd,
return status;;
}
+
+/*
+ * The function sets a share in the registry with the parameters
+ * held in the smbconf_service struct
+ */
static NTSTATUS rpc_conf_set_share(TALLOC_CTX *mem_ctx,
struct dcerpc_binding_handle *b,
struct policy_handle *parent_hnd,
}
+/*
+ * The function opens the registry database and retrieves
+ * as a smbconf_service struct the share with the name
+ * 'share_name'
+ */
static NTSTATUS rpc_conf_get_share(TALLOC_CTX *mem_ctx,
struct dcerpc_binding_handle *b,
struct policy_handle *parent_hnd,
return status;
}
+/*
+ * The function prints the shares held as smbconf_service structs
+ * in a smbconf file format.
+ */
static int rpc_conf_print_shares(uint32_t num_shares,
struct smbconf_service *shares)
{
return 0;
}
+
+/*
+ * The function openes the registry key
+ * HKLM/Software/Samba/smbconf with the give access_mask
+ */
static NTSTATUS rpc_conf_open_conf(TALLOC_CTX *mem_ctx,
struct dcerpc_binding_handle *b,
uint32_t access_mask,
return status;
}
+/**********************************************************
+ *
+ * internal functions that provide the functionality
+ * net rpc conf
+ *
+ **********************************************************/
+
static NTSTATUS rpc_conf_listshares_internal(struct net_context *c,
const struct dom_sid *domain_sid,
const char *domain_name,
status = NT_STATUS_INVALID_PARAMETER;
goto error;
}
-/* try REG_KEY_WRITE */
+
status = rpc_conf_open_conf(frame,
b,
REG_KEY_READ,
}
+/**********************************************************
+ *
+ * Functions that run the rpc commands for net rpc conf modules
+ *
+ **********************************************************/
+
static int rpc_conf_drop(struct net_context *c, int argc,
const char **argv)
{