Version 2.2
RPC pipe client
- Copyright (C) Tim Potter 2000
+ Copyright (C) Tim Potter 2000-2001
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Print usage information */
static void usage(void)
{
- printf("Usage: rpcclient [options] server\n");
+ printf("Usage: rpcclient server [options]\n");
printf("\t-A authfile file containing user credentials\n");
printf("\t-c \"command string\" execute semicolon separated cmds\n");
argc -= optind;
/* Parse options */
- if (argc < 1) {
+ if (argc > 1) {
usage();
return 0;
}
+ if (strncmp("//", argv[0], 2) == 0 ||
+ strncmp("\\\\", argv[0], 2) == 0)
+ argv[0] += 2;
+
pstrcpy(server, argv[0]);
/* the following functions are part of the Samba debugging