diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-09-04 09:29:50 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:43:23 -0500 |
commit | f5906de76db2ba8c95af3da34a283de3da21ec0f (patch) | |
tree | 41928fe1a78e20bc0602345f6bc9fce27ba3108b /source3/nsswitch/winbindd_pam.c | |
parent | 5f2b59622ea1d2ca72577e3c7f60c5868a2aa20a (diff) | |
download | samba-f5906de76db2ba8c95af3da34a283de3da21ec0f.tar.gz samba-f5906de76db2ba8c95af3da34a283de3da21ec0f.tar.bz2 samba-f5906de76db2ba8c95af3da34a283de3da21ec0f.zip |
r18028: Fix warnings on non-krb5 systems
(This used to be commit 30df6cb65f2dcc1829ea362ea0bc2a5e10f9819a)
Diffstat (limited to 'source3/nsswitch/winbindd_pam.c')
-rw-r--r-- | source3/nsswitch/winbindd_pam.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c index dbd52092ef..14975141b2 100644 --- a/source3/nsswitch/winbindd_pam.c +++ b/source3/nsswitch/winbindd_pam.c @@ -321,6 +321,8 @@ static NTSTATUS get_pwd_properties(struct winbindd_domain *domain, return NT_STATUS_OK; } +#ifdef HAVE_KRB5 + static const char *generate_krb5_ccache(TALLOC_CTX *mem_ctx, const char *type, uid_t uid, @@ -368,19 +370,6 @@ static const char *generate_krb5_ccache(TALLOC_CTX *mem_ctx, 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) { 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); } +#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 ccache if required @@ -1852,7 +1856,9 @@ enum winbindd_result winbindd_dual_pam_logoff(struct winbindd_domain *domain, struct winbindd_cli_state *state) { NTSTATUS result = NT_STATUS_NOT_SUPPORTED; +#ifdef HAVE_KRB5 int ret; +#endif DEBUG(3, ("[%5lu]: pam dual logoff %s\n", (unsigned long)state->pid, state->request.data.logoff.user)); |