diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/net.c | 8 | ||||
-rw-r--r-- | source3/utils/net_ads.c | 95 | ||||
-rw-r--r-- | source3/utils/net_ads_gpo.c | 34 | ||||
-rw-r--r-- | source3/utils/net_afs.c | 4 | ||||
-rw-r--r-- | source3/utils/net_cache.c | 21 | ||||
-rw-r--r-- | source3/utils/net_conf.c | 26 | ||||
-rw-r--r-- | source3/utils/net_dom.c | 6 | ||||
-rw-r--r-- | source3/utils/net_eventlog.c | 6 | ||||
-rw-r--r-- | source3/utils/net_groupmap.c | 30 | ||||
-rw-r--r-- | source3/utils/net_idmap.c | 21 | ||||
-rw-r--r-- | source3/utils/net_lookup.c | 8 | ||||
-rw-r--r-- | source3/utils/net_rap.c | 8 | ||||
-rw-r--r-- | source3/utils/net_registry.c | 28 | ||||
-rw-r--r-- | source3/utils/net_rpc.c | 180 | ||||
-rw-r--r-- | source3/utils/net_rpc_audit.c | 20 | ||||
-rw-r--r-- | source3/utils/net_rpc_registry.c | 30 | ||||
-rw-r--r-- | source3/utils/net_rpc_rights.c | 20 | ||||
-rw-r--r-- | source3/utils/net_rpc_samsync.c | 12 | ||||
-rw-r--r-- | source3/utils/net_rpc_service.c | 50 | ||||
-rw-r--r-- | source3/utils/net_rpc_sh_acct.c | 4 | ||||
-rw-r--r-- | source3/utils/net_rpc_shell.c | 4 | ||||
-rw-r--r-- | source3/utils/net_sam.c | 52 | ||||
-rw-r--r-- | source3/utils/net_status.c | 8 | ||||
-rw-r--r-- | source3/utils/net_time.c | 12 | ||||
-rw-r--r-- | source3/utils/net_util.c | 4 |
25 files changed, 347 insertions, 344 deletions
diff --git a/source3/utils/net.c b/source3/utils/net.c index e8920e0b02..c0bffe27f9 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -277,7 +277,7 @@ static int net_setlocalsid(struct net_context *c, int argc, const char **argv) || (strncmp(argv[0], "S-1-5-21-", strlen("S-1-5-21-")) != 0) || (!string_to_sid(&sid, argv[0])) || (sid.num_auths != 4)) { - d_printf(_("usage: net setlocalsid S-1-5-21-x-y-z\n")); + d_printf(_("usage:")," net setlocalsid S-1-5-21-x-y-z\n"); return 1; } @@ -297,7 +297,7 @@ static int net_setdomainsid(struct net_context *c, int argc, const char **argv) || (strncmp(argv[0], "S-1-5-21-", strlen("S-1-5-21-")) != 0) || (!string_to_sid(&sid, argv[0])) || (sid.num_auths != 4)) { - d_printf(_("usage: net setdomainsid S-1-5-21-x-y-z\n")); + d_printf(_("usage:")," net setdomainsid S-1-5-21-x-y-z\n"); return 1; } @@ -315,7 +315,7 @@ static int net_getdomainsid(struct net_context *c, int argc, const char **argv) fstring sid_str; if (argc > 0) { - d_printf(_("usage: net getdomainsid\n")); + d_printf(_("usage:")," net getdomainsid\n"); return 1; } @@ -399,7 +399,7 @@ static int net_maxrid(struct net_context *c, int argc, const char **argv) uint32 rid; if (argc != 0) { - d_fprintf(stderr, _("usage: net maxrid\n")); + d_fprintf(stderr, _("usage:")," net maxrid\n"); return 1; } diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index 8e644bb6b2..90f5ca4f8a 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -128,9 +128,9 @@ static int net_ads_lookup(struct net_context *c, int argc, const char **argv) int ret; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net ads lookup\n" - " Find the ADS DC using CLDAP lookup.\n")); + " ",_("Find the ADS DC using CLDAP lookup.\n")); return 0; } @@ -158,9 +158,10 @@ static int net_ads_info(struct net_context *c, int argc, const char **argv) char addr[INET6_ADDRSTRLEN]; if (c->display_usage) { - d_printf(_("Usage:\n" - "net ads info\n" - " Display information about an Active Directory " + d_printf(_("Usage:\n"), + "net ads info\n", + " ", + _("Display information about an Active Directory " "server.\n")); return 0; } @@ -372,9 +373,9 @@ static int net_ads_workgroup(struct net_context *c, int argc, const char **argv) struct NETLOGON_SAM_LOGON_RESPONSE_EX reply; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net ads workgroup\n" - " Print the workgroup name\n")); + " ",_("Print the workgroup name\n")); return 0; } @@ -697,9 +698,9 @@ int net_ads_user(struct net_context *c, int argc, const char **argv) if (argc == 0) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net ads user\n" - " List AD users\n")); + " ",_("List AD users\n")); net_display_usage_from_functable(func); return 0; } @@ -848,9 +849,9 @@ int net_ads_group(struct net_context *c, int argc, const char **argv) if (argc == 0) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net ads group\n" - " List AD groups\n")); + " ", _("List AD groups\n")); net_display_usage_from_functable(func); return 0; } @@ -882,9 +883,9 @@ static int net_ads_status(struct net_context *c, int argc, const char **argv) LDAPMessage *res; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net ads status\n" - " Display machine account details\n")); + " ",_("Display machine account details\n")); return 0; } @@ -924,9 +925,9 @@ static int net_ads_leave(struct net_context *c, int argc, const char **argv) WERROR werr; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net ads leave\n" - " Leave an AD domain\n")); + " ", _("Leave an AD domain\n")); return 0; } @@ -1037,9 +1038,9 @@ int net_ads_testjoin(struct net_context *c, int argc, const char **argv) use_in_memory_ccache(); if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net ads testjoin\n" - " Test if the existing join is ok\n")); + " ", _("Test if the existing join is ok\n")); return 0; } @@ -1416,9 +1417,9 @@ static int net_ads_dns_register(struct net_context *c, int argc, const char **ar #endif if (argc > 0 || c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net ads dns register\n" - " Register hostname with DNS\n")); + " ", _("Register hostname with DNS\n")); return -1; } @@ -1468,8 +1469,8 @@ static int net_ads_dns_gethostbyname(struct net_context *c, int argc, const char #endif if (argc != 2 || c->display_usage) { - d_printf(_("Usage:\n" - "net ads dns gethostbyname <server> <name>\n" + d_printf(_("Usage:\n"), + _("net ads dns gethostbyname <server> <name>\n"), " Look up hostname from the AD\n" " server\tName server to use\n" " name\tName to look up\n")); @@ -1538,9 +1539,9 @@ static int net_ads_printer_search(struct net_context *c, int argc, const char ** LDAPMessage *res = NULL; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net ads printer search\n" - " List printers in the AD\n")); + " ", _("List printers in the AD\n")); return 0; } @@ -1578,8 +1579,8 @@ static int net_ads_printer_info(struct net_context *c, int argc, const char **ar LDAPMessage *res = NULL; if (c->display_usage) { - d_printf(_("Usage:\n" - "net ads printer info [printername [servername]]\n" + d_printf(_("Usage:\n"), + _("net ads printer info [printername [servername]]\n" " Display printer info from AD\n" " printername\tPrinter name or wildcard\n" " servername\tName of the print server\n")); @@ -1642,8 +1643,8 @@ static int net_ads_printer_publish(struct net_context *c, int argc, const char * LDAPMessage *res = NULL; if (argc < 1 || c->display_usage) { - d_printf(_("Usage:\n" - "net ads printer publish <printername> [servername]\n" + d_printf(_("Usage:\n"), + _("net ads printer publish <printername> [servername]\n" " Publish printer in AD\n" " printername\tName of the printer\n" " servername\tName of the print server\n")); @@ -1768,8 +1769,8 @@ static int net_ads_printer_remove(struct net_context *c, int argc, const char ** LDAPMessage *res = NULL; if (argc < 1 || c->display_usage) { - d_printf(_("Usage:\n" - "net ads printer remove <printername> [servername]\n" + d_printf(_("Usage:\n"), + _("net ads printer remove <printername> [servername]\n" " Remove a printer from the AD\n" " printername\tName of the printer\n" " servername\tName of the print server\n")); @@ -1871,8 +1872,8 @@ static int net_ads_password(struct net_context *c, int argc, const char **argv) ADS_STATUS ret; if (c->display_usage) { - d_printf(_("Usage:\n" - "net ads password <username>\n" + d_printf(_("Usage:\n"), + _("net ads password <username>\n" " Change password for user\n" " username\tName of user to change password for\n")); return 0; @@ -1954,9 +1955,9 @@ int net_ads_changetrustpw(struct net_context *c, int argc, const char **argv) ADS_STATUS ret; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net ads changetrustpw\n" - " Change the machine account's trust password\n")); + " ", _("Change the machine account's trust password\n")); return 0; } @@ -2195,9 +2196,9 @@ static int net_ads_keytab_flush(struct net_context *c, int argc, const char **ar ADS_STRUCT *ads; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net ads keytab flush\n" - " Delete the whole keytab\n")); + " ", _("Delete the whole keytab\n")); return 0; } @@ -2216,8 +2217,8 @@ static int net_ads_keytab_add(struct net_context *c, int argc, const char **argv ADS_STRUCT *ads; if (c->display_usage) { - d_printf(_("Usage:\n" - "net ads keytab add <principal> [principal ...]\n" + d_printf(_("Usage:\n"), + _("net ads keytab add <principal> [principal ...]\n" " Add principals to local keytab\n" " principal\tKerberos principal to add to " "keytab\n")); @@ -2241,9 +2242,9 @@ static int net_ads_keytab_create(struct net_context *c, int argc, const char **a int ret; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net ads keytab create\n" - " Create new default keytab\n")); + " ", _("Create new default keytab\n")); return 0; } @@ -2260,8 +2261,8 @@ static int net_ads_keytab_list(struct net_context *c, int argc, const char **arg const char *keytab = NULL; if (c->display_usage) { - d_printf(_("Usage:\n" - "net ads keytab list [keytab]\n" + d_printf(_("Usage:\n"), + _("net ads keytab list [keytab]\n" " List a local keytab\n" " keytab\tKeytab to list\n")); return 0; @@ -2326,9 +2327,9 @@ static int net_ads_kerberos_renew(struct net_context *c, int argc, const char ** int ret = -1; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net ads kerberos renew\n" - " Renew TGT from existing credential cache\n")); + " ", _("Renew TGT from existing credential cache\n")); return 0; } @@ -2350,9 +2351,9 @@ static int net_ads_kerberos_pac(struct net_context *c, int argc, const char **ar const char *impersonate_princ_s = NULL; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net ads kerberos pac\n" - " Dump the Kerberos PAC\n")); + " ", _("Dump the Kerberos PAC\n")); return 0; } @@ -2405,9 +2406,9 @@ static int net_ads_kerberos_kinit(struct net_context *c, int argc, const char ** NTSTATUS status; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net ads kerberos kinit\n" - " Get Ticket Granting Ticket (TGT) for the user\n")); + " ", _("Get Ticket Granting Ticket (TGT) for the user\n")); return 0; } diff --git a/source3/utils/net_ads_gpo.c b/source3/utils/net_ads_gpo.c index 5f8921a904..2203f362e9 100644 --- a/source3/utils/net_ads_gpo.c +++ b/source3/utils/net_ads_gpo.c @@ -37,9 +37,9 @@ static int net_ads_gpo_refresh(struct net_context *c, int argc, const char **arg struct nt_user_token *token = NULL; if (argc < 1 || c->display_usage) { - d_printf(_("Usage:\n" - "net ads gpo refresh <username|machinename>\n" - " Lists all GPOs assigned to an account and " + d_printf(_("Usage:\n"), + _("net ads gpo refresh <username|machinename>\n"), + _(" Lists all GPOs assigned to an account and " "downloads them\n" " username\tUser to refresh GPOs for\n" " machinename\tMachine to refresh GPOs for\n")); @@ -223,9 +223,9 @@ static int net_ads_gpo_list_all(struct net_context *c, int argc, const char **ar }; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net ads gpo listall\n" - " List all GPOs on the DC\n")); + " ", _("List all GPOs on the DC\n")); return 0; } @@ -297,9 +297,9 @@ static int net_ads_gpo_list(struct net_context *c, int argc, const char **argv) struct nt_user_token *token = NULL; if (argc < 1 || c->display_usage) { - d_printf(_("Usage:\n" - "net ads gpo list <username|machinename>\n" - " Lists all GPOs for machine/user\n" + d_printf(_("Usage:\n"), + _("net ads gpo list <username|machinename>\n"), + _(" Lists all GPOs for machine/user\n" " username\tUser to list GPOs for\n" " machinename\tMachine to list GPOs for\n")); return -1; @@ -448,9 +448,9 @@ static int net_ads_gpo_link_get(struct net_context *c, int argc, const char **ar struct GP_LINK gp_link; if (argc < 1 || c->display_usage) { - d_printf(_("Usage:\n" - "net ads gpo linkget <container>\n" - " Lists gPLink of a containter\n" + d_printf(_("Usage:\n"), + _("net ads gpo linkget <container>\n"), + _(" Lists gPLink of a containter\n" " container\tContainer to get link for\n")); return -1; } @@ -489,9 +489,9 @@ static int net_ads_gpo_link_add(struct net_context *c, int argc, const char **ar TALLOC_CTX *mem_ctx; if (argc < 2 || c->display_usage) { - d_printf(_("Usage:\n" - "net ads gpo linkadd <linkdn> <gpodn> [options]\n" - " Link a container to a GPO\n" + d_printf(_("Usage:\n"), + _("net ads gpo linkadd <linkdn> <gpodn> [options]\n"), + _(" Link a container to a GPO\n" " linkdn\tContainer to link to a GPO\n" " gpodn\tGPO to link container to\n")); d_printf(_("note: DNs must be provided properly escaped.\n" @@ -576,9 +576,9 @@ static int net_ads_gpo_get_gpo(struct net_context *c, int argc, const char **arg struct GROUP_POLICY_OBJECT gpo; if (argc < 1 || c->display_usage) { - d_printf(_("Usage:\n" - "net ads gpo getgpo <gpo>\n" - " List speciefied GPO\n" + d_printf(_("Usage:\n"), + _("net ads gpo getgpo <gpo>\n"), + _(" List speciefied GPO\n" " gpo\t\tGPO to list\n")); return -1; } diff --git a/source3/utils/net_afs.c b/source3/utils/net_afs.c index 043be17b91..1d17348b45 100644 --- a/source3/utils/net_afs.c +++ b/source3/utils/net_afs.c @@ -35,7 +35,7 @@ int net_afs_key(struct net_context *c, int argc, const char **argv) struct afs_keyfile keyfile; if (argc != 2) { - d_printf(_("usage: 'net afs key <keyfile> cell'\n")); + d_printf(_("usage:")," net afs key <keyfile> cell\n"); return -1; } @@ -68,7 +68,7 @@ int net_afs_impersonate(struct net_context *c, int argc, char *token; if (argc != 2) { - fprintf(stderr, _("Usage: net afs impersonate <user> <cell>\n")); + fprintf(stderr, _("Usage:")," net afs impersonate <user> <cell>\n"); exit(1); } diff --git a/source3/utils/net_cache.c b/source3/utils/net_cache.c index 96306375fa..41bf7ef1c7 100644 --- a/source3/utils/net_cache.c +++ b/source3/utils/net_cache.c @@ -155,7 +155,8 @@ static int net_cache_add(struct net_context *c, int argc, const char **argv) time_t timeout; if (argc < 3 || c->display_usage) { - d_printf(_("\nUsage:\nnet cache add <key string> <data string> " + d_printf("\n",_("Usage:\n"), + _("net cache add <key string> <data string> " "<timeout>\n")); return -1; } @@ -192,7 +193,7 @@ static int net_cache_del(struct net_context *c, int argc, const char **argv) const char *keystr = argv[0]; if (argc < 1 || c->display_usage) { - d_printf(_("\nUsage: net cache del <key string>\n")); + d_printf("\n",_("Usage:"), _(" net cache del <key string>\n")); return -1; } @@ -220,7 +221,7 @@ static int net_cache_get(struct net_context *c, int argc, const char **argv) time_t timeout; if (argc < 1 || c->display_usage) { - d_printf(_("\nUsage: net cache get <key>\n")); + d_printf("\n", _("Usage:"), _(" net cache get <key>\n")); return -1; } @@ -247,7 +248,7 @@ static int net_cache_search(struct net_context *c, int argc, const char **argv) const char* pattern; if (argc < 1 || c->display_usage) { - d_printf(_("Usage: net cache search <pattern>\n")); + d_printf(_("Usage:"), _(" net cache search <pattern>\n")); return -1; } @@ -269,9 +270,9 @@ static int net_cache_list(struct net_context *c, int argc, const char **argv) const char* pattern = "*"; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net cache list\n" - " List all cache entries.\n")); + " ", _("List all cache entries.\n")); return 0; } gencache_iterate(print_cache_entry, NULL, pattern); @@ -290,9 +291,9 @@ static int net_cache_flush(struct net_context *c, int argc, const char **argv) { const char* pattern = "*"; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net cache flush\n" - " Delete all cache entries.\n")); + " ", _("Delete all cache entries.\n")); return 0; } gencache_iterate(delete_cache_entry, NULL, pattern); @@ -303,9 +304,9 @@ static int net_cache_stabilize(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net cache flush\n" - " Delete all cache entries.\n")); + " ", _("Delete all cache entries.\n")); return 0; } diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c index 106a53246d..9a83b46212 100644 --- a/source3/utils/net_conf.c +++ b/source3/utils/net_conf.c @@ -39,14 +39,14 @@ static int net_conf_list_usage(struct net_context *c, int argc, const char **argv) { - d_printf(_("USAGE: net conf list\n")); + d_printf(_("Usage:"), " net conf list\n"); return -1; } static int net_conf_import_usage(struct net_context *c, int argc, const char**argv) { - d_printf(_("USAGE: net conf import [--test|-T] <filename> " + d_printf(_("Usage:"), _(" net conf import [--test|-T] <filename> " "[<servicename>]\n" "\t[--test|-T] testmode - do not act, just print " "what would be done\n" @@ -58,28 +58,28 @@ static int net_conf_import_usage(struct net_context *c, int argc, static int net_conf_listshares_usage(struct net_context *c, int argc, const char **argv) { - d_printf(_("USAGE: net conf listshares\n")); + d_printf(_("Usage:"), " net conf listshares\n"); return -1; } static int net_conf_drop_usage(struct net_context *c, int argc, const char **argv) { - d_printf(_("USAGE: net conf drop\n")); + d_printf(_("Usage:"), " net conf drop\n"); return -1; } static int net_conf_showshare_usage(struct net_context *c, int argc, const char **argv) { - d_printf(_("USAGE: net conf showshare <sharename>\n")); + d_printf(_("Usage:"), _(" net conf showshare <sharename>\n")); return -1; } static int net_conf_addshare_usage(struct net_context *c, int argc, const char **argv) { - d_printf(_("USAGE: net conf addshare <sharename> <path> " + d_printf(_("Usage:"), _(" net conf addshare <sharename> <path> " "[writeable={y|N} [guest_ok={y|N} [<comment>]]\n" "\t<sharename> the new share name.\n" "\t<path> the path on the filesystem to export.\n" @@ -94,49 +94,49 @@ static int net_conf_addshare_usage(struct net_context *c, int argc, static int net_conf_delshare_usage(struct net_context *c, int argc, const char **argv) { - d_printf(_("USAGE: net conf delshare <sharename>\n")); + d_printf(_("Usage: "), _(" net conf delshare <sharename>\n")); return -1; } static int net_conf_setparm_usage(struct net_context *c, int argc, const char **argv) { - d_printf(_("USAGE: net conf setparm <section> <param> <value>\n")); + d_printf(_("Usage:"), _(" net conf setparm <section> <param> <value>\n")); return -1; } static int net_conf_getparm_usage(struct net_context *c, int argc, const char **argv) { - d_printf(_("USAGE: net conf getparm <section> <param>\n")); + d_printf(_("Usage:"), _(" net conf getparm <section> <param>\n")); return -1; } static int net_conf_delparm_usage(struct net_context *c, int argc, const char **argv) { - d_printf(_("USAGE: net conf delparm <section> <param>\n")); + d_printf(_("Usage:"), _(" net conf delparm <section> <param>\n")); return -1; } static int net_conf_getincludes_usage(struct net_context *c, int argc, const char **argv) { - d_printf(_("USAGE: net conf getincludes <section>\n")); + d_printf(_("Usage:"), _(" net conf getincludes <section>\n")); return -1; } static int net_conf_setincludes_usage(struct net_context *c, int argc, const char **argv) { - d_printf(_("USAGE: net conf setincludes <section> [<filename>]*\n")); + d_printf(_("Usage:"), _(" net conf setincludes <section> [<filename>]*\n")); return -1; } static int net_conf_delincludes_usage(struct net_context *c, int argc, const char **argv) { - d_printf(_("USAGE: net conf delincludes <section>\n")); + d_printf(_("Usage:"), _(" net conf delincludes <section>\n")); return -1; } diff --git a/source3/utils/net_dom.c b/source3/utils/net_dom.c index ba3b950e43..e139ef4e03 100644 --- a/source3/utils/net_dom.c +++ b/source3/utils/net_dom.c @@ -23,13 +23,13 @@ int net_dom_usage(struct net_context *c, int argc, const char **argv) { - d_printf(_("usage: net dom join " + d_printf(_("Usage:"), _(" net dom join " "<domain=DOMAIN> <ou=OU> <account=ACCOUNT> " "<password=PASSWORD> <reboot>\n Join a remote machine\n")); - d_printf(_("usage: net dom unjoin " + d_printf(_("Usage:"), _(" net dom unjoin " "<account=ACCOUNT> <password=PASSWORD> <reboot>\n" " Unjoin a remote machine\n")); - d_printf(_("usage: net dom renamecomputer " + d_printf(_("Usage:"), _(" net dom renamecomputer " "<newname=NEWNAME> " "<account=ACCOUNT> <password=PASSWORD> <reboot>\n" " Rename joined computer\n")); diff --git a/source3/utils/net_eventlog.c b/source3/utils/net_eventlog.c index bb1be0c9ca..2cbb82f928 100644 --- a/source3/utils/net_eventlog.c +++ b/source3/utils/net_eventlog.c @@ -43,7 +43,7 @@ static int net_eventlog_dump(struct net_context *c, int argc, char *s; if (argc < 1 || c->display_usage) { - d_fprintf(stderr, _("usage: net eventlog dump <file.evt>\n")); + d_fprintf(stderr, _("usage:")," net eventlog dump <file.evt>\n"); goto done; } @@ -99,7 +99,7 @@ static int net_eventlog_import(struct net_context *c, int argc, if (argc < 2 || c->display_usage) { d_fprintf(stderr, - _("usage: net eventlog import <file> <eventlog>\n")); + _("usage:")," net eventlog import <file> <eventlog>\n"); goto done; } @@ -194,7 +194,7 @@ static int net_eventlog_export(struct net_context *c, int argc, if (argc < 2 || c->display_usage) { d_fprintf(stderr, - _("usage: net eventlog export <file> <eventlog>\n")); + _("usage:")," net eventlog export <file> <eventlog>\n"); goto done; } diff --git a/source3/utils/net_groupmap.c b/source3/utils/net_groupmap.c index e82c7b14f2..01b25da48e 100644 --- a/source3/utils/net_groupmap.c +++ b/source3/utils/net_groupmap.c @@ -88,7 +88,7 @@ static int net_groupmap_list(struct net_context *c, int argc, const char **argv) " sid\tSID of group to list"); if (c->display_usage) { - d_printf(_("Usage:\n%s\n"), list_usage_str); + d_printf(_("Usage:\n"),"%s\n", list_usage_str); return 0; } @@ -116,7 +116,7 @@ static int net_groupmap_list(struct net_context *c, int argc, const char **argv) } else { d_fprintf(stderr, _("Bad option: %s\n"), argv[i]); - d_printf("Usage:\n%s\n", list_usage_str); + d_printf(_("Usage:\n"),"%s\n", list_usage_str); return -1; } } @@ -192,7 +192,7 @@ static int net_groupmap_add(struct net_context *c, int argc, const char **argv) name_type = "domain group"; if (c->display_usage) { - d_printf(_("Usage\n%s\n"), add_usage_str); + d_printf(_("Usage\n"),"%s\n", add_usage_str); return 0; } @@ -268,7 +268,7 @@ static int net_groupmap_add(struct net_context *c, int argc, const char **argv) } if ( !unixgrp[0] ) { - d_printf(_("Usage:\n%s\n"), add_usage_str); + d_printf(_("Usage:\n"),"%s\n", add_usage_str); return -1; } @@ -352,7 +352,7 @@ static int net_groupmap_modify(struct net_context *c, int argc, const char **arg "[type=<domain|local>]"); if (c->display_usage) { - d_printf(_("Usage:\n%s\n"), modify_usage_str); + d_printf(_("Usage:\n"),"%s\n", modify_usage_str); return 0; } @@ -408,7 +408,7 @@ static int net_groupmap_modify(struct net_context *c, int argc, const char **arg } if ( !ntgroup[0] && !sid_string[0] ) { - d_printf(_("Usage:\n%s\n"), modify_usage_str); + d_printf(_("Usage:\n"),"%s\n", modify_usage_str); return -1; } @@ -491,7 +491,7 @@ static int net_groupmap_delete(struct net_context *c, int argc, const char **arg "{ntgroup=<string>|sid=<SID>}"); if (c->display_usage) { - d_printf(_("Usage:\n%s\n"), delete_usage_str); + d_printf(_("Usage:\n"),"%s\n", delete_usage_str); return 0; } @@ -518,7 +518,7 @@ static int net_groupmap_delete(struct net_context *c, int argc, const char **arg } if ( !ntgroup[0] && !sid_string[0]) { - d_printf(_("Usage:\n%s\n"), delete_usage_str); + d_printf(_("Usage:\n"),"%s\n", delete_usage_str); return -1; } @@ -553,7 +553,7 @@ static int net_groupmap_set(struct net_context *c, int argc, const char **argv) bool have_map = false; if ((argc < 1) || (argc > 2) || c->display_usage) { - d_printf(_("Usage: net groupmap set \"NT Group\" " + d_printf(_("Usage:"), _(" net groupmap set \"NT Group\" " "[\"unix group\"] [-C \"comment\"] [-L] [-D]\n")); return -1; } @@ -669,9 +669,9 @@ static int net_groupmap_cleanup(struct net_context *c, int argc, const char **ar size_t i, entries; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net groupmap cleanup\n" - " Delete all group mappings\n")); + " ",_("Delete all group mappings\n")); return 0; } @@ -707,7 +707,7 @@ static int net_groupmap_addmem(struct net_context *c, int argc, const char **arg c->display_usage || !string_to_sid(&alias, argv[0]) || !string_to_sid(&member, argv[1]) ) { - d_printf(_("Usage: net groupmap addmem alias-sid member-sid\n")); + d_printf(_("Usage:"), _("net groupmap addmem alias-sid member-sid\n")); return -1; } @@ -728,7 +728,7 @@ static int net_groupmap_delmem(struct net_context *c, int argc, const char **arg c->display_usage || !string_to_sid(&alias, argv[0]) || !string_to_sid(&member, argv[1]) ) { - d_printf(_("Usage: net groupmap delmem alias-sid member-sid\n")); + d_printf(_("Usage:"), _(" net groupmap delmem alias-sid member-sid\n")); return -1; } @@ -750,7 +750,7 @@ static int net_groupmap_listmem(struct net_context *c, int argc, const char **ar if ( (argc != 1) || c->display_usage || !string_to_sid(&alias, argv[0]) ) { - d_printf(_("Usage: net groupmap listmem alias-sid\n")); + d_printf(_("Usage:"), _(" net groupmap listmem alias-sid\n")); return -1; } @@ -808,7 +808,7 @@ static int net_groupmap_memberships(struct net_context *c, int argc, const char if ( (argc != 1) || c->display_usage || !string_to_sid(&member, argv[0]) ) { - d_printf(_("Usage: net groupmap memberof sid\n")); + d_printf(_("Usage:"), _(" net groupmap memberof sid\n")); return -1; } diff --git a/source3/utils/net_idmap.c b/source3/utils/net_idmap.c index 5a380da02f..7ad655bd4e 100644 --- a/source3/utils/net_idmap.c +++ b/source3/utils/net_idmap.c @@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#define FOO(x) (x) #include "includes.h" #include "utils/net.h" @@ -60,8 +61,8 @@ static int net_idmap_dump(struct net_context *c, int argc, const char **argv) TDB_CONTEXT *idmap_tdb; if ( argc != 1 || c->display_usage) { - d_printf(_("Usage:\n" - "net idmap dump <inputfile>\n" + d_printf(_("Usage:\n"), + _("net idmap dump <inputfile>\n" " Dump current ID mapping.\n" " inputfile\tTDB file to read mappings from.\n")); return c->display_usage?0:-1; @@ -91,8 +92,8 @@ static int net_idmap_restore(struct net_context *c, int argc, const char **argv) FILE *input; if (c->display_usage) { - d_printf(_("Usage:\n" - "net idmap restore [inputfile]\n" + d_printf(_("Usage:\n"), + _("net idmap restore [inputfile]\n" " Restore ID mappings from file\n" " inputfile\tFile to load ID mappings from. If " "not given, load data from stdin.\n")); @@ -193,13 +194,13 @@ static int net_idmap_restore(struct net_context *c, int argc, const char **argv) **********************************************************/ static int net_idmap_delete(struct net_context *c, int argc, const char **argv) { - d_printf(_("Not Implemented yet\n")); + d_printf(_("Not implemented yet"),"\n"); return -1; } static int net_idmap_set(struct net_context *c, int argc, const char **argv) { - d_printf(_("Not Implemented yet\n")); + d_printf(_("Not implemented yet"),"\n"); return -1; } bool idmap_store_secret(const char *backend, bool alloc, @@ -237,8 +238,8 @@ static int net_idmap_secret(struct net_context *c, int argc, const char **argv) bool ret; if (argc != 2 || c->display_usage) { - d_printf(_("Usage:\n" - "net idmap secret {<DOMAIN>|alloc} <secret>\n" + d_printf(_("Usage:\n"), + _("net idmap secret {<DOMAIN>|alloc} <secret>\n" " Set the secret for the specified domain " "(or alloc module)\n" " DOMAIN\tDomain to set secret for.\n" @@ -336,8 +337,8 @@ static int net_idmap_aclmapset(struct net_context *c, int argc, const char **arg NTSTATUS status; if (argc != 3 || c->display_usage) { - d_fprintf(stderr, _("usage: net idmap aclmapset <tdb> " - "<src-sid> <dst-sid>\n")); + d_fprintf(stderr, _("usage:")," net idmap aclmapset <tdb> " + "<src-sid> <dst-sid>\n"); return -1; } diff --git a/source3/utils/net_lookup.c b/source3/utils/net_lookup.c index 21b2c4329e..b303abde56 100644 --- a/source3/utils/net_lookup.c +++ b/source3/utils/net_lookup.c @@ -109,7 +109,7 @@ static int net_lookup_ldap(struct net_context *c, int argc, const char **argv) sitename = sitename_fetch(domain); if ( (ctx = talloc_init("net_lookup_ldap")) == NULL ) { - d_fprintf(stderr,_("net_lookup_ldap: talloc_init() failed!\n")); + d_fprintf(stderr,"net_lookup_ldap: talloc_init() ",_("failed"),"!\n"); SAFE_FREE(sitename); return -1; } @@ -322,7 +322,7 @@ static int net_lookup_name(struct net_context *c, int argc, const char **argv) enum lsa_SidType type; if (argc != 1) { - d_printf(_("usage: net lookup name <name>\n")); + d_printf(_("Usage:"), _(" net lookup name <name>\n")); return -1; } @@ -344,7 +344,7 @@ static int net_lookup_sid(struct net_context *c, int argc, const char **argv) enum lsa_SidType type; if (argc != 1) { - d_printf(_("usage: net lookup sid <sid>\n")); + d_printf(_("Usage:"), _(" net lookup sid <sid>\n")); return -1; } @@ -375,7 +375,7 @@ static int net_lookup_dsgetdcname(struct net_context *c, int argc, const char ** char *s = NULL; if (argc < 1 || argc > 3) { - d_printf(_("usage: net lookup dsgetdcname " + d_printf(_("Usage:"), _(" net lookup dsgetdcname " "<name> <flags> <sitename>\n")); return -1; } diff --git a/source3/utils/net_rap.c b/source3/utils/net_rap.c index eecb669fdb..b613b266b0 100644 --- a/source3/utils/net_rap.c +++ b/source3/utils/net_rap.c @@ -503,8 +503,8 @@ static int net_rap_server_name(struct net_context *c, int argc, const char *argv char *name; if (c->display_usage) { - d_printf(_("Usage:\n" - "net rap server name\n" + d_printf(_("Usage:\n"), + _("net rap server name\n" " Get the name of the server\n")); return 0; } @@ -532,8 +532,8 @@ static int net_rap_server_domain(struct net_context *c, int argc, int ret; if (c->display_usage) { - d_printf(_("Usage:\n" - "net rap server domain\n" + d_printf(_("Usage:\n"), + _("net rap server domain\n" " Enumerate servers in this domain/workgroup\n")); return 0; } diff --git a/source3/utils/net_registry.c b/source3/utils/net_registry.c index 711c111275..9d953f3e24 100644 --- a/source3/utils/net_registry.c +++ b/source3/utils/net_registry.c @@ -130,8 +130,8 @@ static int net_registry_enumerate(struct net_context *c, int argc, int ret = -1; if (argc != 1 || c->display_usage) { - d_printf(_("Usage: net registry enumerate <path>\n")); - d_printf(_("Example: net registry enumerate " + d_printf(_("Usage:"),_(" net registry enumerate <path>\n")); + d_printf(_("Example:"), _(" net registry enumerate " "'HKLM\\Software\\Samba'\n")); goto done; } @@ -182,8 +182,8 @@ static int net_registry_createkey(struct net_context *c, int argc, int ret = -1; if (argc != 1 || c->display_usage) { - d_printf(_("Usage: net registry createkey <path>\n")); - d_printf(_("Example: net registry createkey " + d_printf(_("Usage:"),_(" net registry createkey <path>\n")); + d_printf(_("Example:"), _(" net registry createkey " "'HKLM\\Software\\Samba\\smbconf.127.0.0.1'\n")); goto done; } @@ -235,8 +235,8 @@ static int net_registry_deletekey(struct net_context *c, int argc, int ret = -1; if (argc != 1 || c->display_usage) { - d_printf(_("Usage: net registry deletekey <path>\n")); - d_printf(_("Example: net registry deletekey " + d_printf(_("Usage:"),_(" net registry deletekey <path>\n")); + d_printf(_("Example:"),_(" net registry deletekey " "'HKLM\\Software\\Samba\\smbconf.127.0.0.1'\n")); goto done; } @@ -247,14 +247,14 @@ static int net_registry_deletekey(struct net_context *c, int argc, werr = open_hive(ctx, argv[0], REG_KEY_WRITE, &hivekey, &subkeyname); if (!W_ERROR_IS_OK(werr)) { - d_fprintf(stderr, _("open_hive failed: %s\n"), - win_errstr(werr)); + d_fprintf(stderr, "open_hive ", _("failed"), + ": %s\n", win_errstr(werr)); goto done; } werr = reg_deletekey(hivekey, subkeyname); if (!W_ERROR_IS_OK(werr)) { - d_fprintf(stderr, _("reg_deletekey failed: %s\n"), + d_fprintf(stderr, "reg_deletekey ", _("failed"), ": %s\n", win_errstr(werr)); goto done; } @@ -276,7 +276,7 @@ static int net_registry_getvalue_internal(struct net_context *c, int argc, TALLOC_CTX *ctx = talloc_stackframe(); if (argc != 2 || c->display_usage) { - d_fprintf(stderr, _("usage: net rpc registry getvalue <key> " + d_fprintf(stderr, _("usage:"),_(" net rpc registry getvalue <key> " "<valuename>\n")); goto done; } @@ -325,7 +325,7 @@ static int net_registry_setvalue(struct net_context *c, int argc, TALLOC_CTX *ctx = talloc_stackframe(); if (argc < 4 || c->display_usage) { - d_fprintf(stderr, _("usage: net rpc registry setvalue <key> " + d_fprintf(stderr, _("usage:"),_(" net rpc registry setvalue <key> " "<valuename> <type> [<val>]+\n")); goto done; } @@ -380,7 +380,7 @@ static int net_registry_deletevalue(struct net_context *c, int argc, int ret = -1; if (argc != 2 || c->display_usage) { - d_fprintf(stderr, _("usage: net rpc registry deletevalue <key> " + d_fprintf(stderr, _("usage:"),_(" net rpc registry deletevalue <key> " "<valuename>\n")); goto done; } @@ -424,8 +424,8 @@ static int net_registry_getsd(struct net_context *c, int argc, access_mask = REG_KEY_READ; if (argc != 1 || c->display_usage) { - d_printf(_("Usage: net registry getsd <path>\n")); - d_printf(_("Example: net registry getsd " + d_printf(_("Usage:"),_(" net registry getsd <path>\n")); + d_printf(_("Example:"),_(" net registry getsd " "'HKLM\\Software\\Samba'\n")); goto done; } diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 3b72506cc8..5df279e95a 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -78,8 +78,8 @@ NTSTATUS net_get_remote_domain_sid(struct cli_state *cli, TALLOC_CTX *mem_ctx, SEC_FLAG_MAXIMUM_ALLOWED, &pol); if (!NT_STATUS_IS_OK(result)) { - d_fprintf(stderr, _("open_policy failed: %s\n"), - nt_errstr(result)); + d_fprintf(stderr, "open_policy ",_("failed"),": %s\n"), + nt_errstr(result); return result; } @@ -88,8 +88,8 @@ NTSTATUS net_get_remote_domain_sid(struct cli_state *cli, TALLOC_CTX *mem_ctx, LSA_POLICY_INFO_ACCOUNT_DOMAIN, &info); if (!NT_STATUS_IS_OK(result)) { - d_fprintf(stderr, _("lsaquery failed: %s\n"), - nt_errstr(result)); + d_fprintf(stderr, "lsaquery ",_("failed"),": %s\n"), + nt_errstr(result); return result; } @@ -272,9 +272,9 @@ static NTSTATUS rpc_changetrustpw_internals(struct net_context *c, int net_rpc_changetrustpw(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc changetrustpw\n" - " Change the machine trust password\n")); + " ",_("Change the machine trust password\n")); return 0; } @@ -403,9 +403,9 @@ static int net_rpc_oldjoin(struct net_context *c, int argc, const char **argv) int rc = -1; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc oldjoin\n" - " Join a domain the old way\n")); + " ",_("Join a domain the old way\n")); return 0; } @@ -433,8 +433,8 @@ static int net_rpc_oldjoin(struct net_context *c, int argc, const char **argv) int net_rpc_join(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" - "net rpc join -U <username>[%%password] <type>\n" + d_printf(_("Usage:\n"), + _("net rpc join -U <username>[%%password] <type>\n" " Join a domain\n" " username\tName of the admin user" " password\tPassword of the admin user, will " @@ -548,9 +548,9 @@ NTSTATUS rpc_info_internals(struct net_context *c, int net_rpc_info(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc info\n" - " Display information about the domain\n")); + " ",_("Display information about the domain\n")); return 0; } @@ -614,9 +614,9 @@ int net_rpc_getsid(struct net_context *c, int argc, const char **argv) } if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc getsid\n" - " Fetch domain SID into local secrets.tdb\n")); + " ",_("Fetch domain SID into local secrets.tdb\n")); return 0; } @@ -982,9 +982,9 @@ int net_rpc_user(struct net_context *c, int argc, const char **argv) if (argc == 0) { if (c->display_usage) { - d_printf(_("Usage:\n")); - d_printf(_("net rpc user\n" - " List all users\n")); + d_printf(_("Usage:\n"), + "net rpc user\n" + " ",_("List all users\n")); net_display_usage_from_functable(func); return 0; } @@ -1033,7 +1033,7 @@ static NTSTATUS rpc_sh_handle_user(struct net_context *c, enum lsa_SidType type; if (argc == 0) { - d_fprintf(stderr, _("usage: %s <username>\n"), ctx->whoami); + d_fprintf(stderr, _("usage:")," %s <username>\n"), ctx->whoami; return NT_STATUS_INVALID_PARAMETER; } @@ -1114,7 +1114,7 @@ static NTSTATUS rpc_sh_user_show_internals(struct net_context *c, union samr_UserInfo *info = NULL; if (argc != 0) { - d_fprintf(stderr, _("usage: %s show <username>\n"),ctx->whoami); + d_fprintf(stderr, _("usage:")," %s show <username>\n"),ctx->whoami; return NT_STATUS_INVALID_PARAMETER; } @@ -1167,7 +1167,7 @@ static NTSTATUS rpc_sh_user_str_edit_internals(struct net_context *c, union samr_UserInfo *info = NULL; if (argc > 1) { - d_fprintf(stderr, _("usage: %s <username> [new value|NULL]\n"), + d_fprintf(stderr, _("usage:")," %s <username> [new value|NULL]\n", ctx->whoami); return NT_STATUS_INVALID_PARAMETER; } @@ -1571,7 +1571,7 @@ static NTSTATUS rpc_group_delete_internals(struct net_context *c, d_printf(_("ok\n")); } else { if (c->opt_verbose) - d_printf(_("failed\n")); + d_printf(_("failed"),"\n"); goto done; } } @@ -1914,8 +1914,8 @@ static NTSTATUS rpc_group_addmem_internals(struct net_context *c, enum lsa_SidType group_type; if (argc != 2 || c->display_usage) { - d_printf(_("Usage:\n" - "net rpc group addmem <group> <member>\n" + d_printf(_("Usage:\n"), + _("net rpc group addmem <group> <member>\n" " Add a member to a group\n" " group\tGroup to add member to\n" " member\tMember to add to group\n")); @@ -2116,8 +2116,8 @@ static NTSTATUS rpc_group_delmem_internals(struct net_context *c, enum lsa_SidType group_type; if (argc != 2 || c->display_usage) { - d_printf(_("Usage:\n" - "net rpc group delmem <group> <member>\n" + d_printf(_("Usage:\n"), + _("net rpc group delmem <group> <member>\n" " Delete a member from a group\n" " group\tGroup to delete member from\n" " member\tMember to delete from group\n")); @@ -2200,8 +2200,8 @@ static NTSTATUS rpc_group_list_internals(struct net_context *c, bool builtin = false; if (c->display_usage) { - d_printf(_("Usage:\n" - "net rpc group list [global] [local] [builtin]\n" + d_printf(_("Usage:\n"), + _("net rpc group list [global] [local] [builtin]\n" " List groups on RPC server\n" " global\tList global groups\n" " local\tList local groups\n" @@ -2709,7 +2709,7 @@ static int rpc_group_rename_internals(struct net_context *c, int argc, const cha uint32_t parm_err; if (argc != 2) { - d_printf(_("Usage: 'net rpc group rename group newname'\n")); + d_printf(_("Usage:\n"), "net rpc group rename group newname\n"); return -1; } @@ -3047,9 +3047,9 @@ static int rpc_share_list(struct net_context *c, int argc, const char **argv) uint32_t i, level = 1; if (c->display_usage) { - d_printf(_("Usage\n" + d_printf(_("Usage\n"), "net rpc share list\n" - " List shares on remote server\n")); + " ",_("List shares on remote server\n")); return 0; } @@ -3231,9 +3231,9 @@ static int rpc_share_migrate_shares(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc share migrate shares\n" - " Migrate shares to local server\n")); + " ",_("Migrate shares to local server\n")); return 0; } @@ -3564,9 +3564,9 @@ done: static int rpc_share_migrate_files(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net share migrate files\n" - " Migrate files to local server\n")); + " ",_("Migrate files to local server\n")); return 0; } @@ -3689,9 +3689,9 @@ static int rpc_share_migrate_security(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc share migrate security\n" - " Migrate share-acls to local server\n")); + " ",_("Migrate share-acls to local server\n")); return 0; } @@ -3722,9 +3722,9 @@ static int rpc_share_migrate_all(struct net_context *c, int argc, int ret; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc share migrate all\n" - " Migrates shares including all share settings\n")); + " ",_("Migrates shares including all share settings\n")); return 0; } @@ -4019,7 +4019,7 @@ static void init_user_token(NT_USER_TOKEN *token, DOM_SID *user_sid) token->num_sids = 4; if (!(token->user_sids = SMB_MALLOC_ARRAY(DOM_SID, 4))) { - d_fprintf(stderr, _("malloc failed\n")); + d_fprintf(stderr, "malloc ",_("failed"),"\n"); token->num_sids = 0; return; } @@ -4525,9 +4525,9 @@ static int rpc_share_allowedusers(struct net_context *c, int argc, int result; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc share allowedusers\n" - " List allowed users\n")); + " ",_("List allowed users\n")); return 0; } @@ -4651,8 +4651,8 @@ int net_rpc_share(struct net_context *c, int argc, const char **argv) if (argc == 0) { if (c->display_usage) { - d_printf(_("Usage:\n" - "net rpc share\n" + d_printf(_("Usage:\n"), + _("net rpc share\n" " List shares\n" " Alias for net rpc share list\n")); net_display_usage_from_functable(func); @@ -4715,7 +4715,7 @@ static NTSTATUS rpc_sh_share_delete(struct net_context *c, int argc, const char **argv) { if (argc != 1) { - d_fprintf(stderr, _("usage: %s <share>\n"), ctx->whoami); + d_fprintf(stderr, _("usage:")," %s <share>\n", ctx->whoami); return NT_STATUS_INVALID_PARAMETER; } @@ -5033,9 +5033,9 @@ static int rpc_shutdown_abort(struct net_context *c, int argc, int rc = -1; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc abortshutdown\n" - " Abort a scheduled shutdown\n")); + " ",_("Abort a scheduled shutdown\n")); return 0; } @@ -5180,9 +5180,9 @@ static int rpc_shutdown(struct net_context *c, int argc, const char **argv) int rc = -1; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc shutdown\n" - " Shut down a remote RPC server\n")); + " ",_("Shut down a remote RPC server\n")); return 0; } @@ -5239,7 +5239,7 @@ static NTSTATUS rpc_trustdom_add_internals(struct net_context *c, unsigned int orig_timeout; if (argc != 2) { - d_printf(_("Usage: net rpc trustdom add <domain_name> " + d_printf(_("Usage:"),_(" net rpc trustdom add <domain_name> " "<trust password>\n")); return NT_STATUS_INVALID_PARAMETER; } @@ -5352,8 +5352,8 @@ static int rpc_trustdom_add(struct net_context *c, int argc, const char **argv) return run_rpc_command(c, NULL, &ndr_table_samr.syntax_id, 0, rpc_trustdom_add_internals, argc, argv); } else { - d_printf(_("Usage:\n" - "net rpc trustdom add <domain_name> <trust " + d_printf(_("Usage:\n"), + _("net rpc trustdom add <domain_name> <trust " "password>\n")); return -1; } @@ -5393,7 +5393,7 @@ static NTSTATUS rpc_trustdom_del_internals(struct net_context *c, struct lsa_String lsa_acct_name; if (argc != 1) { - d_printf(_("Usage: net rpc trustdom del <domain_name>\n")); + d_printf(_("Usage:"),_(" net rpc trustdom del <domain_name>\n")); return NT_STATUS_INVALID_PARAMETER; } @@ -5509,8 +5509,8 @@ static int rpc_trustdom_del(struct net_context *c, int argc, const char **argv) return run_rpc_command(c, NULL, &ndr_table_samr.syntax_id, 0, rpc_trustdom_del_internals, argc, argv); } else { - d_printf(_("Usage:\n" - "net rpc trustdom del <domain>\n")); + d_printf(_("Usage:\n"), + _("net rpc trustdom del <domain>\n")); return -1; } } @@ -5592,8 +5592,8 @@ static int rpc_trustdom_establish(struct net_context *c, int argc, */ if (argc != 1 || c->display_usage) { - d_printf(_("Usage:\n" - "net rpc trustdom establish <domain_name>\n")); + d_printf(_("Usage:\n"), + _("net rpc trustdom establish <domain_name>\n")); return -1; } @@ -5756,8 +5756,8 @@ static int rpc_trustdom_revoke(struct net_context *c, int argc, int rc = -1; if (argc < 1 || c->display_usage) { - d_printf(_("Usage:\n" - "net rpc trustdom revoke <domain_name>\n" + d_printf(_("Usage:\n"), + _("net rpc trustdom revoke <domain_name>\n" " Revoke trust relationship\n" " domain_name\tName of domain to revoke trust\n")); return -1; @@ -5887,9 +5887,9 @@ static int rpc_trustdom_vampire(struct net_context *c, int argc, fstring pdc_name; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc trustdom vampire\n" - " Vampire trust relationship from remote server\n")); + " ",_("Vampire trust relationship from remote server\n")); return 0; } @@ -6044,9 +6044,9 @@ static int rpc_trustdom_list(struct net_context *c, int argc, const char **argv) struct samr_SamArray *trusts = NULL; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc trustdom list\n" - " List in- and outgoing trust relationships\n")); + " ",_("List in- and outgoing trust relationships\n")); return 0; } @@ -6417,9 +6417,9 @@ bool net_rpc_check(struct net_context *c, unsigned flags) /* dump sam database via samsync rpc calls */ static int rpc_samdump(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc samdump\n" - " Dump remote SAM database\n")); + " ",_("Dump remote SAM database\n")); return 0; } @@ -6464,9 +6464,9 @@ static int rpc_vampire(struct net_context *c, int argc, const char **argv) if (argc == 0) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc vampire\n" - " Vampire remote SAM database\n")); + " ",_("Vampire remote SAM database\n")); return 0; } @@ -6500,9 +6500,9 @@ static int rpc_printer_migrate_all(struct net_context *c, int argc, int ret; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc printer migrate all\n" - " Migrate everything from a print server\n")); + " ",_("Migrate everything from a print server\n")); return 0; } @@ -6554,9 +6554,9 @@ static int rpc_printer_migrate_drivers(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc printer migrate drivers\n" - " Migrate print-drivers from a print-server\n")); + " ",_("Migrate print-drivers from a print-server\n")); return 0; } @@ -6584,9 +6584,9 @@ static int rpc_printer_migrate_forms(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc printer migrate forms\n" - " Migrate print-forms from a print-server\n")); + " ",_("Migrate print-forms from a print-server\n")); return 0; } @@ -6614,9 +6614,9 @@ static int rpc_printer_migrate_printers(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc printer migrate printers\n" - " Migrate printers from a print-server\n")); + " ",_("Migrate printers from a print-server\n")); return 0; } @@ -6644,9 +6644,9 @@ static int rpc_printer_migrate_security(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc printer migrate security\n" - " Migrate printer-ACLs from a print-server\n")); + " ",_("Migrate printer-ACLs from a print-server\n")); return 0; } @@ -6674,9 +6674,9 @@ static int rpc_printer_migrate_settings(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc printer migrate settings\n" - " Migrate printer-settings from a " + " ",_("Migrate printer-settings from a " "print-server\n")); return 0; } @@ -6776,9 +6776,9 @@ int rpc_printer_migrate(struct net_context *c, int argc, const char **argv) static int rpc_printer_list(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc printer list\n" - " List printers on a remote RPC server\n")); + " ",_("List printers on a remote RPC server\n")); return 0; } @@ -6801,9 +6801,9 @@ static int rpc_printer_driver_list(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc printer driver\n" - " List printer-drivers on a remote RPC server\n")); + " ",_("List printer-drivers on a remote RPC server\n")); return 0; } @@ -6826,9 +6826,9 @@ static int rpc_printer_publish_publish(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc printer publish publish\n" - " Publish printer in ADS via MSRPC\n")); + " ",_("Publish printer in ADS via MSRPC\n")); return 0; } @@ -6850,9 +6850,9 @@ static int rpc_printer_publish_publish(struct net_context *c, int argc, static int rpc_printer_publish_update(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc printer publish update\n" - " Update printer in ADS via MSRPC\n")); + " ",_("Update printer in ADS via MSRPC\n")); return 0; } @@ -6875,9 +6875,9 @@ static int rpc_printer_publish_unpublish(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc printer publish unpublish\n" - " UnPublish printer in ADS via MSRPC\n")); + " ",_("UnPublish printer in ADS via MSRPC\n")); return 0; } @@ -6900,9 +6900,9 @@ static int rpc_printer_publish_list(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc printer publish list\n" - " List published printers via MSRPC\n")); + " ",_("List published printers via MSRPC\n")); return 0; } diff --git a/source3/utils/net_rpc_audit.c b/source3/utils/net_rpc_audit.c index b001c9c623..ed461cafb0 100644 --- a/source3/utils/net_rpc_audit.c +++ b/source3/utils/net_rpc_audit.c @@ -364,9 +364,9 @@ static NTSTATUS rpc_audit_list_internal(struct net_context *c, static int rpc_audit_get(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc audit get\n" - " View configured audit setting\n")); + " ",_("View configured audit setting\n")); return 0; } @@ -380,9 +380,9 @@ static int rpc_audit_get(struct net_context *c, int argc, const char **argv) static int rpc_audit_set(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc audit set\n" - " Set audit policies\n")); + " ",_("Set audit policies\n")); return 0; } @@ -396,9 +396,9 @@ static int rpc_audit_set(struct net_context *c, int argc, const char **argv) static int rpc_audit_enable(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc audit enable\n" - " Enable auditing\n")); + " ",_("Enable auditing\n")); return 0; } @@ -412,9 +412,9 @@ static int rpc_audit_enable(struct net_context *c, int argc, const char **argv) static int rpc_audit_disable(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc audit disable\n" - " Disable auditing\n")); + " ",_("Disable auditing\n")); return 0; } @@ -428,9 +428,9 @@ static int rpc_audit_disable(struct net_context *c, int argc, const char **argv) static int rpc_audit_list(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc audit list\n" - " List auditing settings\n")); + " ",_("List auditing settings\n")); return 0; } diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c index aa3a13208c..dc3d54999c 100644 --- a/source3/utils/net_rpc_registry.c +++ b/source3/utils/net_rpc_registry.c @@ -471,7 +471,7 @@ static int rpc_registry_setvalue(struct net_context *c, int argc, const char **argv ) { if (argc < 4 || c->display_usage) { - d_fprintf(stderr, _("usage: net rpc registry setvalue <key> " + d_fprintf(stderr, _("usage:"),_(" net rpc registry setvalue <key> " "<valuename> <type> [<val>]+\n")); return -1; } @@ -524,7 +524,7 @@ static int rpc_registry_deletevalue(struct net_context *c, int argc, const char **argv ) { if (argc != 2 || c->display_usage) { - d_fprintf(stderr, _("usage: net rpc registry deletevalue <key> " + d_fprintf(stderr, _("usage:"),_(" net rpc registry deletevalue <key> " "<valuename>\n")); return -1; } @@ -639,7 +639,7 @@ static int rpc_registry_getvalue(struct net_context *c, int argc, const char **argv) { if (argc != 2 || c->display_usage) { - d_fprintf(stderr, _("usage: net rpc registry getvalue <key> " + d_fprintf(stderr, _("usage:"),_(" net rpc registry getvalue <key> " "<valuename>\n")); return -1; } @@ -666,7 +666,7 @@ static int rpc_registry_getvalueraw(struct net_context *c, int argc, const char **argv) { if (argc != 2 || c->display_usage) { - d_fprintf(stderr, _("usage: net rpc registry getvalue <key> " + d_fprintf(stderr, _("usage:"),_(" net rpc registry getvalue <key> " "<valuename>\n")); return -1; } @@ -740,7 +740,7 @@ static int rpc_registry_createkey(struct net_context *c, int argc, { if (argc != 1 || c->display_usage) { d_fprintf(stderr, - _("usage: net rpc registry createkey <key>\n")); + _("usage:"),_(" net rpc registry createkey <key>\n")); return -1; } @@ -790,7 +790,7 @@ static int rpc_registry_deletekey(struct net_context *c, int argc, const char ** { if (argc != 1 || c->display_usage) { d_fprintf(stderr, - _("usage: net rpc registry deletekey <key>\n")); + _("usage:"),_(" net rpc registry deletekey <key>\n")); return -1; } @@ -820,9 +820,9 @@ static NTSTATUS rpc_registry_enumerate_internal(struct net_context *c, struct registry_value **values = NULL; if (argc != 1 || c->display_usage) { - d_printf(_("Usage: net rpc registry enumerate <path>\n")); - d_printf(_("Example: net rpc registry enumerate " - "'HKLM\\Software\\Samba'\n")); + d_printf(_("Usage:"),_(" net rpc registry enumerate <path>\n")); + d_printf(_("Example:")," net rpc registry enumerate " + "'HKLM\\Software\\Samba'\n"); return NT_STATUS_INVALID_PARAMETER; } @@ -892,7 +892,7 @@ static NTSTATUS rpc_registry_save_internal(struct net_context *c, struct winreg_String filename; if (argc != 2 || c->display_usage) { - d_printf(_("Usage: net rpc registry backup <path> " + d_printf(_("Usage:"),_(" net rpc registry backup <path> " "<file> \n")); return NT_STATUS_INVALID_PARAMETER; } @@ -1080,7 +1080,7 @@ static int rpc_registry_dump(struct net_context *c, int argc, const char **argv) REGF_NK_REC *nk; if (argc != 1 || c->display_usage) { - d_printf(_("Usage: net rpc registry dump <file> \n")); + d_printf(_("Usage:"),_(" net rpc registry dump <file> \n")); return -1; } @@ -1124,7 +1124,7 @@ static int rpc_registry_copy(struct net_context *c, int argc, const char **argv int result = 1; if (argc != 2 || c->display_usage) { - d_printf(_("Usage: net rpc registry copy <srcfile> " + d_printf(_("Usage:"),_(" net rpc registry copy <srcfile> " "<newfile>\n")); return -1; } @@ -1196,10 +1196,10 @@ static NTSTATUS rpc_registry_getsd_internal(struct net_context *c, SEC_FLAG_SYSTEM_SECURITY; if (argc <1 || argc > 2 || c->display_usage) { - d_printf(_("Usage: net rpc registry getsd <path> " + d_printf(_("Usage:"),_(" net rpc registry getsd <path> " "<secinfo>\n")); - d_printf(_("Example: net rpc registry getsd " - "'HKLM\\Software\\Samba'\n")); + d_printf(_("Example:")," net rpc registry getsd " + "'HKLM\\Software\\Samba'\n"); return NT_STATUS_INVALID_PARAMETER; } diff --git a/source3/utils/net_rpc_rights.c b/source3/utils/net_rpc_rights.c index fca73c0200..355a226198 100644 --- a/source3/utils/net_rpc_rights.c +++ b/source3/utils/net_rpc_rights.c @@ -413,8 +413,8 @@ static NTSTATUS rpc_rights_list_internal(struct net_context *c, /* backward comaptibility: if no keyword provided, treat the key as an account name */ if (argc > 1) { - d_printf(_("Usage: net rpc rights list [[accounts|privileges] " - "[name|SID]]\n")); + d_printf(_("Usage:")," net rpc rights list [[accounts|privileges] " + "[name|SID]]\n"); result = NT_STATUS_OK; goto done; } @@ -451,7 +451,7 @@ static NTSTATUS rpc_rights_grant_internal(struct net_context *c, DOM_SID sid; if (argc < 2 ) { - d_printf(_("Usage: net rpc rights grant <name|SID> " + d_printf(_("Usage:"),_(" net rpc rights grant <name|SID> " "<rights...>\n")); return NT_STATUS_OK; } @@ -521,7 +521,7 @@ static NTSTATUS rpc_rights_revoke_internal(struct net_context *c, int i; if (argc < 2 ) { - d_printf(_("Usage: net rpc rights revoke <name|SID> " + d_printf(_("Usage:"),_(" net rpc rights revoke <name|SID> " "<rights...>\n")); return NT_STATUS_OK; } @@ -577,8 +577,8 @@ done: static int rpc_rights_list(struct net_context *c, int argc, const char **argv ) { if (c->display_usage) { - d_printf(_("Usage:\n" - "net rpc rights list [{accounts|privileges} " + d_printf(_("Usage:\n"), + _("net rpc rights list [{accounts|privileges} " "[name|SID]]\n" " View available/assigned privileges\n")); return 0; @@ -594,8 +594,8 @@ static int rpc_rights_list(struct net_context *c, int argc, const char **argv ) static int rpc_rights_grant(struct net_context *c, int argc, const char **argv ) { if (c->display_usage) { - d_printf(_("Usage:\n" - "net rpc rights grant <name|SID> <right>\n" + d_printf(_("Usage:\n"), + _("net rpc rights grant <name|SID> <right>\n" " Assign privilege[s]\n")); d_printf(_("For example:\n" " net rpc rights grant 'VALE\\biddle' " @@ -615,8 +615,8 @@ static int rpc_rights_grant(struct net_context *c, int argc, const char **argv ) static int rpc_rights_revoke(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" - "net rpc rights revoke <name|SID> <right>\n" + d_printf(_("Usage:\n"), + _("net rpc rights revoke <name|SID> <right>\n" " Revoke privilege[s]\n")); d_printf(_("For example:\n" " net rpc rights revoke 'VALE\\biddle' " diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c index 89568eef94..b6b5b21542 100644 --- a/source3/utils/net_rpc_samsync.c +++ b/source3/utils/net_rpc_samsync.c @@ -252,9 +252,9 @@ NTSTATUS rpc_vampire_internals(struct net_context *c, int rpc_vampire_passdb(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc vampire passdb\n" - " Dump remote SAM database to passdb\n")); + " ",_("Dump remote SAM database to passdb\n")); return 0; } @@ -333,9 +333,9 @@ NTSTATUS rpc_vampire_ldif_internals(struct net_context *c, int rpc_vampire_ldif(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc vampire ldif\n" - " Dump remote SAM database to LDIF file or " + " ",_("Dump remote SAM database to LDIF file or " "stdout\n")); return 0; } @@ -477,8 +477,8 @@ int rpc_vampire_keytab(struct net_context *c, int argc, const char **argv) struct net_dc_info dc_info; if (c->display_usage || (argc < 1)) { - d_printf(_("Usage:\n" - "net rpc vampire keytab <keytabfile>\n" + d_printf(_("Usage:\n"), + _("net rpc vampire keytab <keytabfile>\n" " Dump remote SAM database to Kerberos keytab " "file\n")); return 0; diff --git a/source3/utils/net_rpc_service.c b/source3/utils/net_rpc_service.c index 4edf94e8d9..55bd40dec8 100644 --- a/source3/utils/net_rpc_service.c +++ b/source3/utils/net_rpc_service.c @@ -215,7 +215,7 @@ static NTSTATUS rpc_service_list_internal(struct net_context *c, uint32_t resume_handle = 0; if (argc != 0 ) { - d_printf(_("Usage: net rpc service list\n")); + d_printf(_("Usage:")," net rpc service list\n"); return NT_STATUS_OK; } @@ -324,7 +324,7 @@ static NTSTATUS rpc_service_status_internal(struct net_context *c, uint32_t ret_size = 0; if (argc != 1 ) { - d_printf(_("Usage: net rpc service status <service>\n")); + d_printf(_("Usage:")," net rpc service status <service>\n"); return NT_STATUS_OK; } @@ -456,7 +456,7 @@ static NTSTATUS rpc_service_stop_internal(struct net_context *c, fstring servicename; if (argc != 1 ) { - d_printf(_("Usage: net rpc service status <service>\n")); + d_printf(_("Usage:")," net rpc service status <service>\n"); return NT_STATUS_OK; } @@ -502,7 +502,7 @@ static NTSTATUS rpc_service_pause_internal(struct net_context *c, fstring servicename; if (argc != 1 ) { - d_printf(_("Usage: net rpc service status <service>\n")); + d_printf(_("Usage:")," net rpc service status <service>\n"); return NT_STATUS_OK; } @@ -548,7 +548,7 @@ static NTSTATUS rpc_service_resume_internal(struct net_context *c, fstring servicename; if (argc != 1 ) { - d_printf(_("Usage: net rpc service status <service>\n")); + d_printf(_("Usage:")," net rpc service status <service>\n"); return NT_STATUS_OK; } @@ -594,7 +594,7 @@ static NTSTATUS rpc_service_start_internal(struct net_context *c, uint32 state = 0; if (argc != 1 ) { - d_printf(_("Usage: net rpc service status <service>\n")); + d_printf(_("Usage:")," net rpc service status <service>\n"); return NT_STATUS_OK; } @@ -674,7 +674,7 @@ static NTSTATUS rpc_service_delete_internal(struct net_context *c, NTSTATUS status; if (argc != 1 ) { - d_printf(_("Usage: net rpc service delete <service>\n")); + d_printf(_("Usage:")," net rpc service delete <service>\n"); return NT_STATUS_OK; } @@ -752,8 +752,8 @@ static NTSTATUS rpc_service_create_internal(struct net_context *c, const char *binary_path; if (argc != 3) { - d_printf(_("Usage: net rpc service create <service> " - "<displayname> <binarypath>\n")); + d_printf(_("Usage:")," net rpc service create <service> " + "<displayname> <binarypath>\n"); return NT_STATUS_OK; } @@ -821,9 +821,9 @@ static NTSTATUS rpc_service_create_internal(struct net_context *c, static int rpc_service_list(struct net_context *c, int argc, const char **argv ) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc service list\n" - " View configured Win32 services\n")); + " ",_("View configured Win32 services\n")); return 0; } @@ -837,9 +837,9 @@ static int rpc_service_list(struct net_context *c, int argc, const char **argv ) static int rpc_service_start(struct net_context *c, int argc, const char **argv ) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc service start <service>\n" - " Start a Win32 service\n")); + " ",_("Start a Win32 service\n")); return 0; } @@ -853,9 +853,9 @@ static int rpc_service_start(struct net_context *c, int argc, const char **argv static int rpc_service_stop(struct net_context *c, int argc, const char **argv ) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc service stop <service>\n" - " Stop a Win32 service\n")); + " ",_("Stop a Win32 service\n")); return 0; } @@ -869,9 +869,9 @@ static int rpc_service_stop(struct net_context *c, int argc, const char **argv ) static int rpc_service_resume(struct net_context *c, int argc, const char **argv ) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc service resume <service>\n" - " Resume a Win32 service\n")); + " ",_("Resume a Win32 service\n")); return 0; } @@ -885,9 +885,9 @@ static int rpc_service_resume(struct net_context *c, int argc, const char **argv static int rpc_service_pause(struct net_context *c, int argc, const char **argv ) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc service pause <service>\n" - " Pause a Win32 service\n")); + " ",_("Pause a Win32 service\n")); return 0; } @@ -901,9 +901,9 @@ static int rpc_service_pause(struct net_context *c, int argc, const char **argv static int rpc_service_status(struct net_context *c, int argc, const char **argv ) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc service status <service>\n" - " Show the current status of a service\n")); + " ",_("Show the current status of a service\n")); return 0; } @@ -917,9 +917,9 @@ static int rpc_service_status(struct net_context *c, int argc, const char **argv static int rpc_service_delete(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc service delete <service>\n" - " Delete a Win32 service\n")); + " ",_("Delete a Win32 service\n")); return 0; } @@ -933,9 +933,9 @@ static int rpc_service_delete(struct net_context *c, int argc, const char **argv static int rpc_service_create(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net rpc service create <service>\n" - " Create a Win32 service\n")); + " ",_("Create a Win32 service\n")); return 0; } diff --git a/source3/utils/net_rpc_sh_acct.c b/source3/utils/net_rpc_sh_acct.c index efd90abb30..2f0b0ea764 100644 --- a/source3/utils/net_rpc_sh_acct.c +++ b/source3/utils/net_rpc_sh_acct.c @@ -155,7 +155,7 @@ static int account_show(struct net_context *c, int argc, const char **argv) { if (argc != 0) { - d_fprintf(stderr, _("usage: %s\n"), ctx->whoami); + d_fprintf(stderr, _("usage:")," %s\n"), ctx->whoami; return -1; } @@ -226,7 +226,7 @@ static int account_set_badpw(struct net_context *c, int argc, const char **argv) { if (argc != 1) { - d_fprintf(stderr, _("usage: %s <count>\n"), ctx->whoami); + d_fprintf(stderr, _("usage:")," %s <count>\n"), ctx->whoami; return -1; } diff --git a/source3/utils/net_rpc_shell.c b/source3/utils/net_rpc_shell.c index 39ef1cedcd..fdfb2f3beb 100644 --- a/source3/utils/net_rpc_shell.c +++ b/source3/utils/net_rpc_shell.c @@ -214,8 +214,8 @@ int net_rpc_shell(struct net_context *c, int argc, const char **argv) struct rpc_sh_ctx *ctx; if (argc != 0 || c->display_usage) { - d_printf(_("Usage:\n" - "net rpc shell\n")); + d_printf(_("Usage:\n"), + "net rpc shell\n"); return -1; } diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c index fe84ce4674..c3b328bae5 100644 --- a/source3/utils/net_sam.c +++ b/source3/utils/net_sam.c @@ -37,7 +37,7 @@ static int net_sam_userset(struct net_context *c, int argc, const char **argv, NTSTATUS status; if (argc != 2 || c->display_usage) { - d_fprintf(stderr, _("usage: net sam set %s <user> <value>\n"), + d_fprintf(stderr, _("usage:"),_(" net sam set %s <user> <value>\n"), field); return -1; } @@ -142,7 +142,7 @@ static int net_sam_set_userflag(struct net_context *c, int argc, if ((argc != 2) || c->display_usage || (!strequal(argv[1], "yes") && !strequal(argv[1], "no"))) { - d_fprintf(stderr, _("usage: net sam set %s <user> [yes|no]\n"), + d_fprintf(stderr, _("usage:"),_(" net sam set %s <user> [yes|no]\n"), field); return -1; } @@ -234,7 +234,7 @@ static int net_sam_set_pwdmustchangenow(struct net_context *c, int argc, (!strequal(argv[1], "yes") && !strequal(argv[1], "no"))) { d_fprintf(stderr, - _("usage: net sam set pwdmustchangenow <user> " + _("usage:"),_(" net sam set pwdmustchangenow <user> " "[yes|no]\n")); return -1; } @@ -297,7 +297,7 @@ static int net_sam_set_comment(struct net_context *c, int argc, NTSTATUS status; if (argc != 2 || c->display_usage) { - d_fprintf(stderr, _("usage: net sam set comment <name> " + d_fprintf(stderr, _("usage:"),_(" net sam set comment <name> " "<comment>\n")); return -1; } @@ -461,7 +461,7 @@ static int net_sam_policy_set(struct net_context *c, int argc, const char **argv char *endptr; if (argc != 2 || c->display_usage) { - d_fprintf(stderr, _("usage: net sam policy set " + d_fprintf(stderr, _("usage:"),_(" net sam policy set " "\"<account policy>\" <value> \n")); return -1; } @@ -527,7 +527,7 @@ static int net_sam_policy_show(struct net_context *c, int argc, const char **arg enum pdb_policy_type field; if (argc != 1 || c->display_usage) { - d_fprintf(stderr, _("usage: net sam policy show" + d_fprintf(stderr, _("usage:"),_(" net sam policy show" " \"<account policy>\" \n")); return -1; } @@ -572,9 +572,9 @@ static int net_sam_policy_list(struct net_context *c, int argc, const char **arg int i; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net sam policy list\n" - " List account policies\n")); + " ",_("List account policies\n")); return 0; } @@ -631,8 +631,8 @@ static int net_sam_rights_list(struct net_context *c, int argc, SE_PRIV mask; if (argc > 1 || c->display_usage) { - d_fprintf(stderr, - _("usage: net sam rights list [privilege name]\n")); + d_fprintf(stderr, _("usage:"), + _(" net sam rights list [privilege name]\n")); return -1; } @@ -687,7 +687,7 @@ static int net_sam_rights_grant(struct net_context *c, int argc, int i; if (argc < 2 || c->display_usage) { - d_fprintf(stderr, _("usage: net sam rights grant <name> " + d_fprintf(stderr, _("usage:"),_(" net sam rights grant <name> " "<rights> ...\n")); return -1; } @@ -725,7 +725,7 @@ static int net_sam_rights_revoke(struct net_context *c, int argc, int i; if (argc < 2 || c->display_usage) { - d_fprintf(stderr, _("usage: net sam rights revoke <name> " + d_fprintf(stderr, _("usage:"),_(" net sam rights revoke <name> " "<rights>\n")); return -1; } @@ -852,7 +852,7 @@ static int net_sam_mapunixgroup(struct net_context *c, int argc, const char **ar struct group *grp; if (argc != 1 || c->display_usage) { - d_fprintf(stderr, _("usage: net sam mapunixgroup <name>\n")); + d_fprintf(stderr, _("usage:"),_(" net sam mapunixgroup <name>\n")); return -1; } @@ -914,7 +914,7 @@ static int net_sam_unmapunixgroup(struct net_context *c, int argc, const char ** struct group *grp; if (argc != 1 || c->display_usage) { - d_fprintf(stderr, _("usage: net sam unmapunixgroup <name>\n")); + d_fprintf(stderr, _("usage:"),_(" net sam unmapunixgroup <name>\n")); return -1; } @@ -950,7 +950,7 @@ static int net_sam_createdomaingroup(struct net_context *c, int argc, if (argc != 1 || c->display_usage) { d_fprintf(stderr, - _("usage: net sam createdomaingroup <name>\n")); + _("usage:"),_(" net sam createdomaingroup <name>\n")); return -1; } @@ -981,7 +981,7 @@ static int net_sam_deletedomaingroup(struct net_context *c, int argc, NTSTATUS status; if (argc != 1 || c->display_usage) { - d_fprintf(stderr,_("usage: net sam deletelocalgroup <name>\n")); + d_fprintf(stderr,_("usage:"),_(" net sam deletelocalgroup <name>\n")); return -1; } @@ -1022,7 +1022,7 @@ static int net_sam_createlocalgroup(struct net_context *c, int argc, const char uint32 rid; if (argc != 1 || c->display_usage) { - d_fprintf(stderr,_("usage: net sam createlocalgroup <name>\n")); + d_fprintf(stderr,_("usage:"),_(" net sam createlocalgroup <name>\n")); return -1; } @@ -1057,7 +1057,7 @@ static int net_sam_deletelocalgroup(struct net_context *c, int argc, const char NTSTATUS status; if (argc != 1 || c->display_usage) { - d_fprintf(stderr,_("usage: net sam deletelocalgroup <name>\n")); + d_fprintf(stderr,_("usage:"),_(" net sam deletelocalgroup <name>\n")); return -1; } @@ -1100,7 +1100,7 @@ static int net_sam_createbuiltingroup(struct net_context *c, int argc, const cha if (argc != 1 || c->display_usage) { d_fprintf(stderr, - _("usage: net sam createbuiltingroup <name>\n")); + _("usage:"),_(" net sam createbuiltingroup <name>\n")); return -1; } @@ -1152,7 +1152,7 @@ static int net_sam_addmem(struct net_context *c, int argc, const char **argv) NTSTATUS status; if (argc != 2 || c->display_usage) { - d_fprintf(stderr,_("usage: net sam addmem <group> <member>\n")); + d_fprintf(stderr,_("usage:"),_(" net sam addmem <group> <member>\n")); return -1; } @@ -1239,7 +1239,7 @@ static int net_sam_delmem(struct net_context *c, int argc, const char **argv) NTSTATUS status; if (argc != 2 || c->display_usage) { - d_fprintf(stderr,_("usage: net sam delmem <group> <member>\n")); + d_fprintf(stderr,_("usage:"),_(" net sam delmem <group> <member>\n")); return -1; } @@ -1311,7 +1311,7 @@ static int net_sam_listmem(struct net_context *c, int argc, const char **argv) NTSTATUS status; if (argc != 1 || c->display_usage) { - d_fprintf(stderr, _("usage: net sam listmem <group>\n")); + d_fprintf(stderr, _("usage:"),_(" net sam listmem <group>\n")); return -1; } @@ -1385,7 +1385,7 @@ static int net_sam_do_list(struct net_context *c, int argc, const char **argv, if ((argc > 1) || c->display_usage || ((argc == 1) && !strequal(argv[0], "verbose"))) { - d_fprintf(stderr,_("usage: net sam list %s [verbose]\n"), what); + d_fprintf(stderr,_("usage:"),_(" net sam list %s [verbose]\n"), what); return -1; } @@ -1518,7 +1518,7 @@ static int net_sam_show(struct net_context *c, int argc, const char **argv) const char *dom, *name; if (argc != 1 || c->display_usage) { - d_fprintf(stderr, _("usage: net sam show <name>\n")); + d_fprintf(stderr, _("usage:"),_(" net sam show <name>\n")); return -1; } @@ -1556,9 +1556,9 @@ static int net_sam_provision(struct net_context *c, int argc, const char **argv) struct passwd *pwd; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net sam provision\n" - " Init an LDAP tree with default " + " ",_("Init an LDAP tree with default " "users/groups\n")); return 0; } diff --git a/source3/utils/net_status.c b/source3/utils/net_status.c index e7f3d33d55..d49470a187 100644 --- a/source3/utils/net_status.c +++ b/source3/utils/net_status.c @@ -63,9 +63,9 @@ static int net_status_sessions(struct net_context *c, int argc, const char **arg bool parseable; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net status sessions [parseable]\n" - " Display open user sessions.\n" + " ",_("Display open user sessions.\n" " If parseable is specified, output is machine-" "readable.\n")); return 0; @@ -213,9 +213,9 @@ static int net_status_shares_parseable(struct net_context *c, int argc, const ch static int net_status_shares(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net status shares [parseable]\n" - " Display open user shares.\n" + " ",_("Display open user shares.\n" " If parseable is specified, output is machine-" "readable.\n")); return 0; diff --git a/source3/utils/net_time.c b/source3/utils/net_time.c index c53593d556..1ed36238da 100644 --- a/source3/utils/net_time.c +++ b/source3/utils/net_time.c @@ -133,9 +133,9 @@ static int net_time_system(struct net_context *c, int argc, const char **argv) time_t t; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net time system\n" - " Output remote time server time in a format " + " ",_("Output remote time server time in a format " "ready for /bin/date\n")); return 0; } @@ -157,9 +157,9 @@ static int net_time_zone(struct net_context *c, int argc, const char **argv) time_t t; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net time zone\n" - " Display the remote time server's offset to " + " ",_("Display the remote time server's offset to " "UTC\n")); return 0; } @@ -217,9 +217,9 @@ int net_time(struct net_context *c, int argc, const char **argv) } if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net time\n" - " Display the remote time server's time\n")); + " ",_("Display the remote time server's time\n")); net_display_usage_from_functable(func); return 0; } diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c index 2a42c87e2e..3560a9bd3b 100644 --- a/source3/utils/net_util.c +++ b/source3/utils/net_util.c @@ -50,8 +50,8 @@ NTSTATUS net_rpc_lookup_name(struct net_context *c, SEC_FLAG_MAXIMUM_ALLOWED, &pol); if (!NT_STATUS_IS_OK(result)) { - d_fprintf(stderr, _("open_policy failed: %s\n"), - nt_errstr(result)); + d_fprintf(stderr, "open_policy ",_("failed"),": %s\n"), + nt_errstr(result); return result; } |