Initial import
[samba] / packaging / Debian / debian-sarge / patches / smbclient-tar.patch.unused
1 diff -uNr samba-3.0.0beta2.orig/source/client/client.c samba-3.0.0beta2/source/client/client.c
2 --- samba-3.0.0beta2.orig/source/client/client.c        2003-07-01 22:36:24.000000000 -0500
3 +++ samba-3.0.0beta2/source/client/client.c     2003-07-06 15:17:36.000000000 -0500
4 @@ -2773,6 +2773,7 @@
5         int opt;
6         pstring query_host;
7         BOOL message = False;
8 +       char* tar_args = NULL;
9         extern char tar_type;
10         pstring term_code;
11         static const char *new_name_resolve_order = NULL;
12 @@ -2816,7 +2817,7 @@
13                         max_protocol = interpret_protocol(poptGetOptArg(pc), max_protocol);
14                         break;
15                 case 'T':
16 -                       if (!tar_parseargs(argc, argv, poptGetOptArg(pc), optind)) {
17 +                       if (!(tar_args = poptGetOptArg(pc))) {
18                                 poptPrintUsage(pc, stderr, 0);
19                                 exit(1);
20                         }
21 @@ -2917,6 +2917,22 @@
22                 pstrcpy(cmdline_auth_info.password,poptGetArg(pc));  
23         }
24  
25 +       /* The tar command may take a number of string options; pass
26 +          everything we have left to tar_parseargs(). */
27 +       if (tar_args) {
28 +               const char **argv2 = poptGetArgs(pc);
29 +               int argc2 = 0;
30 +
31 +               if (argv2) {
32 +                       while (argv2[argc2]) argc2++;
33 +               }
34 +               
35 +               if (!tar_parseargs(argc2, argv2, tar_args, 0)) {
36 +                       poptPrintUsage(pc, stderr, 0);
37 +                       exit(1);
38 +               }
39 +       }
40 +
41         init_names();
42  
43         if(new_name_resolve_order)