コード例 #1
0
ファイル: ntacls_backup.py プロジェクト: Alexander--/samba
    def test_smbd_create_file(self):
        """
        A smoke test for smbd.create_file and smbd.unlink API
        """

        filepath = os.path.join(self.service_root, 'a-file')
        smbd.create_file(filepath, self.service)
        self.assertTrue(os.path.isfile(filepath))

        # As well as checking that unlink works, this removes the
        # fake xattrs from the dev/inode based DB
        smbd.unlink(filepath, self.service)
        self.assertFalse(os.path.isfile(filepath))
コード例 #2
0
ファイル: ntacls_backup.py プロジェクト: zhoury14/samba
    def test_smbd_create_file(self):
        """
        A smoke test for smbd.create_file and smbd.unlink API
        """

        filepath = os.path.join(self.service_root, 'a-file')
        smbd.create_file(filepath, self.service)
        self.assertTrue(os.path.isfile(filepath))

        # As well as checking that unlink works, this removes the
        # fake xattrs from the dev/inode based DB
        smbd.unlink(filepath, self.service)
        self.assertFalse(os.path.isfile(filepath))
コード例 #3
0
ファイル: ntacls_backup.py プロジェクト: szaydel/samba
    def test_smbd_create_file(self):
        """
        A smoke test for smbd.create_file and smbd.unlink API
        """

        filepath = os.path.join(self.service_root, 'a-file')
        smbd.create_file(filepath, system_session_unix(), self.service)
        self.assertTrue(os.path.isfile(filepath))

        mode = os.stat(filepath).st_mode

        # This works in conjunction with the TEST_UMASK in smbd_base
        # to ensure that permissions are not related to the umask
        # but instead the smb.conf settings
        self.assertEqual(mode & 0o777, 0o644)

        # As well as checking that unlink works, this removes the
        # fake xattrs from the dev/inode based DB
        smbd.unlink(filepath, system_session_unix(), self.service)
        self.assertFalse(os.path.isfile(filepath))
コード例 #4
0
 def tearDown(self):
     smbd.unlink(self.tempf)
     os.unlink(os.path.join(self.tempdir, "xattr.tdb"))
     super(PosixAclMappingTests, self).tearDown()
コード例 #5
0
ファイル: posixacl.py プロジェクト: encukou/samba
 def tearDown(self):
     smbd.unlink(self.tempf)
     os.unlink(os.path.join(self.tempdir,"xattr.tdb"))
     super(PosixAclMappingTests, self).tearDown()