s3: smbd: Reformat users of can_write_to_file().
[samba.git] / source3 / smbd / dosmode.c
index 7ddc5fd3fc6ddbc7d34ac2b22becfdf72dff7914..b061e9ac794122396e3fe6a3667fc5c07d6654f6 100644 (file)
@@ -219,7 +219,9 @@ static uint32_t dos_mode_from_sbuf(connection_struct *conn,
                }
        } else if (ro_opts == MAP_READONLY_PERMISSIONS) {
                /* Check actual permissions for read-only. */
-               if (!can_write_to_file(conn, smb_fname)) {
+               if (!can_write_to_file(conn,
+                               smb_fname))
+               {
                        result |= FILE_ATTRIBUTE_READONLY;
                }
        } /* Else never set the readonly bit. */
@@ -539,7 +541,8 @@ NTSTATUS set_ea_dos_attribute(connection_struct *conn,
                }
 
                if (!set_dosmode_ok && lp_dos_filemode(SNUM(conn))) {
-                       set_dosmode_ok = can_write_to_file(conn, smb_fname);
+                       set_dosmode_ok = can_write_to_file(conn,
+                                               smb_fname);
                }
 
                if (!set_dosmode_ok) {
@@ -1069,7 +1072,9 @@ int file_set_dosmode(connection_struct *conn,
                bits on a file. Just like file_ntimes below.
        */
 
-       if (!can_write_to_file(conn, smb_fname)) {
+       if (!can_write_to_file(conn,
+                       smb_fname))
+       {
                errno = EACCES;
                return -1;
        }
@@ -1242,7 +1247,9 @@ int file_ntimes(connection_struct *conn, const struct smb_filename *smb_fname,
         */
 
        /* Check if we have write access. */
-       if (can_write_to_file(conn, smb_fname)) {
+       if (can_write_to_file(conn,
+                       smb_fname))
+       {
                /* We are allowed to become root and change the filetime. */
                become_root();
                ret = SMB_VFS_NTIMES(conn, smb_fname, ft);