<feed xmlns='http://www.w3.org/2005/Atom'>
<title>freeipa.git/ipaclient/plugins, branch fix_ber_scanf</title>
<subtitle>FreeIPA patches</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/'/>
<entry>
<title>Handle missing LWCA certificate or chain</title>
<updated>2019-06-18T00:36:24+00:00</updated>
<author>
<name>Fraser Tweedale</name>
<email>ftweedal@redhat.com</email>
</author>
<published>2019-05-30T10:57:10+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=854d3053e294e775fac0e4e394ca3b7b71d04c7d'/>
<id>854d3053e294e775fac0e4e394ca3b7b71d04c7d</id>
<content type='text'>
If lightweight CA key replication has not completed, requests for
the certificate or chain will return 404**.  This can occur in
normal operation, and should be a temporary condition.  Detect this
case and handle it by simply omitting the 'certificate' and/or
'certificate_out' fields in the response, and add a warning message
to the response.

Also update the client-side plugin that handles the
--certificate-out option.  Because the CLI will automatically print
the warning message, if the expected field is missing from the
response, just ignore it and continue processing.

** after the Dogtag NullPointerException gets fixed!

Part of: https://pagure.io/freeipa/issue/7964

Reviewed-By: Christian Heimes &lt;cheimes@redhat.com&gt;
Reviewed-By: Fraser Tweedale &lt;ftweedal@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If lightweight CA key replication has not completed, requests for
the certificate or chain will return 404**.  This can occur in
normal operation, and should be a temporary condition.  Detect this
case and handle it by simply omitting the 'certificate' and/or
'certificate_out' fields in the response, and add a warning message
to the response.

Also update the client-side plugin that handles the
--certificate-out option.  Because the CLI will automatically print
the warning message, if the expected field is missing from the
response, just ignore it and continue processing.

** after the Dogtag NullPointerException gets fixed!

Part of: https://pagure.io/freeipa/issue/7964

Reviewed-By: Christian Heimes &lt;cheimes@redhat.com&gt;
Reviewed-By: Fraser Tweedale &lt;ftweedal@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Import urllib submodules</title>
<updated>2019-04-30T14:32:43+00:00</updated>
<author>
<name>Christian Heimes</name>
<email>cheimes@redhat.com</email>
</author>
<published>2019-04-29T15:51:09+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=e73fdcf8baf5c18ce2c3de011268aea9c81c1e1b'/>
<id>e73fdcf8baf5c18ce2c3de011268aea9c81c1e1b</id>
<content type='text'>
otpclient only imported the urllib parent package, not urllib.request
and urllib.parse subpackages. This may or may not work depending on the
import order of other plugins.

Signed-off-by: Christian Heimes &lt;cheimes@redhat.com&gt;
Reviewed-By: Alexander Bokovoy &lt;abokovoy@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
otpclient only imported the urllib parent package, not urllib.request
and urllib.parse subpackages. This may or may not work depending on the
import order of other plugins.

Signed-off-by: Christian Heimes &lt;cheimes@redhat.com&gt;
Reviewed-By: Alexander Bokovoy &lt;abokovoy@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pylint 2.2: Fix unnecessary pass statement</title>
<updated>2018-11-26T15:54:43+00:00</updated>
<author>
<name>Christian Heimes</name>
<email>cheimes@redhat.com</email>
</author>
<published>2018-11-26T09:53:40+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=533a5b2633e8b5d9049256ea085324cbc45c6e73'/>
<id>533a5b2633e8b5d9049256ea085324cbc45c6e73</id>
<content type='text'>
pylint 2.2.0 has a new checker for unnecessary pass statements. There is
no need to have a pass statement in functions or classes with a doc
string.

Fixes: https://pagure.io/freeipa/issue/7772
Signed-off-by: Christian Heimes &lt;cheimes@redhat.com&gt;
Reviewed-By: Thomas Woerner &lt;twoerner@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pylint 2.2.0 has a new checker for unnecessary pass statements. There is
no need to have a pass statement in functions or classes with a doc
string.

Fixes: https://pagure.io/freeipa/issue/7772
Signed-off-by: Christian Heimes &lt;cheimes@redhat.com&gt;
Reviewed-By: Thomas Woerner &lt;twoerner@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Py3: Replace six.moves imports</title>
<updated>2018-10-05T10:06:19+00:00</updated>
<author>
<name>Christian Heimes</name>
<email>cheimes@redhat.com</email>
</author>
<published>2018-09-27T05:47:07+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=15d5e44ee89ce4c0f1f366b0d7150166f1a26844'/>
<id>15d5e44ee89ce4c0f1f366b0d7150166f1a26844</id>
<content type='text'>
Replace six.moves and six.StringIO/BytesIO imports with cannonical
Python 3 packages.

Note: six.moves.input behaves differently than builtin input function.
Therefore I left six.moves.input for now.

See: https://pagure.io/freeipa/issue/7715
Signed-off-by: Christian Heimes &lt;cheimes@redhat.com&gt;
Reviewed-By: Fraser Tweedale &lt;ftweedal@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace six.moves and six.StringIO/BytesIO imports with cannonical
Python 3 packages.

Note: six.moves.input behaves differently than builtin input function.
Therefore I left six.moves.input for now.

See: https://pagure.io/freeipa/issue/7715
Signed-off-by: Christian Heimes &lt;cheimes@redhat.com&gt;
Reviewed-By: Fraser Tweedale &lt;ftweedal@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix writing certificate chain to file</title>
<updated>2018-10-02T08:18:32+00:00</updated>
<author>
<name>Fraser Tweedale</name>
<email>ftweedal@redhat.com</email>
</author>
<published>2018-09-27T06:36:59+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=a2ad41749027c2c5e2b03f4d8b7e0d712f98e1b3'/>
<id>a2ad41749027c2c5e2b03f4d8b7e0d712f98e1b3</id>
<content type='text'>
An client-side error occurs when cert commands are instructed to
write the certificate chain (--chain option) to a file
(--certificate-out option).  This regression was introduced in the
'cert' plugin in commit 5a44ca638310913ab6b0c239374f4b0ddeeedeb3,
and reflected in the 'ca' plugin in commit
c7064494e5801d5fd4670e6aab1e07c65d7a0731.

The server behaviour did not change; rather the client did not
correctly handle the DER-encoded certificates in the
'certificate_chain' response field.  Fix the issue by treating the
'certificate' field as base-64 encoded DER, and the
'certificate_chain' field as an array of raw DER certificates.

Add tests for checking that the relevant commands succeed and write
PEM data to the file (both with and without --chain).

Fixes: https://pagure.io/freeipa/issue/7700
Reviewed-By: Christian Heimes &lt;cheimes@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An client-side error occurs when cert commands are instructed to
write the certificate chain (--chain option) to a file
(--certificate-out option).  This regression was introduced in the
'cert' plugin in commit 5a44ca638310913ab6b0c239374f4b0ddeeedeb3,
and reflected in the 'ca' plugin in commit
c7064494e5801d5fd4670e6aab1e07c65d7a0731.

The server behaviour did not change; rather the client did not
correctly handle the DER-encoded certificates in the
'certificate_chain' response field.  Fix the issue by treating the
'certificate' field as base-64 encoded DER, and the
'certificate_chain' field as an array of raw DER certificates.

Add tests for checking that the relevant commands succeed and write
PEM data to the file (both with and without --chain).

Fixes: https://pagure.io/freeipa/issue/7700
Reviewed-By: Christian Heimes &lt;cheimes@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Py3: Remove subclassing from object</title>
<updated>2018-09-27T09:49:04+00:00</updated>
<author>
<name>Christian Heimes</name>
<email>cheimes@redhat.com</email>
</author>
<published>2018-09-26T09:59:50+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=b431e9b684df11c811892bd9d2a5711355f0076e'/>
<id>b431e9b684df11c811892bd9d2a5711355f0076e</id>
<content type='text'>
Python 2 had old style and new style classes. Python 3 has only new
style classes. There is no point to subclass from object any more.

See: https://pagure.io/freeipa/issue/7715
Signed-off-by: Christian Heimes &lt;cheimes@redhat.com&gt;
Reviewed-By: Florence Blanc-Renaud &lt;frenaud@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Python 2 had old style and new style classes. Python 3 has only new
style classes. There is no point to subclass from object any more.

See: https://pagure.io/freeipa/issue/7715
Signed-off-by: Christian Heimes &lt;cheimes@redhat.com&gt;
Reviewed-By: Florence Blanc-Renaud &lt;frenaud@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix certificate type error when exporting to file</title>
<updated>2018-09-06T12:36:15+00:00</updated>
<author>
<name>Armando Neto</name>
<email>abiagion@redhat.com</email>
</author>
<published>2018-09-03T21:52:57+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=c7064494e5801d5fd4670e6aab1e07c65d7a0731'/>
<id>c7064494e5801d5fd4670e6aab1e07c65d7a0731</id>
<content type='text'>
Commands `ipa ca-show` and `ipa cert-show` share the same code,
this commit updates the former, closing the gap between them.

Reflecting the changes done in 5a44ca638310913ab6b0c239374f4b0ddeeedeb3.

https://pagure.io/freeipa/issue/7628

Signed-off-by: Armando Neto &lt;abiagion@redhat.com&gt;
Reviewed-By: Christian Heimes &lt;cheimes@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commands `ipa ca-show` and `ipa cert-show` share the same code,
this commit updates the former, closing the gap between them.

Reflecting the changes done in 5a44ca638310913ab6b0c239374f4b0ddeeedeb3.

https://pagure.io/freeipa/issue/7628

Signed-off-by: Armando Neto &lt;abiagion@redhat.com&gt;
Reviewed-By: Christian Heimes &lt;cheimes@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix Pylint 2.0 violations</title>
<updated>2018-07-14T10:04:19+00:00</updated>
<author>
<name>Armando Neto</name>
<email>abiagion@redhat.com</email>
</author>
<published>2018-07-12T14:21:34+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=d13571942e41370fdbd2b6f9960c484fa61c3404'/>
<id>d13571942e41370fdbd2b6f9960c484fa61c3404</id>
<content type='text'>
Fix the following violations aiming to support Pylint 2.0

- `unneeded-not` (C0113):
  Consider changing "not item in items" to "item not in items" used
  when a boolean expression contains an unneeded negation.

- `useless-import-alias` (C0414):
  Import alias does not rename original package Used when an import
  alias is same as original package.e.g using import numpy as numpy
  instead of import numpy as np

- `raising-format-tuple` (W0715):
  Exception arguments suggest string formatting might be intended Used
  when passing multiple arguments to an exception constructor, the
  first of them a string literal containing what appears to be
  placeholders intended for formatting

- `bad-continuation` (C0330):
  This was already included on the disable list, although with current
  version of pylint (2.0.0.dev2) violations at the end of the files
  are not being ignored.
  See: https://github.com/PyCQA/pylint/issues/2278

- `try-except-raise` (E0705):
  The except handler raises immediately Used when an except handler
  uses raise as its first or only operator. This is useless because it
  raises back the exception immediately. Remove the raise operator or
  the entire try-except-raise block!

- `consider-using-set-comprehension` (R1718):
  Consider using a set comprehension Although there is nothing
  syntactically wrong with this code, it is hard to read and can be
  simplified to a set comprehension.Also it is faster since you don't
  need to create another transient list

- `dict-keys-not-iterating` (W1655):
  dict.keys referenced when not iterating Used when dict.keys is
  referenced in a non-iterating context (returns an iterator in
  Python 3)

- `comprehension-escape` (W1662):
  Using a variable that was bound inside a comprehension Emitted when
  using a variable, that was bound in a comprehension handler, outside
  of the comprehension itself. On Python 3 these variables will be
  deleted outside of the comprehension.

Issue: https://pagure.io/freeipa/issue/7614

Signed-off-by: Armando Neto &lt;abiagion@redhat.com&gt;
Reviewed-By: Christian Heimes &lt;cheimes@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix the following violations aiming to support Pylint 2.0

- `unneeded-not` (C0113):
  Consider changing "not item in items" to "item not in items" used
  when a boolean expression contains an unneeded negation.

- `useless-import-alias` (C0414):
  Import alias does not rename original package Used when an import
  alias is same as original package.e.g using import numpy as numpy
  instead of import numpy as np

- `raising-format-tuple` (W0715):
  Exception arguments suggest string formatting might be intended Used
  when passing multiple arguments to an exception constructor, the
  first of them a string literal containing what appears to be
  placeholders intended for formatting

- `bad-continuation` (C0330):
  This was already included on the disable list, although with current
  version of pylint (2.0.0.dev2) violations at the end of the files
  are not being ignored.
  See: https://github.com/PyCQA/pylint/issues/2278

- `try-except-raise` (E0705):
  The except handler raises immediately Used when an except handler
  uses raise as its first or only operator. This is useless because it
  raises back the exception immediately. Remove the raise operator or
  the entire try-except-raise block!

- `consider-using-set-comprehension` (R1718):
  Consider using a set comprehension Although there is nothing
  syntactically wrong with this code, it is hard to read and can be
  simplified to a set comprehension.Also it is faster since you don't
  need to create another transient list

- `dict-keys-not-iterating` (W1655):
  dict.keys referenced when not iterating Used when dict.keys is
  referenced in a non-iterating context (returns an iterator in
  Python 3)

- `comprehension-escape` (W1662):
  Using a variable that was bound inside a comprehension Emitted when
  using a variable, that was bound in a comprehension handler, outside
  of the comprehension itself. On Python 3 these variables will be
  deleted outside of the comprehension.

Issue: https://pagure.io/freeipa/issue/7614

Signed-off-by: Armando Neto &lt;abiagion@redhat.com&gt;
Reviewed-By: Christian Heimes &lt;cheimes@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace file.flush() calls with flush_sync() helper</title>
<updated>2018-07-07T08:20:01+00:00</updated>
<author>
<name>Armando Neto</name>
<email>abiagion@redhat.com</email>
</author>
<published>2018-07-05T18:12:33+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=b274da726b896730b47d47f4ad664c5c0583b469'/>
<id>b274da726b896730b47d47f4ad664c5c0583b469</id>
<content type='text'>
Calls to `os.fsync(f.fileno())` need to be accompained by `f.flush()`.

Commit 8bbeedc93fd442cbbb9bb70e5f446011e95211db introduces the helper
`ipapython.ipautil.flush_sync()`, which handles all calls in the right
order.

However, `flush_sync()` takes as parameter a file object with fileno
and name, where name must be a path to the file, this isn't possible
in some cases where file descriptors are used.

Issue: https://pagure.io/freeipa/issue/7251

Signed-off-by: Armando Neto &lt;abiagion@redhat.com&gt;
Reviewed-By: Christian Heimes &lt;cheimes@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Calls to `os.fsync(f.fileno())` need to be accompained by `f.flush()`.

Commit 8bbeedc93fd442cbbb9bb70e5f446011e95211db introduces the helper
`ipapython.ipautil.flush_sync()`, which handles all calls in the right
order.

However, `flush_sync()` takes as parameter a file object with fileno
and name, where name must be a path to the file, this isn't possible
in some cases where file descriptors are used.

Issue: https://pagure.io/freeipa/issue/7251

Signed-off-by: Armando Neto &lt;abiagion@redhat.com&gt;
Reviewed-By: Christian Heimes &lt;cheimes@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix translation of commands description in API Browser</title>
<updated>2018-06-12T06:38:56+00:00</updated>
<author>
<name>Stanislav Levin</name>
<email>slev@altlinux.org</email>
</author>
<published>2018-06-04T10:19:42+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=f5a04da95ddd5ab89b356fdc33d3981dfddc3c3d'/>
<id>f5a04da95ddd5ab89b356fdc33d3981dfddc3c3d</id>
<content type='text'>
The command description is taken from python docstring. Thus
commands should have them and should include the callings of
gettext to be translated.

Reviewed-By: Christian Heimes &lt;cheimes@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The command description is taken from python docstring. Thus
commands should have them and should include the callings of
gettext to be translated.

Reviewed-By: Christian Heimes &lt;cheimes@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
