Ignore:
Timestamp:
Oct 8, 2009, 8:16:40 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 to 3.2.15 (security update)

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

Legend:

Unmodified
Added
Removed
  • branches/samba-3.2.x/source/VERSION

    r335 r340  
    2626SAMBA_VERSION_MAJOR=3
    2727SAMBA_VERSION_MINOR=2
    28 SAMBA_VERSION_RELEASE=14
     28SAMBA_VERSION_RELEASE=15
    2929
    3030########################################################
  • branches/samba-3.2.x/source/client/mount.cifs.c

    r233 r340  
    200200        FILE * fs;
    201201        int i, length;
     202
     203        i = access(file_name, R_OK);
     204        if (i)
     205                return i;
     206
    202207        fs = fopen(file_name,"r");
    203208        if(fs == NULL)
     
    322327
    323328        if(filename != NULL) {
     329                rc = access(filename, R_OK);
     330                if (rc) {
     331                        fprintf(stderr, "mount.cifs failed: access check of %s failed: %s\n",
     332                                        filename, strerror(errno));
     333                        exit(EX_SYSERR);
     334                }
    324335                file_descript = open(filename, O_RDONLY);
    325336                if(file_descript < 0) {
     
    380391                return 1;
    381392        data = *optionsp;
    382 
    383         if(verboseflag)
    384                 printf("parsing options: %s\n", data);
    385393
    386394        /* BB fixme check for separator override BB */
     
    472480                        if (!value || !*value) {
    473481                                if(got_password) {
    474                                         printf("\npassword specified twice, ignoring second\n");
     482                                        fprintf(stderr, "\npassword specified twice, ignoring second\n");
    475483                                } else
    476484                                        got_password = 1;
    477                         } else if (strnlen(value, 17) < 17) {
    478                                 if(got_password)
    479                                         printf("\nmount.cifs warning - password specified twice\n");
    480                                 got_password = 1;
     485                        } else if (strnlen(value, MOUNT_PASSWD_SIZE) < MOUNT_PASSWD_SIZE) {
     486                                if (got_password) {
     487                                        fprintf(stderr, "\nmount.cifs warning - password specified twice\n");
     488                                } else {
     489                                        mountpassword = strndup(value, MOUNT_PASSWD_SIZE);
     490                                        if (!mountpassword) {
     491                                                fprintf(stderr, "mount.cifs error: %s", strerror(ENOMEM));
     492                                                SAFE_FREE(out);
     493                                                return 1;
     494                                        }
     495                                        got_password = 1;
     496                                }
    481497                        } else {
    482                                 printf("password too long\n");
     498                                fprintf(stderr, "password too long\n");
    483499                                SAFE_FREE(out);
    484500                                return 1;
    485501                        }
     502                        goto nocopy;
    486503                } else if (strncmp(data, "sec", 3) == 0) {
    487504                        if (value) {
     
    13711388                }
    13721389        }
    1373         if(mountpassword) {
    1374                 /* Commas have to be doubled, or else they will
    1375                 look like the parameter separator */
    1376 /*              if(sep is not set)*/
    1377                 if(retry == 0)
    1378                         check_for_comma(&mountpassword);
    1379                 strlcat(options,",pass=",options_size);
    1380                 strlcat(options,mountpassword,options_size);
    1381         }
    13821390
    13831391        strlcat(options,",ver=",options_size);
     
    13921400                strlcat(options,prefixpath,options_size); /* no need to cat the / */
    13931401        }
    1394         if(verboseflag)
    1395                 printf("\nmount.cifs kernel mount options %s \n",options);
    13961402
    13971403        /* convert all '\\' to '/' in share portion so that /proc/mounts looks pretty */
     
    14241430                }
    14251431        }
     1432
     1433        if(verboseflag)
     1434                fprintf(stderr, "\nmount.cifs kernel mount options: %s", options);
     1435
     1436        if (mountpassword) {
     1437                /*
     1438                 * Commas have to be doubled, or else they will
     1439                 * look like the parameter separator
     1440                 */
     1441                if(retry == 0)
     1442                        check_for_comma(&mountpassword);
     1443                strlcat(options,",pass=",options_size);
     1444                strlcat(options,mountpassword,options_size);
     1445                if (verboseflag)
     1446                        fprintf(stderr, ",pass=********");
     1447        }
     1448
     1449        if (verboseflag)
     1450                fprintf(stderr, "\n");
    14261451
    14271452        if (!fakemnt && mount(dev_name, mountpoint, "cifs", flags, options)) {
  • branches/samba-3.2.x/source/include/smb.h

    r232 r340  
    760760        struct timeval end_time; /* When does this time out? */
    761761        bool encrypted;
     762        bool processed;
    762763        DATA_BLOB buf;
    763764        DATA_BLOB private_data;
  • branches/samba-3.2.x/source/include/version.h

    r335 r340  
    22#define SAMBA_VERSION_MAJOR 3
    33#define SAMBA_VERSION_MINOR 2
    4 #define SAMBA_VERSION_RELEASE 14
    5 #define SAMBA_VERSION_OFFICIAL_STRING "3.2.14"
     4#define SAMBA_VERSION_RELEASE 15
     5#define SAMBA_VERSION_OFFICIAL_STRING "3.2.15"
    66#define SAMBA_VERSION_STRING samba_version_string()
  • branches/samba-3.2.x/source/param/loadparm.c

    r238 r340  
    58515851        int i;
    58525852
     5853        if (pszHomename == NULL || user == NULL || pszHomedir == NULL ||
     5854                        pszHomedir[0] == '\0') {
     5855                return false;
     5856        }
     5857
    58535858        i = add_a_service(ServicePtrs[iDefaultService], pszHomename);
    58545859
     
    78017806                home = get_user_home_dir(talloc_tos(), p);
    78027807
    7803                 if (home && homes >= 0)
     7808                if (home && home[0] && homes >= 0)
    78047809                        lp_add_home(p, homes, p, home);
    78057810
  • branches/samba-3.2.x/source/smbd/process.c

    r233 r340  
    435435        msg->end_time = end_time;
    436436        msg->encrypted = req->encrypted;
     437        msg->processed = false;
    437438
    438439        if (private_data) {
     
    490491                        (unsigned int)msg_mid ));
    491492                if (mid == msg_mid) {
     493
     494                        if (pml->processed) {
     495                                /* A processed message should not be
     496                                 * rescheduled. */
     497                                DEBUG(0,("schedule_deferred_open_smb_message: LOGIC ERROR "
     498                                        "message mid %u was already processed\n",
     499                                        (unsigned int)msg_mid ));
     500                                continue;
     501                        }
     502
    492503                        DEBUG(10,("schedule_deferred_open_smb_message: scheduling mid %u\n",
    493504                                mid ));
     
    504515
    505516/****************************************************************************
    506  Return true if this mid is on the deferred queue.
     517 Return true if this mid is on the deferred queue and was not yet processed.
    507518****************************************************************************/
    508519
     
    512523
    513524        for (pml = deferred_open_queue; pml; pml = pml->next) {
    514                 if (SVAL(pml->buf.data,smb_mid) == mid) {
     525                if (SVAL(pml->buf.data,smb_mid) == mid && !pml->processed) {
    515526                        return True;
    516527                }
     
    779790                           know this is a retry. */
    780791                        DEBUG(5,("receive_message_or_smb: returning deferred open smb message.\n"));
     792
     793                        /* Mark the message as processed so this is not
     794                         * re-processed in error. */
     795                        msg->processed = true;
    781796                        return NT_STATUS_OK;
    782797                }
     
    14061421                if (!change_to_user(conn,session_tag)) {
    14071422                        reply_nterror(req, NT_STATUS_DOS(ERRSRV, ERRbaduid));
    1408                         remove_deferred_open_smb_message(req->mid);
    14091423                        return conn;
    14101424                }
     
    14711485static void construct_reply(char *inbuf, int size, size_t unread_bytes, bool encrypted)
    14721486{
     1487        struct pending_message_list *pml = NULL;
    14731488        uint8 type = CVAL(inbuf,smb_com);
    14741489        connection_struct *conn;
     
    14851500
    14861501        conn = switch_message(type, req, size);
     1502
     1503        /* If this was a deferred message and it's still there and
     1504         * was processed, remove it. */
     1505        pml = get_open_deferred_message(req->mid);
     1506        if (pml && pml->processed) {
     1507                remove_deferred_open_smb_message(req->mid);
     1508        }
    14871509
    14881510        if (req->unread_bytes) {
  • branches/samba-3.2.x/source/smbd/service.c

    r232 r340  
    5555        const char *s = connectpath;
    5656        bool start_of_name_component = true;
     57
     58        if (connectpath == NULL || connectpath[0] == '\0') {
     59                return false;
     60        }
    5761
    5862        destname = SMB_STRDUP(connectpath);
     
    332336        int iHomeService;
    333337
    334         if (!service || !homedir)
     338        if (!service || !homedir || homedir[0] == '\0')
    335339                return -1;
    336340
Note: See TracChangeset for help on using the changeset viewer.