-/*
+/*
ldb database library
Copyright (C) Andrew Tridgell 2004
** NOTE! The following LGPL license applies to the ldb
** library. This does NOT imply that all of Samba is released
** under the LGPL
-
+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
static void usage(void)
{
- printf("Usage: ldbadd <options> <ldif...>\n");
+ printf("Usage: ldbadd <options> <ldif...>\n");
printf("Adds records to a ldb, reading ldif the specified list of files\n\n");
ldb_cmdline_help("ldbadd", stdout);
exit(1);
talloc_free(mem_ctx);
printf("Added %d records with %d failures\n", count, failures);
-
+
return ret;
}
-/*
+/*
ldb database library
Copyright (C) Andrew Tridgell 2004
** NOTE! The following LGPL license applies to the ldb
** library. This does NOT imply that all of Samba is released
** under the LGPL
-
+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
static struct ldb_cmdline *options;
/*
- debug routine
+ debug routine
*/
-static void ldif_write_msg(struct ldb_context *ldb,
- FILE *f,
+static void ldif_write_msg(struct ldb_context *ldb,
+ FILE *f,
enum ldb_changetype changetype,
struct ldb_message *msg)
{
modify a database record so msg1 becomes msg2
returns the number of modified elements
*/
-static int modify_record(struct ldb_context *ldb,
+static int modify_record(struct ldb_context *ldb,
struct ldb_message *msg1,
struct ldb_message *msg2,
struct ldb_control **req_ctrls)
}
if (ldb_modify_ctrl(ldb, mod, req_ctrls) != 0) {
- fprintf(stderr, "failed to modify %s - %s\n",
+ fprintf(stderr, "failed to modify %s - %s\n",
ldb_dn_get_linearized(msg1->dn), ldb_errstring(ldb));
ret = -1;
goto done;
/*
save a set of messages as ldif to a file
*/
-static int save_ldif(struct ldb_context *ldb,
+static int save_ldif(struct ldb_context *ldb,
FILE *f, struct ldb_message **msgs, unsigned int count)
{
unsigned int i;
options = ldb_cmdline_process(ldb, argc, argv, usage);
/* the check for '=' is for compatibility with ldapsearch */
- if (options->argc > 0 &&
+ if (options->argc > 0 &&
strchr(options->argv[0], '=')) {
expression = options->argv[0];
options->argv++;