summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-02-12 16:51:08 +0100
committerVolker Lendecke <vl@samba.org>2011-02-13 12:11:52 +0100
commit158c1e315b2b680dad56d1b14ccfd4679c04c8bc (patch)
treec447bf6f0dbc6086d19a29916716b2615866afb1
parent6375e6993e38483fe2dfb3ce5d039b20b950b438 (diff)
downloadsamba-158c1e315b2b680dad56d1b14ccfd4679c04c8bc.tar.gz
samba-158c1e315b2b680dad56d1b14ccfd4679c04c8bc.tar.bz2
samba-158c1e315b2b680dad56d1b14ccfd4679c04c8bc.zip
s3: Convert tldap_make_mod_fmt args to "array, count"
-rw-r--r--source3/include/tldap_util.h2
-rw-r--r--source3/lib/tldap_util.c2
-rw-r--r--source3/passdb/pdb_ads.c32
3 files changed, 18 insertions, 18 deletions
diff --git a/source3/include/tldap_util.h b/source3/include/tldap_util.h
index 72f9ae2114..d0268fe1d6 100644
--- a/source3/include/tldap_util.h
+++ b/source3/include/tldap_util.h
@@ -42,7 +42,7 @@ bool tldap_make_mod_blob(struct tldap_message *existing, TALLOC_CTX *mem_ctx,
struct tldap_mod **pmods, int *pnum_mods,
const char *attrib, DATA_BLOB newval);
bool tldap_make_mod_fmt(struct tldap_message *existing, TALLOC_CTX *mem_ctx,
- int *pnum_mods, struct tldap_mod **pmods,
+ struct tldap_mod **pmods, int *pnum_mods,
const char *attrib, const char *fmt, ...);
const char *tldap_errstr(TALLOC_CTX *mem_ctx, struct tldap_context *ld,
diff --git a/source3/lib/tldap_util.c b/source3/lib/tldap_util.c
index f125253afd..2646348aa1 100644
--- a/source3/lib/tldap_util.c
+++ b/source3/lib/tldap_util.c
@@ -302,7 +302,7 @@ static int compare_utf8_blobs(const DATA_BLOB *d1, const DATA_BLOB *d2)
}
bool tldap_make_mod_fmt(struct tldap_message *existing, TALLOC_CTX *mem_ctx,
- int *pnum_mods, struct tldap_mod **pmods,
+ struct tldap_mod **pmods, int *pnum_mods,
const char *attrib, const char *fmt, ...)
{
va_list ap;
diff --git a/source3/passdb/pdb_ads.c b/source3/passdb/pdb_ads.c
index 867ad48bdd..99170aacc3 100644
--- a/source3/passdb/pdb_ads.c
+++ b/source3/passdb/pdb_ads.c
@@ -301,7 +301,7 @@ static bool pdb_ads_init_ads_from_sam(struct pdb_ads_state *state,
/* TODO: All fields :-) */
ret &= tldap_make_mod_fmt(
- existing, mem_ctx, pnum_mods, pmods, "displayName",
+ existing, mem_ctx, pmods, pnum_mods, "displayName",
"%s", pdb_get_fullname(sam));
pw = pdb_get_plaintext_passwd(sam);
@@ -340,23 +340,23 @@ static bool pdb_ads_init_ads_from_sam(struct pdb_ads_state *state,
}
ret &= tldap_make_mod_fmt(
- existing, mem_ctx, pnum_mods, pmods, "userAccountControl",
+ existing, mem_ctx, pmods, pnum_mods, "userAccountControl",
"%d", ds_acb2uf(pdb_get_acct_ctrl(sam)));
ret &= tldap_make_mod_fmt(
- existing, mem_ctx, pnum_mods, pmods, "homeDirectory",
+ existing, mem_ctx, pmods, pnum_mods, "homeDirectory",
"%s", pdb_get_homedir(sam));
ret &= tldap_make_mod_fmt(
- existing, mem_ctx, pnum_mods, pmods, "homeDrive",
+ existing, mem_ctx, pmods, pnum_mods, "homeDrive",
"%s", pdb_get_dir_drive(sam));
ret &= tldap_make_mod_fmt(
- existing, mem_ctx, pnum_mods, pmods, "scriptPath",
+ existing, mem_ctx, pmods, pnum_mods, "scriptPath",
"%s", pdb_get_logon_script(sam));
ret &= tldap_make_mod_fmt(
- existing, mem_ctx, pnum_mods, pmods, "profilePath",
+ existing, mem_ctx, pmods, pnum_mods, "profilePath",
"%s", pdb_get_profile_path(sam));
fail:
@@ -507,9 +507,9 @@ static NTSTATUS pdb_ads_create_user(struct pdb_methods *m,
ok = true;
ok &= tldap_make_mod_fmt(
- NULL, talloc_tos(), &num_mods, &mods, "objectClass", "user");
+ NULL, talloc_tos(), &mods, &num_mods, "objectClass", "user");
ok &= tldap_make_mod_fmt(
- NULL, talloc_tos(), &num_mods, &mods, "samAccountName", "%s",
+ NULL, talloc_tos(), &mods, &num_mods, "samAccountName", "%s",
name);
if (!ok) {
return NT_STATUS_NO_MEMORY;
@@ -791,12 +791,12 @@ static NTSTATUS pdb_ads_create_dom_group(struct pdb_methods *m,
}
ok &= tldap_make_mod_fmt(
- NULL, talloc_tos(), &num_mods, &mods, "samAccountName", "%s",
+ NULL, talloc_tos(), &mods, &num_mods, "samAccountName", "%s",
name);
ok &= tldap_make_mod_fmt(
- NULL, talloc_tos(), &num_mods, &mods, "objectClass", "group");
+ NULL, talloc_tos(), &mods, &num_mods, "objectClass", "group");
ok &= tldap_make_mod_fmt(
- NULL, talloc_tos(), &num_mods, &mods, "groupType",
+ NULL, talloc_tos(), &mods, &num_mods, "groupType",
"%d", (int)GTYPE_SECURITY_GLOBAL_GROUP);
if (!ok) {
@@ -1176,12 +1176,12 @@ static NTSTATUS pdb_ads_create_alias(struct pdb_methods *m,
}
ok &= tldap_make_mod_fmt(
- NULL, talloc_tos(), &num_mods, &mods, "samAccountName", "%s",
+ NULL, talloc_tos(), &mods, &num_mods, "samAccountName", "%s",
name);
ok &= tldap_make_mod_fmt(
- NULL, talloc_tos(), &num_mods, &mods, "objectClass", "group");
+ NULL, talloc_tos(), &mods, &num_mods, "objectClass", "group");
ok &= tldap_make_mod_fmt(
- NULL, talloc_tos(), &num_mods, &mods, "groupType",
+ NULL, talloc_tos(), &mods, &num_mods, "groupType",
"%d", (int)GTYPE_SECURITY_DOMAIN_LOCAL_GROUP);
if (!ok) {
@@ -1335,10 +1335,10 @@ static NTSTATUS pdb_ads_set_aliasinfo(struct pdb_methods *m,
ok = true;
ok &= tldap_make_mod_fmt(
- msg[0], msg, &num_mods, &mods, "description",
+ msg[0], msg, &mods, &num_mods, "description",
"%s", info->acct_desc);
ok &= tldap_make_mod_fmt(
- msg[0], msg, &num_mods, &mods, "samAccountName",
+ msg[0], msg, &mods, &num_mods, "samAccountName",
"%s", info->acct_name);
if (!ok) {
TALLOC_FREE(msg);