Remove superfluous fd parameter from SMB_VFS_FGET_NT_ACL().
authorMichael Adam <obnox@samba.org>
Sat, 5 Jan 2008 01:16:15 +0000 (02:16 +0100)
committerMichael Adam <obnox@samba.org>
Sun, 6 Jan 2008 22:07:59 +0000 (23:07 +0100)
Michael
(This used to be commit c0c7c1223da29c68359dac64a340c1c710d5f3d2)

source3/include/vfs.h
source3/include/vfs_macros.h
source3/modules/vfs_afsacl.c
source3/modules/vfs_aixacl2.c
source3/modules/vfs_default.c
source3/modules/vfs_full_audit.c
source3/modules/vfs_gpfs.c
source3/modules/vfs_zfsacl.c
source3/smbd/dir.c
source3/smbd/nttrans.c

index 5a3ec58b7a17d986fc0eb5eb177081a34de77329..83dff133cf55e7abc9b140a5abcbeba7db9323eb 100644 (file)
@@ -77,6 +77,7 @@
 /* Leave at 22 - not yet released. Change get_nt_acl to return NTSTATUS - vl */
 /* Leave at 22 - not yet released. Change get_nt_acl to *not* take a
  * files_struct. - obnox.*/
+/* Leave at 22 - not yet released. Remove parameter fd from fget_nt_acl. - obnox */
 
 #define SMB_VFS_INTERFACE_VERSION 22
 
@@ -310,7 +311,7 @@ struct vfs_ops {
                /* NT ACL operations. */
                
                NTSTATUS (*fget_nt_acl)(struct vfs_handle_struct *handle,
-                                       struct files_struct *fsp, int fd,
+                                       struct files_struct *fsp,
                                        uint32 security_info,
                                        struct security_descriptor **ppdesc);
                NTSTATUS (*get_nt_acl)(struct vfs_handle_struct *handle,
index c31d6cfc67a75ae36fd16323f36c3f5b9dc80b2b..4c06cc23b692d625c20c1cb2979fb0b78cc8919c 100644 (file)
@@ -84,7 +84,7 @@
 #define SMB_VFS_FILE_ID_CREATE(conn, dev, inode) ((conn)->vfs.ops.file_id_create((conn)->vfs.handles.file_id_create, (dev), (inode)))
 
 /* NT ACL operations. */
-#define SMB_VFS_FGET_NT_ACL(fsp, fd, security_info, ppdesc) ((fsp)->conn->vfs.ops.fget_nt_acl((fsp)->conn->vfs.handles.fget_nt_acl, (fsp), (fd), (security_info), (ppdesc)))
+#define SMB_VFS_FGET_NT_ACL(fsp, security_info, ppdesc) ((fsp)->conn->vfs.ops.fget_nt_acl((fsp)->conn->vfs.handles.fget_nt_acl, (fsp), (security_info), (ppdesc)))
 #define SMB_VFS_GET_NT_ACL(conn, name, security_info, ppdesc) ((conn)->vfs.ops.get_nt_acl((conn)->vfs.handles.get_nt_acl, (name), (security_info), (ppdesc)))
 #define SMB_VFS_FSET_NT_ACL(fsp, fd, security_info_sent, psd) ((fsp)->conn->vfs.ops.fset_nt_acl((fsp)->conn->vfs.handles.fset_nt_acl, (fsp), (fd), (security_info_sent), (psd)))
 #define SMB_VFS_SET_NT_ACL(fsp, name, security_info_sent, psd) ((fsp)->conn->vfs.ops.set_nt_acl((fsp)->conn->vfs.handles.set_nt_acl, (fsp), (name), (security_info_sent), (psd)))
 #define SMB_VFS_OPAQUE_FILE_ID_CREATE(conn, dev, inode) ((conn)->vfs.ops_opaque.file_id_create((conn)->vfs_opaque.handles.file_id_create, (dev), (inode)))
 
 /* NT ACL operations. */
-#define SMB_VFS_OPAQUE_FGET_NT_ACL(fsp, fd, security_info, ppdesc) ((fsp)->conn->vfs_opaque.ops.fget_nt_acl((fsp)->conn->vfs_opaque.handles.fget_nt_acl, (fsp), (fd), (security_info), (ppdesc)))
+#define SMB_VFS_OPAQUE_FGET_NT_ACL(fsp, security_info, ppdesc) ((fsp)->conn->vfs_opaque.ops.fget_nt_acl((fsp)->conn->vfs_opaque.handles.fget_nt_acl, (fsp), (security_info), (ppdesc)))
 #define SMB_VFS_OPAQUE_GET_NT_ACL(conn, name, security_info, ppdesc) ((conn)->vfs_opaque.ops.get_nt_acl((conn)->vfs_opaque.handles.get_nt_acl, (name), (security_info), (ppdesc)))
 #define SMB_VFS_OPAQUE_FSET_NT_ACL(fsp, fd, security_info_sent, psd) ((fsp)->conn->vfs_opaque.ops.fset_nt_acl((fsp)->conn->vfs_opaque.handles.fset_nt_acl, (fsp), (fd), (security_info_sent), (psd)))
 #define SMB_VFS_OPAQUE_SET_NT_ACL(fsp, name, security_info_sent, psd) ((fsp)->conn->vfs_opaque.ops.set_nt_acl((fsp)->conn->vfs_opaque.handles.set_nt_acl, (fsp), (name), (security_info_sent), (psd)))
 #define SMB_VFS_NEXT_FILE_ID_CREATE(handle, dev, inode) ((handle)->vfs_next.ops.file_id_create((handle)->vfs_next.handles.file_id_create, (dev), (inode)))
 
 /* NT ACL operations. */
-#define SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, fd, security_info, ppdesc) ((handle)->vfs_next.ops.fget_nt_acl((handle)->vfs_next.handles.fget_nt_acl, (fsp), (fd), (security_info), (ppdesc)))
+#define SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, security_info, ppdesc) ((handle)->vfs_next.ops.fget_nt_acl((handle)->vfs_next.handles.fget_nt_acl, (fsp), (security_info), (ppdesc)))
 #define SMB_VFS_NEXT_GET_NT_ACL(handle, name, security_info, ppdesc) ((handle)->vfs_next.ops.get_nt_acl((handle)->vfs_next.handles.get_nt_acl, (name), (security_info), (ppdesc)))
 #define SMB_VFS_NEXT_FSET_NT_ACL(handle, fsp, fd, security_info_sent, psd) ((handle)->vfs_next.ops.fset_nt_acl((handle)->vfs_next.handles.fset_nt_acl, (fsp), (fd), (security_info_sent), (psd)))
 #define SMB_VFS_NEXT_SET_NT_ACL(handle, fsp, name, security_info_sent, psd) ((handle)->vfs_next.ops.set_nt_acl((handle)->vfs_next.handles.set_nt_acl, (fsp), (name), (security_info_sent), (psd)))
index a14a1172298cd21d69ca5a103b4e91952e41c0e8..cdfac3eece5ae20438921e4d49ef84b0c9320880 100644 (file)
@@ -993,7 +993,7 @@ static NTSTATUS afs_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
 
 static NTSTATUS afsacl_fget_nt_acl(struct vfs_handle_struct *handle,
                                   struct files_struct *fsp,
-                                  int fd,  uint32 security_info,
+                                  uint32 security_info,
                                   struct security_descriptor **ppdesc)
 {
        struct afs_acl acl;
index d28efa55c6568a371f795b3901576f63ee11e436..9ea8414f798e2e8b45299063d63a9d8100e0e172 100644 (file)
@@ -159,7 +159,7 @@ static bool aixjfs2_get_nfs4_acl(const char *name,
 }
 
 static NTSTATUS aixjfs2_fget_nt_acl(vfs_handle_struct *handle,
-       files_struct *fsp, int fd, uint32 security_info,
+       files_struct *fsp, uint32 security_info,
        SEC_DESC **ppdesc)
 {
        SMB4ACL_T *pacl = NULL;
index 17b183600a6bbb4fdf2fbcc2fba6face8b0592b0..b31bc19815bfebf59b7ed91dcf60f389e93f1db0 100644 (file)
@@ -944,7 +944,7 @@ static struct file_id vfswrap_file_id_create(struct vfs_handle_struct *handle, S
 }
 
 static NTSTATUS vfswrap_fget_nt_acl(vfs_handle_struct *handle,
-                                   files_struct *fsp, int fd,
+                                   files_struct *fsp,
                                    uint32 security_info, SEC_DESC **ppdesc)
 {
        NTSTATUS result;
index f6b6e858374b75fe0fa22798a49ee799163caa8b..8f90e0de87477364e392950e9aa323b0afa3c10f 100644 (file)
@@ -191,7 +191,7 @@ static int smb_full_audit_chflags(vfs_handle_struct *handle,
 static struct file_id smb_full_audit_file_id_create(struct vfs_handle_struct *handle,
                                                    SMB_DEV_T dev, SMB_INO_T inode);
 static NTSTATUS smb_full_audit_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
-                               int fd, uint32 security_info,
+                               uint32 security_info,
                                SEC_DESC **ppdesc);
 static NTSTATUS smb_full_audit_get_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
                               const char *name, uint32 security_info,
@@ -1525,13 +1525,12 @@ static struct file_id smb_full_audit_file_id_create(struct vfs_handle_struct *ha
 }
 
 static NTSTATUS smb_full_audit_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
-                               int fd, uint32 security_info,
+                               uint32 security_info,
                                SEC_DESC **ppdesc)
 {
        NTSTATUS result;
 
-       result = SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, fd, security_info,
-                                         ppdesc);
+       result = SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, security_info, ppdesc);
 
        do_log(SMB_VFS_OP_FGET_NT_ACL, NT_STATUS_IS_OK(result), handle,
               "%s", fsp->fsp_name);
index 24ca3d5e423c3082e72919e3da10bc54d45a5f97..21e5a6bcfac73b43c9d5c47a9107dc9356a9cce6 100644 (file)
@@ -227,7 +227,7 @@ static int gpfs_get_nfs4_acl(const char *fname, SMB4ACL_T **ppacl)
 }
 
 static NTSTATUS gpfsacl_fget_nt_acl(vfs_handle_struct *handle,
-       files_struct *fsp, int fd, uint32 security_info,
+       files_struct *fsp, uint32 security_info,
        SEC_DESC **ppdesc)
 {
        SMB4ACL_T *pacl = NULL;
index 060d64cffbbce7a58618dcfdab24794e3952c197..6bf8352efd4f8d55e9ae798e1cf94b8e2d315d83 100644 (file)
@@ -174,7 +174,7 @@ static NTSTATUS zfs_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
 
 static NTSTATUS zfsacl_fget_nt_acl(struct vfs_handle_struct *handle,
                                 struct files_struct *fsp,
-                                int fd,  uint32 security_info,
+                                uint32 security_info,
                                 struct security_descriptor **ppdesc)
 {
        SMB4ACL_T *pacl;
index ccf91fe57dd05f7f345d3c984a33cb7b09292d61..ab6e12f20f713fb4452c67fa2114526f28217b37 100644 (file)
@@ -948,7 +948,7 @@ static bool user_can_read_file(connection_struct *conn, char *name, SMB_STRUCT_S
        }
 
        /* Get NT ACL -allocated in main loop talloc context. No free needed here. */
-       status = SMB_VFS_FGET_NT_ACL(fsp, fsp->fh->fd,
+       status = SMB_VFS_FGET_NT_ACL(fsp,
                        (OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION), &psd);
        close_file(fsp, NORMAL_CLOSE);
 
@@ -1007,7 +1007,7 @@ static bool user_can_write_file(connection_struct *conn, char *name, SMB_STRUCT_
        }
 
        /* Get NT ACL -allocated in main loop talloc context. No free needed here. */
-       status = SMB_VFS_FGET_NT_ACL(fsp, fsp->fh->fd,
+       status = SMB_VFS_FGET_NT_ACL(fsp,
                        (OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION), &psd);
        close_file(fsp, NORMAL_CLOSE);
 
index a51f3afd82749715a109677990368fc0f14c4ee5..e7f9f0d36c4df824277a9b67ad77721aad42c7f8 100644 (file)
@@ -1643,7 +1643,7 @@ static void call_nt_transact_query_security_desc(connection_struct *conn,
        } else {
                if (fsp->fh->fd != -1) {
                        status = SMB_VFS_FGET_NT_ACL(
-                               fsp, fsp->fh->fd, security_info_wanted, &psd);
+                               fsp, security_info_wanted, &psd);
                }
                else {
                        status = SMB_VFS_GET_NT_ACL(