From: Volker Lendecke Date: Fri, 4 Mar 2022 07:39:01 +0000 (+0100) Subject: smbd: Make complex if-expression in file_set_dosmode() easier to read X-Git-Tag: tevent-0.12.0~554 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3514a57e9b9b35bc9983d997191c575eeebcf85;p=thirdparty%2Fsamba.git smbd: Make complex if-expression in file_set_dosmode() easier to read Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index b1e6fbc4fec..43bb48d38c5 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -1022,9 +1022,11 @@ int file_set_dosmode(connection_struct *conn, * Simply refuse to do the chmod in this case. */ - if (S_ISDIR(smb_fname->st.st_ex_mode) && (unixmode & S_ISGID) && - geteuid() != sec_initial_uid() && - !current_user_in_group(conn, smb_fname->st.st_ex_gid)) { + if (S_ISDIR(smb_fname->st.st_ex_mode) && + (unixmode & S_ISGID) && + geteuid() != sec_initial_uid() && + !current_user_in_group(conn, smb_fname->st.st_ex_gid)) + { DEBUG(3,("file_set_dosmode: setgid bit cannot be " "set for directory %s\n", smb_fname_str_dbg(smb_fname)));