The Samba-Bugzilla – Attachment 12575 Details for
Bug 12374
Printer/Sharename caching uses incorrect timeout
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
12374.patch (text/plain), 1.56 KB, created by
Volker Lendecke
on 2016-10-14 10:43:55 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Volker Lendecke
Created:
2016-10-14 10:43:55 UTC
Size:
1.56 KB
patch
obsolete
>From d7214a82169e777a6432347ad3dbab8013b83194 Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Wed, 12 Oct 2016 11:06:51 +0200 >Subject: [PATCH] spoolss: Fix caching of printername->sharename >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >time_mono() gives seconds since boot, gencache expects seconds since epoch. >With time_mono(), the values are always expired immediately. > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=12374 > >Signed-off-by: Volker Lendecke <vl@samba.org> >Reviewed-by: Guenther Deschner <gd@samba.org> > >Autobuild-User(master): Günther Deschner <gd@samba.org> >Autobuild-Date(master): Thu Oct 13 13:48:52 CEST 2016 on sn-devel-144 >--- > source3/rpc_server/spoolss/srv_spoolss_nt.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c >index c8ff449..9f1d44f 100644 >--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c >+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c >@@ -705,13 +705,13 @@ static WERROR set_printer_hnd_name(TALLOC_CTX *mem_ctx, > > if (!found) { > gencache_set(cache_key, printer_not_found, >- time_mono(NULL) + 300); >+ time(NULL) + 300); > TALLOC_FREE(cache_key); > DEBUGADD(4,("Printer not found\n")); > return WERR_INVALID_PRINTER_NAME; > } > >- gencache_set(cache_key, sname, time_mono(NULL) + 300); >+ gencache_set(cache_key, sname, time(NULL) + 300); > TALLOC_FREE(cache_key); > > DEBUGADD(4,("set_printer_hnd_name: Printer found: %s -> %s\n", aprinter, sname)); >-- >2.1.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
gd
:
review+
Actions:
View
Attachments on
bug 12374
: 12575