Skip to contentSkip to conversation

Patch numeric domain names

PATCH Donald R. Gray Jr 3 participants 3 messages Nov 4, 2011 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Patch to allow numbers in domain names for cifscreds.

cifscreds.c +2 -1
index f21a47f..5fbf4e8 100644
@@ -43,7 +43,8 @@
 /* allowed and disallowed characters for user and domain name */
 #define USER_DISALLOWED_CHARS "\\/\"[]:|<>+=;,?*@"
 #define DOMAIN_ALLOWED_CHARS "abcdefghijklmnopqrstuvwxyz" \
-			     "ABCDEFGHIJKLMNOPQRSTUVWXYZ-."
+			     "ABCDEFGHIJKLMNOPQRSTUVWXYZ-." \
+			     "0123456789"
 
 /* destination keyring */
 #define DEST_KEYRING KEY_SPEC_USER_KEYRING
#1 lore raw
Quoted 1 line · On Thu, 3 Nov 2011 23:03:36 -0400 "Donald R. Gray Jr"…

Patch to allow numbers in domain names for cifscreds.

According to this msdn page, we should actually be able to allow more characters than just alphanumerics in NetBIOS domain names:

    http://support.microsoft.com/kb/909264

Would it be better to fix the code to just follow those rules instead?

Signature · 1 line
Jeff Layton <[email protected]>

A message that is not in the archive (sent off-list or not yet received): 20111104095253.14e7f0a5-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org

#3 lore raw
Quoted 11 lines · Jeff Layton
Quoted 1 line · On Thu, 3 Nov 2011 23:03:36 -0400 "Donald R. Gray Jr"…

Patch to allow numbers in domain names for cifscreds.

According to this msdn page, we should actually be able to allow more characters than just alphanumerics in NetBIOS domain names:

   http://support.microsoft.com/kb/909264

Would it be better to fix the code to just follow those rules instead?

Yes - there are only about 10 restricted characters, and even those might not be restricted to some non-Windows servers. It is reasonable to warn in userspace on some of those, but risky to forbid certain domain names.

Signature · 3 lines
Thanks,

Steve