less warnings
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@894 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1935,7 +1935,7 @@ restart(int argc, char **argv)
|
|||||||
else {
|
else {
|
||||||
off_t restart_point = atol(argv[1]);
|
off_t restart_point = atol(argv[1]);
|
||||||
printf("restarting at %qd. %s\n", restart_point,
|
printf("restarting at %qd. %s\n", restart_point,
|
||||||
"execute get, put or append to initiate transfer");
|
"execute get, put or append to initiate transfer");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -118,25 +118,21 @@
|
|||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <err.h>
|
||||||
|
|
||||||
#include "ftp_var.h"
|
#include "ftp_var.h"
|
||||||
#include "extern.h"
|
#include "extern.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "pathnames.h"
|
#include "pathnames.h"
|
||||||
|
|
||||||
|
#include <des.h>
|
||||||
|
|
||||||
|
#include <krb.h>
|
||||||
|
|
||||||
#include "krb4.h"
|
#include "krb4.h"
|
||||||
|
|
||||||
#include "roken.h"
|
#include "roken.h"
|
||||||
|
|
||||||
#ifdef NEED_OPTARG_DECLARATION
|
|
||||||
extern char *optarg;
|
|
||||||
#endif
|
|
||||||
#ifdef NEED_OPTIND_DECLARATION
|
|
||||||
extern int optind;
|
|
||||||
#endif
|
|
||||||
#ifdef NEED_OPTERR_DECLARATION
|
|
||||||
extern int opterr;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__sun__) && !defined(__svr4)
|
#if defined(__sun__) && !defined(__svr4)
|
||||||
int fclose(FILE*);
|
int fclose(FILE*);
|
||||||
int pclose(FILE*);
|
int pclose(FILE*);
|
||||||
|
@@ -375,7 +375,6 @@ sec_write(int fd, char *data, int length)
|
|||||||
{
|
{
|
||||||
int len = auth_pbsz;
|
int len = auth_pbsz;
|
||||||
int tx = 0;
|
int tx = 0;
|
||||||
int bytes;
|
|
||||||
|
|
||||||
if(data_prot == prot_clear)
|
if(data_prot == prot_clear)
|
||||||
return write(fd, data, length);
|
return write(fd, data, length);
|
||||||
|
@@ -41,6 +41,9 @@
|
|||||||
#ifndef __KRB4_H__
|
#ifndef __KRB4_H__
|
||||||
#define __KRB4_H__
|
#define __KRB4_H__
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
extern int auth_complete;
|
extern int auth_complete;
|
||||||
|
|
||||||
void sec_status(void);
|
void sec_status(void);
|
||||||
@@ -49,6 +52,17 @@ enum { prot_clear, prot_safe, prot_confidential, prot_private };
|
|||||||
|
|
||||||
void sec_prot(int, char**);
|
void sec_prot(int, char**);
|
||||||
|
|
||||||
|
int sec_getc(FILE *F);
|
||||||
|
int sec_putc(int c, FILE *F);
|
||||||
|
int sec_fflush(FILE *F);
|
||||||
|
int sec_read(int fd, void *data, int length);
|
||||||
|
int sec_write(int fd, char *data, int length);
|
||||||
|
|
||||||
|
int krb4_getc(FILE *F);
|
||||||
|
int krb4_read(int fd, char *data, int length);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void sec_set_protection_level(void);
|
void sec_set_protection_level(void);
|
||||||
int sec_request_prot(char *level);
|
int sec_request_prot(char *level);
|
||||||
|
|
||||||
@@ -57,4 +71,11 @@ void klist(int, char **);
|
|||||||
|
|
||||||
void krb4_quit(void);
|
void krb4_quit(void);
|
||||||
|
|
||||||
|
int krb4_write_enc(FILE *F, char *fmt, va_list ap);
|
||||||
|
int krb4_read_msg(char *s, int priv);
|
||||||
|
int krb4_read_mic(char *s);
|
||||||
|
int krb4_read_enc(char *s);
|
||||||
|
|
||||||
|
int do_klogin(char *host);
|
||||||
|
|
||||||
#endif /* __KRB4_H__ */
|
#endif /* __KRB4_H__ */
|
||||||
|
@@ -256,7 +256,7 @@ getcmd(char *name)
|
|||||||
longest = 0;
|
longest = 0;
|
||||||
nmatches = 0;
|
nmatches = 0;
|
||||||
found = 0;
|
found = 0;
|
||||||
for (c = cmdtab; p = c->c_name; c++) {
|
for (c = cmdtab; (p = c->c_name); c++) {
|
||||||
for (q = name; *q == *p++; q++)
|
for (q = name; *q == *p++; q++)
|
||||||
if (*q == 0) /* exact match? */
|
if (*q == 0) /* exact match? */
|
||||||
return (c);
|
return (c);
|
||||||
|
@@ -41,15 +41,19 @@
|
|||||||
RCSID("$Id$");
|
RCSID("$Id$");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_SYS_IOCTL_H
|
#ifdef HAVE_SYS_IOCTL_H
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "extern.h"
|
#include "extern.h"
|
||||||
#include "krb4.h"
|
#include "krb4.h"
|
||||||
#include "auth.h"
|
#include "auth.h"
|
||||||
|
@@ -82,11 +82,12 @@ void user(char *);
|
|||||||
void yyerror(char *);
|
void yyerror(char *);
|
||||||
|
|
||||||
void kauth(char *, char*);
|
void kauth(char *, char*);
|
||||||
|
void klist(void);
|
||||||
|
|
||||||
int find(char *);
|
int find(char *);
|
||||||
|
|
||||||
|
int do_login(int code, char *passwd);
|
||||||
int klogin(char *name, char *password);
|
int klogin(char *name, char *password);
|
||||||
|
|
||||||
const char *ftp_rooted(const char *path);
|
const char *ftp_rooted(const char *path);
|
||||||
|
|
||||||
|
@@ -42,43 +42,56 @@
|
|||||||
|
|
||||||
%{
|
%{
|
||||||
|
|
||||||
#ifndef lint
|
|
||||||
#if 0
|
|
||||||
static char sccsid[] = "@(#)ftpcmd.y 8.3 (Berkeley) 4/6/94";
|
|
||||||
#else
|
|
||||||
static char rcsid[] = "$NetBSD: ftpcmd.y,v 1.6 1995/06/03 22:46:45 mycroft Exp $";
|
|
||||||
#endif
|
|
||||||
#endif /* not lint */
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
RCSID("$Id$");
|
||||||
|
|
||||||
#ifdef SOCKS
|
#ifdef SOCKS
|
||||||
#include <socks.h>
|
#include <socks.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_PARAM_H
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_STAT_H
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NETINET_IN_H
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_ARPA_FTP_H
|
||||||
#include <arpa/ftp.h>
|
#include <arpa/ftp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <glob.h>
|
#include <glob.h>
|
||||||
|
#ifdef HAVE_PWD_H
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
#endif
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#ifdef HAVE_SYSLOG_H
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
#endif
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_BSD_BSD_H
|
#ifdef HAVE_BSD_BSD_H
|
||||||
#include <bsd/bsd.h>
|
#include <bsd/bsd.h>
|
||||||
@@ -686,7 +699,7 @@ host_port
|
|||||||
: NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER COMMA
|
: NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER COMMA
|
||||||
NUMBER COMMA NUMBER
|
NUMBER COMMA NUMBER
|
||||||
{
|
{
|
||||||
char *a, *p;
|
char *a;
|
||||||
|
|
||||||
data_dest.sin_family = AF_INET;
|
data_dest.sin_family = AF_INET;
|
||||||
data_dest.sin_port = htons($9 * 256 + $11);
|
data_dest.sin_port = htons($9 * 256 + $11);
|
||||||
|
@@ -105,6 +105,7 @@ RCSID("$Id$");
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <stdarg.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#ifdef HAVE_SYSLOG_H
|
#ifdef HAVE_SYSLOG_H
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
@@ -117,7 +118,7 @@ RCSID("$Id$");
|
|||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <err.h>
|
||||||
|
|
||||||
#include "pathnames.h"
|
#include "pathnames.h"
|
||||||
#include "extern.h"
|
#include "extern.h"
|
||||||
@@ -846,12 +847,12 @@ retrieve(char *cmd, char *name)
|
|||||||
char *cmd;
|
char *cmd;
|
||||||
} cmds[] = {
|
} cmds[] = {
|
||||||
/* XXX - make this more general */
|
/* XXX - make this more general */
|
||||||
".tar", "/bin/gtar cPf - ",
|
{".tar", "/bin/gtar cPf - "},
|
||||||
".tar.gz", "/bin/gtar zcPf - ",
|
{".tar.gz", "/bin/gtar zcPf - "},
|
||||||
".tar.Z", "/bin/gtar ZcPf - ",
|
{".tar.Z", "/bin/gtar ZcPf - "},
|
||||||
".gz", "/bin/gzip -c ",
|
{".gz", "/bin/gzip -c "},
|
||||||
".Z", "/bin/compress -c ",
|
{".Z", "/bin/compress -c "},
|
||||||
NULL, NULL
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
struct cmds *p;
|
struct cmds *p;
|
||||||
for(p = cmds; p->ext; p++){
|
for(p = cmds; p->ext; p++){
|
||||||
|
@@ -47,8 +47,14 @@ RCSID("$Id$");
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#ifdef HAVE_SYS_TIME_H
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <roken.h>
|
||||||
|
|
||||||
#include <des.h>
|
#include <des.h>
|
||||||
#include <krb.h>
|
#include <krb.h>
|
||||||
@@ -57,7 +63,7 @@ RCSID("$Id$");
|
|||||||
#include "extern.h"
|
#include "extern.h"
|
||||||
#include "krb4.h"
|
#include "krb4.h"
|
||||||
#include "auth.h"
|
#include "auth.h"
|
||||||
|
#include "base64.h"
|
||||||
|
|
||||||
static KTEXT_ST cip;
|
static KTEXT_ST cip;
|
||||||
static unsigned int lifetime;
|
static unsigned int lifetime;
|
||||||
|
@@ -35,14 +35,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
|
||||||
#if 0
|
|
||||||
static char sccsid[] = "@(#)popen.c 8.3 (Berkeley) 4/6/94";
|
|
||||||
#else
|
|
||||||
static char xrcsid[] = "$NetBSD: popen.c,v 1.5 1995/04/11 02:45:00 cgd Exp $";
|
|
||||||
#endif
|
|
||||||
#endif /* not lint */
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
RCSID("$Id$");
|
RCSID("$Id$");
|
||||||
|
@@ -183,7 +183,8 @@ get_xsockets (int *unix_socket, int *tcp_socket)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#ifdef TCP_NODELAY
|
#ifdef TCP_NODELAY
|
||||||
setsockopt (tcpfd, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one));
|
setsockopt (tcpfd, IPPROTO_TCP, TCP_NODELAY, (void *)&one,
|
||||||
|
sizeof(one));
|
||||||
#endif
|
#endif
|
||||||
memset (&tcpaddr, 0, sizeof(tcpaddr));
|
memset (&tcpaddr, 0, sizeof(tcpaddr));
|
||||||
tcpaddr.sin_family = AF_INET;
|
tcpaddr.sin_family = AF_INET;
|
||||||
|
@@ -139,7 +139,7 @@ connect_host (char *host, des_cblock *key, des_key_schedule schedule,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TCP_NODELAY
|
#ifdef TCP_NODELAY
|
||||||
setsockopt (s, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one));
|
setsockopt (s, IPPROTO_TCP, TCP_NODELAY, (void *)&one, sizeof(one));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (connect (s, (struct sockaddr *)&thataddr, sizeof(thataddr)) < 0) {
|
if (connect (s, (struct sockaddr *)&thataddr, sizeof(thataddr)) < 0) {
|
||||||
@@ -385,14 +385,14 @@ doit (char *host, int passivep, int debugp, int tcpp)
|
|||||||
fn = active;
|
fn = active;
|
||||||
}
|
}
|
||||||
if(debugp)
|
if(debugp)
|
||||||
printf ("%d\t%d\t%s\n", getpid(), display_num, xauthfile);
|
printf ("%u\t%d\t%s\n", (unsigned)getpid(), display_num, xauthfile);
|
||||||
else {
|
else {
|
||||||
pid = fork();
|
pid = fork();
|
||||||
if (pid < 0) {
|
if (pid < 0) {
|
||||||
fprintf (stderr, "%s: fork: %s\n", prog, strerror(errno));
|
fprintf (stderr, "%s: fork: %s\n", prog, strerror(errno));
|
||||||
return 1;
|
return 1;
|
||||||
} else if (pid > 0) {
|
} else if (pid > 0) {
|
||||||
printf ("%d\t%d\t%s\n", pid, display_num, xauthfile);
|
printf ("%u\t%d\t%s\n", (unsigned)pid, display_num, xauthfile);
|
||||||
exit (0);
|
exit (0);
|
||||||
} else {
|
} else {
|
||||||
fclose(stdout);
|
fclose(stdout);
|
||||||
@@ -429,7 +429,7 @@ doit (char *host, int passivep, int debugp, int tcpp)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#ifdef TCP_NODELAY
|
#ifdef TCP_NODELAY
|
||||||
setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one));
|
setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, (void *)&one, sizeof(one));
|
||||||
#endif
|
#endif
|
||||||
++nchild;
|
++nchild;
|
||||||
child = fork ();
|
child = fork ();
|
||||||
|
@@ -57,6 +57,9 @@
|
|||||||
#ifdef HAVE_PWD_H
|
#ifdef HAVE_PWD_H
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_GRP_H
|
||||||
|
#include <grp.h>
|
||||||
|
#endif
|
||||||
#ifdef HAVE_SYSLOG_H
|
#ifdef HAVE_SYSLOG_H
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -118,6 +121,10 @@ extern size_t cookie_len;
|
|||||||
|
|
||||||
int get_xsockets (int *unix_socket, int *tcp_socket);
|
int get_xsockets (int *unix_socket, int *tcp_socket);
|
||||||
int connect_local_xsocket (unsigned dnr);
|
int connect_local_xsocket (unsigned dnr);
|
||||||
|
int create_and_write_cookie (char *xauthfile,
|
||||||
|
u_char *cookie,
|
||||||
|
size_t sz);
|
||||||
|
int suspicious_address (int sock, struct sockaddr_in addr);
|
||||||
|
|
||||||
#define KX_PORT 2111
|
#define KX_PORT 2111
|
||||||
|
|
||||||
|
@@ -188,7 +188,7 @@ doit_conn (int fd, struct sockaddr_in *thataddr,
|
|||||||
return fatal (sock, msg);
|
return fatal (sock, msg);
|
||||||
}
|
}
|
||||||
#ifdef TCP_NODELAY
|
#ifdef TCP_NODELAY
|
||||||
setsockopt (sock, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one));
|
setsockopt (sock, IPPROTO_TCP, TCP_NODELAY, (void *)&one, sizeof(one));
|
||||||
#endif
|
#endif
|
||||||
if (connect (sock, (struct sockaddr *)thataddr,
|
if (connect (sock, (struct sockaddr *)thataddr,
|
||||||
sizeof(*thataddr)) < 0) {
|
sizeof(*thataddr)) < 0) {
|
||||||
@@ -221,7 +221,6 @@ doit(int sock, int tcpp)
|
|||||||
des_key_schedule schedule;
|
des_key_schedule schedule;
|
||||||
des_cblock key;
|
des_cblock key;
|
||||||
int localx, tcpx;
|
int localx, tcpx;
|
||||||
u_int32_t tmp;
|
|
||||||
|
|
||||||
if (recv_conn (sock, &key, schedule, &thataddr))
|
if (recv_conn (sock, &key, schedule, &thataddr))
|
||||||
return 1;
|
return 1;
|
||||||
@@ -292,7 +291,8 @@ doit(int sock, int tcpp)
|
|||||||
return fatal (sock, msg);
|
return fatal (sock, msg);
|
||||||
}
|
}
|
||||||
#ifdef TCP_NODELAY
|
#ifdef TCP_NODELAY
|
||||||
setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one));
|
setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, (void *)&one,
|
||||||
|
sizeof(one));
|
||||||
#endif
|
#endif
|
||||||
child = fork ();
|
child = fork ();
|
||||||
if (child < 0) {
|
if (child < 0) {
|
||||||
|
@@ -49,8 +49,12 @@
|
|||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
#ifdef HAVE_PWD_H
|
#ifdef HAVE_PWD_H
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#endif
|
#endif
|
||||||
#include <roken.h>
|
#include <roken.h>
|
||||||
|
#include <des.h>
|
||||||
#include <otp.h>
|
#include <otp.h>
|
||||||
|
@@ -17,28 +17,28 @@ RCSID("$Id$");
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static state_table states[] = {
|
static state_table states[] = {
|
||||||
auth1, "user", 1, 1, pop_user, {auth1, auth2},
|
{auth1, "user", 1, 1, pop_user, {auth1, auth2}},
|
||||||
auth2, "pass", 1, 99, pop_pass, {auth1, trans},
|
{auth2, "pass", 1, 99, pop_pass, {auth1, trans}},
|
||||||
#ifdef RPOP
|
#ifdef RPOP
|
||||||
auth2, "rpop", 1, 1, pop_rpop, {auth1, trans},
|
{auth2, "rpop", 1, 1, pop_rpop, {auth1, trans}},
|
||||||
#endif /* RPOP */
|
#endif /* RPOP */
|
||||||
auth1, "quit", 0, 0, pop_quit, {halt, halt},
|
{auth1, "quit", 0, 0, pop_quit, {halt, halt}},
|
||||||
auth2, "quit", 0, 0, pop_quit, {halt, halt},
|
{auth2, "quit", 0, 0, pop_quit, {halt, halt}},
|
||||||
trans, "stat", 0, 0, pop_stat, {trans, trans},
|
{trans, "stat", 0, 0, pop_stat, {trans, trans}},
|
||||||
trans, "list", 0, 1, pop_list, {trans, trans},
|
{trans, "list", 0, 1, pop_list, {trans, trans}},
|
||||||
trans, "retr", 1, 1, pop_send, {trans, trans},
|
{trans, "retr", 1, 1, pop_send, {trans, trans}},
|
||||||
trans, "dele", 1, 1, pop_dele, {trans, trans},
|
{trans, "dele", 1, 1, pop_dele, {trans, trans}},
|
||||||
trans, "noop", 0, 0, NULL, {trans, trans},
|
{trans, "noop", 0, 0, NULL, {trans, trans}},
|
||||||
trans, "rset", 0, 0, pop_rset, {trans, trans},
|
{trans, "rset", 0, 0, pop_rset, {trans, trans}},
|
||||||
trans, "top", 2, 2, pop_send, {trans, trans},
|
{trans, "top", 2, 2, pop_send, {trans, trans}},
|
||||||
trans, "last", 0, 0, pop_last, {trans, trans},
|
{trans, "last", 0, 0, pop_last, {trans, trans}},
|
||||||
trans, "xtnd", 1, 99, pop_xtnd, {trans, trans},
|
{trans, "xtnd", 1, 99, pop_xtnd, {trans, trans}},
|
||||||
trans, "quit", 0, 0, pop_updt, {halt, halt},
|
{trans, "quit", 0, 0, pop_updt, {halt, halt}},
|
||||||
trans, "help", 0, 0, pop_help, {trans, trans},
|
{trans, "help", 0, 0, pop_help, {trans, trans}},
|
||||||
#ifdef UIDL
|
#ifdef UIDL
|
||||||
trans, "uidl", 0, 1, pop_uidl, {trans, trans},
|
{trans, "uidl", 0, 1, pop_uidl, {trans, trans},}
|
||||||
#endif
|
#endif
|
||||||
(state) 0, NULL, 0, 0, NULL, {halt, halt},
|
{(state) 0, NULL, 0, 0, NULL, {halt, halt}},
|
||||||
};
|
};
|
||||||
|
|
||||||
state_table *
|
state_table *
|
||||||
|
@@ -17,8 +17,8 @@ RCSID("$Id$");
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static xtnd_table subcommands[] = {
|
static xtnd_table subcommands[] = {
|
||||||
"xmit", 0, 0, pop_xmit,
|
{"xmit", 0, 0, pop_xmit},
|
||||||
NULL
|
{NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
xtnd_table *
|
xtnd_table *
|
||||||
|
@@ -70,7 +70,7 @@ pop_init(POP *p,int argcount,char **argmessage)
|
|||||||
int len;
|
int len;
|
||||||
int options = 0;
|
int options = 0;
|
||||||
int sp = 0; /* Socket pointer */
|
int sp = 0; /* Socket pointer */
|
||||||
char * trace_file_name;
|
char * trace_file_name = "/tmp/popper-trace";
|
||||||
int inetd = 0;
|
int inetd = 0;
|
||||||
|
|
||||||
/* Initialize the POP parameter block */
|
/* Initialize the POP parameter block */
|
||||||
@@ -83,7 +83,7 @@ pop_init(POP *p,int argcount,char **argmessage)
|
|||||||
k_gethostname(p->myhost,MaxHostNameLen);
|
k_gethostname(p->myhost,MaxHostNameLen);
|
||||||
|
|
||||||
/* Open the log file */
|
/* Open the log file */
|
||||||
(void)openlog(p->myname,POP_LOGOPTS,POP_FACILITY);
|
openlog(p->myname,POP_LOGOPTS,POP_FACILITY);
|
||||||
|
|
||||||
/* Process command line arguments */
|
/* Process command line arguments */
|
||||||
while ((c = getopt(argcount,argmessage,
|
while ((c = getopt(argcount,argmessage,
|
||||||
|
@@ -62,8 +62,8 @@ main (int argc, char **argv)
|
|||||||
state_table * s;
|
state_table * s;
|
||||||
char message[MAXLINELEN];
|
char message[MAXLINELEN];
|
||||||
|
|
||||||
(void) signal(SIGHUP, catchSIGHUP);
|
signal(SIGHUP, catchSIGHUP);
|
||||||
(void) signal(SIGPIPE,catchSIGHUP);
|
signal(SIGPIPE, catchSIGHUP);
|
||||||
|
|
||||||
/* Start things rolling */
|
/* Start things rolling */
|
||||||
pop_init(&p,argc,argv);
|
pop_init(&p,argc,argv);
|
||||||
|
@@ -68,11 +68,10 @@ static Pixel Black, White;
|
|||||||
static XFontStruct *font;
|
static XFontStruct *font;
|
||||||
static char root_cpass[16];
|
static char root_cpass[16];
|
||||||
static char user_cpass[16];
|
static char user_cpass[16];
|
||||||
static char root_pw[16];
|
|
||||||
static int time_left, prompt_x, prompt_y, time_x, time_y;
|
static int time_left, prompt_x, prompt_y, time_x, time_y;
|
||||||
static unsigned long interval;
|
static unsigned long interval;
|
||||||
static Pixmap left0, left1, right0, right1, left_front,
|
static Pixmap left0, left1, right0, right1, left_front,
|
||||||
right_front, front, down;
|
right_front, front, down;
|
||||||
|
|
||||||
#define MAXLINES 40
|
#define MAXLINES 40
|
||||||
|
|
||||||
|
@@ -51,7 +51,7 @@ int
|
|||||||
md4_tests ()
|
md4_tests ()
|
||||||
{
|
{
|
||||||
struct test {
|
struct test {
|
||||||
char *str;
|
unsigned char *str;
|
||||||
unsigned char hash[16];
|
unsigned char hash[16];
|
||||||
} tests[] = {
|
} tests[] = {
|
||||||
{"",
|
{"",
|
||||||
@@ -93,7 +93,7 @@ int
|
|||||||
md5_tests ()
|
md5_tests ()
|
||||||
{
|
{
|
||||||
struct test {
|
struct test {
|
||||||
char *str;
|
unsigned char *str;
|
||||||
unsigned char hash[16];
|
unsigned char hash[16];
|
||||||
} tests[] = {
|
} tests[] = {
|
||||||
{"", {0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04, 0xe9, 0x80, 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e}},
|
{"", {0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04, 0xe9, 0x80, 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e}},
|
||||||
@@ -127,7 +127,7 @@ int
|
|||||||
sha_tests ()
|
sha_tests ()
|
||||||
{
|
{
|
||||||
struct test {
|
struct test {
|
||||||
char *str;
|
unsigned char *str;
|
||||||
unsigned char hash[20];
|
unsigned char hash[20];
|
||||||
} tests[] = {
|
} tests[] = {
|
||||||
{"abc", {0xA9, 0x99, 0x3E, 0x36, 0x47, 0x06, 0x81, 0x6A,
|
{"abc", {0xA9, 0x99, 0x3E, 0x36, 0x47, 0x06, 0x81, 0x6A,
|
||||||
|
@@ -72,7 +72,7 @@ typedef struct {
|
|||||||
OtpAlgorithm *otp_find_alg (char *name);
|
OtpAlgorithm *otp_find_alg (char *name);
|
||||||
void otp_print_stddict (OtpKey key, char *str);
|
void otp_print_stddict (OtpKey key, char *str);
|
||||||
void otp_print_hex (OtpKey key, char *str);
|
void otp_print_hex (OtpKey key, char *str);
|
||||||
unsigned opt_checksum (OtpKey key);
|
unsigned otp_checksum (OtpKey key);
|
||||||
int otp_parse_hex (OtpKey key, char *);
|
int otp_parse_hex (OtpKey key, char *);
|
||||||
int otp_parse_stddict (OtpKey key, char *);
|
int otp_parse_stddict (OtpKey key, char *);
|
||||||
int otp_parse_altdict (OtpKey key, char *, OtpAlgorithm *);
|
int otp_parse_altdict (OtpKey key, char *, OtpAlgorithm *);
|
||||||
|
@@ -46,7 +46,6 @@ RCSID("$Id$");
|
|||||||
void *
|
void *
|
||||||
otp_db_open ()
|
otp_db_open ()
|
||||||
{
|
{
|
||||||
DBM *ret;
|
|
||||||
int lock;
|
int lock;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
@@ -80,7 +80,6 @@ otp_md_init (OtpKey key,
|
|||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
int len;
|
int len;
|
||||||
int i;
|
|
||||||
|
|
||||||
len = strlen(pwd) + strlen(seed);
|
len = strlen(pwd) + strlen(seed);
|
||||||
p = malloc (len + 1);
|
p = malloc (len + 1);
|
||||||
|
@@ -41,6 +41,7 @@
|
|||||||
RCSID("$Id$");
|
RCSID("$Id$");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
@@ -41,6 +41,7 @@
|
|||||||
RCSID("$Id$");
|
RCSID("$Id$");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
#include "otp.h"
|
#include "otp.h"
|
||||||
|
|
||||||
static char *std_dict[] =
|
static char *std_dict[] =
|
||||||
|
@@ -41,6 +41,9 @@
|
|||||||
RCSID("$Id$");
|
RCSID("$Id$");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
@@ -175,4 +175,14 @@ void mini_inetd (int port);
|
|||||||
#define LOG_AUTHPRIV LOG_AUTH
|
#define LOG_AUTHPRIV LOG_AUTH
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef NEED_OPTARG_DECLARATION
|
||||||
|
extern char *optarg;
|
||||||
|
#endif
|
||||||
|
#ifdef NEED_OPTIND_DECLARATION
|
||||||
|
extern int optind;
|
||||||
|
#endif
|
||||||
|
#ifdef NEED_OPTERR_DECLARATION
|
||||||
|
extern int opterr;
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __ROKEN_H__ */
|
#endif /* __ROKEN_H__ */
|
||||||
|
@@ -175,4 +175,14 @@ void mini_inetd (int port);
|
|||||||
#define LOG_AUTHPRIV LOG_AUTH
|
#define LOG_AUTHPRIV LOG_AUTH
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef NEED_OPTARG_DECLARATION
|
||||||
|
extern char *optarg;
|
||||||
|
#endif
|
||||||
|
#ifdef NEED_OPTIND_DECLARATION
|
||||||
|
extern int optind;
|
||||||
|
#endif
|
||||||
|
#ifdef NEED_OPTERR_DECLARATION
|
||||||
|
extern int opterr;
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __ROKEN_H__ */
|
#endif /* __ROKEN_H__ */
|
||||||
|
Reference in New Issue
Block a user