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

struct ldb_context* ldb_init ( void *  mem_ctx  )  [read]

Initialise an ldb context

This is required before any other LDB call.

Parameters:
mem_ctx pointer to a talloc memory context. Pass NULL if there is no suitable context available.
Returns:
pointer to ldb_context that should be free'd (using talloc_free()) at the end of the program.

Definition at line 42 of file ldb.c.

{
      struct ldb_context *ldb = talloc_zero(mem_ctx, struct ldb_context);
      int ret;

      ret = ldb_setup_wellknown_attributes(ldb);
      if (ret != 0) {
            talloc_free(ldb);
            return NULL;
      }

      ldb_set_utf8_default(ldb);
      ldb_set_create_perms(ldb, 0666);

      return ldb;
}


Generated by  Doxygen 1.6.0   Back to index