diff options
author | David Disseldorp <ddiss@samba.org> | 2015-04-01 01:03:13 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2015-04-21 02:16:00 +0200 |
commit | 93293071824169944944650a859d832af9d2303b (patch) | |
tree | 6bbe07d0dcb87921df629dab6178425b13131889 | |
parent | 1cd5d85cad2f2f29a5f9d2b4decd538db4e0e1d6 (diff) | |
download | samba-93293071824169944944650a859d832af9d2303b.tar.gz |
spoolss: purge the printer name cache on name change
Currently the name cache is only cleared on printer deletion. This means
that if a printer undergoes a name change, the old name remains in the
cache and can be subsequently used incorrecly if another printer takes
the same name as the old.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11210
Reported-by: Franz Pförtsch <franz.pfoertsch@brose.com>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Apr 14 05:37:50 CEST 2015 on sn-devel-104
(cherry picked from commit a97507a9a7ba01beead6a621e1210618e93a9f9c)
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Tue Apr 21 02:16:00 CEST 2015 on sn-devel-104
-rw-r--r-- | source3/rpc_server/spoolss/srv_spoolss_nt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c index 34f0b5707d9..42caff1025b 100644 --- a/source3/rpc_server/spoolss/srv_spoolss_nt.c +++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c @@ -6472,6 +6472,9 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx, snum, printer->sharename ? printer->sharename : ""); } + + /* name change, purge any cache entries for the old */ + prune_printername_cache(); } if (printer->printername != NULL && @@ -6508,6 +6511,9 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx, notify_printer_printername(server_event_context(), msg_ctx, snum, p ? p : ""); } + + /* name change, purge any cache entries for the old */ + prune_printername_cache(); } if (printer->portname != NULL && |