* ftpd.c: Declare secure_fprintf, gunique, sgetsave, sgetpwnam,
path_expand static.
* ftpd_var.h: Add prototypes for getline, renamefrom, ftpd_popen,
ftpd_pclose.
* ftpcmd.y: Declare lookup, copy and urgsafe_getc static.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13545
dc483132-0cff-0310-8789-
dd5450dbe970
+2001-07-02 Ezra Peisach <epeisach@mit.edu>
+
+ * popen.c: Include ftpd_var.h.
+
+ * ftpd.c: Declare secure_fprintf, gunique, sgetsave, sgetpwnam,
+ path_expand static.
+
+ * ftpd_var.h: Add prototypes for getline, renamefrom, ftpd_popen,
+ ftpd_pclose.
+
+ * ftpcmd.y: Declare lookup, copy and urgsafe_getc static.
+
2001-06-22 Ezra Peisach <epeisach@mit.edu>
* ftpcmd.y (help): Change local variable type to ftype.
void sizecmd(char *);
void help(struct tab *, char *);
static int yylex(void);
+static char *copy(char *);
%}
%union { int num; char *str; }
;
rcmd: RNFR check_login SP pathname CRLF
= {
- char *renamefrom();
-
restart_point = (off_t) 0;
if ($2 && $4) {
fromname = renamefrom((char *) $4);
{ NULL, 0, 0, 0, 0 }
};
-struct tab *
+static struct tab *
lookup(p, cmd)
register struct tab *p;
char *cmd;
/*
* urgsafe_getc - hacked up getc to ignore EOF if SIOCATMARK returns TRUE
*/
-int
+static int
urgsafe_getc(f)
FILE *f;
{
char *
getline(s, n, iop)
char *s;
+ int n;
register FILE *iop;
{
register int c;
register char *cp, *cp2;
register struct tab *p;
int n;
- char c, *copy();
+ char c;
for (;;) {
switch (state) {
}
}
-char *
+static char *
copy(s)
char *s;
{
int swaitint = SWAITINT;
void lostconn(), myoob();
-FILE *getdatasock();
+FILE *getdatasock(char *);
#if defined(__STDC__)
/*
* The following prototypes must be ANSI for systems for which
/*
* Helper function for sgetpwnam().
*/
-char *
+static char *
sgetsave(s)
char *s;
{
* the data returned must not be clobbered by any other command
* (e.g., globbing).
*/
-struct passwd *
+static struct passwd *
sgetpwnam(name)
char *name;
{
/*
* Expand the given pathname relative to the current working directory.
*/
-char *
+static char *
path_expand(path)
char *path;
{
FILE *fout, *din;
struct stat st;
int (*closefunc)();
- char *gunique();
+ static char *gunique();
if (logging > 1) syslog(LOG_NOTICE, "put %s", path_expand(name));
* The file named "local" is already known to exist.
* Generates failure reply on error.
*/
-char *
+static char *
gunique(local)
char *local;
{
* FTP_BUFSIZ
*/
#ifdef STDARG
-int
+static int
secure_fprintf(FILE *stream, char *fmt, ...)
#else
-int
+static int
secure_fprintf(stream, fmt, p1, p2, p3, p4, p5)
FILE *stream;
char *fmt;
void pwd(void);
void removedir(char *);
void renamecmd(char *, char *);
+char *renamefrom(char *);
void retrieve(char *, char *);
void send_file_list(char *);
void setdlevel(int);
-void statcmd();
+void statcmd(void);
void statfilecmd(char *);
void store_file(char *, char *, int);
void user(char *);
/* ftpcmd.y */
void upper(char *);
-
+char *getline(char *, int, FILE *);
#endif /* FTPD_VAR_H__ */
+/* popen.c */
+FILE * ftpd_popen(char *, char *);
+int ftpd_pclose(FILE *);
#ifdef HAVE_VFORK_H
#include <vfork.h>
#endif
+#include "ftpd_var.h"
/*
* Special version of popen which avoids call to shell. This insures noone