From 66de52c4f4527ef43cfaf11c55616ec7602cce85 Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Tue, 19 Jan 2010 11:43:54 +0100 Subject: s3 net: Fix compile warnings --- source3/utils/net_ads.c | 125 +++++++++++++++++++++++++++++++----------------- 1 file changed, 80 insertions(+), 45 deletions(-) (limited to 'source3/utils/net_ads.c') diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index 8e9f412d6c..eff664fcb4 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -128,9 +128,11 @@ static int net_ads_lookup(struct net_context *c, int argc, const char **argv) int ret; if (c->display_usage) { - d_printf(_("Usage:\n"), - "net ads lookup\n" - " ",_("Find the ADS DC using CLDAP lookup.\n")); + d_printf("%s\n" + "net ads lookup\n" + " %s", + _("Usage:"), + _("Find the ADS DC using CLDAP lookup.\n")); return 0; } @@ -158,10 +160,11 @@ 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("%s\n" + "net ads info\n" + " %s", + _("Usage:"), + _("Display information about an Active Directory " "server.\n")); return 0; } @@ -373,9 +376,11 @@ 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 ("%s\n" "net ads workgroup\n" - " ",_("Print the workgroup name\n")); + " %s\n", + _("Usage:"), + _("Print the workgroup name")); return 0; } @@ -698,9 +703,11 @@ 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( "%s\n" "net ads user\n" - " ",_("List AD users\n")); + " %s\n", + _("Usage:"), + _("List AD users")); net_display_usage_from_functable(func); return 0; } @@ -849,9 +856,11 @@ 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( "%s\n" "net ads group\n" - " ", _("List AD groups\n")); + " %s\n", + _("Usage:"), + _("List AD groups")); net_display_usage_from_functable(func); return 0; } @@ -883,9 +892,11 @@ 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( "%s\n" "net ads status\n" - " ",_("Display machine account details\n")); + " %s\n", + _("Usage:"), + _("Display machine account details")); return 0; } @@ -925,9 +936,11 @@ 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( "%s\n" "net ads leave\n" - " ", _("Leave an AD domain\n")); + " %s\n", + _("Usage:"), + _("Leave an AD domain")); return 0; } @@ -1038,9 +1051,11 @@ 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( "%s\n" "net ads testjoin\n" - " ", _("Test if the existing join is ok\n")); + " %s\n", + _("Usage:"), + _("Test if the existing join is ok")); return 0; } @@ -1539,9 +1554,11 @@ 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( "%s\n" "net ads printer search\n" - " ", _("List printers in the AD\n")); + " %s\n", + _("Usage:"), + _("List printers in the AD")); return 0; } @@ -1579,8 +1596,9 @@ 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("%s\n%s", + _("Usage:"), + _("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")); @@ -1643,8 +1661,9 @@ 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 [servername]\n" + d_printf("%s\n%s", + _("Usage:"), + _("net ads printer publish [servername]\n" " Publish printer in AD\n" " printername\tName of the printer\n" " servername\tName of the print server\n")); @@ -1769,8 +1788,9 @@ 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 [servername]\n" + d_printf("%s\n%s", + _("Usage:"), + _("net ads printer remove [servername]\n" " Remove a printer from the AD\n" " printername\tName of the printer\n" " servername\tName of the print server\n")); @@ -1872,8 +1892,9 @@ 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 \n" + d_printf("%s\n%s", + _("Usage:"), + _("net ads password \n" " Change password for user\n" " username\tName of user to change password for\n")); return 0; @@ -1955,9 +1976,11 @@ 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( "%s\n" "net ads changetrustpw\n" - " ", _("Change the machine account's trust password\n")); + " %s\n", + _("Usage:"), + _("Change the machine account's trust password")); return 0; } @@ -2196,9 +2219,11 @@ 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( "%s\n" "net ads keytab flush\n" - " ", _("Delete the whole keytab\n")); + " %s\n", + _("Usage:"), + _("Delete the whole keytab")); return 0; } @@ -2217,8 +2242,9 @@ 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 ...]\n" + d_printf("%s\n%s", + _("Usage:"), + _("net ads keytab add [principal ...]\n" " Add principals to local keytab\n" " principal\tKerberos principal to add to " "keytab\n")); @@ -2242,9 +2268,11 @@ 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( "%s\n" "net ads keytab create\n" - " ", _("Create new default keytab\n")); + " %s\n", + _("Usage:"), + _("Create new default keytab")); return 0; } @@ -2261,8 +2289,9 @@ 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("%s\n%s", + _("Usage:"), + _("net ads keytab list [keytab]\n" " List a local keytab\n" " keytab\tKeytab to list\n")); return 0; @@ -2327,9 +2356,11 @@ 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( "%s\n" "net ads kerberos renew\n" - " ", _("Renew TGT from existing credential cache\n")); + " %s\n", + _("Usage:"), + _("Renew TGT from existing credential cache")); return 0; } @@ -2351,9 +2382,11 @@ 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( "%s\n" "net ads kerberos pac\n" - " ", _("Dump the Kerberos PAC\n")); + " %s\n", + _("Usage:"), + _("Dump the Kerberos PAC")); return 0; } @@ -2406,9 +2439,11 @@ 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( "%s\n" "net ads kerberos kinit\n" - " ", _("Get Ticket Granting Ticket (TGT) for the user\n")); + " %s\n", + _("Usage:"), + _("Get Ticket Granting Ticket (TGT) for the user")); return 0; } -- cgit