summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-01-15 16:07:14 +0000
committerGerald Carter <jerry@samba.org>2003-01-15 16:07:14 +0000
commit43e4cae106ebc581994dccbf1cc4c9c9559e3e8a (patch)
tree9321ad16d9eae20b4a269e1ad1b12448ce5e2385 /source3/libads
parent58fe4d9c20203f6f55c8e995402e156becb91b3e (diff)
downloadsamba-43e4cae106ebc581994dccbf1cc4c9c9559e3e8a.tar.gz
samba-43e4cae106ebc581994dccbf1cc4c9c9559e3e8a.tar.bz2
samba-43e4cae106ebc581994dccbf1cc4c9c9559e3e8a.zip
* removed unused variable from rpcclient code
* added container option to net command (patch from SuSE) * Makefile patch for examples/VFS from SuSE (This used to be commit 4a6d8280ea27ca7a6998219aacc4b15b1227a659)
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/ldap_user.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/libads/ldap_user.c b/source3/libads/ldap_user.c
index de19e2da5e..2e38e7a00d 100644
--- a/source3/libads/ldap_user.c
+++ b/source3/libads/ldap_user.c
@@ -38,7 +38,7 @@ ADS_STATUS ads_find_user_acct(ADS_STRUCT *ads, void **res, const char *user)
}
ADS_STATUS ads_add_user_acct(ADS_STRUCT *ads, const char *user,
- const char *fullname)
+ const char *container, const char *fullname)
{
TALLOC_CTX *ctx;
ADS_MODLIST mods;
@@ -57,7 +57,7 @@ ADS_STATUS ads_add_user_acct(ADS_STRUCT *ads, const char *user,
if (!(upn = talloc_asprintf(ctx, "%s@%s", user, ads->config.realm)))
goto done;
- if (!(new_dn = talloc_asprintf(ctx, "cn=%s,cn=Users,%s", name,
+ if (!(new_dn = talloc_asprintf(ctx, "cn=%s,%s,%s", name, container,
ads->config.bind_path)))
goto done;
if (!(controlstr = talloc_asprintf(ctx, "%u", UF_NORMAL_ACCOUNT)))
@@ -80,7 +80,7 @@ ADS_STATUS ads_add_user_acct(ADS_STRUCT *ads, const char *user,
}
ADS_STATUS ads_add_group_acct(ADS_STRUCT *ads, const char *group,
- const char *comment)
+ const char *container, const char *comment)
{
TALLOC_CTX *ctx;
ADS_MODLIST mods;
@@ -93,7 +93,7 @@ ADS_STATUS ads_add_group_acct(ADS_STRUCT *ads, const char *group,
status = ADS_ERROR(LDAP_NO_MEMORY);
- if (!(new_dn = talloc_asprintf(ctx, "cn=%s,cn=Users,%s", group,
+ if (!(new_dn = talloc_asprintf(ctx, "cn=%s,%s,%s", group, container,
ads->config.bind_path)))
goto done;
if (!(mods = ads_init_mods(ctx)))
@@ -102,7 +102,7 @@ ADS_STATUS ads_add_group_acct(ADS_STRUCT *ads, const char *group,
ads_mod_str(ctx, &mods, "cn", group);
ads_mod_strlist(ctx, &mods, "objectClass",objectClass);
ads_mod_str(ctx, &mods, "name", group);
- if (comment)
+ if (comment && *comment)
ads_mod_str(ctx, &mods, "description", comment);
ads_mod_str(ctx, &mods, "sAMAccountName", group);
status = ads_gen_add(ads, new_dn, mods);