summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2003-05-01 01:35:23 +0000
committerJelmer Vernooij <jelmer@samba.org>2003-05-01 01:35:23 +0000
commit4b5d6fa4c10f3f45d547d97a8175d426b25a5e5f (patch)
tree04e36da8b90f9757a1da32ebd975e140e5b572e1
parent7226d4698ec32d40c86ea2aaa1de15d559a15e2a (diff)
downloadsamba-4b5d6fa4c10f3f45d547d97a8175d426b25a5e5f.tar.gz
samba-4b5d6fa4c10f3f45d547d97a8175d426b25a5e5f.tar.xz
samba-4b5d6fa4c10f3f45d547d97a8175d426b25a5e5f.zip
Don't crash if the underlying VFS doesn't support ACL's
(This used to be commit 277fa587d596449a6ac15b440ae07d6707d758ac)
-rw-r--r--examples/VFS/skel.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/VFS/skel.c b/examples/VFS/skel.c
index fe6e0731efa..0742caa6085 100644
--- a/examples/VFS/skel.c
+++ b/examples/VFS/skel.c
@@ -232,11 +232,21 @@ static BOOL skel_set_nt_acl(struct files_struct *fsp, const char *name, uint32 s
static BOOL skel_chmod_acl(struct connection_struct *conn, const char *name, mode_t mode)
{
+ /* If the underlying VFS doesn't have ACL support... */
+ if (!default_vfs_ops.chmod_acl) {
+ errno = ENOSYS;
+ return -1;
+ }
return default_vfs_ops.chmod_acl(conn, name, mode);
}
static BOOL skel_fchmod_acl(struct files_struct *fsp, int fd, mode_t mode)
{
+ /* If the underlying VFS doesn't have ACL support... */
+ if (!default_vfs_ops.fchmod_acl) {
+ errno = ENOSYS;
+ return -1;
+ }
return default_vfs_ops.fchmod_acl(fsp, fd, mode);
}