mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
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 commit is contained in:
parent
17c758687f
commit
34c91840a3
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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},
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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" },
|
||||
{ BUILTIN_ALIAS_RID_ADMINS , "admins" },
|
||||
{ BUILTIN_ALIAS_RID_USERS , "users" },
|
||||
{ BUILTIN_ALIAS_RID_GUESTS , "guests" },
|
||||
{ BUILTIN_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_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 }
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user