The branch, master has been updated
       via  6718747 s3:smbd: use server_messaging_context() instead of 
sconn->msg_ctx in exit_server_common()
       via  2ea963b s3:vfs_hpuxacl: remove unused file_find_fd() calls
      from  d328762 wintest: use (renamed) smbclient4 tool as smbclient

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 671874726817f3dd1c448fca193bd97002f6971d
Author: Stefan Metzmacher <[email protected]>
Date:   Thu May 31 15:28:11 2012 +0200

    s3:smbd: use server_messaging_context() instead of sconn->msg_ctx in 
exit_server_common()
    
    sconn is not available in the parent anymore.
    
    Thanks to Volker Lendecke <[email protected]> for finding this!
    
    metze
    
    Autobuild-User: Stefan Metzmacher <[email protected]>
    Autobuild-Date: Thu May 31 18:08:06 CEST 2012 on sn-devel-104

commit 2ea963b260864b6a0b281c63d407c4e1df065abd
Author: Stefan Metzmacher <[email protected]>
Date:   Thu May 31 09:28:31 2012 +0200

    s3:vfs_hpuxacl: remove unused file_find_fd() calls
    
    metze

-----------------------------------------------------------------------

Summary of changes:
 source3/modules/vfs_hpuxacl.c |   20 ++------------------
 source3/smbd/server_exit.c    |    5 +++--
 2 files changed, 5 insertions(+), 20 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_hpuxacl.c b/source3/modules/vfs_hpuxacl.c
index 5acfd1e..1b5d8d0 100644
--- a/source3/modules/vfs_hpuxacl.c
+++ b/source3/modules/vfs_hpuxacl.c
@@ -191,14 +191,6 @@ SMB_ACL_T hpuxacl_sys_acl_get_fd(vfs_handle_struct *handle,
         /* 
         * HPUX doesn't have the facl call. Fake it using the path.... JRA. 
         */
-       /* For all I see, the info should already be in the fsp
-        * parameter, but get it again to be safe --- necessary? */
-        files_struct *file_struct_p = file_find_fd(fsp->conn->sconn,
-                                                  fsp->fh->fd);
-        if (file_struct_p == NULL) {
-                errno = EBADF;
-                return NULL;
-        }
         /*
          * We know we're in the same conn context. So we
          * can use the relative path.
@@ -207,7 +199,7 @@ SMB_ACL_T hpuxacl_sys_acl_get_fd(vfs_handle_struct *handle,
                "hpuxacl_sys_acl_get_file (no facl syscall on HPUX).\n"));
 
         return hpuxacl_sys_acl_get_file(handle,
-                                       file_struct_p->fsp_name->base_name,
+                                       fsp->fsp_name->base_name,
                                        SMB_ACL_TYPE_ACCESS);
 }
 
@@ -331,14 +323,6 @@ int hpuxacl_sys_acl_set_fd(vfs_handle_struct *handle,
         /*
          * HPUX doesn't have the facl call. Fake it using the path.... JRA.
          */
-       /* For all I see, the info should already be in the fsp
-        * parameter, but get it again to be safe --- necessary? */
-        files_struct *file_struct_p = file_find_fd(fsp->conn->sconn,
-                                                  fsp->fh->fd);
-        if (file_struct_p == NULL) {
-                errno = EBADF;
-                return -1;
-        }
         /*
          * We know we're in the same conn context. So we
          * can use the relative path.
@@ -347,7 +331,7 @@ int hpuxacl_sys_acl_set_fd(vfs_handle_struct *handle,
                "hpuxacl_sys_acl_set_file (no facl syscall on HPUX)\n"));
 
         return hpuxacl_sys_acl_set_file(handle,
-                                       file_struct_p->fsp_name->base_name,
+                                       fsp->fsp_name->base_name,
                                        SMB_ACL_TYPE_ACCESS, theacl);
 }
 
diff --git a/source3/smbd/server_exit.c b/source3/smbd/server_exit.c
index 20f7b4d..aa22c15 100644
--- a/source3/smbd/server_exit.c
+++ b/source3/smbd/server_exit.c
@@ -87,6 +87,7 @@ static void exit_server_common(enum server_exit_reason how,
        bool had_open_conn = false;
        struct smbXsrv_connection *conn = global_smbXsrv_connection;
        struct smbd_server_connection *sconn = NULL;
+       struct messaging_context *msg_ctx = server_messaging_context();
 
        if (conn != NULL) {
                sconn = conn->sconn;
@@ -112,14 +113,14 @@ static void exit_server_common(enum server_exit_reason 
how,
        }
 
        /* 3 second timeout. */
-       print_notify_send_messages(sconn->msg_ctx, 3);
+       print_notify_send_messages(msg_ctx, 3);
 
        /* delete our entry in the serverid database. */
        if (am_parent) {
                /*
                 * For children the parent takes care of cleaning up
                 */
-               serverid_deregister(messaging_server_id(sconn->msg_ctx));
+               serverid_deregister(messaging_server_id(msg_ctx));
        }
 
 #ifdef WITH_DFS


-- 
Samba Shared Repository

Reply via email to