mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
r18028: Fix warnings on non-krb5 systems
(This used to be commit 30df6cb65f2dcc1829ea362ea0bc2a5e10f9819a)
This commit is contained in:
parent
5f2b59622e
commit
f5906de76d
@ -72,10 +72,12 @@ static void krb5_ticket_refresh_handler(struct timed_event *te,
|
|||||||
{
|
{
|
||||||
struct WINBINDD_CCACHE_ENTRY *entry =
|
struct WINBINDD_CCACHE_ENTRY *entry =
|
||||||
talloc_get_type_abort(private_data, struct WINBINDD_CCACHE_ENTRY);
|
talloc_get_type_abort(private_data, struct WINBINDD_CCACHE_ENTRY);
|
||||||
|
#ifdef HAVE_KRB5
|
||||||
int ret;
|
int ret;
|
||||||
time_t new_start;
|
time_t new_start;
|
||||||
struct timeval t;
|
struct timeval t;
|
||||||
struct WINBINDD_MEMORY_CREDS *cred_ptr = entry->cred_ptr;
|
struct WINBINDD_MEMORY_CREDS *cred_ptr = entry->cred_ptr;
|
||||||
|
#endif
|
||||||
|
|
||||||
DEBUG(10,("krb5_ticket_refresh_handler called\n"));
|
DEBUG(10,("krb5_ticket_refresh_handler called\n"));
|
||||||
DEBUGADD(10,("event called for: %s, %s\n", entry->ccname, entry->username));
|
DEBUGADD(10,("event called for: %s, %s\n", entry->ccname, entry->username));
|
||||||
|
@ -321,6 +321,8 @@ static NTSTATUS get_pwd_properties(struct winbindd_domain *domain,
|
|||||||
return NT_STATUS_OK;
|
return NT_STATUS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_KRB5
|
||||||
|
|
||||||
static const char *generate_krb5_ccache(TALLOC_CTX *mem_ctx,
|
static const char *generate_krb5_ccache(TALLOC_CTX *mem_ctx,
|
||||||
const char *type,
|
const char *type,
|
||||||
uid_t uid,
|
uid_t uid,
|
||||||
@ -368,19 +370,6 @@ static const char *generate_krb5_ccache(TALLOC_CTX *mem_ctx,
|
|||||||
return gen_cc;
|
return gen_cc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uid_t get_uid_from_state(struct winbindd_cli_state *state)
|
|
||||||
{
|
|
||||||
uid_t uid = -1;
|
|
||||||
|
|
||||||
uid = state->request.data.auth.uid;
|
|
||||||
|
|
||||||
if (uid < 0) {
|
|
||||||
DEBUG(1,("invalid uid: '%d'\n", uid));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return uid;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void setup_return_cc_name(struct winbindd_cli_state *state, const char *cc)
|
static void setup_return_cc_name(struct winbindd_cli_state *state, const char *cc)
|
||||||
{
|
{
|
||||||
const char *type = state->request.data.auth.krb5_cc_type;
|
const char *type = state->request.data.auth.krb5_cc_type;
|
||||||
@ -401,6 +390,21 @@ static void setup_return_cc_name(struct winbindd_cli_state *state, const char *c
|
|||||||
fstrcpy(state->response.data.auth.krb5ccname, cc);
|
fstrcpy(state->response.data.auth.krb5ccname, cc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static uid_t get_uid_from_state(struct winbindd_cli_state *state)
|
||||||
|
{
|
||||||
|
uid_t uid = -1;
|
||||||
|
|
||||||
|
uid = state->request.data.auth.uid;
|
||||||
|
|
||||||
|
if (uid < 0) {
|
||||||
|
DEBUG(1,("invalid uid: '%d'\n", uid));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return uid;
|
||||||
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
Authenticate a user with a clear text password using Kerberos and fill up
|
Authenticate a user with a clear text password using Kerberos and fill up
|
||||||
ccache if required
|
ccache if required
|
||||||
@ -1852,7 +1856,9 @@ enum winbindd_result winbindd_dual_pam_logoff(struct winbindd_domain *domain,
|
|||||||
struct winbindd_cli_state *state)
|
struct winbindd_cli_state *state)
|
||||||
{
|
{
|
||||||
NTSTATUS result = NT_STATUS_NOT_SUPPORTED;
|
NTSTATUS result = NT_STATUS_NOT_SUPPORTED;
|
||||||
|
#ifdef HAVE_KRB5
|
||||||
int ret;
|
int ret;
|
||||||
|
#endif
|
||||||
|
|
||||||
DEBUG(3, ("[%5lu]: pam dual logoff %s\n", (unsigned long)state->pid,
|
DEBUG(3, ("[%5lu]: pam dual logoff %s\n", (unsigned long)state->pid,
|
||||||
state->request.data.logoff.user));
|
state->request.data.logoff.user));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user