<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/source4/scripting/bin, branch talloc-2.2.0</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>s4/scripting: remove obsolete w32err_code.py</title>
<updated>2019-03-14T02:12:18+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2019-03-12T21:29:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=c69092e9bad79252000ea76d119b17dca552d8c8'/>
<id>c69092e9bad79252000ea76d119b17dca552d8c8</id>
<content type='text'>
This has been replaced by gen_werror.py which shares common code with other scripts
(e.g. gen_ntstatus) and is more likely to work with conteporary microsoft HTML.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@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>
This has been replaced by gen_werror.py which shares common code with other scripts
(e.g. gen_ntstatus) and is more likely to work with conteporary microsoft HTML.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s4/scripting/autoidl: p3 exception syntax</title>
<updated>2019-03-12T00:42:18+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2019-03-09T01:40:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=0a804d38c4a7fed7aef6c357091ec5790bec7873'/>
<id>0a804d38c4a7fed7aef6c357091ec5790bec7873</id>
<content type='text'>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@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: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s4/scripting: MORE py3 compatible print functions</title>
<updated>2019-03-12T00:42:18+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2019-03-09T00:48:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=561b654bc5bc2f5e614c5c2ab378193ca94d481a'/>
<id>561b654bc5bc2f5e614c5c2ab378193ca94d481a</id>
<content type='text'>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@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: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sambaundoguididx: use the right escaped oder unescaped sam ldb files</title>
<updated>2019-02-17T12:33:12+00:00</updated>
<author>
<name>Björn Jacke</name>
<email>bj@sernet.de</email>
</author>
<published>2019-01-23T13:01:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=cd1ac3668cd164bd5f7cadf7b59df9541aaef83e'/>
<id>cd1ac3668cd164bd5f7cadf7b59df9541aaef83e</id>
<content type='text'>
the correct filename is taken from the partition database before, we should not
unescape that because this can result in a new unescaped ldb file being created
and the script not to work at all.

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

Signed-off-by: Bjoern Jacke &lt;bjacke@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 correct filename is taken from the partition database before, we should not
unescape that because this can result in a new unescaped ldb file being created
and the script not to work at all.

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

Signed-off-by: Bjoern Jacke &lt;bjacke@samba.org&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>samba_dnsupdate: make rodc_dns_update() more robust against timing problems</title>
<updated>2019-02-14T01:18:29+00:00</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2019-02-07T08:42:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=19f34b2161dee26ebaee2774b4bee0dc3ce9e340'/>
<id>19f34b2161dee26ebaee2774b4bee0dc3ce9e340</id>
<content type='text'>
Without this we had an interesting race!

The messaging_dgm code caches connected datagram sockets based on the
destination pid for 1 second.

The fact that samba_dnsupdate constantly recreates its messaging
context (and the underlying datagram socket) means that we the winbindd
messaging context may get a stale connection. As a result sending any
message from winbindd back to samba_dnsupdate will result in
ECONNREFUSED.

That means the IRPC response from winbindd never reaches
samba_dnsupdate, which will then hit a timeout.

In turn samba_dnsupdate on the RODC times out.

This was a workaround for the problem, by having just one global
IRPC handle and thus just one messaging_dgm context.
The actual problem is solved a few commits before
("messages_dgm: Properly handle receiver re-initialization").
But we keep this as an performance optimization, which hopefully
means that the overall samba_dnsupdate is less likely to
timeout after the hardcoded 20 seconds.

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Without this we had an interesting race!

The messaging_dgm code caches connected datagram sockets based on the
destination pid for 1 second.

The fact that samba_dnsupdate constantly recreates its messaging
context (and the underlying datagram socket) means that we the winbindd
messaging context may get a stale connection. As a result sending any
message from winbindd back to samba_dnsupdate will result in
ECONNREFUSED.

That means the IRPC response from winbindd never reaches
samba_dnsupdate, which will then hit a timeout.

In turn samba_dnsupdate on the RODC times out.

This was a workaround for the problem, by having just one global
IRPC handle and thus just one messaging_dgm context.
The actual problem is solved a few commits before
("messages_dgm: Properly handle receiver re-initialization").
But we keep this as an performance optimization, which hopefully
means that the overall samba_dnsupdate is less likely to
timeout after the hardcoded 20 seconds.

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>samba_dnsupdate: make it clear that opts.use_file is active and we're not using nsupdate</title>
<updated>2019-02-14T01:18:28+00:00</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2019-02-07T08:40:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=767e60d97390f90e1b0579d4108ede51a9116952'/>
<id>767e60d97390f90e1b0579d4108ede51a9116952</id>
<content type='text'>
Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&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: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s4/scripting/bin: open unicode files with utf8 encoding and write unicode string</title>
<updated>2019-02-08T05:34:47+00:00</updated>
<author>
<name>Joe Guo</name>
<email>joeg@catalyst.net.nz</email>
</author>
<published>2019-01-30T02:52:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=87149445af26b8577566dfe5e311b32e3650c6e6'/>
<id>87149445af26b8577566dfe5e311b32e3650c6e6</id>
<content type='text'>
In files like `libcli/util/werror_err_table.txt` and `libcli/util/ntstatus_err_table.txt`,
there were unicode quote symbols at line 6:

    ...(“this documentation”)...

In `libcli/util/wscript_build`, it will run `gen_werror.py` and `gen_ntstatus.py`
to `open` above files, read content from them and write to other files.

When encoding not specified, `open` in both python 2/3 will guess encoding from locale.

When locale is not set, it defaults to POSIX or C, and then python will use
encoding `ANSI_X3.4-1968`.

So, on a system locale is not set, `make` will fail with encoding error
for both python 2 and 3:

    File "/home/ubuntu/samba/source4/scripting/bin/gen_werror.py", line 139, in main
        errors = parseErrorDescriptions(input_file, True, transformErrorName)
      File "/home/ubuntu/samba/source4/scripting/bin/gen_error_common.py", line 52, in parseErrorDescriptions
        for line in file_contents:
      File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 318: ordinal not in range(128)

In this case, we have to use `io.open` with `encoding='utf8'`.
However, then we got unicode strs and try to write them with other strs
into new file, which means the new file must also open with utf-8 and
all other strs have to be unicode, too.

Instead of prefix `u` to all strs, a more easier/elegant way is to enable
unicode literals for the python scripts, which we normally didn't do in samba.

Since both `gen_werror.py` and `gen_ntstatus.py` are bin scripts and no
other modules import them, it should be ok for this case.

Signed-off-by: Joe Guo &lt;joeg@catalyst.net.nz&gt;

Autobuild-User(master): Douglas Bagnall &lt;dbagnall@samba.org&gt;
Autobuild-Date(master): Fri Feb  8 06:34:47 CET 2019 on sn-devel-144
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In files like `libcli/util/werror_err_table.txt` and `libcli/util/ntstatus_err_table.txt`,
there were unicode quote symbols at line 6:

    ...(“this documentation”)...

In `libcli/util/wscript_build`, it will run `gen_werror.py` and `gen_ntstatus.py`
to `open` above files, read content from them and write to other files.

When encoding not specified, `open` in both python 2/3 will guess encoding from locale.

When locale is not set, it defaults to POSIX or C, and then python will use
encoding `ANSI_X3.4-1968`.

So, on a system locale is not set, `make` will fail with encoding error
for both python 2 and 3:

    File "/home/ubuntu/samba/source4/scripting/bin/gen_werror.py", line 139, in main
        errors = parseErrorDescriptions(input_file, True, transformErrorName)
      File "/home/ubuntu/samba/source4/scripting/bin/gen_error_common.py", line 52, in parseErrorDescriptions
        for line in file_contents:
      File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 318: ordinal not in range(128)

In this case, we have to use `io.open` with `encoding='utf8'`.
However, then we got unicode strs and try to write them with other strs
into new file, which means the new file must also open with utf-8 and
all other strs have to be unicode, too.

Instead of prefix `u` to all strs, a more easier/elegant way is to enable
unicode literals for the python scripts, which we normally didn't do in samba.

Since both `gen_werror.py` and `gen_ntstatus.py` are bin scripts and no
other modules import them, it should be ok for this case.

Signed-off-by: Joe Guo &lt;joeg@catalyst.net.nz&gt;

Autobuild-User(master): Douglas Bagnall &lt;dbagnall@samba.org&gt;
Autobuild-Date(master): Fri Feb  8 06:34:47 CET 2019 on sn-devel-144
</pre>
</div>
</content>
</entry>
<entry>
<title>samba_dnsupdate: With dns_hub, we don't need resolv_wrap</title>
<updated>2019-01-15T06:53:22+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2019-01-03T15:44:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=9563fcf6ffae4a6d3595a1207513bbf0742203f4'/>
<id>9563fcf6ffae4a6d3595a1207513bbf0742203f4</id>
<content type='text'>
Best viewed with git show -b

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>
Best viewed with git show -b

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>s4:scripting:bin: rm rpcclient</title>
<updated>2018-12-17T00:24:14+00:00</updated>
<author>
<name>Guo Qiao</name>
<email>guoqiao@gmail.com</email>
</author>
<published>2018-12-13T22:23:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=0a449c2b7438ad6012e16d7764edf12cc7277474'/>
<id>0a449c2b7438ad6012e16d7764edf12cc7277474</id>
<content type='text'>
This file only works in py2, and no one use it. Just delete it.

Signed-off-by: Joe Guo &lt;joeg@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This file only works in py2, and no one use it. Just delete it.

Signed-off-by: Joe Guo &lt;joeg@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PY3: change shebang to python3 in source4/scripting/bin dir</title>
<updated>2018-12-14T13:40:20+00:00</updated>
<author>
<name>Joe Guo</name>
<email>joeg@catalyst.net.nz</email>
</author>
<published>2018-12-10T23:23:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=a19d5bd771c1727b037d28d24af0b85e49bdafb2'/>
<id>a19d5bd771c1727b037d28d24af0b85e49bdafb2</id>
<content type='text'>
Samba default python is 3 now.

Signed-off-by: Joe Guo &lt;joeg@catalyst.net.nz&gt;
Reviewed-by: Noel Power &lt;npower@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Samba default python is 3 now.

Signed-off-by: Joe Guo &lt;joeg@catalyst.net.nz&gt;
Reviewed-by: Noel Power &lt;npower@samba.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
