Skip to content

Commit

Permalink
smb3: Add debug message for new file creation with idsfromsid mount o…
Browse files Browse the repository at this point in the history
…ption

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>
  • Loading branch information
Steve French committed Jun 12, 2020
1 parent a660339 commit a7a519a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/cifs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,7 @@ smb311_posix_get_inode_info(struct inode **inode,


/*
* 4. Tweak fattr based on mount options
* 3. Tweak fattr based on mount options
*/

/* check for Minshall+French symlinks */
Expand All @@ -1160,7 +1160,7 @@ smb311_posix_get_inode_info(struct inode **inode,
}

/*
* 5. Update inode with final fattr data
* 4. Update inode with final fattr data
*/

if (!*inode) {
Expand Down
2 changes: 2 additions & 0 deletions fs/cifs/smb2pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2337,6 +2337,8 @@ static void setup_owner_group_sids(char *buf)
sids->group.SubAuthorities[0] = cpu_to_le32(88);
sids->group.SubAuthorities[1] = cpu_to_le32(2);
sids->group.SubAuthorities[2] = cpu_to_le32(current_fsgid().val);

cifs_dbg(FYI, "owner S-1-5-88-1-%d, group S-1-5-88-2-%d\n", current_fsuid().val, current_fsgid().val);
}

/* See MS-SMB2 2.2.13.2.2 and MS-DTYP 2.4.6 */
Expand Down

0 comments on commit a7a519a

Please sign in to comment.