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

Re: [Libosinfo] [PATCH 1/2] install-config: Document hostname limitations



On Wed, May 14, 2014 at 08:28:38PM +0100, Zeeshan Ali (Khattak) wrote:
> Since Microsoft Windows has several limitations on allowed characters and
> number of characters in ComputerName (which is what hostname is
> translated to), lets inform the app developers about these limitations.
> 
> http://technet.microsoft.com/en-us/library/ff715676.aspx
> ---
>  osinfo/osinfo_install_config.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/osinfo/osinfo_install_config.c b/osinfo/osinfo_install_config.c
> index de4ee42..4fc8b35 100644
> --- a/osinfo/osinfo_install_config.c
> +++ b/osinfo/osinfo_install_config.c
> @@ -343,6 +343,22 @@ const gchar *osinfo_install_config_get_reg_product_key(OsinfoInstallConfig *conf
>                                           OSINFO_INSTALL_CONFIG_PROP_REG_PRODUCTKEY);
>  }
>  
> +/**
> + * osinfo_install_config_set_hostname:
> + * @config: the install config
> + * @hostname: the desired hostname
> + *
> + * Sets the #OSINFO_INSTALL_CONFIG_PROP_HOSTNAME parameter.
> + *
> + * Note that some operating systems have restrictions on maximum number of, and
> + * allowed characters in hostname (or its equivalent) so it is highly
> + * recommended that you keep the actual hostname less than or equal to 15
> + * characters long and does not contain non-ASCII, spaces or any of the

"and that it does not contain"

> + * following characters to ensure the generated install script using @config
> + * works as expected:
> + *
> + * { | } ~ [ \ ] ^ ' : ; < = > ? @ ! " # $ % ` ( ) + / . , * &

Maybe we should just recommend to use alphanumeric characters and '-'
instead of a blacklist?

ACK with the first comment addressed.

Christophe


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