The Samba-Bugzilla – Attachment 5619 Details for
Bug 7342
Don't ucase configured realm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Here's a fix to preserve realm case
rpc.patch (text/plain), 2.29 KB, created by
Benjamin Coddington
on 2010-04-09 15:28:58 UTC
(
hide
)
Description:
Here's a fix to preserve realm case
Filename:
MIME Type:
Creator:
Benjamin Coddington
Created:
2010-04-09 15:28:58 UTC
Size:
2.29 KB
patch
obsolete
>diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c >index 579f847..f5fd985 100644 >--- a/source3/param/loadparm.c >+++ b/source3/param/loadparm.c >@@ -147,6 +147,8 @@ struct global { > char *szPasswordServer; > char *szSocketOptions; > char *szRealm; >+ char *szEffectiveRealm; >+ bool *bRealmPreserveCase; > char *szAfsUsernameMap; > int iAfsTokenLifetime; > char *szLogNtTokenCommand; >@@ -995,13 +997,22 @@ static struct parm_struct parm_table[] = { > #ifdef WITH_ADS > { > .label = "realm", >- .type = P_USTRING, >+ .type = P_STRING, > .p_class = P_GLOBAL, >- .ptr = &Globals.szRealm, >- .special = NULL, >+ .ptr = &Globals.szEffectiveRealm, >+ .special = handle_realm, > .enum_list = NULL, > .flags = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD, > }, >+ { >+ .label = "realm preserve case", >+ .type = P_BOOL, >+ .p_class = P_GLOBAL, >+ .ptr = &Globals.bRealmPreserveCase, >+ .special = handle_realm_preserve_case, >+ .enum_list = NULL, >+ .flags = FLAG_BASIC | FLAG_ADVANCED, >+ }, > #endif > { > .label = "netbios name", >@@ -5351,7 +5362,7 @@ FN_GLOBAL_STRING(lp_passwd_program, &Globals.szPasswdProgram) > FN_GLOBAL_STRING(lp_passwd_chat, &Globals.szPasswdChat) > FN_GLOBAL_STRING(lp_passwordserver, &Globals.szPasswordServer) > FN_GLOBAL_STRING(lp_name_resolve_order, &Globals.szNameResolveOrder) >-FN_GLOBAL_STRING(lp_realm, &Globals.szRealm) >+FN_GLOBAL_STRING(lp_realm, &Globals.szEffectiveRealm) > FN_GLOBAL_CONST_STRING(lp_afs_username_map, &Globals.szAfsUsernameMap) > FN_GLOBAL_INTEGER(lp_afs_token_lifetime, &Globals.iAfsTokenLifetime) > FN_GLOBAL_STRING(lp_log_nt_token_command, &Globals.szLogNtTokenCommand) >@@ -7228,6 +7239,25 @@ static bool handle_workgroup(int snum, const char *pszParmValue, char **ptr) > return ret; > } > >+static bool handle_realm(int snum, const char *pszParmValue, char **ptr) >+{ >+ string_set(ptr, pszParmValue); >+ string_set(&Globals.szRealm, pszParmValue); >+ if (!Globals.bRealmPreserveCase) >+ strupper_m(*ptr); >+ >+ return True; >+} >+ >+static bool handle_realm_preserve_case(int snum, const char *pszParmValue, char **ptr) >+{ >+ string_set(&Globals.szEffectiveRealm, Globals.szRealm); >+ if (!(*(bool *)ptr = lp_bool(pszParmValue))) >+ strupper_m(Globals.szEffectiveRealm); >+ >+ return True; >+} >+ > static bool handle_netbios_scope(int snum, const char *pszParmValue, char **ptr) > { > bool ret;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 7342
:
5619
|
5632
|
5635