diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
commit | 6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch) | |
tree | 850c71039563c16a5d563c47e7ba2ab645baf198 /source3/utils/net.c | |
parent | 6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff) | |
parent | 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff) | |
download | samba-4.0.0alpha16.tar.gz samba-4.0.0alpha16.tar.xz samba-4.0.0alpha16.zip |
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16samba-4.0.0alpha16
Diffstat (limited to 'source3/utils/net.c')
-rw-r--r-- | source3/utils/net.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/source3/utils/net.c b/source3/utils/net.c index c53b2859b09..95b937444ec 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -243,7 +243,7 @@ static int net_getlocalsid(struct net_context *c, int argc, const char **argv) name = argv[0]; } else { - name = global_myname(); + name = lp_netbios_name(); } if(!initialize_password_db(false, NULL)) { @@ -286,7 +286,7 @@ static int net_setlocalsid(struct net_context *c, int argc, const char **argv) return 1; } - if (!secrets_store_domain_sid(global_myname(), &sid)) { + if (!secrets_store_domain_sid(lp_netbios_name(), &sid)) { DEBUG(0,("Can't store domain SID as a pdc/bdc.\n")); return 1; } @@ -346,13 +346,13 @@ static int net_getdomainsid(struct net_context *c, int argc, const char **argv) /* Generate one, if it doesn't exist */ get_global_sam_sid(); - if (!secrets_fetch_domain_sid(global_myname(), &domain_sid)) { + if (!secrets_fetch_domain_sid(lp_netbios_name(), &domain_sid)) { d_fprintf(stderr, _("Could not fetch local SID\n")); return 1; } sid_to_fstring(sid_str, &domain_sid); d_printf(_("SID for local machine %s is: %s\n"), - global_myname(), sid_str); + lp_netbios_name(), sid_str); if (!secrets_fetch_domain_sid(c->opt_workgroup, &domain_sid)) { d_fprintf(stderr, _("Could not fetch domain SID\n")); @@ -880,6 +880,16 @@ static struct functable net_func[] = { lp_load(get_dyn_CONFIGFILE(), true, false, false, true); +#if defined(HAVE_BIND_TEXTDOMAIN_CODESET) + /* Bind our gettext results to 'unix charset' + + This ensures that the translations and any embedded strings are in the + same charset. It won't be the one from the user's locale (we no + longer auto-detect that), but it will be self-consistent. + */ + bind_textdomain_codeset(MODULE_NAME, lp_unix_charset()); +#endif + argv_new = (const char **)poptGetArgs(pc); argc_new = argc; @@ -895,7 +905,7 @@ static struct functable net_func[] = { } if (c->opt_requester_name) { - set_global_myname(c->opt_requester_name); + lp_set_cmdline("netbios name", c->opt_requester_name); } if (!c->opt_user_name && getenv("LOGNAME")) { |