The branch, master has been updated
       via  c7f4480... s3: Remove fsp_belongs_conn
      from  b90eb7d... s3: Remove some leftovers from macros

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


- Log -----------------------------------------------------------------
commit c7f44801e3e55a37cfc467de8d9ac127cd89327e
Author: Volker Lendecke <[email protected]>
Date:   Sun Jun 13 15:17:31 2010 +0200

    s3: Remove fsp_belongs_conn
    
    check_open_fsp does exactly the same

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

Summary of changes:
 source3/include/proto.h |    2 --
 source3/smbd/nttrans.c  |    8 ++++----
 source3/smbd/reply.c    |   16 ----------------
 3 files changed, 4 insertions(+), 22 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 2b2754c..df991e3 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -6139,8 +6139,6 @@ bool check_fsp(connection_struct *conn, struct 
smb_request *req,
               files_struct *fsp);
 bool check_fsp_ntquota_handle(connection_struct *conn, struct smb_request *req,
                              files_struct *fsp);
-bool fsp_belongs_conn(connection_struct *conn, struct smb_request *req,
-                     files_struct *fsp);
 void reply_special(struct smbd_server_connection *sconn, char *inbuf);
 void reply_tcon(struct smb_request *req);
 void reply_tcon_and_X(struct smb_request *req);
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index c5b5fee..839d1b3 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -2051,7 +2051,7 @@ static void call_nt_transact_ioctl(connection_struct 
*conn,
 
                DEBUG(10,("FSCTL_CREATE_OR_GET_OBJECT_ID: called on 
FID[0x%04X]\n",fidnum));
 
-               if (!fsp_belongs_conn(conn, req, fsp)) {
+               if (!check_fsp_open(conn, req, fsp)) {
                        return;
                }
 
@@ -2108,7 +2108,7 @@ static void call_nt_transact_ioctl(connection_struct 
*conn,
                uint32 i;
                char *cur_pdata;
 
-               if (!fsp_belongs_conn(conn, req, fsp)) {
+               if (!check_fsp_open(conn, req, fsp)) {
                        return;
                }
 
@@ -2231,7 +2231,7 @@ static void call_nt_transact_ioctl(connection_struct 
*conn,
 
                DEBUG(10,("FSCTL_FIND_FILES_BY_SID: called on 
FID[0x%04X]\n",fidnum));
 
-               if (!fsp_belongs_conn(conn, req, fsp)) {
+               if (!check_fsp_open(conn, req, fsp)) {
                        return;
                }
 
@@ -2281,7 +2281,7 @@ static void call_nt_transact_ioctl(connection_struct 
*conn,
                NTSTATUS status;
                uint64_t offset, length;
 
-               if (!fsp_belongs_conn(conn, req, fsp)) {
+               if (!check_fsp_open(conn, req, fsp)) {
                        return;
                }
 
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 4d33652..19c9870 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -386,22 +386,6 @@ bool check_fsp_ntquota_handle(connection_struct *conn, 
struct smb_request *req,
        return true;
 }
 
-/****************************************************************************
- Check if we have a correct fsp. Replacement for the FSP_BELONGS_CONN macro
-****************************************************************************/
-
-bool fsp_belongs_conn(connection_struct *conn, struct smb_request *req,
-                     files_struct *fsp)
-{
-       if ((fsp) && (conn) && ((conn)==(fsp)->conn)
-           && (req->vuid == (fsp)->vuid)) {
-               return True;
-       }
-
-       reply_nterror(req, NT_STATUS_INVALID_HANDLE);
-       return False;
-}
-
 static bool netbios_session_retarget(const char *name, int name_type)
 {
        char *trim_name;


-- 
Samba Shared Repository

Reply via email to