Logo Search packages:      
Sourcecode: ldb version File versions  Download package

int ldb_delete ( struct ldb_context *  ldb,
struct ldb_dn *  dn 
)

Delete a record from the database

This function deletes a record from the database.

Parameters:
ldb the context associated with the database (from ldb_init())
dn the DN for the record to be deleted.
Returns:
result code (LDB_SUCCESS if the record was deleted, otherwise a failure code)

Definition at line 1056 of file ldb.c.

References LDB_SUCCESS.

{
      struct ldb_request *req;
      int ret;

      ret = ldb_build_del_req(&req, ldb, ldb,
                              dn,
                              NULL,
                              NULL,
                              NULL);

      if (ret != LDB_SUCCESS) return ret;

      ldb_set_timeout(ldb, req, 0); /* use default timeout */

      /* do request and autostart a transaction */
      ret = ldb_autotransaction_request(ldb, req);

      talloc_free(req);
      return ret;
}


Generated by  Doxygen 1.6.0   Back to index