summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-07-10 11:37:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:59:21 -0500
commita87dea2a0894015cf4a3140995791f5468c40038 (patch)
tree476f460bcf834519d935fca57ea3b42d0eb858b0 /source4/libcli
parent69c0923c5ea02cd89c5465023692927d30043676 (diff)
downloadsamba-a87dea2a0894015cf4a3140995791f5468c40038.tar.gz
samba-a87dea2a0894015cf4a3140995791f5468c40038.tar.bz2
samba-a87dea2a0894015cf4a3140995791f5468c40038.zip
r23810: Make things static, and remove unsued code.
This includes some of the original ildap ldap client API. ldb provides a much easier abstraction on this to use, and doesn't use these functions. Andrew Bartlett (This used to be commit dc27a7e41c297472675e8c251bb14327a1af3902)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/ldap/ldap_ildap.c114
1 files changed, 0 insertions, 114 deletions
diff --git a/source4/libcli/ldap/ldap_ildap.c b/source4/libcli/ldap/ldap_ildap.c
index 5366e325cb..62019b8cc1 100644
--- a/source4/libcli/ldap/ldap_ildap.c
+++ b/source4/libcli/ldap/ldap_ildap.c
@@ -24,120 +24,6 @@
#include "libcli/ldap/ldap.h"
#include "libcli/ldap/ldap_client.h"
-/*
- delete a record
- */
-NTSTATUS ildap_delete(struct ldap_connection *conn, const char *dn)
-{
- struct ldap_message *msg;
- NTSTATUS status;
-
- msg = new_ldap_message(conn);
- NT_STATUS_HAVE_NO_MEMORY(msg);
-
- msg->type = LDAP_TAG_DelRequest;
- msg->r.DelRequest.dn = dn;
-
- status = ldap_transaction(conn, msg);
-
- talloc_free(msg);
-
- return status;
-}
-
-/*
- add a record
- */
-NTSTATUS ildap_add(struct ldap_connection *conn, const char *dn, struct ldap_mod **mods)
-{
- struct ldap_message *msg;
- int n, i;
- NTSTATUS status;
-
- msg = new_ldap_message(conn);
- NT_STATUS_HAVE_NO_MEMORY(msg);
-
- for (n=0;mods[n];n++) /* noop */ ;
-
- msg->type = LDAP_TAG_AddRequest;
- msg->r.AddRequest.dn = dn;
- msg->r.AddRequest.num_attributes = n;
- msg->r.AddRequest.attributes = talloc_array(msg, struct ldb_message_element, n);
- if (msg->r.AddRequest.attributes == NULL) {
- talloc_free(msg);
- return NT_STATUS_NO_MEMORY;
- }
- for (i=0;i<n;i++) {
- msg->r.AddRequest.attributes[i] = mods[i]->attrib;
- }
-
- status = ldap_transaction(conn, msg);
-
- talloc_free(msg);
-
- return status;
-}
-
-
-/*
- modify a record
- */
-NTSTATUS ildap_modify(struct ldap_connection *conn, const char *dn, struct ldap_mod **mods)
-{
- struct ldap_message *msg;
- int n, i;
- NTSTATUS status;
-
- msg = new_ldap_message(conn);
- NT_STATUS_HAVE_NO_MEMORY(msg);
-
- for (n=0;mods[n];n++) /* noop */ ;
-
- msg->type = LDAP_TAG_ModifyRequest;
- msg->r.ModifyRequest.dn = dn;
- msg->r.ModifyRequest.num_mods = n;
- msg->r.ModifyRequest.mods = talloc_array(msg, struct ldap_mod, n);
- if (msg->r.ModifyRequest.mods == NULL) {
- talloc_free(msg);
- return NT_STATUS_NO_MEMORY;
- }
- for (i=0;i<n;i++) {
- msg->r.ModifyRequest.mods[i] = *mods[i];
- }
-
- status = ldap_transaction(conn, msg);
-
- talloc_free(msg);
-
- return status;
-}
-
-
-/*
- rename a record
- */
-NTSTATUS ildap_rename(struct ldap_connection *conn, const char *dn, const char *newrdn,
- const char *parentdn, BOOL deleteolddn)
-{
- struct ldap_message *msg;
- NTSTATUS status;
-
- msg = new_ldap_message(conn);
- NT_STATUS_HAVE_NO_MEMORY(msg);
-
- msg->type = LDAP_TAG_ModifyDNRequest;
- msg->r.ModifyDNRequest.dn = dn;
- msg->r.ModifyDNRequest.newrdn = newrdn;
- msg->r.ModifyDNRequest.deleteolddn = deleteolddn;
- msg->r.ModifyDNRequest.newsuperior = parentdn;
-
- status = ldap_transaction(conn, msg);
-
- talloc_free(msg);
-
- return status;
-}
-
/*
count the returned search entries