<div dir="auto">Did not find a definition in the docs quickly...<div dir="auto"><br></div><div dir="auto">I think Arnaud mentioned that there was (planned to be?) some constraint, but looking at the parsing code it seems that de-facto we check for (and strip away) the opening and closing brackets in the first token after `parseconf` separated the lines into those, and take octets between the brackets.<div dir="auto"><br></div><div dir="auto">So at least parseconf rules out whitespace and some punctuation... unless someone double-quotes a section line/content?.. :)<div dir="auto"><br></div><div dir="auto">Device section names are also used as socket filenames (so no slash).</div><div dir="auto"><br></div><div dir="auto">Empty is probably also bad, though does not seem immediately invalid in the parser.</div><div dir="auto"><br></div><div dir="auto">Most of the processing then deals with C string equality.</div><div dir="auto"><br></div><div dir="auto">The nut-driver-enumerator and upsdrvsvcctl scripts in new release also check if the device name contains valid characters for a nut-driver service instance name (different charsets and lengths for systemd, SMF) but work around by hashing it if not.</div><div dir="auto"><br></div><div dir="auto">Similar logic applies for user names (as sections in upsd.users), it seems.</div><div dir="auto"><br></div><div dir="auto">Jim</div><div dir="auto"><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 5, 2022, 16:32 Roger Price <<a href="mailto:roger@rogerprice.org">roger@rogerprice.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 5 Apr 2022, Roger Price wrote:<br>
<br>
>> Do we have a formal definition of a UPS name?<br>
<br>
Should a system administrator be able to name a UPS "Bébé" or "罗杰-1" ?<br>
<br>
Roger_______________________________________________<br>
Nut-upsuser mailing list<br>
<a href="mailto:Nut-upsuser@alioth-lists.debian.net" target="_blank" rel="noreferrer">Nut-upsuser@alioth-lists.debian.net</a><br>
<a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser" rel="noreferrer noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser</a><br>
</blockquote></div>