1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-10 04:23:50 +03:00

r991: Allow winbindd to use the domain trust account password

for setting up an schannel connection.  This solves the problem
of a Samba DC running winbind, trusting a native mode AD domain,
and needing to enumerate AD users via wbinfo -u.
This commit is contained in:
Gerald Carter
2004-06-03 18:00:22 +00:00
committed by Gerald (Jerry) Carter
parent 5070c1b68f
commit e9f109d1b3
10 changed files with 205 additions and 53 deletions

View File

@@ -68,6 +68,11 @@
#define SAM_DATABASE_BUILTIN 0x01 /* BUILTIN users and groups */
#define SAM_DATABASE_PRIVS 0x02 /* Privileges */
#define NETLOGON_CONTROL_REDISCOVER 0x5
#define NETLOGON_CONTROL_TC_QUERY 0x6
#define NETLOGON_CONTROL_TRANSPORT_NOTIFY 0x7
#define NETLOGON_CONTROL_SET_DBFLAG 0xfffe
#if 0
/* I think this is correct - it's what gets parsed on the wire. JRA. */
/* NET_USER_INFO_2 */
@@ -204,7 +209,7 @@ typedef struct netlogon_2_info
uint32 flags; /* 0x0 - undocumented */
uint32 pdc_status; /* 0x0 - undocumented */
uint32 ptr_trusted_dc_name; /* pointer to trusted domain controller name */
uint32 tc_status; /* 0x051f - ERROR_NO_LOGON_SERVERS */
uint32 tc_status;
UNISTR2 uni_trusted_dc_name; /* unicode string - trusted dc name */
} NETLOGON_INFO_2;
@@ -255,6 +260,26 @@ typedef struct net_r_logon_ctrl_info
NTSTATUS status;
} NET_R_LOGON_CTRL;
typedef struct ctrl_data_info_5
{
uint32 function_code;
uint32 ptr_domain;
UNISTR2 domain;
} CTRL_DATA_INFO_5;
typedef struct ctrl_data_info_6
{
uint32 function_code;
uint32 ptr_domain;
UNISTR2 domain;
} CTRL_DATA_INFO_6;
/********************************************************
Logon Control2 Query
@@ -266,13 +291,16 @@ typedef struct net_r_logon_ctrl_info
/* NET_Q_LOGON_CTRL2 - LSA Netr Logon Control 2 */
typedef struct net_q_logon_ctrl2_info
{
uint32 ptr; /* undocumented buffer pointer */
UNISTR2 uni_server_name; /* server name, starting with two '\'s */
uint32 ptr; /* undocumented buffer pointer */
UNISTR2 uni_server_name; /* server name, starting with two '\'s */
uint32 function_code;
uint32 query_level;
union {
CTRL_DATA_INFO_5 info5;
CTRL_DATA_INFO_6 info6;;
} info;
uint32 function_code; /* 0x1 */
uint32 query_level; /* 0x1, 0x3 */
uint32 switch_value; /* 0x1 */
} NET_Q_LOGON_CTRL2;
/*******************************************************