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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 26, 2015 at 10:37 AM, Christophe Fergeau
<cfergeau@xxxxxxxxxx> wrote:
> 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

I actually first tried to have the same API as product-key-format but
then realized it's not practical since username is variable
characters. OTOH, a regex for product-key-format wouldn't have made it
easy for implementing the nice UI we have in Boxes for it (entering
'-' in right places automatically) that other UIs might also want.

>, 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).

I'm not sure I follow your suggestion. Could you please provide an
example or two?

-- 
Regards,

Zeeshan Ali (Khattak)
________________________________________
Befriend GNOME: http://www.gnome.org/friends/

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux