summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/mangle_hash2.c3
-rw-r--r--source3/smbd/password.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/source3/smbd/mangle_hash2.c b/source3/smbd/mangle_hash2.c
index f68873687b..c6ad1215b0 100644
--- a/source3/smbd/mangle_hash2.c
+++ b/source3/smbd/mangle_hash2.c
@@ -119,7 +119,7 @@ static const char *reserved_names[] =
this hash needs to be fast with a low collision rate (what hash doesn't?)
*/
-static u32 mangle_hash(const char *key, unsigned length)
+static u32 mangle_hash(const char *key, unsigned int length)
{
u32 value;
u32 i;
@@ -129,6 +129,7 @@ static u32 mangle_hash(const char *key, unsigned length)
doesn't depend on the case of the long name. Note that this
is the only place where we need to use a multi-byte string
function */
+ length = MIN(length,sizeof(fstring)-1);
strncpy(str, key, length);
str[length] = 0;
strupper_m(str);
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index decac845ac..cf3c3d64d2 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -272,7 +272,7 @@ int register_vuid(auth_serversupplied_info *server_info, DATA_BLOB session_key,
vuser->user.unix_name, vuser->unix_homedir);
} else {
DEBUG(3, ("Using static (or previously created) service for user '%s'; path = '%s'\n",
- vuser->user.unix_name, lp_path(servicenumber) ));
+ vuser->user.unix_name, lp_pathname(servicenumber) ));
vuser->homes_snum = servicenumber;
}
}