summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-06-09 02:26:26 +0000
committerJeremy Allison <jra@samba.org>1998-06-09 02:26:26 +0000
commite85295d9241bcdad3723898ab8ad88d8f11d5f28 (patch)
treeab70331ce6bf518879e9a4128e879f5508b0c247
parent75e909f27db1e1ff69897e477a2c4704faf9a2fb (diff)
downloadsamba-e85295d9241bcdad3723898ab8ad88d8f11d5f28.tar.gz
samba-e85295d9241bcdad3723898ab8ad88d8f11d5f28.tar.bz2
samba-e85295d9241bcdad3723898ab8ad88d8f11d5f28.zip
loadparm.c: Removed 'domain other sids' parameter.
lib/rpc/include/rpc_lsa.h: Changed #defines for RPC calls - moved some, made LSA_LOOKUPNAMES correct. lib/rpc/include/rpc_misc.h: Changed DOMAIN_ALIAS_xxx to BUILTIN_ALIAS_xxx. Changed bitmasks for uid to rid to be 1 bit. lib/rpc/parse/parse_misc.c: Changed make_unistr2 to put length as given, max length as one more. lib/rpc/server/srv_netlog.c: Removed 'domain other sids' parameter. lib/rpc/server/srv_samr.c: Changed DOMAIN_ALIAS_xxx to BUILTIN_ALIAS_xxx. lib/rpc/server/srv_util.c: Changed DOMAIN_ALIAS_xxx to BUILTIN_ALIAS_xxx. Jeremy. (This used to be commit 34c91840a3d8c252715dc2f749b7a3b171a5b74f)
-rw-r--r--source3/include/rpc_lsa.h8
-rw-r--r--source3/include/rpc_misc.h26
-rw-r--r--source3/param/loadparm.c1
-rw-r--r--source3/rpc_parse/parse_misc.c4
-rw-r--r--source3/rpc_server/srv_netlog.c4
-rw-r--r--source3/rpc_server/srv_samr.c4
-rw-r--r--source3/rpc_server/srv_util.c20
7 files changed, 33 insertions, 34 deletions
diff --git a/source3/include/rpc_lsa.h b/source3/include/rpc_lsa.h
index 008f8866c0..39f42dcd56 100644
--- a/source3/include/rpc_lsa.h
+++ b/source3/include/rpc_lsa.h
@@ -34,16 +34,16 @@ enum SID_NAME_USE
};
/* ntlsa pipe */
-#define LSA_OPENPOLICY 0x2c
+#define LSA_CLOSE 0x00
#define LSA_QUERYINFOPOLICY 0x07
#define LSA_ENUMTRUSTDOM 0x0d
-#define LSA_CLOSE 0x00
-#define LSA_OPENSECRET 0x1C
+#define LSA_LOOKUPNAMES 0x0e
#define LSA_LOOKUPSIDS 0x0f
+#define LSA_OPENPOLICY 0x2c
+#define LSA_OPENSECRET 0x1C
/* XXXX these are here to get a compile! */
#define LSA_LOOKUPRIDS 0xFD
-#define LSA_LOOKUPNAMES 0xFC
#define LSA_MAX_GROUPS 32
#define LSA_MAX_SIDS 32
diff --git a/source3/include/rpc_misc.h b/source3/include/rpc_misc.h
index e8ffcd4a16..3e1a6052b5 100644
--- a/source3/include/rpc_misc.h
+++ b/source3/include/rpc_misc.h
@@ -50,28 +50,28 @@
#define DOMAIN_GROUP_RID_GUESTS (0x00000202L)
/* RIDs - well-known aliases ... */
-#define DOMAIN_ALIAS_RID_ADMINS (0x00000220L)
-#define DOMAIN_ALIAS_RID_USERS (0x00000221L)
-#define DOMAIN_ALIAS_RID_GUESTS (0x00000222L)
-#define DOMAIN_ALIAS_RID_POWER_USERS (0x00000223L)
+#define BUILTIN_ALIAS_RID_ADMINS (0x00000220L)
+#define BUILTIN_ALIAS_RID_USERS (0x00000221L)
+#define BUILTIN_ALIAS_RID_GUESTS (0x00000222L)
+#define BUILTIN_ALIAS_RID_POWER_USERS (0x00000223L)
-#define DOMAIN_ALIAS_RID_ACCOUNT_OPS (0x00000224L)
-#define DOMAIN_ALIAS_RID_SYSTEM_OPS (0x00000225L)
-#define DOMAIN_ALIAS_RID_PRINT_OPS (0x00000226L)
-#define DOMAIN_ALIAS_RID_BACKUP_OPS (0x00000227L)
+#define BUILTIN_ALIAS_RID_ACCOUNT_OPS (0x00000224L)
+#define BUILTIN_ALIAS_RID_SYSTEM_OPS (0x00000225L)
+#define BUILTIN_ALIAS_RID_PRINT_OPS (0x00000226L)
+#define BUILTIN_ALIAS_RID_BACKUP_OPS (0x00000227L)
-#define DOMAIN_ALIAS_RID_REPLICATOR (0x00000228L)
+#define BUILTIN_ALIAS_RID_REPLICATOR (0x00000228L)
/*
* Masks for mappings between unix uid and gid types and
* NT RIDS.
*/
-/* Take the 3 bottom bits. */
-#define RID_TYPE_MASK 7
-#define RID_MULTIPLIER 8
+/* Take the bottom bit. */
+#define RID_TYPE_MASK 1
+#define RID_MULTIPLIER 2
-/* The two common types for now. */
+/* The two common types. */
#define USER_RID_TYPE 0
#define GROUP_RID_TYPE 1
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 8bd051567a..e6065ae64b 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -585,7 +585,6 @@ static struct parm_struct parm_table[] =
{"Domain Options", P_SEP, P_SEPARATOR},
{"domain sid", P_USTRING, P_GLOBAL, &Globals.szDomainSID, NULL, NULL, 0},
- {"domain other sids",P_STRING, P_GLOBAL, &Globals.szDomainOtherSIDs, NULL, NULL, 0},
{"domain groups", P_STRING, P_GLOBAL, &Globals.szDomainGroups, NULL, NULL, 0},
{"domain controller",P_BOOL , P_GLOBAL, &Globals.bDomainController,NULL, NULL, 0},
{"domain admin group",P_STRING, P_GLOBAL, &Globals.szDomainAdminGroup, NULL, NULL, 0},
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index 35ca6c9553..4937751b89 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -423,7 +423,9 @@ void make_unistr2(UNISTR2 *str, char *buf, int len)
/* set up string lengths. add one if string is not null-terminated */
str->uni_max_len = len+1;
str->undoc = 0;
- str->uni_str_len = len+1;
+
+/* JRATEST - I believe this should be len, not len-1. JRA.*/
+ str->uni_str_len = len;
/* store the string (null-terminated 8 bit chars into 16 bit chars) */
struni2(str->buffer, buf);
diff --git a/source3/rpc_server/srv_netlog.c b/source3/rpc_server/srv_netlog.c
index 0679e876e2..38481cd2d3 100644
--- a/source3/rpc_server/srv_netlog.c
+++ b/source3/rpc_server/srv_netlog.c
@@ -691,7 +691,6 @@ static void api_net_sam_logon( int uid,
pstring my_name;
pstring my_workgroup;
pstring domain_groups;
- pstring other_sids;
uint32 r_uid;
uint32 r_gid;
@@ -708,7 +707,6 @@ static void api_net_sam_logon( int uid,
pstrcpy(logon_script, lp_logon_script());
pstrcpy(profile_path, lp_logon_path());
- pstrcpy(other_sids, lp_domain_other_sids());
pstrcpy(my_workgroup, lp_workgroup());
pstrcpy(home_drive, lp_logon_drive());
@@ -767,7 +765,7 @@ static void api_net_sam_logon( int uid,
my_workgroup, /* char *logon_dom */
&global_machine_sid, /* DOM_SID *dom_sid */
- other_sids); /* char *other_sids */
+ NULL); /* char *other_sids */
}
else
{
diff --git a/source3/rpc_server/srv_samr.c b/source3/rpc_server/srv_samr.c
index d0304d0dd6..5ca37f4b83 100644
--- a/source3/rpc_server/srv_samr.c
+++ b/source3/rpc_server/srv_samr.c
@@ -414,7 +414,7 @@ static void samr_reply_enum_dom_aliases(SAMR_Q_ENUM_DOM_ALIASES *q_u,
got_aliases = True;
num_entries = 1;
make_unistr2(&(pass[0].uni_user_name), dummy_alias, strlen(dummy_alias));
- pass[0].user_rid = DOMAIN_ALIAS_RID_ADMINS;
+ pass[0].user_rid = BUILTIN_ALIAS_RID_ADMINS;
if (r_e.status == 0 && got_aliases)
{
@@ -637,7 +637,7 @@ static void samr_reply_lookup_ids(SAMR_Q_LOOKUP_IDS *q_u,
#endif
num_rids = 1;
- rid[0] = DOMAIN_ALIAS_RID_USERS;
+ rid[0] = BUILTIN_ALIAS_RID_USERS;
make_samr_r_lookup_ids(&r_u, num_rids, rid, status);
diff --git a/source3/rpc_server/srv_util.c b/source3/rpc_server/srv_util.c
index 64f2e7a0d9..1ccd14c813 100644
--- a/source3/rpc_server/srv_util.c
+++ b/source3/rpc_server/srv_util.c
@@ -48,16 +48,16 @@ extern int DEBUGLEVEL;
i.e the DOMAIN_GROUP_RID_ADMIN/USER/GUEST. */
rid_name domain_alias_rids[] =
{
- { DOMAIN_ALIAS_RID_ADMINS , "admins" },
- { DOMAIN_ALIAS_RID_USERS , "users" },
- { DOMAIN_ALIAS_RID_GUESTS , "guests" },
- { DOMAIN_ALIAS_RID_POWER_USERS , "power_users" },
-
- { DOMAIN_ALIAS_RID_ACCOUNT_OPS , "account_ops" },
- { DOMAIN_ALIAS_RID_SYSTEM_OPS , "system_ops" },
- { DOMAIN_ALIAS_RID_PRINT_OPS , "print_ops" },
- { DOMAIN_ALIAS_RID_BACKUP_OPS , "backup_ops" },
- { DOMAIN_ALIAS_RID_REPLICATOR , "replicator" },
+ { BUILTIN_ALIAS_RID_ADMINS , "admins" },
+ { BUILTIN_ALIAS_RID_USERS , "users" },
+ { BUILTIN_ALIAS_RID_GUESTS , "guests" },
+ { BUILTIN_ALIAS_RID_POWER_USERS , "power_users" },
+
+ { BUILTIN_ALIAS_RID_ACCOUNT_OPS , "account_ops" },
+ { BUILTIN_ALIAS_RID_SYSTEM_OPS , "system_ops" },
+ { BUILTIN_ALIAS_RID_PRINT_OPS , "print_ops" },
+ { BUILTIN_ALIAS_RID_BACKUP_OPS , "backup_ops" },
+ { BUILTIN_ALIAS_RID_REPLICATOR , "replicator" },
{ 0 , NULL }
};