<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/source3/printing/printer_list.c, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/'/>
<entry>
<title>s3:printing: make printer_list.tdb none readable for others</title>
<updated>2026-04-07T16:12:32+00:00</updated>
<author>
<name>Shwetha Acharya</name>
<email>Shwetha.K.Acharya@ibm.com</email>
</author>
<published>2026-04-06T11:25:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=ccb54fffaeda0cde2ed0a625ff3a69fae64fb4b2'/>
<id>ccb54fffaeda0cde2ed0a625ff3a69fae64fb4b2</id>
<content type='text'>
Signed-off-by: Shwetha Acharya &lt;Shwetha.K.Acharya@ibm.com&gt;
Reviewed-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;

Autobuild-User(master): Anoop C S &lt;anoopcs@samba.org&gt;
Autobuild-Date(master): Tue Apr  7 16:12:32 UTC 2026 on atb-devel-224
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Shwetha Acharya &lt;Shwetha.K.Acharya@ibm.com&gt;
Reviewed-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;

Autobuild-User(master): Anoop C S &lt;anoopcs@samba.org&gt;
Autobuild-Date(master): Tue Apr  7 16:12:32 UTC 2026 on atb-devel-224
</pre>
</div>
</content>
</entry>
<entry>
<title>s3:printing: Fix code spelling</title>
<updated>2023-08-08T04:39:38+00:00</updated>
<author>
<name>Joseph Sutton</name>
<email>josephsutton@catalyst.net.nz</email>
</author>
<published>2023-08-08T00:20:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=6489f31378eb79647fd96188eafaec6bde8a9d98'/>
<id>6489f31378eb79647fd96188eafaec6bde8a9d98</id>
<content type='text'>
Signed-off-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s3:printing: Add missing newlines to logging messages</title>
<updated>2023-08-08T04:39:38+00:00</updated>
<author>
<name>Joseph Sutton</name>
<email>josephsutton@catalyst.net.nz</email>
</author>
<published>2023-08-07T04:47:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=1fbfe05023e22e65711461130464efab63ea514e'/>
<id>1fbfe05023e22e65711461130464efab63ea514e</id>
<content type='text'>
Signed-off-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s3:printing: Do not clear the printer-list.tdb</title>
<updated>2022-06-30T22:08:39+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2022-06-22T16:56:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=9080cd30d517cb50954e440bb4475c2eeb678906'/>
<id>9080cd30d517cb50954e440bb4475c2eeb678906</id>
<content type='text'>
With the new dcerpc architecture we need to keep printer-list.tdb
around. A spoolss dcerpc call will start rpc-spoolssd which will then
start the background queue process. However in order to enum the
printers we need have a printer-list.tdb. Depending on the number of
printers this task can take several seconds. It is unlinkly that
the printer-list will change all the time, so we might provide outdated
data till it gets refreshed, but this is better than providing no
printer list at all.

If there are a lot of printers, the idle_seconds for the rpc-spoolssd
should be increased so that the background task can finish.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15082

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;

Autobuild-User(master): Jeremy Allison &lt;jra@samba.org&gt;
Autobuild-Date(master): Thu Jun 30 22:08:39 UTC 2022 on sn-devel-184
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With the new dcerpc architecture we need to keep printer-list.tdb
around. A spoolss dcerpc call will start rpc-spoolssd which will then
start the background queue process. However in order to enum the
printers we need have a printer-list.tdb. Depending on the number of
printers this task can take several seconds. It is unlinkly that
the printer-list will change all the time, so we might provide outdated
data till it gets refreshed, but this is better than providing no
printer list at all.

If there are a lot of printers, the idle_seconds for the rpc-spoolssd
should be increased so that the background task can finish.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15082

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;

Autobuild-User(master): Jeremy Allison &lt;jra@samba.org&gt;
Autobuild-Date(master): Thu Jun 30 22:08:39 UTC 2022 on sn-devel-184
</pre>
</div>
</content>
</entry>
<entry>
<title>printing: Introduce printer_list_printername_exists()</title>
<updated>2021-03-16T17:09:31+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2021-03-13T13:34:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=46cc9b512200fcd435be313e915c1b1fc0deb428'/>
<id>46cc9b512200fcd435be313e915c1b1fc0deb428</id>
<content type='text'>
Replace pcap_printername_ok(). Slightly different semantics: If the
printer list db has a corrupted record, this is not detected.

Why this patch? pcap_printername_ok() is a simple wrapper around the
tdb accessing function, and this reduces a dependency on pcap.c

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace pcap_printername_ok(). Slightly different semantics: If the
printer list db has a corrupted record, this is not detected.

Why this patch? pcap_printername_ok() is a simple wrapper around the
tdb accessing function, and this reduces a dependency on pcap.c

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: Pass mem_ctx to lock_path()</title>
<updated>2018-08-17T09:30:10+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2018-08-16T08:51:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=f986a73b240ea61df1d4664b9c3c6d0858b17111'/>
<id>f986a73b240ea61df1d4664b9c3c6d0858b17111</id>
<content type='text'>
Fix a confusing API: Many places TALLOC_FREE the path where it's not
clear you have to do it.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix a confusing API: Many places TALLOC_FREE the path where it's not
clear you have to do it.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>printer_list: don't leak lock_path onto talloc tos</title>
<updated>2014-11-03T22:46:05+00:00</updated>
<author>
<name>David Disseldorp</name>
<email>ddiss@samba.org</email>
</author>
<published>2014-11-02T19:21:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=d3cd60d660a4a8ef03689c0b66ed730e444f84cc'/>
<id>d3cd60d660a4a8ef03689c0b66ed730e444f84cc</id>
<content type='text'>
Also check for allocation failures.

Signed-off-by: David Disseldorp &lt;ddiss@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also check for allocation failures.

Signed-off-by: David Disseldorp &lt;ddiss@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>printer_list: fix talloc tos leak of tdb record</title>
<updated>2014-10-07T17:25:09+00:00</updated>
<author>
<name>David Disseldorp</name>
<email>ddiss@samba.org</email>
</author>
<published>2014-10-07T12:49:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=b376a822259aac3904d8bb47da77173d21e8a716'/>
<id>b376a822259aac3904d8bb47da77173d21e8a716</id>
<content type='text'>
Reported-by: Franz Pförtsch &lt;franz.pfoertsch@brose.com&gt;
Signed-off-by: David Disseldorp &lt;ddiss@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;

Autobuild-User(master): Volker Lendecke &lt;vl@samba.org&gt;
Autobuild-Date(master): Tue Oct  7 19:25:09 CEST 2014 on sn-devel-104
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reported-by: Franz Pförtsch &lt;franz.pfoertsch@brose.com&gt;
Signed-off-by: David Disseldorp &lt;ddiss@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;

Autobuild-User(master): Volker Lendecke &lt;vl@samba.org&gt;
Autobuild-Date(master): Tue Oct  7 19:25:09 CEST 2014 on sn-devel-104
</pre>
</div>
</content>
</entry>
<entry>
<title>printing: traverse_read the printer list for share updates</title>
<updated>2014-08-08T12:10:38+00:00</updated>
<author>
<name>David Disseldorp</name>
<email>ddiss@samba.org</email>
</author>
<published>2014-07-09T22:18:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=1e83435eac2cef03fccb4cf69ef5e0bfbd710410'/>
<id>1e83435eac2cef03fccb4cf69ef5e0bfbd710410</id>
<content type='text'>
The printcap update procedure involves the background printer process
obtaining the printcap information from the printing backend, writing
this to printer_list.tdb, and then notifying all smbd processes of the
new list. The processes then all attempt to simultaneously traverse
printer_list.tdb, in order to update their local share lists.

With a large number of printers, and a large number of per-client smbd
processes, this traversal results in significant lock contention, mostly
due to the fact that the traversal is unnecessarily done with an
exclusive (write) lock on the printer_list.tdb database.

This commit changes the share update code path to perform a read-only
traversal.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652

Reported-by: Alex K &lt;korobkin+samba@gmail.com&gt;
Reported-by: Franz Pförtsch &lt;franz.pfoertsch@brose.com&gt;
Signed-off-by: David Disseldorp &lt;ddiss@samba.org&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The printcap update procedure involves the background printer process
obtaining the printcap information from the printing backend, writing
this to printer_list.tdb, and then notifying all smbd processes of the
new list. The processes then all attempt to simultaneously traverse
printer_list.tdb, in order to update their local share lists.

With a large number of printers, and a large number of per-client smbd
processes, this traversal results in significant lock contention, mostly
due to the fact that the traversal is unnecessarily done with an
exclusive (write) lock on the printer_list.tdb database.

This commit changes the share update code path to perform a read-only
traversal.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652

Reported-by: Alex K &lt;korobkin+samba@gmail.com&gt;
Reported-by: Franz Pförtsch &lt;franz.pfoertsch@brose.com&gt;
Signed-off-by: David Disseldorp &lt;ddiss@samba.org&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s3-printing: Fix obvious memory leak in printer_list_get_printer().</title>
<updated>2014-02-25T12:19:37+00:00</updated>
<author>
<name>Jeremy Allison</name>
<email>jra@samba.org</email>
</author>
<published>2014-02-25T00:18:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=148bbdd8d04400b5d873f636671dd443952ca04f'/>
<id>148bbdd8d04400b5d873f636671dd443952ca04f</id>
<content type='text'>
https://bugzilla.samba.org/show_bug.cgi?id=9993

Signed-off-by: Jeremy Allison &lt;jra@samba.org&gt;
Reviewed-by: Ira Cooper &lt;ira@samba.org&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;

Autobuild-User(master): Andreas Schneider &lt;asn@cryptomilk.org&gt;
Autobuild-Date(master): Tue Feb 25 13:19:37 CET 2014 on sn-devel-104
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://bugzilla.samba.org/show_bug.cgi?id=9993

Signed-off-by: Jeremy Allison &lt;jra@samba.org&gt;
Reviewed-by: Ira Cooper &lt;ira@samba.org&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;

Autobuild-User(master): Andreas Schneider &lt;asn@cryptomilk.org&gt;
Autobuild-Date(master): Tue Feb 25 13:19:37 CET 2014 on sn-devel-104
</pre>
</div>
</content>
</entry>
</feed>
