[SCM] Samba Shared Repository - branch v3-6-test updated
Jeremy Allison
jra at samba.org
Thu Mar 17 17:10:56 MDT 2011
The branch, v3-6-test has been updated
via 527fe12 Fix compiler warning in debug message. (cherry picked from commit 3d6a92a37bead8df3c7704a2f33614cac0201748)
via 3fc3602 Fix crash bug on smbd shutdown when using FOPENDIR() found by Volker.
from c302e0e s3: Expose num_opens via api_RNetSessionEnum
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test
- Log -----------------------------------------------------------------
commit 527fe128c5bec3d5e1f2be45e3b72437ff2b7dde
Author: Jeremy Allison <jra at samba.org>
Date: Thu Mar 17 10:35:10 2011 -0700
Fix compiler warning in debug message.
(cherry picked from commit 3d6a92a37bead8df3c7704a2f33614cac0201748)
commit 3fc3602d07f5e08ff872584bb7942940af5b9ff9
Author: Jeremy Allison <jra at samba.org>
Date: Thu Mar 17 15:55:15 2011 -0700
Fix crash bug on smbd shutdown when using FOPENDIR() found by Volker.
The key was allowing the dptr_idle code to be triggered. We were
closing the dirp->dir handle without updating the underlying fd
in the open fsp.
Jeremy.
(cherry picked from commit 4c77d620e6cc5ea31f4a8f0bf9c8dab81f5f1002)
-----------------------------------------------------------------------
Summary of changes:
source3/passdb/pdb_ads.c | 2 +-
source3/smbd/dir.c | 14 +++++++++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/passdb/pdb_ads.c b/source3/passdb/pdb_ads.c
index 9960d38..654bc5d 100644
--- a/source3/passdb/pdb_ads.c
+++ b/source3/passdb/pdb_ads.c
@@ -2231,7 +2231,7 @@ static bool pdb_ads_sid_to_id(struct pdb_methods *m, const struct dom_sid *sid,
}
if (talloc_array_length(msg) != 1) {
DEBUG(10, ("Got %d objects, expected 1\n",
- talloc_array_length(msg)));
+ (int)talloc_array_length(msg)));
goto fail;
}
if (!tldap_pull_uint32(msg[0], "samAccountType", &atype)) {
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index b9791e9..350c4e5 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -575,7 +575,9 @@ void dptr_CloseDir(files_struct *fsp)
* present. I hate Solaris. JRA.
*/
#ifdef HAVE_DIRFD
- if (fsp->fh->fd == dirfd(fsp->dptr->dir_hnd->dir)) {
+ if (fsp->fh->fd != -1 &&
+ fsp->dptr->dir_hnd &&
+ dirfd(fsp->dptr->dir_hnd->dir)) {
/* The call below closes the underlying fd. */
fsp->fh->fd = -1;
}
@@ -1311,6 +1313,16 @@ bool is_visible_file(connection_struct *conn, const char *dir_path,
static int smb_Dir_destructor(struct smb_Dir *dirp)
{
if (dirp->dir) {
+#ifdef HAVE_DIRFD
+ if (dirp->conn->sconn) {
+ files_struct *fsp = file_find_fd(dirp->conn->sconn,
+ dirfd(dirp->dir));
+ if (fsp) {
+ /* The call below closes the underlying fd. */
+ fsp->fh->fd = -1;
+ }
+ }
+#endif
SMB_VFS_CLOSEDIR(dirp->conn,dirp->dir);
}
if (dirp->conn->sconn) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list