s3:pysmbd: fix fd leak in py_smbd_create_file()
authorStefan Metzmacher <metze@samba.org>
Tue, 9 Feb 2021 12:48:36 +0000 (13:48 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 16 Feb 2021 21:35:14 +0000 (21:35 +0000)
commit6382ca8568219a1ba54bc05d24ccbff019240cfe
tree370ad75889a7379b0b6cdb1c77d60205b5289355
parente80ef35f9356eadcaf6578a5b2c8d68acc45c172
s3:pysmbd: fix fd leak in py_smbd_create_file()

Various 'samba-tool domain backup' commands use this and will
fail if there's over ~1000 files in the sysvol folder.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13898

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit d8fa464a2dfb11df4e1db4ebffe8bd28ff118c75)
source3/smbd/pysmbd.c