Ignore:
Timestamp:
May 24, 2009, 7:51:24 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update Samba 3.3 branch to 3.3.3

Location:
branches/samba-3.3.x/source/smbd
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/smbd/dosmode.c

    r206 r223  
    336336                        p = path;
    337337                }
    338                
    339                 if (p[0] == '.' && p[1] != '.' && p[1] != 0) {
     338
     339                /* Only . and .. are not hidden. */
     340                if (p[0] == '.' && !((p[1] == '\0') ||
     341                                (p[1] == '.' && p[2] == '\0'))) {
    340342                        result |= aHIDDEN;
    341343                }
     
    388390                        p = path;
    389391                }
    390                
    391                 if (p[0] == '.' && p[1] != '.' && p[1] != 0) {
     392
     393                /* Only . and .. are not hidden. */
     394                if (p[0] == '.' && !((p[1] == '\0') ||
     395                                (p[1] == '.' && p[2] == '\0'))) {
    392396                        result |= aHIDDEN;
    393397                }
  • branches/samba-3.3.x/source/smbd/open.c

    r222 r223  
    426426                        if (!NT_STATUS_IS_OK(status)) {
    427427                                if (NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) {
     428                                        /*
     429                                         * On NT_STATUS_ACCESS_DENIED, access_granted
     430                                         * contains the denied bits.
     431                                         */
     432
     433                                        if ((access_mask & FILE_WRITE_ATTRIBUTES) &&
     434                                                        (access_granted & FILE_WRITE_ATTRIBUTES) &&
     435                                                        (lp_map_readonly(SNUM(conn)) ||
     436                                                         lp_map_archive(SNUM(conn)) ||
     437                                                         lp_map_hidden(SNUM(conn)) ||
     438                                                         lp_map_system(SNUM(conn)))) {
     439                                                access_granted &= ~FILE_WRITE_ATTRIBUTES;
     440
     441                                                DEBUG(10,("open_file: overrode FILE_WRITE_ATTRIBUTES "
     442                                                        "on file %s\n",
     443                                                        path ));
     444                                        }
     445
    428446                                        if ((access_mask & DELETE_ACCESS) &&
    429                                                         (access_granted == DELETE_ACCESS) &&
     447                                                        (access_granted & DELETE_ACCESS) &&
    430448                                                        can_delete_file_in_directory(conn, path)) {
    431449                                                /* Were we trying to do a stat open
     
    437455                                                 * for details. */
    438456
    439                                                 DEBUG(10,("open_file: overrode ACCESS_DENIED "
     457                                                access_granted &= ~DELETE_ACCESS;
     458
     459                                                DEBUG(10,("open_file: overrode DELETE_ACCESS "
    440460                                                        "on file %s\n",
    441461                                                        path ));
    442                                         } else {
     462                                        }
     463
     464                                        if (access_granted != 0) {
    443465                                                DEBUG(10, ("open_file: Access denied on "
    444466                                                        "file %s\n",
  • branches/samba-3.3.x/source/smbd/process.c

    r206 r223  
    10401040/* 0x31 */ { NULL, NULL, 0 },
    10411041/* 0x32 */ { "SMBtrans2",reply_trans2, AS_USER | CAN_IPC },
    1042 /* 0x33 */ { "SMBtranss2",reply_transs2, AS_USER},
     1042/* 0x33 */ { "SMBtranss2",reply_transs2, AS_USER | CAN_IPC},
    10431043/* 0x34 */ { "SMBfindclose",reply_findclose,AS_USER},
    10441044/* 0x35 */ { "SMBfindnclose",reply_findnclose,AS_USER},
  • branches/samba-3.3.x/source/smbd/reply.c

    r222 r223  
    7777                }
    7878
    79                 if (!stream_started && *s == ':') {
     79                if (!posix_path && !stream_started && *s == ':') {
    8080                        if (*p_last_component_contains_wcard) {
    8181                                return NT_STATUS_OBJECT_NAME_INVALID;
    8282                        }
    83                         /* stream names allow more characters than file names */
     83                        /* Stream names allow more characters than file names.
     84                           We're overloading posix_path here to allow a wider
     85                           range of characters. If stream_started is true this
     86                           is still a Windows path even if posix_path is true.
     87                           JRA.
     88                        */
    8489                        stream_started = true;
    8590                        start_of_name_component = false;
  • branches/samba-3.3.x/source/smbd/server.c

    r221 r223  
    588588                           MSG_SMB_INJECT_FAULT, msg_inject_fault);
    589589#endif
     590
     591        /* Kick off our mDNS registration. */
     592        if (dns_port != 0) {
     593#ifdef WITH_DNSSD_SUPPORT
     594                dns_register_smbd(&dns_reg, dns_port, &maxfd,
     595                                  &r_fds, &idle_timeout);
     596#endif
     597#ifdef WITH_AVAHI_SUPPORT
     598                void *avahi_conn;
     599                avahi_conn = avahi_start_register(
     600                        smbd_event_context(), smbd_event_context(),
     601                        dns_port);
     602                if (avahi_conn == NULL) {
     603                        DEBUG(10, ("avahi_start_register failed\n"));
     604                }
     605#endif
     606        }
    590607
    591608        /* now accept incoming connections - forking a new process
     
    632649                FD_ZERO(&w_fds);
    633650                GetTimeOfDay(&now);
    634 
    635                 /* Kick off our mDNS registration. */
    636                 if (dns_port != 0) {
    637                         dns_register_smbd(&dns_reg, dns_port, &maxfd,
    638                                         &r_fds, &idle_timeout);
    639                 }
    640651
    641652                event_add_to_select_args(smbd_event_context(), &now,
Note: See TracChangeset for help on using the changeset viewer.