r2082: lp_path should be lp_pathname.
authorJeremy Allison <jra@samba.org>
Thu, 26 Aug 2004 21:39:10 +0000 (21:39 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:52:30 +0000 (10:52 -0500)
Paranoia fix on mangle prefix.
Jeremy.
(This used to be commit cc91bbe20d9cb26e52ad417f279e2d60c85af2dc)

source3/smbd/mangle_hash2.c
source3/smbd/password.c

index f68873687bdc277783d8e0a7cb6f2dba7d93736a..c6ad1215b0990549ef3f28af6a09805b75027a46 100644 (file)
@@ -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);
index decac845acdae74f26eb015664ac5f430b493473..cf3c3d64d206178b8dca7f8aab4cdd2a127fd635 100644 (file)
@@ -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;
                }
        }