patch from Hal Roberts check for a valid [f]chmod_acl function pointer before calling...
authorGerald Carter <jerry@samba.org>
Fri, 21 Feb 2003 16:15:44 +0000 (16:15 +0000)
committerGerald Carter <jerry@samba.org>
Fri, 21 Feb 2003 16:15:44 +0000 (16:15 +0000)
(This used to be commit e5acebbe79a97191903ee3a1819410a0fb9ac655)

source3/modules/vfs_audit.c

index 92b78c1c32f837c7d4daacc832eb15b169129b20..1944c98e531c65a2ddf2ea0588da22405673020b 100644 (file)
@@ -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,