[Libosinfo] [PATCH 2/2] debian,script: Specify username pattern

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Mon Aug 17 18:14:29 UTC 2015


Debian installer is known to bail out on encountering invalid characters
(e.g '-') in usernames[1], so let's ensure applications know not to pass
such characters in username configuration parameter.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=734682
---
 data/install-scripts/debian.xml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/data/install-scripts/debian.xml b/data/install-scripts/debian.xml
index b164b01..f25e19f 100644
--- a/data/install-scripts/debian.xml
+++ b/data/install-scripts/debian.xml
@@ -4,6 +4,7 @@
     <profile>jeos</profile>
     <expected-filename>preseed.cfg</expected-filename>
     <can-pre-install-drivers>true</can-pre-install-drivers>
+    <username-pattern>^[a-zA-Z][a-zA-Z0-9]*$</username-pattern>
     <config>
       <param name="admin-password" policy="optional"/>
       <param name="l10n-keyboard" policy="optional" value-map="http://libosinfo.fedorahosted.org/x11-keyboard"/>
@@ -131,6 +132,7 @@ d-i preseed/late_command string in-target passwd -d root
     <profile>desktop</profile>
     <expected-filename>preseed.cfg</expected-filename>
     <can-pre-install-drivers>true</can-pre-install-drivers>
+    <username-pattern>^[a-zA-Z][a-zA-Z0-9]*$</username-pattern>
     <config>
       <!-- Localization options -->
       <param name="l10n-keyboard" policy="optional" value-map="http://libosinfo.fedorahosted.org/x11-keyboard"/>
-- 
2.4.3




More information about the Libosinfo mailing list