summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2005-07-29 06:42:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:30:11 -0500
commit5dd9940da8d571691628b31d98fa2bf23fbb8304 (patch)
tree5bd882a33d4cc266e4182f9e618d59b92d14dd8a
parentd14fd78a43195e02a67eb6b93de2f97605754794 (diff)
downloadsamba-5dd9940da8d571691628b31d98fa2bf23fbb8304.tar.gz
samba-5dd9940da8d571691628b31d98fa2bf23fbb8304.tar.bz2
samba-5dd9940da8d571691628b31d98fa2bf23fbb8304.zip
r8845: Removing unnecessary string length calculations. Thanks abartlet
for noticing that. rafal (This used to be commit 109fc94c13ad04feaaa3f9c7666ad431b3255ae6)
-rw-r--r--source4/libnet/userman.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/source4/libnet/userman.c b/source4/libnet/userman.c
index 6db4d17685..6bb0ad4939 100644
--- a/source4/libnet/userman.c
+++ b/source4/libnet/userman.c
@@ -518,40 +518,30 @@ static NTSTATUS usermod_open(struct composite_context *c,
if (s->change.fields) {
if (s->change.fields & USERMOD_FIELD_ACCOUNT_NAME) {
level = 7;
- i->info7.account_name.length = 2*strlen_m(s->change.account_name);
- i->info7.account_name.size = 2*strlen_m(s->change.account_name);
i->info7.account_name.string = s->change.account_name;
s->change.fields ^= USERMOD_FIELD_ACCOUNT_NAME;
} else if (s->change.fields & USERMOD_FIELD_FULL_NAME) {
level = 8;
- i->info8.full_name.length = 2*strlen_m(s->change.full_name);
- i->info8.full_name.size = 2*strlen_m(s->change.full_name);
i->info8.full_name.string = s->change.full_name;
s->change.fields ^= USERMOD_FIELD_FULL_NAME;
} else if (s->change.fields & USERMOD_FIELD_DESCRIPTION) {
level = 13;
- i->info13.description.length = 2*strlen_m(s->change.description);
- i->info13.description.size = 2*strlen_m(s->change.description);
i->info13.description.string = s->change.description;
s->change.fields ^= USERMOD_FIELD_DESCRIPTION;
} else if (s->change.fields & USERMOD_FIELD_LOGON_SCRIPT) {
level = 11;
- i->info11.logon_script.length = 2*strlen_m(s->change.logon_script);
- i->info11.logon_script.size = 2*strlen_m(s->change.logon_script);
i->info11.logon_script.string = s->change.logon_script;
s->change.fields ^= USERMOD_FIELD_LOGON_SCRIPT;
} else if (s->change.fields & USERMOD_FIELD_PROFILE_PATH) {
level = 12;
- i->info12.profile_path.length = 2*strlen_m(s->change.profile_path);
- i->info12.profile_path.size = 2*strlen_m(s->change.profile_path);
i->info12.profile_path.string = s->change.profile_path;
s->change.fields ^= USERMOD_FIELD_PROFILE_PATH;
@@ -564,8 +554,8 @@ static NTSTATUS usermod_open(struct composite_context *c,
}
}
- s->setuser.in.level = level;
- s->setuser.in.info = i;
+ s->setuser.in.level = level;
+ s->setuser.in.info = i;
s->req = dcerpc_samr_SetUserInfo_send(s->pipe, c, &s->setuser);