mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
s3: use enum netr_SchannelType all over the place.
Guenther
This commit is contained in:
@ -195,7 +195,7 @@ machine %s. Error was : %s.\n", dc_name, nt_errstr(result)));
|
||||
if (!lp_client_schannel()) {
|
||||
/* We need to set up a creds chain on an unauthenticated netlogon pipe. */
|
||||
uint32_t neg_flags = NETLOGON_NEG_AUTH2_ADS_FLAGS;
|
||||
uint32 sec_chan_type = 0;
|
||||
enum netr_SchannelType sec_chan_type = 0;
|
||||
unsigned char machine_pwd[16];
|
||||
const char *account_name;
|
||||
|
||||
|
@ -3309,7 +3309,7 @@ NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client *cli, TALLOC_CTX *m
|
||||
const char *domain,
|
||||
const char *account_name,
|
||||
unsigned char orig_trust_passwd_hash[16],
|
||||
uint32 sec_channel_type);
|
||||
enum netr_SchannelType sec_channel_type);
|
||||
NTSTATUS trust_pw_find_change_and_store_it(struct rpc_pipe_client *cli,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const char *domain) ;
|
||||
@ -4672,14 +4672,14 @@ bool secrets_fetch_domain_sid(const char *domain, DOM_SID *sid);
|
||||
bool secrets_store_domain_guid(const char *domain, struct GUID *guid);
|
||||
bool secrets_fetch_domain_guid(const char *domain, struct GUID *guid);
|
||||
void *secrets_get_trust_account_lock(TALLOC_CTX *mem_ctx, const char *domain);
|
||||
uint32 get_default_sec_channel(void);
|
||||
enum netr_SchannelType get_default_sec_channel(void);
|
||||
bool secrets_fetch_trust_account_password_legacy(const char *domain,
|
||||
uint8 ret_pwd[16],
|
||||
time_t *pass_last_set_time,
|
||||
uint32 *channel);
|
||||
enum netr_SchannelType *channel);
|
||||
bool secrets_fetch_trust_account_password(const char *domain, uint8 ret_pwd[16],
|
||||
time_t *pass_last_set_time,
|
||||
uint32 *channel);
|
||||
enum netr_SchannelType *channel);
|
||||
bool secrets_fetch_trusted_domain_password(const char *domain, char** pwd,
|
||||
DOM_SID *sid, time_t *pass_last_set_time);
|
||||
bool secrets_store_trusted_domain_password(const char* domain, const char* pwd,
|
||||
@ -4687,10 +4687,10 @@ bool secrets_store_trusted_domain_password(const char* domain, const char* pwd,
|
||||
bool secrets_delete_machine_password(const char *domain);
|
||||
bool secrets_delete_machine_password_ex(const char *domain);
|
||||
bool secrets_delete_domain_sid(const char *domain);
|
||||
bool secrets_store_machine_password(const char *pass, const char *domain, uint32 sec_channel);
|
||||
bool secrets_store_machine_password(const char *pass, const char *domain, enum netr_SchannelType sec_channel);
|
||||
char *secrets_fetch_machine_password(const char *domain,
|
||||
time_t *pass_last_set_time,
|
||||
uint32 *channel);
|
||||
enum netr_SchannelType *channel);
|
||||
bool trusted_domain_password_delete(const char *domain);
|
||||
bool secrets_store_ldap_pw(const char* dn, char* pw);
|
||||
bool fetch_ldap_pw(char **dn, char** pw);
|
||||
@ -5243,7 +5243,7 @@ NTSTATUS rpccli_netlogon_set_trust_password(struct rpc_pipe_client *cli,
|
||||
const unsigned char orig_trust_passwd_hash[16],
|
||||
const char *new_trust_pwd_cleartext,
|
||||
const unsigned char new_trust_passwd_hash[16],
|
||||
uint32_t sec_channel_type);
|
||||
enum netr_SchannelType sec_channel_type);
|
||||
|
||||
/* The following definitions come from rpc_client/cli_pipe.c */
|
||||
|
||||
|
@ -26,7 +26,7 @@ ADS_STATUS ads_change_trust_account_password(ADS_STRUCT *ads, char *host_princip
|
||||
char *password;
|
||||
char *new_password;
|
||||
ADS_STATUS ret;
|
||||
uint32 sec_channel_type;
|
||||
enum netr_SchannelType sec_channel_type;
|
||||
|
||||
if ((password = secrets_fetch_machine_password(lp_workgroup(), NULL, &sec_channel_type)) == NULL) {
|
||||
DEBUG(1,("Failed to retrieve password for principal %s\n", host_principal));
|
||||
|
@ -31,7 +31,7 @@ NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client *cli, TALLOC_CTX *m
|
||||
const char *domain,
|
||||
const char *account_name,
|
||||
unsigned char orig_trust_passwd_hash[16],
|
||||
uint32 sec_channel_type)
|
||||
enum netr_SchannelType sec_channel_type)
|
||||
{
|
||||
unsigned char new_trust_passwd_hash[16];
|
||||
char *new_trust_passwd;
|
||||
@ -113,7 +113,7 @@ NTSTATUS trust_pw_find_change_and_store_it(struct rpc_pipe_client *cli,
|
||||
const char *domain)
|
||||
{
|
||||
unsigned char old_trust_passwd_hash[16];
|
||||
uint32 sec_channel_type = 0;
|
||||
enum netr_SchannelType sec_channel_type = SEC_CHAN_NULL;
|
||||
const char *account_name;
|
||||
|
||||
if (!get_trust_pw_hash(domain, old_trust_passwd_hash, &account_name,
|
||||
|
@ -2257,7 +2257,8 @@ bool is_dc_trusted_domain_situation(const char *domain_name)
|
||||
*******************************************************************/
|
||||
|
||||
bool get_trust_pw_clear(const char *domain, char **ret_pwd,
|
||||
const char **account_name, uint32 *channel)
|
||||
const char **account_name,
|
||||
enum netr_SchannelType *channel)
|
||||
{
|
||||
char *pwd;
|
||||
time_t last_set_time;
|
||||
@ -2329,7 +2330,8 @@ bool get_trust_pw_clear(const char *domain, char **ret_pwd,
|
||||
*******************************************************************/
|
||||
|
||||
bool get_trust_pw_hash(const char *domain, uint8 ret_pwd[16],
|
||||
const char **account_name, uint32 *channel)
|
||||
const char **account_name,
|
||||
enum netr_SchannelType *channel)
|
||||
{
|
||||
char *pwd = NULL;
|
||||
time_t last_set_time;
|
||||
|
@ -392,7 +392,7 @@ void *secrets_get_trust_account_lock(TALLOC_CTX *mem_ctx, const char *domain)
|
||||
Routine to get the default secure channel type for trust accounts
|
||||
************************************************************************/
|
||||
|
||||
uint32 get_default_sec_channel(void)
|
||||
enum netr_SchannelType get_default_sec_channel(void)
|
||||
{
|
||||
if (lp_server_role() == ROLE_DOMAIN_BDC ||
|
||||
lp_server_role() == ROLE_DOMAIN_PDC) {
|
||||
@ -412,7 +412,7 @@ uint32 get_default_sec_channel(void)
|
||||
bool secrets_fetch_trust_account_password_legacy(const char *domain,
|
||||
uint8 ret_pwd[16],
|
||||
time_t *pass_last_set_time,
|
||||
uint32 *channel)
|
||||
enum netr_SchannelType *channel)
|
||||
{
|
||||
struct machine_acct_pass *pass;
|
||||
size_t size = 0;
|
||||
@ -458,7 +458,7 @@ bool secrets_fetch_trust_account_password_legacy(const char *domain,
|
||||
|
||||
bool secrets_fetch_trust_account_password(const char *domain, uint8 ret_pwd[16],
|
||||
time_t *pass_last_set_time,
|
||||
uint32 *channel)
|
||||
enum netr_SchannelType *channel)
|
||||
{
|
||||
char *plaintext;
|
||||
|
||||
@ -793,7 +793,8 @@ bool secrets_delete_domain_sid(const char *domain)
|
||||
the password is assumed to be a null terminated ascii string
|
||||
************************************************************************/
|
||||
|
||||
bool secrets_store_machine_password(const char *pass, const char *domain, uint32 sec_channel)
|
||||
bool secrets_store_machine_password(const char *pass, const char *domain,
|
||||
enum netr_SchannelType sec_channel)
|
||||
{
|
||||
bool ret;
|
||||
uint32 last_change_time;
|
||||
@ -819,7 +820,7 @@ bool secrets_store_machine_password(const char *pass, const char *domain, uint32
|
||||
|
||||
char *secrets_fetch_machine_password(const char *domain,
|
||||
time_t *pass_last_set_time,
|
||||
uint32 *channel)
|
||||
enum netr_SchannelType *channel)
|
||||
{
|
||||
char *ret;
|
||||
ret = (char *)secrets_fetch(machine_password_keystr(domain), NULL);
|
||||
|
@ -513,7 +513,7 @@ NTSTATUS rpccli_netlogon_set_trust_password(struct rpc_pipe_client *cli,
|
||||
const unsigned char orig_trust_passwd_hash[16],
|
||||
const char *new_trust_pwd_cleartext,
|
||||
const unsigned char new_trust_passwd_hash[16],
|
||||
uint32_t sec_channel_type)
|
||||
enum netr_SchannelType sec_channel_type)
|
||||
{
|
||||
NTSTATUS result;
|
||||
uint32_t neg_flags = NETLOGON_NEG_AUTH2_ADS_FLAGS;
|
||||
|
@ -3819,7 +3819,7 @@ static NTSTATUS get_schannel_session_key_common(struct rpc_pipe_client *netlogon
|
||||
const char *domain,
|
||||
uint32 *pneg_flags)
|
||||
{
|
||||
uint32 sec_chan_type = 0;
|
||||
enum netr_SchannelType sec_chan_type = 0;
|
||||
unsigned char machine_pwd[16];
|
||||
const char *machine_account;
|
||||
NTSTATUS status;
|
||||
|
@ -281,7 +281,7 @@ WERROR _netr_NetrEnumerateTrustedDomains(pipes_struct *p,
|
||||
******************************************************************/
|
||||
|
||||
static NTSTATUS get_md4pw(struct samr_Password *md4pw, const char *mach_acct,
|
||||
uint16_t sec_chan_type, struct dom_sid *sid)
|
||||
enum netr_SchannelType sec_chan_type, struct dom_sid *sid)
|
||||
{
|
||||
struct samu *sampass = NULL;
|
||||
const uint8 *pass;
|
||||
|
@ -1051,7 +1051,7 @@ static NTSTATUS cmd_netlogon_database_redo(struct rpc_pipe_client *cli,
|
||||
struct netr_Authenticator clnt_creds, srv_cred;
|
||||
struct netr_DELTA_ENUM_ARRAY *delta_enum_array = NULL;
|
||||
unsigned char trust_passwd_hash[16];
|
||||
uint32_t sec_channel_type = 0;
|
||||
enum netr_SchannelType sec_channel_type = 0;
|
||||
struct netr_ChangeLogEntry e;
|
||||
uint32_t rid = 500;
|
||||
|
||||
|
@ -694,7 +694,7 @@ static NTSTATUS do_cmd(struct cli_state *cli,
|
||||
if (ndr_syntax_id_equal(cmd_entry->interface,
|
||||
&ndr_table_netlogon.syntax_id)) {
|
||||
uint32_t neg_flags = NETLOGON_NEG_AUTH2_ADS_FLAGS;
|
||||
uint32 sec_channel_type;
|
||||
enum netr_SchannelType sec_channel_type;
|
||||
uchar trust_password[16];
|
||||
const char *machine_account;
|
||||
|
||||
|
@ -53,7 +53,7 @@ extern bool AllowDebugChange;
|
||||
/* end of internationalization section */
|
||||
/***********************************************************************/
|
||||
|
||||
uint32 get_sec_channel_type(const char *param)
|
||||
enum netr_SchannelType get_sec_channel_type(const char *param)
|
||||
{
|
||||
if (!(param && *param)) {
|
||||
return get_default_sec_channel();
|
||||
@ -91,7 +91,7 @@ static int net_changesecretpw(struct net_context *c, int argc,
|
||||
const char **argv)
|
||||
{
|
||||
char *trust_pw;
|
||||
uint32 sec_channel_type = SEC_CHAN_WKSTA;
|
||||
enum netr_SchannelType sec_channel_type = SEC_CHAN_WKSTA;
|
||||
|
||||
if(c->opt_force) {
|
||||
if (c->opt_stdin) {
|
||||
|
@ -42,7 +42,7 @@ void debug_unix_user_token(int dbg_class, int dbg_lev, uid_t uid, gid_t gid,
|
||||
|
||||
/* The following definitions come from utils/net.c */
|
||||
|
||||
uint32 get_sec_channel_type(const char *param);
|
||||
enum netr_SchannelType get_sec_channel_type(const char *param);
|
||||
|
||||
/* The following definitions come from utils/net_ads.c */
|
||||
|
||||
|
@ -309,7 +309,7 @@ static NTSTATUS rpc_oldjoin_internals(struct net_context *c,
|
||||
fstring trust_passwd;
|
||||
unsigned char orig_trust_passwd_hash[16];
|
||||
NTSTATUS result;
|
||||
uint32 sec_channel_type;
|
||||
enum netr_SchannelType sec_channel_type;
|
||||
|
||||
result = cli_rpc_pipe_open_noauth(cli, &ndr_table_netlogon.syntax_id,
|
||||
&pipe_hnd);
|
||||
|
@ -138,7 +138,7 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv)
|
||||
TALLOC_CTX *mem_ctx;
|
||||
uint32 acb_info = ACB_WSTRUST;
|
||||
uint32_t neg_flags = NETLOGON_NEG_AUTH2_ADS_FLAGS;
|
||||
uint32 sec_channel_type;
|
||||
enum netr_SchannelType sec_channel_type;
|
||||
struct rpc_pipe_client *pipe_hnd = NULL;
|
||||
|
||||
/* rpc variables */
|
||||
|
@ -2370,7 +2370,7 @@ NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
|
||||
|
||||
uint32_t neg_flags = NETLOGON_NEG_AUTH2_ADS_FLAGS;
|
||||
uint8 mach_pwd[16];
|
||||
uint32 sec_chan_type;
|
||||
enum netr_SchannelType sec_chan_type;
|
||||
const char *account_name;
|
||||
struct rpc_pipe_client *netlogon_pipe = NULL;
|
||||
|
||||
|
Reference in New Issue
Block a user