The branch, master has been updated via 7edf5467fc7 lib: Remove timeval_set() via a3e186b6171 lib: Remove timeval_until() via 842e7378439 fuzz:fuzz_ndr_X: don't skip printing on push error via cebe12bc85a ldb-samba: matching rules: notify of search failure in transitive filter via 90964caaf2e fuzz:_conditional_ace_blob discards a const via e1071cd1df6 fuzz:fuzz_conditional_ace_blob lets long generated SDDL fail via 168e5df62f9 fuzzing: fuzz_ndr_X ndr_print does printing from 4f0ed9b0038 tests/krb5: Add tests for AllowedToAuthenticateTo with an AS-REQ
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 7edf5467fc77cc1039c0ef9fd4579bfb7333c159 Author: Volker Lendecke <v...@samba.org> Date: Wed Mar 13 16:19:48 2024 +0100 lib: Remove timeval_set() We have the same function in tevent, no need to duplicate code. More lines just due to clang-format. Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> Autobuild-User(master): Andrew Bartlett <abart...@samba.org> Autobuild-Date(master): Fri Mar 22 06:07:42 UTC 2024 on atb-devel-224 commit a3e186b61719cd0e1ec60006d7ea675c01d69c36 Author: Volker Lendecke <v...@samba.org> Date: Wed Mar 13 16:07:00 2024 +0100 lib: Remove timeval_until() We have the same function in tevent, no need to duplicate code. Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 842e7378439fcf354260c98b9ea7dadf59c601c7 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Mar 21 14:48:34 2024 +1300 fuzz:fuzz_ndr_X: don't skip printing on push error push should not have changed the struct, so it is valid to try to print it also. Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit cebe12bc85a7f178e7ccaecd1c075f2e40478139 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Dec 28 12:45:41 2023 +1300 ldb-samba: matching rules: notify of search failure in transitive filter It can be very hard to known where transitive checks fail, and this will help. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15515 Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 90964caaf2e2ae0c36aa223ddfb66a5cdec42a6c Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Dec 28 13:46:48 2023 +1300 fuzz:_conditional_ace_blob discards a const Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit e1071cd1df6b639a2a4b273b82bdc968df363dbb Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Wed Mar 20 17:29:52 2024 +1300 fuzz:fuzz_conditional_ace_blob lets long generated SDDL fail This can legitimately fail, due to e.g. integers being interpreted as local attributes due to their position (the original data is complete nonsense, bravely decompiled by sddl_from_conditional_ace). In the example found the original begins like 00000000 61 72 74 78 02 00 00 00 00 00 00 00 00 03 01 02 |artx............| 00000010 f7 ff ff ff ff ff ff ff 03 01 a1 02 00 3b 00 00 |.............;..| 00000020 00 00 00 00 03 01 a1 02 00 3b 00 00 00 00 00 00 |.........;......| 00000030 03 01 02 a5 ff ff ff ff ff ff ff 03 01 a1 02 78 |...............x| 00000040 00 00 00 00 00 00 00 03 01 85 02 00 3b 00 00 00 |............;...| 00000050 00 00 00 03 01 a1 02 00 3b 00 00 00 00 00 00 03 |........;.......| 00000060 01 02 a5 00 00 00 00 00 00 00 03 01 81 02 00 00 |................| 00000070 00 00 00 00 00 00 03 01 81 02 00 3b 00 00 00 00 |...........;....| while the SDDL cycled version looks like 00000000 61 72 74 78 f8 04 00 00 00 30 00 30 00 f8 2e 00 |artx.....0.0....| 00000010 00 00 30 00 31 00 37 00 37 00 37 00 37 00 37 00 |..0.1.7.7.7.7.7.| 00000020 37 00 37 00 37 00 37 00 37 00 37 00 37 00 37 00 |7.7.7.7.7.7.7.7.| 00000030 37 00 37 00 37 00 37 00 37 00 37 00 36 00 37 00 |7.7.7.7.7.7.6.7.| 00000040 a1 f8 0c 00 00 00 30 00 33 00 35 00 34 00 30 00 |......0.3.5.4.0.| 00000050 30 00 a1 f8 0c 00 00 00 30 00 33 00 35 00 34 00 |0.......0.3.5.4.| 00000060 30 00 30 00 f8 2e 00 00 00 30 00 31 00 37 00 37 |0.0......0.1.7.7| 00000070 00 37 00 37 00 37 00 37 00 37 00 37 00 37 00 37 |.7.7.7.7.7.7.7.7| and this new interpretation ends up being more than 10000 bytes long, so the conversion fails. The SDDL ends up looking like this: (((((((((((00) || (01777777777777777777767)) || (035400)) || \ (((((((((((((((((((((((((((((((((((035400) || (01777777777777777777645)) \ >= 0170) || (035400)) || (((((((((((((((((((((((((((((((035400 != 0245) [...] where all the octal digits on the left hand side of operators are UTF-16 strings. REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65322 Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 168e5df62f956e2bd74ca0e6ed54bfea2da1b09f Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Jan 4 11:06:46 2024 +1300 fuzzing: fuzz_ndr_X ndr_print does printing By printing into a buffer, we might notice some errors. Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> ----------------------------------------------------------------------- Summary of changes: ctdb/server/ctdb_daemon.c | 4 ++-- lib/fuzzing/fuzz_conditional_ace_blob.c | 15 +++++++++++-- lib/fuzzing/fuzz_ndr_X.c | 30 +++++++++++++++++-------- lib/ldb-samba/ldb_matching_rules.c | 5 +++++ lib/util/time.c | 35 ----------------------------- lib/util/time.h | 13 ----------- source3/lib/dbwrap/dbwrap_ctdb.c | 8 +++++-- source3/printing/queue_process.c | 11 +++++---- source3/smbd/open.c | 14 ++++++------ source3/smbd/smb2_process.c | 33 ++++++++++++++++++--------- source3/smbd/smb2_setinfo.c | 2 +- source3/torture/msg_sink.c | 4 ++-- source3/torture/msg_source.c | 8 +++++-- source3/utils/net_g_lock.c | 14 ++++++------ source3/utils/net_registry.c | 2 +- source3/winbindd/winbindd_cred_cache.c | 40 ++++++++++++++++++--------------- source3/winbindd/winbindd_dual.c | 2 +- source4/torture/rpc/echo.c | 3 ++- 18 files changed, 125 insertions(+), 118 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c index 0a53770a6bf..c5dd1ed60aa 100644 --- a/ctdb/server/ctdb_daemon.c +++ b/ctdb/server/ctdb_daemon.c @@ -1331,7 +1331,7 @@ static void ctdb_tevent_trace(enum tevent_trace_point tp, switch (tp) { case TEVENT_TRACE_BEFORE_WAIT: - diff = timeval_until(&tevent_after_wait_ts, &now); + diff = tevent_timeval_until(&tevent_after_wait_ts, &now); if (diff.tv_sec > 3) { DEBUG(DEBUG_ERR, ("Handling event took %ld seconds!\n", @@ -1341,7 +1341,7 @@ static void ctdb_tevent_trace(enum tevent_trace_point tp, break; case TEVENT_TRACE_AFTER_WAIT: - diff = timeval_until(&tevent_before_wait_ts, &now); + diff = tevent_timeval_until(&tevent_before_wait_ts, &now); if (diff.tv_sec > 3) { DEBUG(DEBUG_ERR, ("No event for %ld seconds!\n", diff --git a/lib/fuzzing/fuzz_conditional_ace_blob.c b/lib/fuzzing/fuzz_conditional_ace_blob.c index ebbd90883aa..76ce0154a4c 100644 --- a/lib/fuzzing/fuzz_conditional_ace_blob.c +++ b/lib/fuzzing/fuzz_conditional_ace_blob.c @@ -58,7 +58,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *input, size_t len) * need a security token. */ - e1.data = input; + e1.data = discard_const(input); e1.length = len; mem_ctx = talloc_new(NULL); @@ -124,7 +124,18 @@ int LLVMFuzzerTestOneInput(const uint8_t *input, size_t len) ok = conditional_ace_encode_binary(mem_ctx, s2, &e2); if (! ok) { - abort(); + if (len < CONDITIONAL_ACE_MAX_LENGTH / 4) { + /* + * long invalid ACEs can easily result in SDDL that + * would compile to an over-long ACE, which fail + * accordingly. + * + * But if the original ACE less than a few thousand + * bytes, and it has been serialised into SDDL, that + * SDDL should be parsable. + */ + abort(); + } } /* diff --git a/lib/fuzzing/fuzz_ndr_X.c b/lib/fuzzing/fuzz_ndr_X.c index 16109cccb2b..99332608414 100644 --- a/lib/fuzzing/fuzz_ndr_X.c +++ b/lib/fuzzing/fuzz_ndr_X.c @@ -136,17 +136,23 @@ static NTSTATUS pull_chunks(struct ndr_pull *ndr_pull, return NT_STATUS_OK; } -static void ndr_print_nothing(struct ndr_print *ndr, const char *format, ...) +static void ndr_print_and_forget(struct ndr_print *ndr, const char *format, ...) PRINTF_ATTRIBUTE(2,3); + +static char print_buffer[1000000]; + +static void ndr_print_and_forget(struct ndr_print *ndr, const char *format, ...) { /* * This is here so that we walk the tree but don't output anything. - * This helps find buggy ndr_print routines + * This helps find buggy ndr_print routines. + * + * We call snprinf() to find e.g. strings without NULL terminators. */ + va_list list; - /* - * TODO: consider calling snprinf() to find strings without NULL - * terminators (for example) - */ + va_start(list, format); + vsnprintf(print_buffer, sizeof(print_buffer), format, list); + va_end(list); } @@ -306,13 +312,19 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { pull_push_print_flags, st); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - TALLOC_FREE(mem_ctx); - return 0; + /* + * Note we aren't bailing here. + * + * It is good that ndr_push returned an error, because + * the structure is no doubt rubbish. But that doesn't + * mean we don't also want to see if ndr_print can + * handle it. + */ } { struct ndr_print *ndr_print = talloc_zero(mem_ctx, struct ndr_print); - ndr_print->print = ndr_print_nothing; + ndr_print->print = ndr_print_and_forget; ndr_print->depth = 1; /* diff --git a/lib/ldb-samba/ldb_matching_rules.c b/lib/ldb-samba/ldb_matching_rules.c index 59d1385f4e3..dd1f80628c9 100644 --- a/lib/ldb-samba/ldb_matching_rules.c +++ b/lib/ldb-samba/ldb_matching_rules.c @@ -74,6 +74,11 @@ static int ldb_eval_transitive_filter_helper(TALLOC_CTX *mem_ctx, attrs, DSDB_MARK_REQ_UNTRUSTED); if (ret != LDB_SUCCESS) { + DBG_NOTICE("search failure (%d: %s) looking for '%s' on '%s'\n", + ret, + ldb_strerror(ret), + attr, + ldb_dn_get_linearized(to_visit->dn)); talloc_free(tmp_ctx); return ret; } diff --git a/lib/util/time.c b/lib/util/time.c index a47af20a350..d2bf2454e31 100644 --- a/lib/util/time.c +++ b/lib/util/time.c @@ -617,18 +617,6 @@ _PUBLIC_ struct timeval timeval_current(void) return tv; } -/** - return a timeval struct with the given elements -*/ -_PUBLIC_ struct timeval timeval_set(uint32_t secs, uint32_t usecs) -{ - struct timeval tv; - tv.tv_sec = secs; - tv.tv_usec = usecs; - return tv; -} - - /** return a timeval ofs microseconds after tv */ @@ -766,29 +754,6 @@ _PUBLIC_ struct timeval timeval_max(const struct timeval *tv1, return *tv2; } -/** - return the difference between two timevals as a timeval - if tv1 comes after tv2, then return a zero timeval - (this is *tv2 - *tv1) -*/ -_PUBLIC_ struct timeval timeval_until(const struct timeval *tv1, - const struct timeval *tv2) -{ - struct timeval t; - if (timeval_compare(tv1, tv2) >= 0) { - return timeval_zero(); - } - t.tv_sec = tv2->tv_sec - tv1->tv_sec; - if (tv1->tv_usec > tv2->tv_usec) { - t.tv_sec--; - t.tv_usec = 1000000 - (tv1->tv_usec - tv2->tv_usec); - } else { - t.tv_usec = tv2->tv_usec - tv1->tv_usec; - } - return t; -} - - /** convert a timeval to a NTTIME */ diff --git a/lib/util/time.h b/lib/util/time.h index bfbd1b811dd..1180dd0cfc4 100644 --- a/lib/util/time.h +++ b/lib/util/time.h @@ -240,11 +240,6 @@ bool timeval_is_zero(const struct timeval *tv); */ struct timeval timeval_current(void); -/** - return a timeval struct with the given elements -*/ -struct timeval timeval_set(uint32_t secs, uint32_t usecs); - /** return a timeval ofs microseconds after tv */ @@ -317,14 +312,6 @@ struct timeval timeval_min(const struct timeval *tv1, struct timeval timeval_max(const struct timeval *tv1, const struct timeval *tv2); -/** - return the difference between two timevals as a timeval - if tv1 comes after tv2, then return a zero timeval - (this is *tv2 - *tv1) -*/ -struct timeval timeval_until(const struct timeval *tv1, - const struct timeval *tv2); - /** convert a timeval to a NTTIME */ diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c index 46165e8fbfb..807b7f52248 100644 --- a/source3/lib/dbwrap/dbwrap_ctdb.c +++ b/source3/lib/dbwrap/dbwrap_ctdb.c @@ -381,8 +381,12 @@ static int db_ctdb_transaction_start(struct db_context *db) /* * Wait a day, i.e. forever... */ - status = g_lock_lock(ctx->lock_ctx, string_term_tdb_data(h->lock_name), - G_LOCK_WRITE, timeval_set(86400, 0), NULL, NULL); + status = g_lock_lock(ctx->lock_ctx, + string_term_tdb_data(h->lock_name), + G_LOCK_WRITE, + tevent_timeval_set(86400, 0), + NULL, + NULL); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("g_lock_lock failed: %s\n", nt_errstr(status))); TALLOC_FREE(h); diff --git a/source3/printing/queue_process.c b/source3/printing/queue_process.c index 6613e8f9f55..d1e95bb083a 100644 --- a/source3/printing/queue_process.c +++ b/source3/printing/queue_process.c @@ -186,10 +186,13 @@ static bool printing_subsystem_queue_tasks(struct bq_state *state) return true; } - state->housekeep = event_add_idle(state->ev, NULL, - timeval_set(housekeeping_period, 0), - "print_queue_housekeeping", - print_queue_housekeeping, state); + state->housekeep = event_add_idle( + state->ev, + NULL, + tevent_timeval_set(housekeeping_period, 0), + "print_queue_housekeeping", + print_queue_housekeeping, + state); if (state->housekeep == NULL) { DEBUG(0,("Could not add print_queue_housekeeping event\n")); return false; diff --git a/source3/smbd/open.c b/source3/smbd/open.c index bd397376d26..ae47d130650 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -3206,7 +3206,7 @@ static void schedule_defer_open(struct share_mode_lock *lck, * measure here in case the other smbd is stuck * somewhere else. */ - timeout = timeval_set(OPLOCK_BREAK_TIMEOUT*2, 0); + timeout = tevent_timeval_set(OPLOCK_BREAK_TIMEOUT * 2, 0); if (request_timed_out(req, timeout)) { return; @@ -3230,7 +3230,7 @@ static void schedule_async_open_timer(struct tevent_context *ev, static void schedule_async_open(struct smb_request *req) { struct deferred_open_record *open_rec = NULL; - struct timeval timeout = timeval_set(20, 0); + struct timeval timeout = tevent_timeval_set(20, 0); bool ok; if (request_timed_out(req, timeout)) { @@ -4184,11 +4184,11 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, * the oplock got removed. */ - setup_poll_open( - req, - &fsp->file_id, - timeval_set(OPLOCK_BREAK_TIMEOUT*2, 0), - timeval_set(1, 0)); + setup_poll_open(req, + &fsp->file_id, + tevent_timeval_set(OPLOCK_BREAK_TIMEOUT * 2, + 0), + tevent_timeval_set(1, 0)); return NT_STATUS_SHARING_VIOLATION; } diff --git a/source3/smbd/smb2_process.c b/source3/smbd/smb2_process.c index 2783ac23822..482c448e81b 100644 --- a/source3/smbd/smb2_process.c +++ b/source3/smbd/smb2_process.c @@ -2020,26 +2020,37 @@ void smbd_process(struct tevent_context *ev_ctx, MSG_DEBUG, debug_message); #if defined(WITH_SMB1SERVER) - if ((lp_keepalive() != 0) - && !(event_add_idle(ev_ctx, NULL, - timeval_set(lp_keepalive(), 0), - "keepalive", keepalive_fn, - sconn))) { + if ((lp_keepalive() != 0) && + !(event_add_idle(ev_ctx, + NULL, + tevent_timeval_set(lp_keepalive(), 0), + "keepalive", + keepalive_fn, + sconn))) + { DEBUG(0, ("Could not add keepalive event\n")); exit(1); } #endif - if (!(event_add_idle(ev_ctx, NULL, - timeval_set(IDLE_CLOSED_TIMEOUT, 0), - "deadtime", deadtime_fn, sconn))) { + if (!(event_add_idle(ev_ctx, + NULL, + tevent_timeval_set(IDLE_CLOSED_TIMEOUT, 0), + "deadtime", + deadtime_fn, + sconn))) + { DEBUG(0, ("Could not add deadtime event\n")); exit(1); } - if (!(event_add_idle(ev_ctx, NULL, - timeval_set(SMBD_HOUSEKEEPING_INTERVAL, 0), - "housekeeping", housekeeping_fn, sconn))) { + if (!(event_add_idle(ev_ctx, + NULL, + tevent_timeval_set(SMBD_HOUSEKEEPING_INTERVAL, 0), + "housekeeping", + housekeeping_fn, + sconn))) + { DEBUG(0, ("Could not add housekeeping event\n")); exit(1); } diff --git a/source3/smbd/smb2_setinfo.c b/source3/smbd/smb2_setinfo.c index f26fce77a23..dd0ba880fd1 100644 --- a/source3/smbd/smb2_setinfo.c +++ b/source3/smbd/smb2_setinfo.c @@ -279,7 +279,7 @@ static struct tevent_req *delay_rename_for_lease_break(struct tevent_req *req, tevent_req_set_callback(subreq, defer_rename_done, rename_state); - timeout = timeval_set(OPLOCK_BREAK_TIMEOUT*2, 0); + timeout = tevent_timeval_set(OPLOCK_BREAK_TIMEOUT * 2, 0); if (!tevent_req_set_endtime(subreq, ev, timeval_sum(&smb2req->request_time, &timeout))) { diff --git a/source3/torture/msg_sink.c b/source3/torture/msg_sink.c index 3c3dda3c779..d61dd259d62 100644 --- a/source3/torture/msg_sink.c +++ b/source3/torture/msg_sink.c @@ -266,8 +266,8 @@ int main(void) printf("server_id: %s\n", server_id_str_buf(id, &tmp)); - req = msgcount_send(ev, ev, msg_ctx, MSG_SMB_NOTIFY, - timeval_set(1, 0)); + req = msgcount_send( + ev, ev, msg_ctx, MSG_SMB_NOTIFY, tevent_timeval_set(1, 0)); if (req == NULL) { perror("msgcount_send failed"); return -1; diff --git a/source3/torture/msg_source.c b/source3/torture/msg_source.c index e718018be98..6fb23f72252 100644 --- a/source3/torture/msg_source.c +++ b/source3/torture/msg_source.c @@ -139,8 +139,12 @@ int main(int argc, const char *argv[]) return -1; } - req = source_send(ev, ev, msg_ctx, MSG_SMB_NOTIFY, - timeval_set(0, 10000), id); + req = source_send(ev, + ev, + msg_ctx, + MSG_SMB_NOTIFY, + tevent_timeval_set(0, 10000), + id); if (req == NULL) { perror("source_send failed"); return -1; diff --git a/source3/utils/net_g_lock.c b/source3/utils/net_g_lock.c index a1000284102..30dda0116a4 100644 --- a/source3/utils/net_g_lock.c +++ b/source3/utils/net_g_lock.c @@ -83,13 +83,13 @@ static int net_g_lock_do(struct net_context *c, int argc, const char **argv) d_fprintf(stderr, _("g_lock_ctx_init failed\n")); return -1; } - status = g_lock_lock( - ctx, - key, - G_LOCK_WRITE, - timeval_set(timeout / 1000, timeout % 1000), - NULL, - NULL); + status = g_lock_lock(ctx, + key, + G_LOCK_WRITE, + tevent_timeval_set(timeout / 1000, + timeout % 1000), + NULL, + NULL); if (!NT_STATUS_IS_OK(status)) { d_fprintf(stderr, _("g_lock_lock failed: %s\n"), diff --git a/source3/utils/net_registry.c b/source3/utils/net_registry.c index 5d1314ec37a..92f6ebf374b 100644 --- a/source3/utils/net_registry.c +++ b/source3/utils/net_registry.c @@ -616,7 +616,7 @@ static int net_registry_increment(struct net_context *c, int argc, status = g_lock_lock(ctx, lock_key, G_LOCK_WRITE, - timeval_set(600, 0), + tevent_timeval_set(600, 0), NULL, NULL); if (!NT_STATUS_IS_OK(status)) { diff --git a/source3/winbindd/winbindd_cred_cache.c b/source3/winbindd/winbindd_cred_cache.c index 59daaffbd25..a73afe483fb 100644 --- a/source3/winbindd/winbindd_cred_cache.c +++ b/source3/winbindd/winbindd_cred_cache.c @@ -174,8 +174,10 @@ rekinit: new_start = time(NULL) + MAX(30, lp_winbind_cache_time()); #endif - add_krb5_ticket_gain_handler_event(entry, - timeval_set(new_start, 0)); + add_krb5_ticket_gain_handler_event( + entry, + tevent_timeval_set(new_start, + 0)); return; } TALLOC_FREE(entry->event); @@ -250,8 +252,8 @@ rekinit: #endif /* ticket is destroyed here, we have to regain it * if it is possible */ - add_krb5_ticket_gain_handler_event(entry, - timeval_set(new_start, 0)); + add_krb5_ticket_gain_handler_event( + entry, tevent_timeval_set(new_start, 0)); return; } @@ -280,18 +282,19 @@ done: && (entry->renew_until <= expire_time)) { /* try to regain ticket 10 seconds before expiration */ expire_time -= 10; - add_krb5_ticket_gain_handler_event(entry, - timeval_set(expire_time, 0)); + add_krb5_ticket_gain_handler_event( + entry, tevent_timeval_set(expire_time, 0)); return; } if (entry->refresh_time == 0) { entry->refresh_time = new_start; } - entry->event = tevent_add_timer(global_event_context(), entry, - timeval_set(new_start, 0), - krb5_ticket_refresh_handler, - entry); + entry->event = tevent_add_timer(global_event_context(), + entry, + tevent_timeval_set(new_start, 0), + krb5_ticket_refresh_handler, + entry); #endif } @@ -371,7 +374,7 @@ static void krb5_ticket_gain_handler(struct tevent_context *event_ctx, retry_later: #if defined(DEBUG_KRB5_TKT_RENEWAL) - t = timeval_set(time(NULL) + 30, 0); + t = tevent_timeval_set(time(NULL) + 30, 0); #else t = timeval_current_ofs(MAX(30, lp_winbind_cache_time()), 0); #endif @@ -382,9 +385,9 @@ static void krb5_ticket_gain_handler(struct tevent_context *event_ctx, got_ticket: #if defined(DEBUG_KRB5_TKT_RENEWAL) - t = timeval_set(time(NULL) + 30, 0); + t = tevent_timeval_set(time(NULL) + 30, 0); #else -- Samba Shared Repository