summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-05-23 23:55:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:22:46 -0500
commit57d6318a0b5ecc0154547a04acef8ac222c1d28f (patch)
treec87905c626d1c6cac32ba8b4b3f6948484b5acd7 /source3/include
parentdbfd6bf8c8cc9945c4ba7e22ac44b1f33f9c7ce6 (diff)
downloadsamba-57d6318a0b5ecc0154547a04acef8ac222c1d28f.tar.gz
samba-57d6318a0b5ecc0154547a04acef8ac222c1d28f.tar.bz2
samba-57d6318a0b5ecc0154547a04acef8ac222c1d28f.zip
r23105: Add lchown to the vfs layer. We need this in the POSIX code.
Jeremy. (This used to be commit 932523cbb508db869b726768e86bfa8e248f768b)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/smbprofile.h4
-rw-r--r--source3/include/vfs.h6
-rw-r--r--source3/include/vfs_macros.h3
3 files changed, 12 insertions, 1 deletions
diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h
index cc501739c1..7b04a185b4 100644
--- a/source3/include/smbprofile.h
+++ b/source3/include/smbprofile.h
@@ -144,6 +144,10 @@ enum profile_stats_values
#define syscall_fchown_count __profile_stats_value(PR_VALUE_SYSCALL_FCHOWN, count)
#define syscall_fchown_time __profile_stats_value(PR_VALUE_SYSCALL_FCHOWN, time)
+ PR_VALUE_SYSCALL_LCHOWN,
+#define syscall_lchown_count __profile_stats_value(PR_VALUE_SYSCALL_LCHOWN, count)
+#define syscall_lchown_time __profile_stats_value(PR_VALUE_SYSCALL_LCHOWN, time)
+
PR_VALUE_SYSCALL_CHDIR,
#define syscall_chdir_count __profile_stats_value(PR_VALUE_SYSCALL_CHDIR, count)
#define syscall_chdir_time __profile_stats_value(PR_VALUE_SYSCALL_CHDIR, time)
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 5e7048bb54..eac9eced16 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -70,7 +70,8 @@
/* Changed to version 20, use ntimes call instead of utime (greater
* timestamp resolition. JRA. */
/* Changed to version21 to add chflags operation -- jpeach */
-#define SMB_VFS_INTERFACE_VERSION 21
+/* Changed to version22 to add lchown operation -- jra */
+#define SMB_VFS_INTERFACE_VERSION 22
/* to bug old modules which are trying to compile with the old functions */
@@ -145,6 +146,7 @@ typedef enum _vfs_op_type {
SMB_VFS_OP_FCHMOD,
SMB_VFS_OP_CHOWN,
SMB_VFS_OP_FCHOWN,
+ SMB_VFS_OP_LCHOWN,
SMB_VFS_OP_CHDIR,
SMB_VFS_OP_GETWD,
SMB_VFS_OP_NTIMES,
@@ -271,6 +273,7 @@ struct vfs_ops {
int (*fchmod)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, mode_t mode);
int (*chown)(struct vfs_handle_struct *handle, const char *path, uid_t uid, gid_t gid);
int (*fchown)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, uid_t uid, gid_t gid);
+ int (*lchown)(struct vfs_handle_struct *handle, const char *path, uid_t uid, gid_t gid);
int (*chdir)(struct vfs_handle_struct *handle, const char *path);
char *(*getwd)(struct vfs_handle_struct *handle, char *buf);
int (*ntimes)(struct vfs_handle_struct *handle, const char *path, const struct timespec ts[2]);
@@ -395,6 +398,7 @@ struct vfs_ops {
struct vfs_handle_struct *fchmod;
struct vfs_handle_struct *chown;
struct vfs_handle_struct *fchown;
+ struct vfs_handle_struct *lchown;
struct vfs_handle_struct *chdir;
struct vfs_handle_struct *getwd;
struct vfs_handle_struct *ntimes;
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index 2ff313b42c..48321ddad0 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -65,6 +65,7 @@
#define SMB_VFS_FCHMOD(fsp, fd, mode) ((fsp)->conn->vfs.ops.fchmod((fsp)->conn->vfs.handles.fchmod, (fsp), (fd), (mode)))
#define SMB_VFS_CHOWN(conn, path, uid, gid) ((conn)->vfs.ops.chown((conn)->vfs.handles.chown, (path), (uid), (gid)))
#define SMB_VFS_FCHOWN(fsp, fd, uid, gid) ((fsp)->conn->vfs.ops.fchown((fsp)->conn->vfs.handles.fchown, (fsp), (fd), (uid), (gid)))
+#define SMB_VFS_LCHOWN(conn, path, uid, gid) ((conn)->vfs.ops.lchown((conn)->vfs.handles.lchown, (path), (uid), (gid)))
#define SMB_VFS_CHDIR(conn, path) ((conn)->vfs.ops.chdir((conn)->vfs.handles.chdir, (path)))
#define SMB_VFS_GETWD(conn, buf) ((conn)->vfs.ops.getwd((conn)->vfs.handles.getwd, (buf)))
#define SMB_VFS_NTIMES(conn, path, ts) ((conn)->vfs.ops.ntimes((conn)->vfs.handles.ntimes, (path), (ts)))
@@ -181,6 +182,7 @@
#define SMB_VFS_OPAQUE_FCHMOD(fsp, fd, mode) ((fsp)->conn->vfs_opaque.ops.fchmod((fsp)->conn->vfs_opaque.handles.fchmod, (fsp), (fd), (mode)))
#define SMB_VFS_OPAQUE_CHOWN(conn, path, uid, gid) ((conn)->vfs_opaque.ops.chown((conn)->vfs_opaque.handles.chown, (path), (uid), (gid)))
#define SMB_VFS_OPAQUE_FCHOWN(fsp, fd, uid, gid) ((fsp)->conn->vfs_opaque.ops.fchown((fsp)->conn->vfs_opaque.handles.fchown, (fsp), (fd), (uid), (gid)))
+#define SMB_VFS_OPAQUE_LCHOWN(conn, path, uid, gid) ((conn)->vfs_opaque.ops.lchown((conn)->vfs_opaque.handles.lchown, (path), (uid), (gid)))
#define SMB_VFS_OPAQUE_CHDIR(conn, path) ((conn)->vfs_opaque.ops.chdir((conn)->vfs_opaque.handles.chdir, (path)))
#define SMB_VFS_OPAQUE_GETWD(conn, buf) ((conn)->vfs_opaque.ops.getwd((conn)->vfs_opaque.handles.getwd, (buf)))
#define SMB_VFS_OPAQUE_NTIMES(conn, path, ts) ((conn)->vfs_opaque.ops.ntimes((conn)->vfs_opaque.handles.ntimes, (path), (ts)))
@@ -298,6 +300,7 @@
#define SMB_VFS_NEXT_FCHMOD(handle, fsp, fd, mode) ((handle)->vfs_next.ops.fchmod((handle)->vfs_next.handles.fchmod, (fsp), (fd), (mode)))
#define SMB_VFS_NEXT_CHOWN(handle, path, uid, gid) ((handle)->vfs_next.ops.chown((handle)->vfs_next.handles.chown, (path), (uid), (gid)))
#define SMB_VFS_NEXT_FCHOWN(handle, fsp, fd, uid, gid) ((handle)->vfs_next.ops.fchown((handle)->vfs_next.handles.fchown, (fsp), (fd), (uid), (gid)))
+#define SMB_VFS_NEXT_LCHOWN(handle, path, uid, gid) ((handle)->vfs_next.ops.lchown((handle)->vfs_next.handles.lchown, (path), (uid), (gid)))
#define SMB_VFS_NEXT_CHDIR(handle, path) ((handle)->vfs_next.ops.chdir((handle)->vfs_next.handles.chdir, (path)))
#define SMB_VFS_NEXT_GETWD(handle, buf) ((handle)->vfs_next.ops.getwd((handle)->vfs_next.handles.getwd, (buf)))
#define SMB_VFS_NEXT_NTIMES(handle, path, ts) ((handle)->vfs_next.ops.ntimes((handle)->vfs_next.handles.ntimes, (path), (ts)))