From 8a689739a082d40b322c32bfa93852d98f13aa56 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 9 Apr 2018 09:32:23 -0700 Subject: [PATCH] s3: smbd: Unix extensions attempts to change wrong field in fchown call. Found by "Rungta, Vandana" . Cut and paste error. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13375 Signed-off-by: Jeremy Allison --- source3/smbd/trans2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index b49c3ca7836..af7a0d72484 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -7778,10 +7778,10 @@ static NTSTATUS smb_set_file_unix_basic(connection_struct *conn, DEBUG(10,("smb_set_file_unix_basic: SMB_SET_FILE_UNIX_BASIC " "changing group %u for file %s\n", - (unsigned int)set_owner, + (unsigned int)set_grp, smb_fname_str_dbg(smb_fname))); if (fsp && fsp->fh->fd != -1) { - ret = SMB_VFS_FCHOWN(fsp, set_owner, (gid_t)-1); + ret = SMB_VFS_FCHOWN(fsp, (uid_t)-1, set_grp); } else { /* * UNIX extensions calls must always operate -- 2.17.0.484.g0c8726318c-goog