1 # Unix SMB/CIFS implementation.
2 # Copyright Volker Lendecke <vl@samba.org> 2022
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 from samba
.samba3
import libsmb_samba_internal
as libsmb
19 from samba
import (ntstatus
,NTSTATUSError
)
20 from samba
.dcerpc
import security
as sec
21 import samba
.tests
.libsmb
23 class Smb1PosixTests(samba
.tests
.libsmb
.LibsmbTests
):
25 def test_directory_case_sensivity(self
):
26 """Test that in smb1 posix dirs are case sensitive"""
37 except NTSTATUSError
as e
:
38 if e
.args
[0] != ntstatus
.NT_STATUS_OBJECT_NAME_COLLISION
:
41 conn
.mkdir("lower/second")
42 except NTSTATUSError
as e
:
43 if e
.args
[0] != ntstatus
.NT_STATUS_OBJECT_NAME_COLLISION
:
46 self
.assertFalse(conn
.chkpath("Lower/second"))
47 conn
.rmdir("lower/second")
50 if __name__
== '__main__':