smbd: remove dead code
authorRalph Boehme <slow@samba.org>
Fri, 29 May 2020 09:27:35 +0000 (11:27 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 29 May 2020 18:38:40 +0000 (18:38 +0000)
LINKS_READ_ONLY is not defined anywhere since ages.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/dosmode.c

index 40633b8996e2456e2e34b165c45608f827111123..b7942f10afb9fc61ca2a52a6d94fc7a46260d765 100644 (file)
@@ -84,17 +84,6 @@ static uint32_t filter_mode_by_protocol(uint32_t mode)
        return mode;
 }
 
-static int set_link_read_only_flag(const SMB_STRUCT_STAT *const sbuf)
-{
-#ifdef S_ISLNK
-#if LINKS_READ_ONLY
-       if (S_ISLNK(sbuf->st_mode) && S_ISDIR(sbuf->st_mode))
-               return FILE_ATTRIBUTE_READONLY;
-#endif
-#endif
-       return 0;
-}
-
 /****************************************************************************
  Change a dos mode to a unix mode.
     Base permission for files:
@@ -239,8 +228,6 @@ static uint32_t dos_mode_from_sbuf(connection_struct *conn,
        if (S_ISDIR(smb_fname->st.st_ex_mode))
                result = FILE_ATTRIBUTE_DIRECTORY | (result & FILE_ATTRIBUTE_READONLY);
 
-       result |= set_link_read_only_flag(&smb_fname->st);
-
        dos_mode_debug_print(__func__, result);
 
        return result;