From 5a3fd9c0f5b68e7f0decf6c5774732ae2cfca561 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 23 Sep 2024 13:55:30 +0200 Subject: [PATCH] idl: Rename smb3_posix_cc_info.posix_perms to posix_mode We'll stash the file type in there soon Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- librpc/idl/smb3posix.idl | 2 +- python/samba/tests/smb3unix.py | 4 ++-- source3/libsmb/cli_smb2_fnum.c | 2 +- source3/smbd/smb2_create.c | 4 ++-- source3/smbd/smb2_posix.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/librpc/idl/smb3posix.idl b/librpc/idl/smb3posix.idl index 262565848a1..e07d4c1f46f 100644 --- a/librpc/idl/smb3posix.idl +++ b/librpc/idl/smb3posix.idl @@ -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; diff --git a/python/samba/tests/smb3unix.py b/python/samba/tests/smb3unix.py index 66aa98b5aa9..6c04eed0403 100644 --- a/python/samba/tests/smb3unix.py +++ b/python/samba/tests/smb3unix.py @@ -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-")) diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c index a8ac2bbcbe0..3324935cbb8 100644 --- a/source3/libsmb/cli_smb2_fnum.c +++ b/source3/libsmb/cli_smb2_fnum.c @@ -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); diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index 8fba899a504..d381373341c 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -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 = { diff --git a/source3/smbd/smb2_posix.c b/source3/smbd/smb2_posix.c index 9623e59e43a..c2df0331d42 100644 --- a/source3/smbd/smb2_posix.c +++ b/source3/smbd/smb2_posix.c @@ -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, }; -- 2.47.3