diff options
author | Jeremy Allison <jra@samba.org> | 2001-04-08 20:22:39 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-04-08 20:22:39 +0000 |
commit | f9a15ce1a69f905e94db7650f0a4805720cd9c88 (patch) | |
tree | ee37b735477fe7eaea7cb16a30d126971aae8d5b /source3/rpcclient | |
parent | 607d5d508d091d6c9b9cd6549b2a89f7359d780c (diff) | |
download | samba-f9a15ce1a69f905e94db7650f0a4805720cd9c88.tar.gz samba-f9a15ce1a69f905e94db7650f0a4805720cd9c88.tar.bz2 samba-f9a15ce1a69f905e94db7650f0a4805720cd9c88.zip |
Got "medieval on our ass" about adding the -1 to slprintf.
Jeremy.
(This used to be commit 94747b4639ed9b19f7d0fb896e43aa392a84989a)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r-- | source3/rpcclient/cmd_samr.c | 8 | ||||
-rw-r--r-- | source3/rpcclient/cmd_spoolss.c | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index ca9469aede..b3d135275a 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -120,7 +120,7 @@ static uint32 cmd_samr_query_user(struct cli_state *cli, int argc, char **argv) return NT_STATUS_UNSUCCESSFUL; } - slprintf (server, sizeof(fstring), "\\\\%s", cli->desthost); + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); if ((result = cli_samr_connect(cli, server, MAXIMUM_ALLOWED_ACCESS, @@ -239,7 +239,7 @@ static uint32 cmd_samr_query_group(struct cli_state *cli, int argc, char **argv) return NT_STATUS_UNSUCCESSFUL; } - slprintf (server, sizeof(fstring), "\\\\%s", cli->desthost); + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); if ((result = cli_samr_connect(cli, server, MAXIMUM_ALLOWED_ACCESS, @@ -319,7 +319,7 @@ static uint32 cmd_samr_query_usergroups(struct cli_state *cli, int argc, char ** return NT_STATUS_UNSUCCESSFUL; } - slprintf (server, sizeof(fstring), "\\\\%s", cli->desthost); + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); if ((result = cli_samr_connect(cli, server, MAXIMUM_ALLOWED_ACCESS, @@ -396,7 +396,7 @@ static uint32 cmd_samr_query_groupmem(struct cli_state *cli, int argc, char **ar return NT_STATUS_UNSUCCESSFUL; } - slprintf (server, sizeof(fstring), "\\\\%s", cli->desthost); + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); if ((result = cli_samr_connect(cli, server, MAXIMUM_ALLOWED_ACCESS, diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index 0b45767afe..157abb27f5 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -158,7 +158,7 @@ static uint32 cmd_spoolss_open_printer_ex(struct cli_state *cli, int argc, char return NT_STATUS_UNSUCCESSFUL; - slprintf (server, sizeof(fstring), "\\\\%s", cli->desthost); + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); fstrcpy (user, cli->user_name); fstrcpy (printername, argv[1]); @@ -503,9 +503,9 @@ static uint32 cmd_spoolss_getprinter(struct cli_state *cli, int argc, char **arg info_level = atoi(argv[2]); } - slprintf (servername, sizeof(fstring), "\\\\%s", cli->desthost); + slprintf (servername, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (servername); - slprintf (printername, sizeof(fstring), "\\\\%s\\%s", servername, argv[1]); + slprintf (printername, sizeof(fstring)-1, "\\\\%s\\%s", servername, argv[1]); fstrcpy (username, cli->user_name); /* get a printer handle */ @@ -691,7 +691,7 @@ static uint32 cmd_spoolss_getdriver(struct cli_state *cli, int argc, char **argv } /* get the arguments need to open the printer handle */ - slprintf (server, sizeof(fstring), "\\\\%s", cli->desthost); + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); fstrcpy (user, cli->user_name); fstrcpy (printername, argv[1]); @@ -789,7 +789,7 @@ static uint32 cmd_spoolss_enum_drivers(struct cli_state *cli, int argc, char **a } /* get the arguments need to open the printer handle */ - slprintf (server, sizeof(fstring), "\\\\%s", cli->desthost); + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); if (argc == 2) info_level = atoi(argv[1]); @@ -1091,7 +1091,7 @@ static uint32 cmd_spoolss_addprinterex (struct cli_state *cli, int argc, char ** return NT_STATUS_NOPROBLEMO; } - slprintf (server, sizeof(fstring), "\\\\%s", cli->desthost); + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); /* Initialise RPC connection */ |