[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-unstable-1117-g4f2d139
Michael Adam
obnox at samba.org
Sun Jan 6 22:08:49 GMT 2008
The branch, v3-2-test has been updated
via 4f2d139a186048f08180378a877b69d2f80ad51f (commit)
via 8fce247bcf7fb27a31a7b8103377681d692d35aa (commit)
via c0c7c1223da29c68359dac64a340c1c710d5f3d2 (commit)
from 020ed731b17ac00dd490f210f108eae249fb27ad (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 4f2d139a186048f08180378a877b69d2f80ad51f
Author: Michael Adam <obnox at samba.org>
Date: Sun Jan 6 18:48:02 2008 +0100
Remove superfluous parameter fd from SMB_VFS_FSET_NT_ACL().
Michael
commit 8fce247bcf7fb27a31a7b8103377681d692d35aa
Author: Michael Adam <obnox at samba.org>
Date: Sun Jan 6 18:03:33 2008 +0100
Wrap lines for readability.
Michael
commit c0c7c1223da29c68359dac64a340c1c710d5f3d2
Author: Michael Adam <obnox at samba.org>
Date: Sat Jan 5 02:16:15 2008 +0100
Remove superfluous fd parameter from SMB_VFS_FGET_NT_ACL().
Michael
-----------------------------------------------------------------------
Summary of changes:
source/include/vfs.h | 15 ++++++++++++---
source/include/vfs_macros.h | 12 ++++++------
source/modules/vfs_afsacl.c | 4 ++--
source/modules/vfs_aixacl2.c | 4 ++--
source/modules/vfs_default.c | 4 ++--
source/modules/vfs_full_audit.c | 14 ++++++--------
source/modules/vfs_gpfs.c | 4 ++--
source/modules/vfs_zfsacl.c | 4 ++--
source/smbd/dir.c | 4 ++--
source/smbd/nttrans.c | 5 ++---
source/smbd/open.c | 3 +--
11 files changed, 39 insertions(+), 34 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/include/vfs.h b/source/include/vfs.h
index 5a3ec58..038da29 100644
--- a/source/include/vfs.h
+++ b/source/include/vfs.h
@@ -77,6 +77,8 @@
/* 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 */
+/* Leave at 22 - not yet released. Remove parameter fd from gset_nt_acl. - obnox */
#define SMB_VFS_INTERFACE_VERSION 22
@@ -310,15 +312,22 @@ 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,
const char *name,
uint32 security_info,
struct security_descriptor **ppdesc);
- NTSTATUS (*fset_nt_acl)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, uint32 security_info_sent, struct security_descriptor *psd);
- NTSTATUS (*set_nt_acl)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, uint32 security_info_sent, struct security_descriptor *psd);
+ NTSTATUS (*fset_nt_acl)(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ uint32 security_info_sent,
+ struct security_descriptor *psd);
+ NTSTATUS (*set_nt_acl)(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ const char *name,
+ uint32 security_info_sent,
+ struct security_descriptor *psd);
/* POSIX ACL operations. */
diff --git a/source/include/vfs_macros.h b/source/include/vfs_macros.h
index c31d6cf..45c5353 100644
--- a/source/include/vfs_macros.h
+++ b/source/include/vfs_macros.h
@@ -84,9 +84,9 @@
#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_FSET_NT_ACL(fsp, security_info_sent, psd) ((fsp)->conn->vfs.ops.fset_nt_acl((fsp)->conn->vfs.handles.fset_nt_acl, (fsp), (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)))
/* POSIX ACL operations. */
@@ -203,9 +203,9 @@
#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_FSET_NT_ACL(fsp, security_info_sent, psd) ((fsp)->conn->vfs_opaque.ops.fset_nt_acl((fsp)->conn->vfs_opaque.handles.fset_nt_acl, (fsp), (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)))
/* POSIX ACL operations. */
@@ -323,9 +323,9 @@
#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_FSET_NT_ACL(handle, fsp, security_info_sent, psd) ((handle)->vfs_next.ops.fset_nt_acl((handle)->vfs_next.handles.fset_nt_acl, (fsp), (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)))
/* POSIX ACL operations. */
diff --git a/source/modules/vfs_afsacl.c b/source/modules/vfs_afsacl.c
index a14a117..90c6a58 100644
--- a/source/modules/vfs_afsacl.c
+++ b/source/modules/vfs_afsacl.c
@@ -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;
@@ -1039,7 +1039,7 @@ static NTSTATUS afsacl_get_nt_acl(struct vfs_handle_struct *handle,
NTSTATUS afsacl_fset_nt_acl(vfs_handle_struct *handle,
files_struct *fsp,
- int fd, uint32 security_info_sent,
+ uint32 security_info_sent,
SEC_DESC *psd)
{
return afs_set_nt_acl(handle, fsp, security_info_sent, psd);
diff --git a/source/modules/vfs_aixacl2.c b/source/modules/vfs_aixacl2.c
index d28efa5..d63886d 100644
--- a/source/modules/vfs_aixacl2.c
+++ b/source/modules/vfs_aixacl2.c
@@ -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;
@@ -399,7 +399,7 @@ static NTSTATUS aixjfs2_set_nt_acl_common(files_struct *fsp, uint32 security_inf
return result;
}
-NTSTATUS aixjfs2_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp, int fd, uint32 security_info_sent, SEC_DESC *psd)
+NTSTATUS aixjfs2_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd)
{
return aixjfs2_set_nt_acl_common(fsp, security_info_sent, psd);
}
diff --git a/source/modules/vfs_default.c b/source/modules/vfs_default.c
index 17b1836..3251c56 100644
--- a/source/modules/vfs_default.c
+++ b/source/modules/vfs_default.c
@@ -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;
@@ -967,7 +967,7 @@ static NTSTATUS vfswrap_get_nt_acl(vfs_handle_struct *handle,
return result;
}
-static NTSTATUS vfswrap_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp, int fd, uint32 security_info_sent, SEC_DESC *psd)
+static NTSTATUS vfswrap_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd)
{
NTSTATUS result;
diff --git a/source/modules/vfs_full_audit.c b/source/modules/vfs_full_audit.c
index f6b6e85..bdbd84a 100644
--- a/source/modules/vfs_full_audit.c
+++ b/source/modules/vfs_full_audit.c
@@ -191,13 +191,13 @@ 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,
SEC_DESC **ppdesc);
static NTSTATUS smb_full_audit_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
- int fd, uint32 security_info_sent,
+ uint32 security_info_sent,
SEC_DESC *psd);
static NTSTATUS smb_full_audit_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
const char *name, uint32 security_info_sent,
@@ -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);
@@ -1556,13 +1555,12 @@ static NTSTATUS smb_full_audit_get_nt_acl(vfs_handle_struct *handle,
}
static NTSTATUS smb_full_audit_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
- int fd, uint32 security_info_sent,
+ uint32 security_info_sent,
SEC_DESC *psd)
{
NTSTATUS result;
- result = SMB_VFS_NEXT_FSET_NT_ACL(handle, fsp, fd, security_info_sent,
- psd);
+ result = SMB_VFS_NEXT_FSET_NT_ACL(handle, fsp, security_info_sent, psd);
do_log(SMB_VFS_OP_FSET_NT_ACL, NT_STATUS_IS_OK(result), handle, "%s", fsp->fsp_name);
diff --git a/source/modules/vfs_gpfs.c b/source/modules/vfs_gpfs.c
index 24ca3d5..0f7dc81 100644
--- a/source/modules/vfs_gpfs.c
+++ b/source/modules/vfs_gpfs.c
@@ -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;
@@ -363,7 +363,7 @@ static NTSTATUS gpfsacl_set_nt_acl_internal(files_struct *fsp, uint32 security_i
return result;
}
-static NTSTATUS gpfsacl_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp, int fd, uint32 security_info_sent, SEC_DESC *psd)
+static NTSTATUS gpfsacl_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd)
{
return gpfsacl_set_nt_acl_internal(fsp, security_info_sent, psd);
}
diff --git a/source/modules/vfs_zfsacl.c b/source/modules/vfs_zfsacl.c
index 060d64c..ce2e287 100644
--- a/source/modules/vfs_zfsacl.c
+++ b/source/modules/vfs_zfsacl.c
@@ -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;
@@ -206,7 +206,7 @@ static NTSTATUS zfsacl_get_nt_acl(struct vfs_handle_struct *handle,
static NTSTATUS zfsacl_fset_nt_acl(vfs_handle_struct *handle,
files_struct *fsp,
- int fd, uint32 security_info_sent,
+ uint32 security_info_sent,
SEC_DESC *psd)
{
return zfs_set_nt_acl(handle, fsp, security_info_sent, psd);
diff --git a/source/smbd/dir.c b/source/smbd/dir.c
index ccf91fe..ab6e12f 100644
--- a/source/smbd/dir.c
+++ b/source/smbd/dir.c
@@ -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);
diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c
index a51f3af..ae64c06 100644
--- a/source/smbd/nttrans.c
+++ b/source/smbd/nttrans.c
@@ -769,8 +769,7 @@ static NTSTATUS set_sd(files_struct *fsp, uint8 *data, uint32 sd_len,
}
if (fsp->fh->fd != -1) {
- status = SMB_VFS_FSET_NT_ACL(fsp, fsp->fh->fd,
- security_info_sent, psd);
+ status = SMB_VFS_FSET_NT_ACL(fsp, security_info_sent, psd);
}
else {
status = SMB_VFS_SET_NT_ACL(fsp, fsp->fsp_name,
@@ -1643,7 +1642,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(
diff --git a/source/smbd/open.c b/source/smbd/open.c
index f178102..23d0223 100644
--- a/source/smbd/open.c
+++ b/source/smbd/open.c
@@ -2621,8 +2621,7 @@ NTSTATUS create_file_unixpath(connection_struct *conn,
fsp->access_mask = FILE_GENERIC_ALL;
- status = SMB_VFS_FSET_NT_ACL(
- fsp, fsp->fh->fd, sec_info_sent, sd);
+ status = SMB_VFS_FSET_NT_ACL(fsp, sec_info_sent, sd);
fsp->access_mask = saved_access_mask;
--
Samba Shared Repository
More information about the samba-cvs
mailing list