Ignore:
Timestamp:
Nov 25, 2016, 8:04:54 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.7

Location:
vendor/current/source3/lib
Files:
1 added
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/lib/dbwrap/dbwrap_ctdb.c

    r988 r989  
    12171217        bool ask_for_readonly_copy;
    12181218        bool done;
     1219        bool empty_record;
    12191220};
    12201221
     
    12361237
    12371238        if (db_ctdb_can_use_local_hdr(header, true)) {
    1238                 state->parser(key, data, state->private_data);
     1239                /*
     1240                 * A record consisting only of the ctdb header can be
     1241                 * a validly created empty record or a tombstone
     1242                 * record of a deleted record (not vacuumed yet). Mark
     1243                 * it accordingly.
     1244                 */
     1245                state->empty_record = (data.dsize == 0);
     1246                if (!state->empty_record) {
     1247                        state->parser(key, data, state->private_data);
     1248                }
    12391249                state->done = true;
    12401250        } else {
     
    12621272        state.parser = parser;
    12631273        state.private_data = private_data;
     1274        state.empty_record = false;
    12641275
    12651276        if (ctx->transaction != NULL) {
     
    12931304                ctx, key, db_ctdb_parse_record_parser_nonpersistent, &state);
    12941305        if (NT_STATUS_IS_OK(status) && state.done) {
     1306                if (state.empty_record) {
     1307                        /*
     1308                         * We know authoritatively, that this is an empty
     1309                         * record. Since ctdb does not distinguish between empty
     1310                         * and deleted records, this can be a record stored as
     1311                         * empty or a not-yet-vacuumed tombstone record of a
     1312                         * deleted record. Now Samba right now can live without
     1313                         * empty records, so we can safely report this record
     1314                         * as non-existing.
     1315                         *
     1316                         * See bugs 10008 and 12005.
     1317                         */
     1318                        return NT_STATUS_NOT_FOUND;
     1319                }
    12951320                return NT_STATUS_OK;
    12961321        }
     
    12991324                          state.ask_for_readonly_copy, parser, private_data);
    13001325        if (ret != 0) {
     1326                if (ret == ENOENT) {
     1327                        /*
     1328                         * This maps to
     1329                         * NT_STATUS_OBJECT_NAME_NOT_FOUND. Our upper
     1330                         * layers expect NT_STATUS_NOT_FOUND for "no
     1331                         * record around". We need to convert dbwrap
     1332                         * to 0/errno away from NTSTATUS ... :-)
     1333                         */
     1334                        return NT_STATUS_NOT_FOUND;
     1335                }
    13011336                return map_nt_error_from_unix(ret);
    13021337        }
  • vendor/current/source3/lib/dumpcore.c

    r988 r989  
    252252        }
    253253
    254 
    255 #ifdef HAVE_GETRLIMIT
    256 #ifdef RLIMIT_CORE
    257         {
    258                 struct rlimit rlp;
    259                 getrlimit(RLIMIT_CORE, &rlp);
    260                 rlp.rlim_cur = MAX(16*1024*1024,rlp.rlim_cur);
    261                 setrlimit(RLIMIT_CORE, &rlp);
    262                 getrlimit(RLIMIT_CORE, &rlp);
    263                 DEBUG(3,("Maximum core file size limits now %d(soft) %d(hard)\n",
    264                          (int)rlp.rlim_cur,(int)rlp.rlim_max));
    265         }
    266 #endif
    267 #endif
    268 
    269254        /* FIXME: if we have a core-plus-pid facility, configurably set
    270255         * this up here.
  • vendor/current/source3/lib/gencache.c

    r988 r989  
    671671        }
    672672
    673         res = tdb_lockall(cache_notrans->tdb);
     673        res = tdb_lockall_nonblock(cache_notrans->tdb);
    674674        if (res != 0) {
    675675                tdb_transaction_cancel(cache->tdb);
  • vendor/current/source3/lib/msghdr.c

    r988 r989  
    205205                msgsize - offsetof(struct msghdr_buf, buf) : 0;
    206206
    207         fd_len = msghdr_prep_fds(&msg->msg, msg->buf, bufsize, fds, num_fds);
     207        if (msg != NULL) {
     208                msg->msg = (struct msghdr) { 0 };
     209
     210                fd_len = msghdr_prep_fds(&msg->msg, msg->buf, bufsize,
     211                                         fds, num_fds);
     212        } else {
     213                fd_len = msghdr_prep_fds(NULL, NULL, bufsize, fds, num_fds);
     214        }
    208215
    209216        if (fd_len == -1) {
  • vendor/current/source3/lib/poll_funcs/poll_funcs_tevent.c

    r988 r989  
    303303                TALLOC_FREE(state->watches[i]);
    304304        }
     305        for (i=0; i<state->num_contexts; i++) {
     306                TALLOC_FREE(state->contexts[i]);
     307        }
    305308        return 0;
    306309}
     
    316319        unsigned i;
    317320
     321        /* Look for an existing match first. */
    318322        for (i=0; i<state->num_contexts; i++) {
    319323                struct poll_funcs_tevent_context *ctx = state->contexts[i];
    320324
    321                 if ((ctx == NULL) || (ctx->ev == ev)) {
     325                if (ctx != NULL && ctx->ev == ev) {
    322326                        *slot = i;
    323327                        return true;
    324328                }
    325329        }
     330
     331        /* Now look for a free slot. */
     332        for (i=0; i<state->num_contexts; i++) {
     333                struct poll_funcs_tevent_context *ctx = state->contexts[i];
     334
     335                if (ctx == NULL) {
     336                        *slot = i;
     337                        return true;
     338                }
     339        }
     340
    326341
    327342        contexts = talloc_realloc(state, state->contexts,
  • vendor/current/source3/lib/server_contexts.c

    r988 r989  
    3232                 * children exiting.
    3333                 */
    34                 server_event_ctx = s3_tevent_context_init(NULL);
     34                server_event_ctx = samba_tevent_context_init(NULL);
    3535        }
    3636        if (!server_event_ctx) {
  • vendor/current/source3/lib/substitute.c

    r988 r989  
    500500                case 'G' : {
    501501                        struct passwd *pass;
     502                        bool is_domain_name = false;
     503                        const char *sep = lp_winbind_separator();
    502504
    503505                        if (domain_name != NULL && domain_name[0] != '\0' &&
    504                             !strequal(domain_name, my_sam_name()))
    505                         {
     506                            (lp_security() == SEC_ADS ||
     507                             lp_security() == SEC_DOMAIN)) {
    506508                                r = talloc_asprintf(tmp_ctx,
    507509                                                    "%s%c%s",
    508510                                                    domain_name,
    509                                                     *lp_winbind_separator(),
     511                                                    *sep,
    510512                                                    smb_name);
     513                                is_domain_name = true;
    511514                        } else {
    512515                                r = talloc_strdup(tmp_ctx, smb_name);
     
    518521                        pass = Get_Pwnam_alloc(tmp_ctx, r);
    519522                        if (pass != NULL) {
    520                                 a_string = realloc_string_sub(
    521                                         a_string, "%G",
    522                                         gidtoname(pass->pw_gid));
     523                                char *group_name;
     524
     525                                group_name = gidtoname(pass->pw_gid);
     526                                if (is_domain_name) {
     527                                        p = strchr_m(group_name, *sep);
     528                                        if (p != NULL) {
     529                                                group_name = p + 1;
     530                                        }
     531                                }
     532                                a_string = realloc_string_sub(a_string,
     533                                                              "%G",
     534                                                              group_name);
    523535                        }
    524536                        TALLOC_FREE(pass);
  • vendor/current/source3/lib/sysquotas_4B.c

    r988 r989  
    8282        dp->curblocks = XLATE_TO_BLOCKS(qblk->dqb_curbytes);
    8383#undef XLATE_TO_BLOCKS
     84#else
     85        dp->bsize = DEV_BSIZE;
     86
     87        dp->softlimit = qblk->dqb_bsoftlimit;
     88        dp->hardlimit = qblk->dqb_bhardlimit;
     89        dp->curblocks = qblk->dqb_curblocks;
    8490#endif
    8591
Note: See TracChangeset for help on using the changeset viewer.