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

Bug#939717: [PATCH] Workaround invalid characters provided during installation



Hi David,

On Sat, Sep 07, 2019 at 10:36:10PM -1000, David Prévot wrote:
> Non-ASCII characters should be dropped instead of being properly
> transliterated as initially designed if they are not recognised. This
> should allow one to workaround installation issues as #939717.

Thanks for reporting the issue and providing a patch.

I've checked the patch via running 'cf-agent -I -Dinstallation,di' on 
the main server. As far as I can tell, another change is needed to get a 
valid workaround:

> ---
>  ldap-tools/ldap-debian-edu-install | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ldap-tools/ldap-debian-edu-install b/ldap-tools/ldap-debian-edu-install
> index 1b393a8f..df723d5d 100755
> --- a/ldap-tools/ldap-debian-edu-install
> +++ b/ldap-tools/ldap-debian-edu-install
> @@ -73,7 +73,7 @@ if db_get debian-edu-config/first-user-fullname && [ "$RET" ] ; then
>  	FIRSTUSERGIVENNAME="$FIRSTUSERLASTNAME"
>      fi
>      # GECOS in LDAP must be ASCII (IA5String), convert to this
> -    FIRSTUSERGECOS="$(echo $RET | iconv -t ASCII//TRANSLIT)"
> +    FIRSTUSERGECOS="$(echo $RET | iconv -ct ASCII//TRANSLIT)"

+    FIRSTUSERGECOS="$(echo "$RET" | iconv -ct ASCII//TRANSLIT)"

>  else
>      echo "error: no value in first-user-fullname, passing debconf values fail?" 1>&2
>      FIRSTUSERGECOS="LDAP initial admin user"
> -- 
> 2.23.0

Please note that running 'ldap-debian-edu-install' via cf-agent (in 
finish_install) causes the problem. It doesn't show up if the tool is 
used directly; i.e running
'/usr/share/debian-edu-config/tools/edu-ldap-from-scratch'

I guess for a proper fix it would be needed to figure out how cf-agent 
is involved here.

Wolfgang

Attachment: signature.asc
Description: PGP signature


Reply to: