diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2003-05-01 01:35:56 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2003-05-01 01:35:56 +0000 |
commit | a7520177b088589eec7f3989273020dab89d90b5 (patch) | |
tree | dbfe514bab2e16f0b7ac71dd17e1b0ff0f07afc0 /examples/VFS | |
parent | dbe36b4c43dceddea9f14161c6cf7b34709287c8 (diff) | |
download | samba-a7520177b088589eec7f3989273020dab89d90b5.tar.gz samba-a7520177b088589eec7f3989273020dab89d90b5.tar.xz samba-a7520177b088589eec7f3989273020dab89d90b5.zip |
Don't crash if the underlying VFS doesn't support ACL's
Diffstat (limited to 'examples/VFS')
-rw-r--r-- | examples/VFS/skel.c | 10 |
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); } |