#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
-/************************************************************************
- Routine to get the trust account password for a domain
-************************************************************************/
-static BOOL _get_trust_account_password(const char *domain, unsigned char *ret_pwd,
- time_t *pass_last_set_time)
-{
- if (!secrets_fetch_trust_account_password(domain, ret_pwd, pass_last_set_time)) {
- return False;
- }
-
- return True;
-}
-
/* Check the machine account password is valid */
enum winbindd_result winbindd_check_machine_acct(struct winbindd_cli_state *state)
uchar trust_passwd[16];
int num_retries = 0;
struct cli_state *cli;
+ uint32 sec_channel_type;
DEBUG(3, ("[%5d]: check machine account\n", state->pid));
/* Get trust account password */
again:
- if (!_get_trust_account_password(lp_workgroup(), trust_passwd,
- NULL)) {
+ if (!secrets_fetch_trust_account_password(
+ lp_workgroup(), trust_passwd, NULL, &sec_channel_type)) {
result = NT_STATUS_INTERNAL_ERROR;
goto done;
}
the trust account password. */
/* Don't shut this down - it belongs to the connection cache code */
- result = cm_get_netlogon_cli(lp_workgroup(), trust_passwd, &cli);
+ result = cm_get_netlogon_cli(lp_workgroup(), trust_passwd, sec_channel_type, True, &cli);
if (!NT_STATUS_IS_OK(result)) {
DEBUG(3, ("could not open handle to NETLOGON pipe\n"));
have changed since we last looked. There may be a sequence
number or something we should use but I haven't found it yet. */
- init_domain_list();
+ if (!init_domain_list()) {
+ DEBUG(1, ("winbindd_list_trusted_domains: could not "
+ "refresh trusted domain list\n"));
+ return WINBINDD_ERROR;
+ }
for(domain = domain_list(); domain; domain = domain->next) {
return WINBINDD_OK;
}
+
+/* What's my name again? */
+
+enum winbindd_result winbindd_netbios_name(struct winbindd_cli_state *state)
+{
+
+ DEBUG(3, ("[%5d]: request netbios name\n", state->pid));
+
+ fstrcpy(state->response.data.netbios_name, global_myname());
+
+ return WINBINDD_OK;
+}
+
+/* Where can I find the privilaged pipe? */
+
+enum winbindd_result winbindd_priv_pipe_dir(struct winbindd_cli_state *state)
+{
+
+ DEBUG(3, ("[%5d]: request location of privileged pipe\n", state->pid));
+
+ state->response.extra_data = strdup(get_winbind_priv_pipe_dir());
+ if (!state->response.extra_data)
+ return WINBINDD_ERROR;
+
+ /* must add one to length to copy the 0 for string termination */
+ state->response.length += strlen((char *)state->response.extra_data) + 1;
+
+ return WINBINDD_OK;
+}