Skip to content

Commit a7a519a

Browse files
committed
smb3: Add debug message for new file creation with idsfromsid mount option
Pavel noticed that a debug message (disabled by default) in creating the security descriptor context could be useful for new file creation owner fields (as we already have for the mode) when using mount parm idsfromsid. [38120.392272] CIFS: FYI: owner S-1-5-88-1-0, group S-1-5-88-2-0 [38125.792637] CIFS: FYI: owner S-1-5-88-1-1000, group S-1-5-88-2-1000 Also cleans up a typo in a comment Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
1 parent a660339 commit a7a519a

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

fs/cifs/inode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,7 @@ smb311_posix_get_inode_info(struct inode **inode,
11481148

11491149

11501150
/*
1151-
* 4. Tweak fattr based on mount options
1151+
* 3. Tweak fattr based on mount options
11521152
*/
11531153

11541154
/* check for Minshall+French symlinks */
@@ -1160,7 +1160,7 @@ smb311_posix_get_inode_info(struct inode **inode,
11601160
}
11611161

11621162
/*
1163-
* 5. Update inode with final fattr data
1163+
* 4. Update inode with final fattr data
11641164
*/
11651165

11661166
if (!*inode) {

fs/cifs/smb2pdu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,6 +2337,8 @@ static void setup_owner_group_sids(char *buf)
23372337
sids->group.SubAuthorities[0] = cpu_to_le32(88);
23382338
sids->group.SubAuthorities[1] = cpu_to_le32(2);
23392339
sids->group.SubAuthorities[2] = cpu_to_le32(current_fsgid().val);
2340+
2341+
cifs_dbg(FYI, "owner S-1-5-88-1-%d, group S-1-5-88-2-%d\n", current_fsuid().val, current_fsgid().val);
23402342
}
23412343

23422344
/* See MS-SMB2 2.2.13.2.2 and MS-DTYP 2.4.6 */

0 commit comments

Comments
 (0)