summaryrefslogtreecommitdiff
path: root/source3/smbd/vfs.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-10-05 19:04:41 +0000
committerJeremy Allison <jra@samba.org>2000-10-05 19:04:41 +0000
commit94c63f6ca473306a3e5607d76aa05a63a9da765c (patch)
treec1ea2d43ab22f602909454a72fd94452fb26c004 /source3/smbd/vfs.c
parentbbd7f7bf0fd4f6cda41989c3371d7bf18f49a592 (diff)
downloadsamba-94c63f6ca473306a3e5607d76aa05a63a9da765c.tar.gz
samba-94c63f6ca473306a3e5607d76aa05a63a9da765c.tar.bz2
samba-94c63f6ca473306a3e5607d76aa05a63a9da765c.zip
Vector get_nt_acl/set_nt_acl via vfs. POSIX ACL support should be added
above this layer. Jeremy. (This used to be commit b90af886a951b7b049ed7a42e6d99c332e43897b)
Diffstat (limited to 'source3/smbd/vfs.c')
-rw-r--r--source3/smbd/vfs.c43
1 files changed, 38 insertions, 5 deletions
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 097f51d217..4a4b1b2cfa 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -69,11 +69,11 @@ struct vfs_ops default_vfs_ops = {
vfswrap_getwd,
vfswrap_utime,
vfswrap_ftruncate,
- vfswrap_lock,
-#if 0
- vfswrap_get_nt_acl,
- vfswrap_set_nt_acl
-#endif
+ vfswrap_lock,
+ NULL, /* The 4 security descriptor functions are not defined by default. */
+ NULL,
+ NULL,
+ NULL
};
/****************************************************************************
@@ -219,6 +219,14 @@ BOOL vfs_init_custom(connection_struct *conn)
conn->vfs_ops.chown = default_vfs_ops.chown;
}
+ if (conn->vfs_ops.chdir == NULL) {
+ conn->vfs_ops.chdir = default_vfs_ops.chdir;
+ }
+
+ if (conn->vfs_ops.getwd == NULL) {
+ conn->vfs_ops.getwd = default_vfs_ops.getwd;
+ }
+
if (conn->vfs_ops.utime == NULL) {
conn->vfs_ops.utime = default_vfs_ops.utime;
}
@@ -230,6 +238,22 @@ BOOL vfs_init_custom(connection_struct *conn)
if (conn->vfs_ops.lock == NULL) {
conn->vfs_ops.lock = default_vfs_ops.lock;
}
+
+ if (conn->vfs_ops.fget_nt_acl == NULL) {
+ conn->vfs_ops.fget_nt_acl = default_vfs_ops.fget_nt_acl;
+ }
+
+ if (conn->vfs_ops.get_nt_acl == NULL) {
+ conn->vfs_ops.get_nt_acl = default_vfs_ops.get_nt_acl;
+ }
+
+ if (conn->vfs_ops.fset_nt_acl == NULL) {
+ conn->vfs_ops.fset_nt_acl = default_vfs_ops.fset_nt_acl;
+ }
+
+ if (conn->vfs_ops.set_nt_acl == NULL) {
+ conn->vfs_ops.set_nt_acl = default_vfs_ops.set_nt_acl;
+ }
return True;
}
@@ -245,6 +269,15 @@ int vfs_stat(connection_struct *conn, char *fname, SMB_STRUCT_STAT *st)
}
/*******************************************************************
+ vfs fstat wrapper that calls dos_to_unix.
+********************************************************************/
+
+int vfs_fstat(connection_struct *conn, int fd, SMB_STRUCT_STAT *st)
+{
+ return(conn->vfs_ops.fstat(fd,st));
+}
+
+/*******************************************************************
Check if directory exists.
********************************************************************/