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

int ldb_rename ( struct ldb_context *  ldb,
struct ldb_dn *  olddn,
struct ldb_dn *  newdn 
)

Rename a record in the database

This function renames a record in the database.

Parameters:
ldb the context associated with the database (from ldb_init())
olddn the DN for the record to be renamed.
newdn the new DN
Returns:
result code (LDB_SUCCESS if the record was renamed as requested, otherwise a failure code)

Definition at line 1081 of file ldb.c.

References LDB_SUCCESS.

{
      struct ldb_request *req;
      int ret;

      ret = ldb_build_rename_req(&req, ldb, ldb,
                              olddn,
                              newdn,
                              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