s3:smbd: make smbd_check_open_rights() function non-static for use in SMB2
authorStefan Metzmacher <metze@samba.org>
Wed, 19 Aug 2009 16:03:43 +0000 (18:03 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 19 Aug 2009 17:28:24 +0000 (19:28 +0200)
metze

source3/smbd/globals.h
source3/smbd/open.c

index 4fa85a9fdb32853f0d1aa2ef0e703356d4d5583e..fd92c22e7299fe27049322b6c7a1bb50025bbb10 100644 (file)
@@ -234,6 +234,11 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx,
                           uint32_t *_mode,
                           long *_prev_offset);
 
+NTSTATUS smbd_check_open_rights(struct connection_struct *conn,
+                               const struct smb_filename *smb_fname,
+                               uint32_t access_mask,
+                               uint32_t *access_granted);
+
 void smbd_notify_cancel_by_smbreq(struct smbd_server_connection *sconn,
                                  const struct smb_request *smbreq);
 
index 63982341ac6459c0b3ac41e438f37048759a3fbd..045635535f6da6b2aced9f22b2782b57ef07ef22 100644 (file)
@@ -64,7 +64,7 @@ NTSTATUS smb1_file_se_access_check(const struct security_descriptor *sd,
  Check if we have open rights.
 ****************************************************************************/
 
-static NTSTATUS check_open_rights(struct connection_struct *conn,
+NTSTATUS smbd_check_open_rights(struct connection_struct *conn,
                                const struct smb_filename *smb_fname,
                                uint32_t access_mask,
                                uint32_t *access_granted)
@@ -90,7 +90,7 @@ static NTSTATUS check_open_rights(struct connection_struct *conn,
                        DACL_SECURITY_INFORMATION),&sd);
 
        if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(10, ("check_open_rights: Could not get acl "
+               DEBUG(10, ("smbd_check_open_rights: Could not get acl "
                        "on %s: %s\n",
                        smb_fname_str_dbg(smb_fname),
                        nt_errstr(status)));
@@ -105,7 +105,7 @@ static NTSTATUS check_open_rights(struct connection_struct *conn,
 
        TALLOC_FREE(sd);
 
-       DEBUG(10,("check_open_rights: file %s requesting "
+       DEBUG(10,("smbd_check_open_rights: file %s requesting "
                "0x%x returning 0x%x (%s)\n",
                smb_fname_str_dbg(smb_fname),
                (unsigned int)access_mask,
@@ -477,7 +477,7 @@ static NTSTATUS open_file(files_struct *fsp,
                if (file_existed) {
                        uint32_t access_granted = 0;
 
-                       status = check_open_rights(conn,
+                       status = smbd_check_open_rights(conn,
                                        smb_fname,
                                        access_mask,
                                        &access_granted);
@@ -547,7 +547,7 @@ static NTSTATUS open_file(files_struct *fsp,
                                                          smb_fname)));
                                } else {
                                        DEBUG(10,("open_file: "
-                                                 "check_open_rights on file "
+                                                 "smbd_check_open_rights on file "
                                                  "%s returned %s\n",
                                                  smb_fname_str_dbg(smb_fname),
                                                  nt_errstr(status) ));
@@ -2545,8 +2545,8 @@ static NTSTATUS open_directory(connection_struct *conn,
 
        if (info == FILE_WAS_OPENED) {
                uint32_t access_granted = 0;
-               status = check_open_rights(conn, smb_dname, access_mask,
-                                          &access_granted);
+               status = smbd_check_open_rights(conn, smb_dname, access_mask,
+                                               &access_granted);
 
                /* Were we trying to do a directory open
                 * for delete and didn't get DELETE
@@ -2567,7 +2567,7 @@ static NTSTATUS open_directory(connection_struct *conn,
                }
 
                if (!NT_STATUS_IS_OK(status)) {
-                       DEBUG(10, ("open_directory: check_open_rights on "
+                       DEBUG(10, ("open_directory: smbd_check_open_rights on "
                                "file %s failed with %s\n",
                                smb_fname_str_dbg(smb_dname),
                                nt_errstr(status)));