Changeset 989 for vendor/current/source3/lib
- Timestamp:
- Nov 25, 2016, 8:04:54 PM (9 years ago)
- 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 1217 1217 bool ask_for_readonly_copy; 1218 1218 bool done; 1219 bool empty_record; 1219 1220 }; 1220 1221 … … 1236 1237 1237 1238 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 } 1239 1249 state->done = true; 1240 1250 } else { … … 1262 1272 state.parser = parser; 1263 1273 state.private_data = private_data; 1274 state.empty_record = false; 1264 1275 1265 1276 if (ctx->transaction != NULL) { … … 1293 1304 ctx, key, db_ctdb_parse_record_parser_nonpersistent, &state); 1294 1305 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 } 1295 1320 return NT_STATUS_OK; 1296 1321 } … … 1299 1324 state.ask_for_readonly_copy, parser, private_data); 1300 1325 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 } 1301 1336 return map_nt_error_from_unix(ret); 1302 1337 } -
vendor/current/source3/lib/dumpcore.c
r988 r989 252 252 } 253 253 254 255 #ifdef HAVE_GETRLIMIT256 #ifdef RLIMIT_CORE257 {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 #endif267 #endif268 269 254 /* FIXME: if we have a core-plus-pid facility, configurably set 270 255 * this up here. -
vendor/current/source3/lib/gencache.c
r988 r989 671 671 } 672 672 673 res = tdb_lockall (cache_notrans->tdb);673 res = tdb_lockall_nonblock(cache_notrans->tdb); 674 674 if (res != 0) { 675 675 tdb_transaction_cancel(cache->tdb); -
vendor/current/source3/lib/msghdr.c
r988 r989 205 205 msgsize - offsetof(struct msghdr_buf, buf) : 0; 206 206 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 } 208 215 209 216 if (fd_len == -1) { -
vendor/current/source3/lib/poll_funcs/poll_funcs_tevent.c
r988 r989 303 303 TALLOC_FREE(state->watches[i]); 304 304 } 305 for (i=0; i<state->num_contexts; i++) { 306 TALLOC_FREE(state->contexts[i]); 307 } 305 308 return 0; 306 309 } … … 316 319 unsigned i; 317 320 321 /* Look for an existing match first. */ 318 322 for (i=0; i<state->num_contexts; i++) { 319 323 struct poll_funcs_tevent_context *ctx = state->contexts[i]; 320 324 321 if ( (ctx == NULL) || (ctx->ev == ev)) {325 if (ctx != NULL && ctx->ev == ev) { 322 326 *slot = i; 323 327 return true; 324 328 } 325 329 } 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 326 341 327 342 contexts = talloc_realloc(state, state->contexts, -
vendor/current/source3/lib/server_contexts.c
r988 r989 32 32 * children exiting. 33 33 */ 34 server_event_ctx = s 3_tevent_context_init(NULL);34 server_event_ctx = samba_tevent_context_init(NULL); 35 35 } 36 36 if (!server_event_ctx) { -
vendor/current/source3/lib/substitute.c
r988 r989 500 500 case 'G' : { 501 501 struct passwd *pass; 502 bool is_domain_name = false; 503 const char *sep = lp_winbind_separator(); 502 504 503 505 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)) { 506 508 r = talloc_asprintf(tmp_ctx, 507 509 "%s%c%s", 508 510 domain_name, 509 * lp_winbind_separator(),511 *sep, 510 512 smb_name); 513 is_domain_name = true; 511 514 } else { 512 515 r = talloc_strdup(tmp_ctx, smb_name); … … 518 521 pass = Get_Pwnam_alloc(tmp_ctx, r); 519 522 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); 523 535 } 524 536 TALLOC_FREE(pass); -
vendor/current/source3/lib/sysquotas_4B.c
r988 r989 82 82 dp->curblocks = XLATE_TO_BLOCKS(qblk->dqb_curbytes); 83 83 #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; 84 90 #endif 85 91
Note:
See TracChangeset
for help on using the changeset viewer.