summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-10-24 01:05:30 +0000
committerJeremy Allison <jra@samba.org>2002-10-24 01:05:30 +0000
commit515e6a268e97a5d512535fd95138fa64ab46280e (patch)
tree3b8251092332b8c35065b0c8ca56841ead983739 /source3
parent1a96aeebc804603d29a406947c8e69933528bb97 (diff)
downloadsamba-515e6a268e97a5d512535fd95138fa64ab46280e.tar.gz
samba-515e6a268e97a5d512535fd95138fa64ab46280e.tar.bz2
samba-515e6a268e97a5d512535fd95138fa64ab46280e.zip
Merge tridge's blank password fix from HEAD.
Jeremy. (This used to be commit eadfd312ba92a780f655cf117c44b30457f007e8)
Diffstat (limited to 'source3')
-rw-r--r--source3/libads/kerberos.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c
index b586d84226..bef2febaef 100644
--- a/source3/libads/kerberos.c
+++ b/source3/libads/kerberos.c
@@ -40,8 +40,12 @@ kerb_prompter(krb5_context ctx, void *data,
memset(prompts[0].reply->data, 0, prompts[0].reply->length);
if (prompts[0].reply->length > 0) {
- strncpy(prompts[0].reply->data, data, prompts[0].reply->length-1);
- prompts[0].reply->length = strlen(prompts[0].reply->data);
+ if (data) {
+ strncpy(prompts[0].reply->data, data, prompts[0].reply->length-1);
+ prompts[0].reply->length = strlen(prompts[0].reply->data);
+ } else {
+ prompts[0].reply->length = 0;
+ }
}
return 0;
}