[SCM] Samba Shared Repository - branch v3-2-stable updated -
release-3-2-0pre3-81-g3ce3384
Karolin Seeger
kseeger at samba.org
Thu May 15 07:01:08 GMT 2008
The branch, v3-2-stable has been updated
via 3ce33843d767aad1f01fab20ba4c2bb781f8c21a (commit)
via 7eebe088f99d401a0f5e42e1ce593bb2ea74f245 (commit)
via c32448b49036a50fc0f6d2b0a2de641144fc049f (commit)
via 5beb4e67b24c31ba8294861d71023dff78d96042 (commit)
via c8c63401423cf15ba6b56ffa80e60d4da6979a2c (commit)
from 784c80a6a3862e092050fb467c37b39d843a1353 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-stable
- Log -----------------------------------------------------------------
commit 3ce33843d767aad1f01fab20ba4c2bb781f8c21a
Author: Jeremy Allison <jra at samba.org>
Date: Wed May 14 14:09:02 2008 -0700
Ensure we don't keep searching for sharename if it's
not the start of the list.
Jeremy.
(cherry picked from commit 4d30a6bff9ce8e826f0109e99021d6683ec4299f)
commit 7eebe088f99d401a0f5e42e1ce593bb2ea74f245
Author: Jeremy Allison <jra at samba.org>
Date: Tue May 13 15:25:14 2008 -0700
Fix debug message.
Jeremy.
(cherry picked from commit 0a68f230cd92b97efed2b3bad19a3bf9a750d401)
commit c32448b49036a50fc0f6d2b0a2de641144fc049f
Author: Jeremy Allison <jra at samba.org>
Date: Tue May 13 15:02:53 2008 -0700
Second part of patch for bug #5460. Cope with pathnames
that don't look like \xxx\yyy, cope with arbitrary length.
Jeremy.
(cherry picked from commit c3328a252430007cd716a406d85fd2a0bbbff607)
commit 5beb4e67b24c31ba8294861d71023dff78d96042
Author: Jeremy Allison <jra at samba.org>
Date: Tue May 13 14:03:21 2008 -0700
Fix bug #5460. The problem is RHEL5.0 shipped a CIFS client
that sets the DFS bit on pathnames but doesn't
send DFS paths. This causes lookups to fail as
the smbd/msdfs.c code now just eats the first
two parts of the pathname and uses the rest as
the local path. The previous hostname check
used to protect us from that as we knew that
when the hostname was invalid it was a local
path (and a broken client).
I didn't want to put that check back in, but
came up with another idea - even though the
hostname can be a different one, the sharename
must be valid on this machine. So we can check
for a valid sharename instead.
Jeremy.
(cherry picked from commit 5c6ed7774220dea30c2c8a564648406b4f3eacbf)
commit c8c63401423cf15ba6b56ffa80e60d4da6979a2c
Author: Jeremy Allison <jra at samba.org>
Date: Wed May 14 14:11:26 2008 -0700
Fix bug #5464. Pointed out by Herb @ Connectathon. In fork_domain_child() we call :
CatchChild();
*before* we fork the domain child. This call establishes a signal handler that
eats SIGCLD signals and doesn't call sys_select_signal() as the main daemon
SIGCLD handler should do. This causes the parent to ignore dead children and
time out, instead of calling winbind_child_died() on receipt of the signal. The
correct fix is to move the CatchChild call into the child code after the fork.
Jeremy.
(cherry picked from commit 6da910cc1c6baccbb143f0b2d347e31e9f84c35b)
-----------------------------------------------------------------------
Summary of changes:
source/smbd/conn.c | 25 +++++++++++++++++++-
source/smbd/msdfs.c | 46 +++++++++++++++++++++++++++++++++-----
source/winbindd/winbindd_dual.c | 6 ++--
3 files changed, 66 insertions(+), 11 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/smbd/conn.c b/source/smbd/conn.c
index 5aedadc..97861ed 100644
--- a/source/smbd/conn.c
+++ b/source/smbd/conn.c
@@ -63,10 +63,10 @@ bool conn_snum_used(int snum)
return(False);
}
-
/****************************************************************************
-find a conn given a cnum
+ Find a conn given a cnum.
****************************************************************************/
+
connection_struct *conn_find(unsigned cnum)
{
int count=0;
@@ -84,6 +84,27 @@ connection_struct *conn_find(unsigned cnum)
return NULL;
}
+/****************************************************************************
+ Find a conn given a service name.
+****************************************************************************/
+
+connection_struct *conn_find_byname(const char *service)
+{
+ connection_struct *conn;
+
+ for (conn=Connections;conn;conn=conn->next) {
+ if (strequal(lp_servicename(SNUM(conn)),service)) {
+ if (conn != Connections) {
+ /* Promote if not first. */
+ DLIST_PROMOTE(Connections, conn);
+ }
+ return conn;
+ }
+ }
+
+ return NULL;
+}
+
/****************************************************************************
find first available connection slot, starting from a random position.
diff --git a/source/smbd/msdfs.c b/source/smbd/msdfs.c
index 4f9e739..eaa66ef 100644
--- a/source/smbd/msdfs.c
+++ b/source/smbd/msdfs.c
@@ -49,6 +49,7 @@ static NTSTATUS parse_dfs_path(const char *pathname,
{
char *pathname_local;
char *p,*temp;
+ char *servicename;
char *eos_ptr;
NTSTATUS status = NT_STATUS_OK;
char sepchar;
@@ -128,16 +129,49 @@ static NTSTATUS parse_dfs_path(const char *pathname,
DEBUG(10,("parse_dfs_path: hostname: %s\n",pdp->hostname));
/* Parse out servicename. */
- temp = p+1;
- p = strchr_m(temp,sepchar);
+ servicename = p+1;
+ p = strchr_m(servicename,sepchar);
+ if (p) {
+ *p = '\0';
+ }
+
+ /* Is this really our servicename ? */
+ if (NULL == conn_find_byname(servicename)) {
+ DEBUG(10,("parse_dfs_path: %s is not our servicename\n",
+ servicename));
+
+ /*
+ * Possibly client sent a local path by mistake.
+ * Try and convert to a local path.
+ */
+
+ pdp->hostname = eos_ptr; /* "" */
+ pdp->servicename = eos_ptr; /* "" */
+
+ /* Repair the path - replace the sepchar's
+ we nulled out */
+ servicename--;
+ *servicename = sepchar;
+ if (p) {
+ *p = sepchar;
+ }
+
+ p = temp;
+ DEBUG(10,("parse_dfs_path: trying to convert %s "
+ "to a local path\n",
+ temp));
+ goto local_path;
+ }
+
+ pdp->servicename = servicename;
+
+ DEBUG(10,("parse_dfs_path: servicename: %s\n",pdp->servicename));
+
if(p == NULL) {
- pdp->servicename = temp;
+ /* Client sent self referral \server\share. */
pdp->reqpath = eos_ptr; /* "" */
return NT_STATUS_OK;
}
- *p = '\0';
- pdp->servicename = temp;
- DEBUG(10,("parse_dfs_path: servicename: %s\n",pdp->servicename));
p++;
diff --git a/source/winbindd/winbindd_dual.c b/source/winbindd/winbindd_dual.c
index f71eec5..88121d2 100644
--- a/source/winbindd/winbindd_dual.c
+++ b/source/winbindd/winbindd_dual.c
@@ -982,9 +982,6 @@ static bool fork_domain_child(struct winbindd_child *child)
ZERO_STRUCT(state);
state.pid = sys_getpid();
- /* Stop zombies */
- CatchChild();
-
child->pid = sys_fork();
if (child->pid == -1) {
@@ -1006,6 +1003,9 @@ static bool fork_domain_child(struct winbindd_child *child)
/* Child */
+ /* Stop zombies in children */
+ CatchChild();
+
state.sock = fdpair[0];
close(fdpair[1]);
--
Samba Shared Repository
More information about the samba-cvs
mailing list