summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-05-03 14:01:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:46 -0500
commit28824fb1971afd398739723ee7c65427bd086d4b (patch)
tree3dedbd28a94008095e69cac3be1cd147e56d88c8 /source3/rpc_server
parent7b9d6ac23e1a7d8136fffd2e3977b09a815da65a (diff)
downloadsamba-28824fb1971afd398739723ee7c65427bd086d4b.tar.gz
samba-28824fb1971afd398739723ee7c65427bd086d4b.tar.bz2
samba-28824fb1971afd398739723ee7c65427bd086d4b.zip
r6601: fixing query and set alias info calls (level 1 from the
MMC manage computer plugin. (This used to be commit c43c1ec80cb52569ccabcdf95e4004386ecb29d6)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_samr_nt.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 040d4e7dea..54012d57a9 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -985,17 +985,18 @@ NTSTATUS _samr_query_aliasinfo(pipes_struct *p, SAMR_Q_QUERY_ALIASINFO *q_u, SAM
if ( !ret )
return NT_STATUS_NO_SUCH_ALIAS;
- switch (q_u->switch_level) {
+ if ( !(r_u->ctr = TALLOC_ZERO_P( p->mem_ctx, ALIAS_INFO_CTR )) )
+ return NT_STATUS_NO_MEMORY;
+
+
+ switch (q_u->level ) {
case 1:
- r_u->ptr = 1;
- r_u->ctr.switch_value1 = 1;
- init_samr_alias_info1(&r_u->ctr.alias.info1,
- info.acct_name, 1, info.acct_desc);
+ r_u->ctr->level = 1;
+ init_samr_alias_info1(&r_u->ctr->alias.info1, info.acct_name, 1, info.acct_desc);
break;
case 3:
- r_u->ptr = 1;
- r_u->ctr.switch_value1 = 3;
- init_samr_alias_info3(&r_u->ctr.alias.info3, info.acct_desc);
+ r_u->ctr->level = 3;
+ init_samr_alias_info3(&r_u->ctr->alias.info3, info.acct_desc);
break;
default:
return NT_STATUS_INVALID_INFO_CLASS;
@@ -3984,11 +3985,13 @@ NTSTATUS _samr_set_aliasinfo(pipes_struct *p, SAMR_Q_SET_ALIASINFO *q_u, SAMR_R_
ctr=&q_u->ctr;
- switch (ctr->switch_value1) {
+ switch (ctr->level) {
case 3:
- unistr2_to_ascii(info.acct_desc,
- &(ctr->alias.info3.uni_acct_desc),
- sizeof(info.acct_desc)-1);
+ if ( ctr->alias.info3.description.string ) {
+ unistr2_to_ascii( info.acct_desc,
+ ctr->alias.info3.description.string,
+ sizeof(info.acct_desc)-1 );
+ }
break;
default:
return NT_STATUS_INVALID_INFO_CLASS;