Ignore:
Timestamp:
Sep 24, 2009, 9:15:13 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 to 3.2.14 (final)

Location:
branches/samba-3.2.x/source/smbd
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.2.x/source/smbd/lanman.c

    r136 r335  
    12181218                }
    12191219                fstrcpy(s->comment, p);
     1220                string_truncate(s->comment, MAX_SERVER_STRING_LENGTH);
    12201221
    12211222                s->domain[0] = '\0';
  • branches/samba-3.2.x/source/smbd/open.c

    r235 r335  
    251251        if (!CAN_WRITE(conn)) {
    252252                /* It's a read-only share - fail if we wanted to write. */
    253                 if(accmode != O_RDONLY) {
     253                if(accmode != O_RDONLY || (flags & O_TRUNC) || (flags & O_APPEND)) {
    254254                        DEBUG(3,("Permission denied opening %s\n", path));
    255255                        return NT_STATUS_ACCESS_DENIED;
     
    259259                           access into the directory.
    260260                        */
    261                         flags &= ~O_CREAT;
    262                         local_flags &= ~O_CREAT;
     261                        flags &= ~(O_CREAT|O_EXCL);
     262                        local_flags &= ~(O_CREAT|O_EXCL);
    263263                }
    264264        }
  • branches/samba-3.2.x/source/smbd/server.c

    r233 r335  
    349349        unsigned dns_port = 0;
    350350
    351         if (!is_daemon) {
    352                 return open_sockets_inetd();
    353         }
    354 
    355351#ifdef HAVE_ATEXIT
    356352        {
     
    362358        }
    363359#endif
     360
     361        if (!is_daemon) {
     362                /*
     363                 * Stop zombies the old way.
     364                 * We aren't forking any new
     365                 * 'normal' connections when
     366                 * run from [x]inetd.
     367                 */
     368                CatchChild();
     369                return open_sockets_inetd();
     370        }
    364371
    365372        /* Stop zombies */
     
    12071214        BlockSignals(False, SIGTERM);
    12081215
     1216        /* Ensure we leave no zombies until we
     1217         * correctly set up child handling below. */
     1218        CatchChild();
     1219
    12091220        /* we want total control over the permissions on created files,
    12101221           so set our umask to 0 */
  • branches/samba-3.2.x/source/smbd/trans2.c

    r272 r335  
    49204920        if (setting_write_time) {
    49214921                /*
    4922                  * This was a setfileinfo on an open file.
     4922                 * This was a Windows setfileinfo on an open file.
    49234923                 * NT does this a lot. We also need to
    49244924                 * set the time here, as it can be read by
     
    59975997        bool delete_on_fail = False;
    59985998        enum perm_type ptype;
     5999        files_struct *all_fsps = NULL;
     6000        bool modify_mtime = true;
     6001        struct file_id id;
    59996002
    60006003        if (total_data < 100) {
     
    61436146
    61446147        /* Deal with any time changes. */
    6145 
    6146         return smb_set_file_time(conn,
     6148        id = vfs_file_id_from_sbuf(conn, psbuf);
     6149        for(all_fsps = file_find_di_first(id); all_fsps;
     6150                        all_fsps = file_find_di_next(all_fsps)) {
     6151                /*
     6152                 * We're setting the time explicitly for UNIX.
     6153                 * Cancel any pending changes over all handles.
     6154                 */
     6155                all_fsps->update_write_time_on_close = false;
     6156                TALLOC_FREE(all_fsps->update_write_time_event);
     6157        }
     6158
     6159        /*
     6160         * Override the "setting_write_time"
     6161         * parameter here as it almost does what
     6162         * we need. Just remember if we modified
     6163         * mtime and send the notify ourselves.
     6164         */
     6165        if (null_timespec(ts[1])) {
     6166                modify_mtime = false;
     6167        }
     6168
     6169        status = smb_set_file_time(conn,
    61476170                                fsp,
    61486171                                fname,
    61496172                                psbuf,
    61506173                                ts,
    6151                                 true);
     6174                                false);
     6175
     6176        if (modify_mtime) {
     6177                notify_fname(conn, NOTIFY_ACTION_MODIFIED,
     6178                        FILE_NOTIFY_CHANGE_LAST_WRITE, fname);
     6179        }
     6180        return status;
    61526181}
    61536182
     
    67766805        }
    67776806
    6778         if (!CAN_WRITE(conn)) {
    6779                 reply_doserror(req, ERRSRV, ERRaccess);
    6780                 return;
    6781         }
    6782 
    67836807        if (INFO_LEVEL_IS_UNIX(info_level) && !lp_unix_extensions()) {
    67846808                reply_nterror(req, NT_STATUS_INVALID_LEVEL);
    67856809                return;
     6810        }
     6811
     6812        if (!CAN_WRITE(conn)) {
     6813                /* Allow POSIX opens. The open path will deny
     6814                 * any non-readonly opens. */
     6815                if (info_level != SMB_POSIX_PATH_OPEN) {
     6816                        reply_doserror(req, ERRSRV, ERRaccess);
     6817                        return;
     6818                }
    67866819        }
    67876820
     
    70907123
    70917124        DEBUG(3,("call_trans2mkdir : name = %s\n", directory));
     7125
     7126        status = resolve_dfspath(ctx,
     7127                                conn,
     7128                                req->flags2 & FLAGS2_DFS_PATHNAMES,
     7129                                directory,
     7130                                &directory);
     7131        if (!NT_STATUS_IS_OK(status)) {
     7132                if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
     7133                        reply_botherror(req,
     7134                                        NT_STATUS_PATH_NOT_COVERED,
     7135                                        ERRSRV, ERRbadpath);
     7136                }
     7137                reply_nterror(req, status);
     7138                return;
     7139        }
    70927140
    70937141        status = unix_convert(ctx, conn, directory, False, &directory, NULL, &sbuf);
Note: See TracChangeset for help on using the changeset viewer.