Remove redundant parameter fd from SMB_VFS_FCHMOD_ACL().
authorMichael Adam <obnox@samba.org>
Tue, 8 Jan 2008 00:14:24 +0000 (01:14 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 8 Jan 2008 00:14:24 +0000 (01:14 +0100)
Michael
(This used to be commit 7b201c177b3668f54751ba17d6a0b53ed913e7f7)

source3/include/vfs.h
source3/include/vfs_macros.h
source3/modules/vfs_audit.c
source3/modules/vfs_default.c
source3/modules/vfs_extd_audit.c
source3/modules/vfs_full_audit.c
source3/smbd/open.c
source3/smbd/posix_acls.c

index fa8645e385ddbaec3dbf020cd1534791a0dd2f0a..abe474f36034f2cbf3585b1854377e58ea2f923d 100644 (file)
@@ -92,6 +92,7 @@
 /* Leave at 22 - not yet released. Remove parameter fd from linux_setlease. - obnox */
 /* Leave at 22 - not yet released. Remove parameter fd from getlock. - obnox */
 /* Leave at 22 - not yet released. Remove parameter fd from sys_acl_get_fd. - obnox */
+/* Leave at 22 - not yet released. Remove parameter fd from fchmod_acl. - obnox */
 
 
 
@@ -347,7 +348,7 @@ struct vfs_ops {
                /* POSIX ACL operations. */
                
                int (*chmod_acl)(struct vfs_handle_struct *handle, const char *name, mode_t mode);
-               int (*fchmod_acl)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, mode_t mode);
+               int (*fchmod_acl)(struct vfs_handle_struct *handle, struct files_struct *fsp, mode_t mode);
                
                int (*sys_acl_get_entry)(struct vfs_handle_struct *handle, SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p);
                int (*sys_acl_get_tag_type)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p);
index e7f39a57ef03e23626c7cc72349cf283f3ddd860..3cd4be17604d2f448df9e6c8e9af7fb6dbdc2657 100644 (file)
@@ -91,7 +91,7 @@
 
 /* POSIX ACL operations. */
 #define SMB_VFS_CHMOD_ACL(conn, name, mode) ((conn)->vfs.ops.chmod_acl((conn)->vfs.handles.chmod_acl, (name), (mode)))
-#define SMB_VFS_FCHMOD_ACL(fsp, fd, mode) ((fsp)->conn->vfs.ops.fchmod_acl((fsp)->conn->vfs.handles.chmod_acl, (fsp), (fd), (mode)))
+#define SMB_VFS_FCHMOD_ACL(fsp, mode) ((fsp)->conn->vfs.ops.fchmod_acl((fsp)->conn->vfs.handles.chmod_acl, (fsp), (mode)))
 
 #define SMB_VFS_SYS_ACL_GET_ENTRY(conn, theacl, entry_id, entry_p) ((conn)->vfs.ops.sys_acl_get_entry((conn)->vfs.handles.sys_acl_get_entry, (theacl), (entry_id), (entry_p)))
 #define SMB_VFS_SYS_ACL_GET_TAG_TYPE(conn, entry_d, tag_type_p) ((conn)->vfs.ops.sys_acl_get_tag_type((conn)->vfs.handles.sys_acl_get_tag_type, (entry_d), (tag_type_p)))
 
 /* POSIX ACL operations. */
 #define SMB_VFS_OPAQUE_CHMOD_ACL(conn, name, mode) ((conn)->vfs_opaque.ops.chmod_acl((conn)->vfs_opaque.handles.chmod_acl, (name), (mode)))
-#define SMB_VFS_OPAQUE_FCHMOD_ACL(fsp, fd, mode) ((fsp)->conn->vfs_opaque.ops.fchmod_acl((fsp)->conn->vfs_opaque.handles.chmod_acl, (fsp), (fd), (mode)))
+#define SMB_VFS_OPAQUE_FCHMOD_ACL(fsp, mode) ((fsp)->conn->vfs_opaque.ops.fchmod_acl((fsp)->conn->vfs_opaque.handles.chmod_acl, (fsp), (mode)))
 
 #define SMB_VFS_OPAQUE_SYS_ACL_GET_ENTRY(conn, theacl, entry_id, entry_p) ((conn)->vfs_opaque.ops.sys_acl_get_entry((conn)->vfs_opaque.handles.sys_acl_get_entry, (theacl), (entry_id), (entry_p)))
 #define SMB_VFS_OPAQUE_SYS_ACL_GET_TAG_TYPE(conn, entry_d, tag_type_p) ((conn)->vfs_opaque.ops.sys_acl_get_tag_type((conn)->vfs_opaque.handles.sys_acl_get_tag_type, (entry_d), (tag_type_p)))
 
 /* POSIX ACL operations. */
 #define SMB_VFS_NEXT_CHMOD_ACL(handle, name, mode) ((handle)->vfs_next.ops.chmod_acl((handle)->vfs_next.handles.chmod_acl, (name), (mode)))
-#define SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, fd, mode) ((handle)->vfs_next.ops.fchmod_acl((handle)->vfs_next.handles.chmod_acl, (fsp), (fd), (mode)))
+#define SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode) ((handle)->vfs_next.ops.fchmod_acl((handle)->vfs_next.handles.chmod_acl, (fsp), (mode)))
 
 #define SMB_VFS_NEXT_SYS_ACL_GET_ENTRY(handle, theacl, entry_id, entry_p) ((handle)->vfs_next.ops.sys_acl_get_entry((handle)->vfs_next.handles.sys_acl_get_entry, (theacl), (entry_id), (entry_p)))
 #define SMB_VFS_NEXT_SYS_ACL_GET_TAG_TYPE(handle, entry_d, tag_type_p) ((handle)->vfs_next.ops.sys_acl_get_tag_type((handle)->vfs_next.handles.sys_acl_get_tag_type, (entry_d), (tag_type_p)))
index 27e7f998ab052b15545a3d62da458e9fb3fae082..a63bf4f67261e50ed551c439ec4748d98ada45d2 100644 (file)
@@ -40,7 +40,7 @@ static int audit_unlink(vfs_handle_struct *handle, const char *path);
 static int audit_chmod(vfs_handle_struct *handle, const char *path, mode_t mode);
 static int audit_chmod_acl(vfs_handle_struct *handle, const char *name, mode_t mode);
 static int audit_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t mode);
-static int audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, int fd, mode_t mode);
+static int audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t mode);
 
 /* VFS operations */
 
@@ -282,11 +282,11 @@ static int audit_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t mod
        return result;
 }
 
-static int audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, int fd, mode_t mode)
+static int audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
 {
        int result;
 
-       result = SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, fd, mode);
+       result = SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
 
        syslog(audit_syslog_priority(handle), "fchmod_acl %s mode 0x%x %s%s\n",
               fsp->fsp_name, mode,
index d909b0475a9a4f79b9608bfd7d7ed016f4581c89..f820d4b3e26f320b2f2ed26a2174e3d5660243b1 100644 (file)
@@ -563,7 +563,7 @@ static int vfswrap_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t m
 
        {
                int saved_errno = errno; /* We might get ENOSYS */
-               if ((result = SMB_VFS_FCHMOD_ACL(fsp, fsp->fh->fd, mode)) == 0) {
+               if ((result = SMB_VFS_FCHMOD_ACL(fsp, mode)) == 0) {
                        END_PROFILE(syscall_fchmod);
                        return result;
                }
@@ -1002,7 +1002,7 @@ static int vfswrap_chmod_acl(vfs_handle_struct *handle,  const char *name, mode_
 #endif
 }
 
-static int vfswrap_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, int fd, mode_t mode)
+static int vfswrap_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
 {
 #ifdef HAVE_NO_ACL
        errno = ENOSYS;
@@ -1011,7 +1011,7 @@ static int vfswrap_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, int
        int result;
 
        START_PROFILE(fchmod_acl);
-       result = fchmod_acl(fsp, fd, mode);
+       result = fchmod_acl(fsp, mode);
        END_PROFILE(fchmod_acl);
        return result;
 #endif
index f9b03731e7097c2b87cd8338d6ea9cd9db3181f6..a21e281e2ca6b09cd10f228837c81bc016a0a9a4 100644 (file)
@@ -43,7 +43,7 @@ static int audit_unlink(vfs_handle_struct *handle, const char *path);
 static int audit_chmod(vfs_handle_struct *handle, const char *path, mode_t mode);
 static int audit_chmod_acl(vfs_handle_struct *handle, const char *name, mode_t mode);
 static int audit_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t mode);
-static int audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, int fd, mode_t mode);
+static int audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t mode);
 
 /* VFS operations */
 
@@ -328,11 +328,11 @@ static int audit_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t mod
        return result;
 }
 
-static int audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, int fd, mode_t mode)
+static int audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
 {
        int result;
        
-       result = SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, fd, mode);
+       result = SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
 
        syslog(audit_syslog_priority(handle), "fchmod_acl %s mode 0x%x %s%s\n",
               fsp->fsp_name, mode,
index d572c155e2271fd715af15f8e5e6ccf565bfea6d..4e70879dc23d5d648a31970d8419d0386732d4a3 100644 (file)
@@ -205,7 +205,7 @@ static NTSTATUS smb_full_audit_set_nt_acl(vfs_handle_struct *handle, files_struc
 static int smb_full_audit_chmod_acl(vfs_handle_struct *handle,
                           const char *path, mode_t mode);
 static int smb_full_audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp,
-                           int fd, mode_t mode);
+                                    mode_t mode);
 static int smb_full_audit_sys_acl_get_entry(vfs_handle_struct *handle,
                                   SMB_ACL_T theacl, int entry_id,
                                   SMB_ACL_ENTRY_T *entry_p);
@@ -1594,11 +1594,11 @@ static int smb_full_audit_chmod_acl(vfs_handle_struct *handle,
 }
 
 static int smb_full_audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp,
-                           int fd, mode_t mode)
+                                    mode_t mode)
 {
        int result;
        
-       result = SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, fd, mode);
+       result = SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
 
        do_log(SMB_VFS_OP_FCHMOD_ACL, (result >= 0), handle,
               "%s|%o", fsp->fsp_name, mode);
index b618092a321174eb7aeee34660e25e9cf1f08a10..4abe01738063fb62f9f4a0cdf42b038becd2ee43 100644 (file)
@@ -1887,7 +1887,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
                int saved_errno = errno; /* We might get ENOSYS in the next
                                          * call.. */
 
-               if (SMB_VFS_FCHMOD_ACL(fsp, fsp->fh->fd, unx_mode) == -1 &&
+               if (SMB_VFS_FCHMOD_ACL(fsp, unx_mode) == -1 &&
                    errno == ENOSYS) {
                        errno = saved_errno; /* Ignore ENOSYS */
                }
@@ -1901,8 +1901,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
                {
                        int saved_errno = errno; /* We might get ENOSYS in the
                                                  * next call.. */
-                       ret = SMB_VFS_FCHMOD_ACL(fsp, fsp->fh->fd,
-                                                new_unx_mode);
+                       ret = SMB_VFS_FCHMOD_ACL(fsp, new_unx_mode);
 
                        if (ret == -1 && errno == ENOSYS) {
                                errno = saved_errno; /* Ignore ENOSYS */
index b07033b8ac9872bcb5a11b54e93112ae01227bb4..23a246fea76f8e0e5d14e51864f41192cf21c735 100644 (file)
@@ -3802,7 +3802,7 @@ int inherit_access_acl(connection_struct *conn, const char *inherit_from_dir,
  and set the mask to rwx. Needed to preserve complex ACLs set by NT.
 ****************************************************************************/
 
-int fchmod_acl(files_struct *fsp, int fd, mode_t mode)
+int fchmod_acl(files_struct *fsp, mode_t mode)
 {
        connection_struct *conn = fsp->conn;
        SMB_ACL_T posix_acl = NULL;