[SCM] Samba Shared Repository - branch v3-3-test updated -
release-3-2-0pre2-2938-g86cae83
Volker Lendecke
vlendec at samba.org
Sun Jun 22 11:09:27 GMT 2008
The branch, v3-3-test has been updated
via 86cae83a7db87063ecd6e58eaa15f11441c45040 (commit)
via 73172113484a2c6c9af014f59e84707716c61a7d (commit)
from 1d7ad0dea7ebf7a46af6e695797e5132264307d6 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test
- Log -----------------------------------------------------------------
commit 86cae83a7db87063ecd6e58eaa15f11441c45040
Author: Volker Lendecke <vl at samba.org>
Date: Sun Jun 22 13:06:35 2008 +0200
Fix a crash in _dfs_Enum
(cherry picked from commit 4a996476297963d4cb300b4d45c23e83a493c339)
commit 73172113484a2c6c9af014f59e84707716c61a7d
Author: Volker Lendecke <vl at samba.org>
Date: Sun Jun 22 12:50:30 2008 +0200
Fix an uninitialized variable access in callers of parse_msdfs_symlink
At least form_junctions() does not initialize refcount, and I don't see it in
get_referred_path(). For the latters, the callers might initialize it. But even
if they did, I think parse_msdfs_symlink() should unconditionally return the
number of referrals it found. I don't think it makes sense to count them up
from somewhere else.
-----------------------------------------------------------------------
Summary of changes:
source/include/msdfs.h | 2 +-
source/smbd/msdfs.c | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/include/msdfs.h b/source/include/msdfs.h
index 49b3ad4..4551325 100644
--- a/source/include/msdfs.h
+++ b/source/include/msdfs.h
@@ -52,7 +52,7 @@ struct referral {
struct junction_map {
char *service_name;
char *volume_name;
- char *comment;
+ const char *comment;
int referral_count;
struct referral* referral_list;
};
diff --git a/source/smbd/msdfs.c b/source/smbd/msdfs.c
index 25b22f4..84ee282 100644
--- a/source/smbd/msdfs.c
+++ b/source/smbd/msdfs.c
@@ -370,9 +370,10 @@ static bool parse_msdfs_symlink(TALLOC_CTX *ctx,
reflist[i].ttl = REFERRAL_TTL;
DEBUG(10, ("parse_msdfs_symlink: Created alt path: %s\n",
reflist[i].alternate_path));
- *refcount += 1;
}
+ *refcount = count;
+
TALLOC_FREE(alt_path);
return True;
}
@@ -1503,6 +1504,7 @@ static int form_junctions(TALLOC_CTX *ctx,
if (!jucn[cnt].service_name || !jucn[cnt].volume_name) {
goto out;
}
+ jucn[cnt].comment = "";
jucn[cnt].referral_count = 1;
ref = jucn[cnt].referral_list = TALLOC_ZERO_P(ctx, struct referral);
@@ -1562,6 +1564,7 @@ static int form_junctions(TALLOC_CTX *ctx,
!jucn[cnt].volume_name) {
goto out;
}
+ jucn[cnt].comment = "";
cnt++;
}
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list