Shyam Prasad N <nspmangalore@xxxxxxxxx> writes: > On Fri, Nov 8, 2024 at 5:47 PM Shyam Prasad N <nspmangalore@xxxxxxxxx> wrote: >> > What about SMB sessions from cifs_tcon::dfs_ses_list? I don't see their >> > password getting updated over remount. >> >> This is in our to-do list as well. > > I did some code reading around how DFS automount works. > @Paulo Alcantara Correct me if I'm wrong, but it sounds like we make > an assumption that when a DFS namespace has a junction to another > share, the same credentials are to be used to perform the mount of > that share. Is that always the case? Yes, it inherits fs_context from the parent mount. For multiuser mounts, when uid/gid/cruid are unspecified, we need to update its values to match real uid/gid from the calling process. > If we go by that assumption, for password2 to work with DFS mounts, we > only need to make sure that in cifs_do_automount, cur_ctx passwords > are synced up to the current ses passwords. That should be quite easy. Correct. The fs_context for the automount is dup'ed from the parent mount. smb3_fs_context_dup() already dups password2, so it should work. The 'remount' case isn't still handled, that's why I mentioned it above. You'd need to set password2 for all sessios in @tcon->dfs_ses_list. I think we need to update password2 for the multiuser sessions as well and not only for session from master tcon.