special treatment should be disabled.
* ftp_var.h (recvrequest): Update declaration.
* cmds.c (remglob, ls, mls): Pass 0 as the extra argument.
(mget): Pass 1.
(getit): Pass 1 iff only one filename was supplied.
ticket: 1351
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15626
dc483132-0cff-0310-8789-
dd5450dbe970
+2003-06-16 Ken Raeburn <raeburn@mit.edu>
+
+ * ftp.c (recvrequest): Add new argument indicating whether "-" and
+ "|..." special treatment should be disabled.
+ * ftp_var.h (recvrequest): Update declaration.
+ * cmds.c (remglob, ls, mls): Pass 0 as the extra argument.
+ (mget): Pass 1.
+ (getit): Pass 1 iff only one filename was supplied.
+
2003-06-05 Sam Hartman <hartmans@mit.edu>
* pclose.c (mypopen): use fork not vfork
}
recvrequest("RETR", argv[2], argv[1], rmode,
- argv[1] != oldargv1 || argv[2] != oldargv2);
+ argv[1] != oldargv1 || argv[2] != oldargv2, loc);
restart_point = 0;
return (0);
}
tp = domap(tp);
}
recvrequest("RETR", tp, cp, "w",
- tp != cp || !interactive);
+ tp != cp || !interactive, 1);
if (!mflag && fromatty) {
ointer = interactive;
interactive = 1;
pswitch(!proxy);
}
for (rmode = "w"; *++argv != NULL; rmode = "a")
- recvrequest ("NLST", temp, *argv, rmode, 0);
+ recvrequest ("NLST", temp, *argv, rmode, 0, 0);
if (doswitch) {
pswitch(!proxy);
}
code = -1;
return;
}
- recvrequest(cmd, argv[2], argv[1], "w", 0);
+ recvrequest(cmd, argv[2], argv[1], "w", 0, 0);
}
/*
(void) setjmp(jabort);
for (i = 1; mflag && i < argc-1; ++i) {
*rmode = (i == 1) ? 'w' : 'a';
- recvrequest(cmd, dest, argv[i], rmode, 0);
+ recvrequest(cmd, dest, argv[i], rmode, 0, 0);
if (!mflag && fromatty) {
ointer = interactive;
interactive = 1;
}
void recvrequest(char *cmd, char *volatile local, char *remote, char *lmode,
- int printnames)
+ int printnames, int fnameonly)
{
FILE *volatile fout, *volatile din = 0, *popen();
int (*volatile closefunc)(), pclose(), fclose();
return;
}
oldintr = signal(SIGINT, abortrecv);
- if (strcmp(local, "-") && *local != '|') {
+ if (fnameonly || (strcmp(local, "-") && *local != '|')) {
if (access(local, 2) < 0) {
char *dir = strrchr(local, '/');
din = dataconn("r");
if (din == NULL)
goto die;
- if (strcmp(local, "-") == 0)
+ if (strcmp(local, "-") == 0 && !fnameonly)
fout = stdout;
- else if (*local == '|') {
+ else if (*local == '|' && !fnameonly) {
#ifdef SIGPIPE
oldintp = signal(SIGPIPE, SIG_IGN);
#endif
/* ftp.c */
void sendrequest (char *, char *, char *, int);
-void recvrequest (char *, char *volatile, char *, char *, int);
+void recvrequest (char *, char *volatile, char *, char *, int, int);
int login (char *);
void setpbsz (unsigned int);
void pswitch (int);