From 728e56b4636b668aaac60ec557d6fe16b530a6f9 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 26 Oct 2012 10:07:02 +1100 Subject: [PATCH] pysmbd: Remember to close files after setting the NT ACL --- source3/smbd/pysmbd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source3/smbd/pysmbd.c b/source3/smbd/pysmbd.c index cfc40126303..9de26291d23 100644 --- a/source3/smbd/pysmbd.c +++ b/source3/smbd/pysmbd.c @@ -101,6 +101,9 @@ static NTSTATUS set_nt_acl_no_snum(const char *fname, set_conn_connectpath(conn, "/"); smbd_vfs_init(conn); + if (!posix_locking_init(false)) { + return NT_STATUS_NO_MEMORY; + } fsp = talloc_zero(frame, struct files_struct); if (fsp == NULL) { @@ -145,6 +148,8 @@ static NTSTATUS set_nt_acl_no_snum(const char *fname, DEBUG(0,("set_nt_acl_no_snum: fset_nt_acl returned %s.\n", nt_errstr(status))); } + SMB_VFS_CLOSE(fsp); + conn_free(conn); TALLOC_FREE(frame); -- 2.11.4.GIT