From 5921607f2647cec20a6bcebd17c5a0c53449c1ba Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 8 Jan 2008 01:54:19 +0100 Subject: Remove redundant parameter fd from SMB_VFS_SYS_ACL_SET_FD(). Michael (This used to be commit 9296e93588c0e795cae770765050247ac1474a74) --- source3/modules/vfs_aixacl.c | 4 ++-- source3/modules/vfs_aixacl2.c | 4 ++-- source3/modules/vfs_default.c | 4 ++-- source3/modules/vfs_full_audit.c | 6 +++--- source3/modules/vfs_gpfs.c | 2 +- source3/modules/vfs_hpuxacl.c | 6 +++--- source3/modules/vfs_irixacl.c | 4 ++-- source3/modules/vfs_posixacl.c | 4 ++-- source3/modules/vfs_solarisacl.c | 8 ++++---- source3/modules/vfs_tru64acl.c | 6 +++--- 10 files changed, 24 insertions(+), 24 deletions(-) (limited to 'source3/modules') diff --git a/source3/modules/vfs_aixacl.c b/source3/modules/vfs_aixacl.c index 1a76ed6878..726a7f485e 100644 --- a/source3/modules/vfs_aixacl.c +++ b/source3/modules/vfs_aixacl.c @@ -153,7 +153,7 @@ int aixacl_sys_acl_set_file(vfs_handle_struct *handle, int aixacl_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, - int fd, SMB_ACL_T theacl) + SMB_ACL_T theacl) { struct acl *file_acl = NULL; unsigned int rc; @@ -162,7 +162,7 @@ int aixacl_sys_acl_set_fd(vfs_handle_struct *handle, if (!file_acl) return -1; - rc = fchacl(fd,file_acl,file_acl->acl_len); + rc = fchacl(fsp->fh->fd,file_acl,file_acl->acl_len); DEBUG(10,("errno is %d\n",errno)); DEBUG(10,("return code is %d\n",rc)); SAFE_FREE(file_acl); diff --git a/source3/modules/vfs_aixacl2.c b/source3/modules/vfs_aixacl2.c index 42ecb9892c..996adbbdfe 100644 --- a/source3/modules/vfs_aixacl2.c +++ b/source3/modules/vfs_aixacl2.c @@ -448,7 +448,7 @@ int aixjfs2_sys_acl_set_file(vfs_handle_struct *handle, int aixjfs2_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, - int fd, SMB_ACL_T theacl) + SMB_ACL_T theacl) { struct acl *acl_aixc; acl_type_t acl_type_info; @@ -467,7 +467,7 @@ int aixjfs2_sys_acl_set_fd(vfs_handle_struct *handle, return -1; rc = aclx_fput( - fd, + fsp->fh->fd, SET_ACL, /* set only the ACL, not mode bits */ acl_type_info, acl_aixc, diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index f820d4b3e2..a46c2a336f 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -1097,9 +1097,9 @@ static int vfswrap_sys_acl_set_file(vfs_handle_struct *handle, const char *name return sys_acl_set_file(handle, name, acltype, theacl); } -static int vfswrap_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_ACL_T theacl) +static int vfswrap_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_T theacl) { - return sys_acl_set_fd(handle, fsp, fd, theacl); + return sys_acl_set_fd(handle, fsp, theacl); } static int vfswrap_sys_acl_delete_def_file(vfs_handle_struct *handle, const char *path) diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c index 4e70879dc2..64c74df1ba 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -250,7 +250,7 @@ static int smb_full_audit_sys_acl_set_file(vfs_handle_struct *handle, const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); static int smb_full_audit_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, - int fd, SMB_ACL_T theacl); + SMB_ACL_T theacl); static int smb_full_audit_sys_acl_delete_def_file(vfs_handle_struct *handle, const char *path); static int smb_full_audit_sys_acl_get_perm(vfs_handle_struct *handle, @@ -1843,11 +1843,11 @@ static int smb_full_audit_sys_acl_set_file(vfs_handle_struct *handle, } static int smb_full_audit_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, - int fd, SMB_ACL_T theacl) + SMB_ACL_T theacl) { int result; - result = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, fd, theacl); + result = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl); do_log(SMB_VFS_OP_SYS_ACL_SET_FD, (result >= 0), handle, "%s", fsp->fsp_name); diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 714f6e2917..bcf61f3bc7 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -615,7 +615,7 @@ int gpfsacl_sys_acl_set_file(vfs_handle_struct *handle, int gpfsacl_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, - int fd, SMB_ACL_T theacl) + SMB_ACL_T theacl) { return gpfsacl_sys_acl_set_file(handle, fsp->fsp_name, SMB_ACL_TYPE_ACCESS, theacl); } diff --git a/source3/modules/vfs_hpuxacl.c b/source3/modules/vfs_hpuxacl.c index 67fbfe56f6..e101886450 100644 --- a/source3/modules/vfs_hpuxacl.c +++ b/source3/modules/vfs_hpuxacl.c @@ -1,7 +1,7 @@ /* * Unix SMB/Netbios implementation. * VFS module to get and set HP-UX ACLs - * Copyright (C) Michael Adam 2006 + * Copyright (C) Michael Adam 2006,2008 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -306,14 +306,14 @@ int hpuxacl_sys_acl_set_file(vfs_handle_struct *handle, */ int hpuxacl_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, - int fd, SMB_ACL_T theacl) + SMB_ACL_T theacl) { /* * 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(fd); + files_struct *file_struct_p = file_find_fd(fsp->fh->fd); if (file_struct_p == NULL) { errno = EBADF; return -1; diff --git a/source3/modules/vfs_irixacl.c b/source3/modules/vfs_irixacl.c index cf53633504..6484e8f3eb 100644 --- a/source3/modules/vfs_irixacl.c +++ b/source3/modules/vfs_irixacl.c @@ -1,7 +1,7 @@ /* Unix SMB/Netbios implementation. VFS module to get and set irix acls - Copyright (C) Michael Adam 2006 + Copyright (C) Michael Adam 2006,2008 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -49,7 +49,7 @@ int irixacl_sys_acl_set_file(vfs_handle_struct *handle, int irixacl_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, - int fd, SMB_ACL_T theacl) + SMB_ACL_T theacl) { errno = ENOTSUP; return -1; diff --git a/source3/modules/vfs_posixacl.c b/source3/modules/vfs_posixacl.c index faa5e8e2ad..21fb2ada31 100644 --- a/source3/modules/vfs_posixacl.c +++ b/source3/modules/vfs_posixacl.c @@ -113,14 +113,14 @@ int posixacl_sys_acl_set_file(vfs_handle_struct *handle, int posixacl_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, - int fd, SMB_ACL_T theacl) + SMB_ACL_T theacl) { int res; acl_t acl = smb_acl_to_posix(theacl); if (acl == NULL) { return -1; } - res = acl_set_fd(fd, acl); + res = acl_set_fd(fsp->fh->fd, acl); acl_free(acl); return res; } diff --git a/source3/modules/vfs_solarisacl.c b/source3/modules/vfs_solarisacl.c index cda243f8c1..ce763f07e7 100644 --- a/source3/modules/vfs_solarisacl.c +++ b/source3/modules/vfs_solarisacl.c @@ -1,7 +1,7 @@ /* Unix SMB/Netbios implementation. VFS module to get and set Solaris ACLs - Copyright (C) Michael Adam 2006 + Copyright (C) Michael Adam 2006,2008 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -219,7 +219,7 @@ int solarisacl_sys_acl_set_file(vfs_handle_struct *handle, */ int solarisacl_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, - int fd, SMB_ACL_T theacl) + SMB_ACL_T theacl) { SOLARIS_ACL_T solaris_acl = NULL; SOLARIS_ACL_T default_acl = NULL; @@ -242,7 +242,7 @@ int solarisacl_sys_acl_set_fd(vfs_handle_struct *handle, strerror(errno))); goto done; } - if (!solaris_acl_get_fd(fd, &default_acl, &default_count)) { + if (!solaris_acl_get_fd(fsp->fh->fd, &default_acl, &default_count)) { DEBUG(10, ("error getting (default) acl from fd\n")); goto done; } @@ -258,7 +258,7 @@ int solarisacl_sys_acl_set_fd(vfs_handle_struct *handle, goto done; } - ret = facl(fd, SETACL, count, solaris_acl); + ret = facl(fsp->fh->fd, SETACL, count, solaris_acl); if (ret != 0) { DEBUG(10, ("call of facl failed (%s).\n", strerror(errno))); } diff --git a/source3/modules/vfs_tru64acl.c b/source3/modules/vfs_tru64acl.c index ee81ee6021..b23a7ddcfa 100644 --- a/source3/modules/vfs_tru64acl.c +++ b/source3/modules/vfs_tru64acl.c @@ -1,7 +1,7 @@ /* Unix SMB/Netbios implementation. VFS module to get and set Tru64 acls - Copyright (C) Michael Adam 2006 + Copyright (C) Michael Adam 2006,2008 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -128,14 +128,14 @@ fail: int tru64acl_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, - int fd, SMB_ACL_T theacl) + SMB_ACL_T theacl) { int res; acl_t tru64_acl = smb_acl_to_tru64_acl(theacl); if (tru64_acl == NULL) { return -1; } - res = acl_set_fd(fd, ACL_TYPE_ACCESS, tru64_acl); + res = acl_set_fd(fsp->fh->fd, ACL_TYPE_ACCESS, tru64_acl); acl_free(tru64_acl); return res; -- cgit