]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
idl: Rename smb3_posix_cc_info.posix_perms to posix_mode
authorVolker Lendecke <vl@samba.org>
Mon, 23 Sep 2024 11:55:30 +0000 (13:55 +0200)
committerRalph Boehme <slow@samba.org>
Thu, 26 Sep 2024 15:22:46 +0000 (15:22 +0000)
We'll stash the file type in there soon

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
librpc/idl/smb3posix.idl
python/samba/tests/smb3unix.py
source3/libsmb/cli_smb2_fnum.c
source3/smbd/smb2_create.c
source3/smbd/smb2_posix.c

index 262565848a1d8f57783ee77ad01755a7ec9a8c6c..e07d4c1f46f85554c9a5af3be26fb1a21b4d9f1d 100644 (file)
@@ -47,7 +47,7 @@ interface smb3posix
        typedef [public,flag(NDR_NOALIGN)] struct {
                uint32 nlinks;
                uint32 reparse_tag;
-               uint32 posix_perms;
+               uint32 posix_mode;
                dom_sid owner;
                dom_sid group;
        } smb3_posix_cc_info;
index 66aa98b5aa91d933cf2b6df490f5bac21ba25258..6c04eed0403fd1c54646754ccc155d3a9b3a1b88 100644 (file)
@@ -363,7 +363,7 @@ class Smb3UnixTests(samba.tests.libsmb.LibsmbTests):
 
             self.assertEqual(cc.nlinks, 1)
             self.assertEqual(cc.reparse_tag, libsmb.IO_REPARSE_TAG_RESERVED_ZERO)
-            self.assertEqual(cc.posix_perms, 0o600)
+            self.assertEqual(cc.posix_mode, 0o600)
             self.assertEqual(cc.owner, dom_sid(self.samsid + "-1000"))
             self.assertTrue(str(cc.group).startswith("S-1-22-2-"))
 
@@ -384,7 +384,7 @@ class Smb3UnixTests(samba.tests.libsmb.LibsmbTests):
                 self.assertEqual(cc.nlinks, 2)
 
             self.assertEqual(cc.reparse_tag, libsmb.IO_REPARSE_TAG_RESERVED_ZERO)
-            self.assertEqual(cc.posix_perms, 0o700)
+            self.assertEqual(cc.posix_mode, 0o700)
             self.assertEqual(cc.owner, dom_sid(self.samsid + "-1000"))
             self.assertTrue(str(cc.group).startswith("S-1-22-2-"))
 
index a8ac2bbcbe0a3bd7685ddc0a01c6709bc25a46f8..3324935cbb8390e87080d3f5275a89591fdb20de 100644 (file)
@@ -1266,7 +1266,7 @@ static NTSTATUS parse_finfo_posix_info(const uint8_t *dir_data,
        finfo->st_ex_dev = info.device;
        finfo->st_ex_nlink = info.cc.nlinks;
        finfo->reparse_tag = info.cc.reparse_tag;
-       finfo->st_ex_mode = wire_perms_to_unix(info.cc.posix_perms);
+       finfo->st_ex_mode = wire_perms_to_unix(info.cc.posix_mode);
        sid_copy(&finfo->owner_sid, &info.cc.owner);
        sid_copy(&finfo->group_sid, &info.cc.group);
 
index 8fba899a504846106eaeaa88aa2c4123fce064da..d381373341c32c2f3437cdec639593503e1f95fa 100644 (file)
@@ -1683,8 +1683,8 @@ static void smbd_smb2_create_after_exec(struct tevent_req *req)
                struct stat_ex *psbuf = &state->result->fsp_name->st;
                struct smb3_posix_cc_info cc = {
                        .nlinks = psbuf->st_ex_nlink,
-                       .posix_perms = unix_perms_to_wire(psbuf->st_ex_mode &
-                                                         ~S_IFMT),
+                       .posix_mode = unix_perms_to_wire(psbuf->st_ex_mode &
+                                                        ~S_IFMT),
                };
                uint8_t buf[sizeof(struct smb3_posix_cc_info)];
                struct ndr_push ndr = {
index 9623e59e43a61b2dc2c6ce4eac8acb14031a934a..c2df0331d4216e615a4165ded359673a03e6c312 100644 (file)
@@ -42,7 +42,7 @@ void smb3_file_posix_information_init(
                .change_time = unix_timespec_to_nt_time(st->st_ex_ctime),
                .cc.nlinks = st->st_ex_nlink,
                .cc.reparse_tag = reparse_tag,
-               .cc.posix_perms = unix_perms_to_wire(st->st_ex_mode & ~S_IFMT),
+               .cc.posix_mode = unix_perms_to_wire(st->st_ex_mode & ~S_IFMT),
                .cc.owner = global_sid_NULL,
                .cc.group = global_sid_NULL,
        };