summaryrefslogtreecommitdiff
path: root/nsswitch/wbinfo.c
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2009-08-12 17:50:04 +0200
committerKai Blin <kai@samba.org>2009-08-18 20:26:05 +0200
commitbc0e0a4c69d11fbdb61b1edc1e8d088090807249 (patch)
tree47d2b0cbd94839b17d6611a311b9f0acf4134a50 /nsswitch/wbinfo.c
parent19855ca2bb13c515c5ee1ec495dac7b41b6b1878 (diff)
downloadsamba-bc0e0a4c69d11fbdb61b1edc1e8d088090807249.tar.gz
samba-bc0e0a4c69d11fbdb61b1edc1e8d088090807249.tar.bz2
samba-bc0e0a4c69d11fbdb61b1edc1e8d088090807249.zip
wbinfo: Use one codebase for Samba3 and Samba4.
There can be only one....wbinfo that is.
Diffstat (limited to 'nsswitch/wbinfo.c')
-rw-r--r--nsswitch/wbinfo.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c
index 5fe0090567..813846f138 100644
--- a/nsswitch/wbinfo.c
+++ b/nsswitch/wbinfo.c
@@ -4,7 +4,7 @@
Winbind status program.
Copyright (C) Tim Potter 2000-2003
- Copyright (C) Andrew Bartlett 2002
+ Copyright (C) Andrew Bartlett 2002-2007
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,9 +29,10 @@
#include "lib/cmdline/popt_common.h"
#endif
-
+#ifdef DBGC_CLASS
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
+#endif
static struct wbcInterfaceDetails *init_interface_details(void)
{
@@ -1214,6 +1215,7 @@ static bool wbinfo_auth_krb5(char *username, const char *cctype, uint32_t flags)
char *p = NULL;
char *password = NULL;
char *name = NULL;
+ char *local_cctype = NULL;
uid_t uid;
struct wbcLogonUserParams params;
struct wbcLogonUserInfo *info;
@@ -1233,6 +1235,8 @@ static bool wbinfo_auth_krb5(char *username, const char *cctype, uint32_t flags)
password = wbinfo_prompt_pass(frame, NULL, username);
}
+ local_cctype = talloc_strdup(frame, cctype);
+
name = s;
uid = geteuid();
@@ -1266,7 +1270,7 @@ static bool wbinfo_auth_krb5(char *username, const char *cctype, uint32_t flags)
&params.blobs,
"krb5_cc_type",
0,
- (uint8_t *)cctype,
+ (uint8_t *)local_cctype,
strlen(cctype)+1);
if (!WBC_ERROR_IS_OK(wbc_status)) {
goto done;