svn commit: samba r2368 - in trunk/source/rpc_server: .
jra at samba.org
jra at samba.org
Thu Sep 16 22:08:22 GMT 2004
Author: jra
Date: 2004-09-16 22:08:21 +0000 (Thu, 16 Sep 2004)
New Revision: 2368
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/trunk/source/rpc_server&rev=2368&nolog=1
Log:
Fix from Richard Renard <rrenard at idealx.com> to fix usermgr and trust relationships.
Jeremy.
Modified:
trunk/source/rpc_server/srv_samr_nt.c
Changeset:
Modified: trunk/source/rpc_server/srv_samr_nt.c
===================================================================
--- trunk/source/rpc_server/srv_samr_nt.c 2004-09-16 12:49:02 UTC (rev 2367)
+++ trunk/source/rpc_server/srv_samr_nt.c 2004-09-16 22:08:21 UTC (rev 2368)
@@ -750,7 +750,17 @@
for (i = 0; i < num_entries; i++) {
pwd = &disp_user_info[i+start_idx];
temp_name = pdb_get_username(pwd);
- init_unistr2(&uni_temp_name, temp_name, UNI_STR_TERMINATE);
+
+ /*
+ * usrmgr expects a non-NULL terminated string with
+ * trust relationships
+ */
+ if (pdb_get_acct_ctrl(pwd) & ACB_DOMTRUST) {
+ init_unistr2(&uni_temp_name, temp_name, UNI_FLAGS_NONE);
+ } else {
+ init_unistr2(&uni_temp_name, temp_name, UNI_STR_TERMINATE);
+ }
+
user_sid = pdb_get_user_sid(pwd);
if (!sid_peek_check_rid(domain_sid, user_sid, &user_rid)) {
More information about the samba-cvs
mailing list