summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/connection.c7
-rw-r--r--source3/smbd/negprot.c9
2 files changed, 16 insertions, 0 deletions
diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c
index 5547309a81..92aaebab1f 100644
--- a/source3/smbd/connection.c
+++ b/source3/smbd/connection.c
@@ -41,6 +41,13 @@ static void make_conn_key(connection_struct *conn, const char *name, TDB_DATA *p
pkey->pid = sys_getpid();
pkey->cnum = conn?conn->cnum:-1;
fstrcpy(pkey->name, name);
+#ifdef DEVELOPER
+ {
+ size_t sl = strlen(pkey->name);
+ if (sizeof(fstring)-sl)
+ memset(&pkey->name[sl], '\0', sizeof(fstring)-sl);
+ }
+#endif
pkbuf->dptr = (char *)pkey;
pkbuf->dsize = sizeof(*pkey);
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index bd1b9b0d57..648801e955 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -182,6 +182,15 @@ static int negprot_spnego(char *p)
ZERO_STRUCT(guid);
safe_strcpy((char *)guid, global_myname(), sizeof(guid)-1);
+
+#ifdef DEVELOPER
+ {
+ size_t sl = strlen(guid);
+ if (sizeof(guid)-sl)
+ memset(&guid[sl], '\0', sizeof(guid)-sl);
+ }
+#endif
+
strlower((char *)guid);
#if 0