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;
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) ;
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,
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);
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 */
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));
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;
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,
*******************************************************************/
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;
*******************************************************************/
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;
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) {
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;
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;
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;
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);
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;
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;
******************************************************************/
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;
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;
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;
/* 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();
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) {
/* 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 */
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);
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 */
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;