[Libosinfo] [PATCH 1/2] script: API to query username pattern

Christophe Fergeau cfergeau at redhat.com
Wed Aug 26 09:37:50 UTC 2015


On Mon, Aug 17, 2015 at 07:14:28PM +0100, Zeeshan Ali (Khattak) wrote:
> Add API to allow applications to query the expected pattern of username
> from install scripts.
> ---
>  data/schemas/libosinfo.rng     |  5 +++++
>  osinfo/libosinfo.syms          |  5 +++++
>  osinfo/osinfo_install_script.c | 16 ++++++++++++++++
>  osinfo/osinfo_install_script.h |  2 ++
>  osinfo/osinfo_loader.c         |  1 +
>  5 files changed, 29 insertions(+)
> 
> diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng
> index b23d210..a019894 100644
> --- a/data/schemas/libosinfo.rng
> +++ b/data/schemas/libosinfo.rng
> @@ -603,6 +603,11 @@
>            </element>
>          </optional>
>          <optional>
> +          <element name='username-pattern'>
> +            <text/>
> +          </element>
> +        </optional>
> +        <optional>

We already have 'product-key-format' which has a somehow similar purpose
for product keys, there are known limitations on hostname format in
Windows iirc, and we also have user-realname and potentially
admin-password/user-password which could have length/character set
limitations. Rather than adding a new element for each of these, maybe
we'd be better off with
<param name="xxxx" policy="yyyy" format/pattern="zzzz"/> ?
(not sure how convenient it is to stuff a regexp in an XML attribute).

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libosinfo/attachments/20150826/2ebc3fca/attachment.sig>


More information about the Libosinfo mailing list