summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-02-21 16:15:30 +0000
committerGerald Carter <jerry@samba.org>2003-02-21 16:15:30 +0000
commit193f9200aa4ea692e9126f3df68a5cb83e3a4056 (patch)
tree8c44cfbc656ac4f9a871fd33401666e344d41f14 /source3
parent23553b48e6bd21481ca32c4b3ee54fc1aded4174 (diff)
downloadsamba-193f9200aa4ea692e9126f3df68a5cb83e3a4056.tar.gz
samba-193f9200aa4ea692e9126f3df68a5cb83e3a4056.tar.bz2
samba-193f9200aa4ea692e9126f3df68a5cb83e3a4056.zip
patch from Hal Roberts check for a valid [f]chmod_acl function pointer before calling it. Fixes seg fault in audit VFS module
(This used to be commit 5e115d43812021f9a16111fc7c05d750026cca1e)
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_audit.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source3/modules/vfs_audit.c b/source3/modules/vfs_audit.c
index 92b78c1c32..1944c98e53 100644
--- a/source3/modules/vfs_audit.c
+++ b/source3/modules/vfs_audit.c
@@ -233,7 +233,12 @@ static int audit_chmod(struct connection_struct *conn, const char *path, mode_t
static int audit_chmod_acl(struct connection_struct *conn, const char *path, mode_t mode)
{
- int result = default_vfs_ops.chmod_acl(conn, path, mode);
+ int result;
+
+ if ( !default_vfs_ops.chmod_acl )
+ return 0;
+
+ result = default_vfs_ops.chmod_acl(conn, path, mode);
syslog(SYSLOG_PRIORITY, "chmod_acl %s mode 0x%x %s%s\n",
path, mode,
@@ -257,7 +262,12 @@ static int audit_fchmod(struct files_struct *fsp, int fd, mode_t mode)
static int audit_fchmod_acl(struct files_struct *fsp, int fd, mode_t mode)
{
- int result = default_vfs_ops.fchmod_acl(fsp, fd, mode);
+ int result;
+
+ if ( !default_vfs_ops.fchmod_acl )
+ return 0;
+
+ result = default_vfs_ops.fchmod_acl(fsp, fd, mode);
syslog(SYSLOG_PRIORITY, "fchmod_acl %s mode 0x%x %s%s\n",
fsp->fsp_name, mode,