Turn on -Wextra -Wno-sign-compare -Wno-unused-paramter and fix issues.
We turn on a few extra warnings and fix the fallout that occurs when building with --enable-developer. Note that we get different warnings on different machines and so this will be a work in progress. So far, we have built on NetBSD/amd64 5.99.64 (which uses gcc 4.5.3) and Ubuntu 10.04.3 LTS (which uses gcc 4.4.3). Notably, we fixed 1. a lot of missing structure initialisers, 2. unchecked return values for functions that glibc marks as __attribute__((warn-unused-result)), 3. made minor modifications to slc and asn1_compile which can generate code which generates warnings, and 4. a few stragglers here and there. We turned off the extended warnings for many programs in appl/ as they are nearing the end of their useful lifetime, e.g. rsh, rcp, popper, ftp and telnet. Interestingly, glibc's strncmp() macro needed to be worked around whereas the function calls did not. We have not yet tried this on 32 bit platforms, so there will be a few more warnings when we do.
This commit is contained in:
@@ -61,15 +61,16 @@ struct getargs args[] = {
|
||||
{ "cell", 'c', arg_strings, &cells, "cells to get tokens for", "cell" },
|
||||
{ "file", 'p', arg_strings, &files, "files to get tokens for", "path" },
|
||||
{ "realm", 'k', arg_string, &realm, "realm for afs cell", "realm" },
|
||||
{ "unlog", 'u', arg_flag, &unlog_flag, "remove tokens" },
|
||||
{ "unlog", 'u', arg_flag, &unlog_flag, "remove tokens", NULL },
|
||||
#ifdef KRB5
|
||||
{ "principal",'P',arg_string,&client_string,"principal to use","principal"},
|
||||
{ "cache", 0, arg_string, &cache_string, "ccache to use", "cache"},
|
||||
{ "v5", 0, arg_negative_flag, &use_krb5, "don't use Kerberos 5" },
|
||||
{ "v5", 0, arg_negative_flag, &use_krb5, "don't use Kerberos 5",
|
||||
NULL },
|
||||
#endif
|
||||
{ "verbose",'v', arg_flag, &verbose },
|
||||
{ "version", 0, arg_flag, &version_flag },
|
||||
{ "help", 'h', arg_flag, &help_flag },
|
||||
{ "verbose",'v', arg_flag, &verbose, NULL, NULL },
|
||||
{ "version", 0, arg_flag, &version_flag, NULL, NULL },
|
||||
{ "help", 'h', arg_flag, &help_flag, NULL, NULL },
|
||||
};
|
||||
|
||||
static int num_args = sizeof(args) / sizeof(args[0]);
|
||||
|
@@ -73,12 +73,12 @@ static char *typename_arg;
|
||||
#endif
|
||||
|
||||
struct getargs getargs[] = {
|
||||
{ NULL, 'c', arg_flag, &c_flag },
|
||||
{ NULL, 'c', arg_flag, &c_flag, NULL, NULL },
|
||||
#ifdef KRB5
|
||||
{ "cache-type", 0, arg_string, &typename_arg },
|
||||
{ "cache-type", 0, arg_string, &typename_arg, NULL, NULL },
|
||||
#endif
|
||||
{ "version", 0, arg_flag, &version_flag },
|
||||
{ "help", 'h', arg_flag, &help_flag },
|
||||
{ "version", 0, arg_flag, &version_flag, NULL, NULL },
|
||||
{ "help", 'h', arg_flag, &help_flag, NULL, NULL },
|
||||
};
|
||||
|
||||
static int num_args = sizeof(getargs) / sizeof(getargs[0]);
|
||||
|
@@ -2,6 +2,8 @@
|
||||
|
||||
include $(top_srcdir)/Makefile.am.common
|
||||
|
||||
WFLAGS += $(WFLAGS_LITE)
|
||||
|
||||
AM_CPPFLAGS += -I$(srcdir)/../common $(INCLUDE_readline) $(INCLUDE_hcrypto)
|
||||
|
||||
bin_PROGRAMS = ftp
|
||||
|
@@ -210,7 +210,7 @@ struct types {
|
||||
{ "image", "I", TYPE_I, 0 },
|
||||
{ "ebcdic", "E", TYPE_E, 0 },
|
||||
{ "tenex", "L", TYPE_L, bytename },
|
||||
{ NULL }
|
||||
{ NULL, NULL, 0, NULL }
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -1316,7 +1316,8 @@ user(int argc, char **argv)
|
||||
if (n == CONTINUE) {
|
||||
if (argc < 4) {
|
||||
printf("Account: "); fflush(stdout);
|
||||
fgets(acctstr, sizeof(acctstr) - 1, stdin);
|
||||
if (fgets(acctstr, sizeof(acctstr) - 1, stdin) == NULL)
|
||||
acctstr[0] = '\0';
|
||||
acctstr[strcspn(acctstr, "\r\n")] = '\0';
|
||||
argv[3] = acctstr; argc++;
|
||||
}
|
||||
|
@@ -197,7 +197,7 @@ struct cmd cmdtab[] = {
|
||||
{ "afslog", afsloghelp, 0, 1, 0, afslog },
|
||||
#endif
|
||||
|
||||
{ 0 },
|
||||
{ NULL, NULL, 0, 0, 0, NULL },
|
||||
};
|
||||
|
||||
int NCMDS = (sizeof (cmdtab) / sizeof (cmdtab[0])) - 1;
|
||||
|
@@ -212,25 +212,32 @@ static int version_flag;
|
||||
static const char *good_chars = "+-=_,.";
|
||||
|
||||
struct getargs args[] = {
|
||||
{ NULL, 'a', arg_string, &auth_string, "required authentication" },
|
||||
{ NULL, 'i', arg_flag, &interactive_flag, "don't assume stdin is a socket" },
|
||||
{ NULL, 'p', arg_string, &port_string, "what port to listen to" },
|
||||
{ NULL, 'g', arg_string, &guest_umask_string, "umask for guest logins" },
|
||||
{ NULL, 'a', arg_string, &auth_string, "required authentication", NULL },
|
||||
{ NULL, 'i', arg_flag, &interactive_flag, "don't assume stdin is a socket",
|
||||
NULL },
|
||||
{ NULL, 'p', arg_string, &port_string, "what port to listen to", NULL },
|
||||
{ NULL, 'g', arg_string, &guest_umask_string, "umask for guest logins",
|
||||
NULL },
|
||||
{ NULL, 'l', arg_counter, &logging, "log more stuff", "" },
|
||||
{ NULL, 't', arg_integer, &ftpd_timeout, "initial timeout" },
|
||||
{ NULL, 'T', arg_integer, &maxtimeout, "max timeout" },
|
||||
{ NULL, 'u', arg_string, &umask_string, "umask for user logins" },
|
||||
{ NULL, 'U', arg_negative_flag, &restricted_data_ports, "don't use high data ports" },
|
||||
{ NULL, 'd', arg_flag, &debug, "enable debugging" },
|
||||
{ NULL, 'v', arg_flag, &debug, "enable debugging" },
|
||||
{ "builtin-ls", 'B', arg_flag, &use_builtin_ls, "use built-in ls to list files" },
|
||||
{ "good-chars", 0, arg_string, &good_chars, "allowed anonymous upload filename chars" },
|
||||
{ "insecure-oob", 'I', arg_negative_flag, &allow_insecure_oob, "don't allow insecure OOB ABOR/STAT" },
|
||||
{ NULL, 't', arg_integer, &ftpd_timeout, "initial timeout", NULL },
|
||||
{ NULL, 'T', arg_integer, &maxtimeout, "max timeout", NULL },
|
||||
{ NULL, 'u', arg_string, &umask_string, "umask for user logins", NULL },
|
||||
{ NULL, 'U', arg_negative_flag, &restricted_data_ports,
|
||||
"don't use high data ports", NULL },
|
||||
{ NULL, 'd', arg_flag, &debug, "enable debugging", NULL },
|
||||
{ NULL, 'v', arg_flag, &debug, "enable debugging", NULL },
|
||||
{ "builtin-ls", 'B', arg_flag, &use_builtin_ls,
|
||||
"use built-in ls to list files", NULL },
|
||||
{ "good-chars", 0, arg_string, &good_chars,
|
||||
"allowed anonymous upload filename chars", NULL },
|
||||
{ "insecure-oob", 'I', arg_negative_flag, &allow_insecure_oob,
|
||||
"don't allow insecure OOB ABOR/STAT", NULL },
|
||||
#ifdef KRB5
|
||||
{ "gss-bindings", 0, arg_flag, &ftp_do_gss_bindings, "Require GSS-API bindings", NULL},
|
||||
{ "gss-bindings", 0, arg_flag, &ftp_do_gss_bindings,
|
||||
"Require GSS-API bindings", NULL},
|
||||
#endif
|
||||
{ "version", 0, arg_flag, &version_flag },
|
||||
{ "help", 'h', arg_flag, &help_flag }
|
||||
{ "version", 0, arg_flag, &version_flag, NULL, NULL },
|
||||
{ "help", 'h', arg_flag, &help_flag, NULL, NULL }
|
||||
};
|
||||
|
||||
static int num_args = sizeof(args) / sizeof(args[0]);
|
||||
@@ -972,7 +979,7 @@ retrieve(const char *cmd, char *name)
|
||||
{".tar.Z", "/bin/gtar ZcPf - %s", NULL},
|
||||
{".gz", "/bin/gzip -c -- %s", "/bin/gzip -c -d -- %s"},
|
||||
{".Z", "/bin/compress -c -- %s", "/bin/uncompress -c -- %s"},
|
||||
{NULL, NULL}
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
struct cmds *p;
|
||||
for(p = cmds; p->ext; p++){
|
||||
@@ -1272,7 +1279,7 @@ dataconn(const char *name, off_t size, const char *mode)
|
||||
close(pdata);
|
||||
pdata = s;
|
||||
#if defined(IPTOS_THROUGHPUT)
|
||||
if (from->sa_family == AF_INET)
|
||||
if (from_ss.ss_family == AF_INET)
|
||||
socket_set_tos(s, IPTOS_THROUGHPUT);
|
||||
#endif
|
||||
reply(150, "Opening %s mode data connection for '%s'%s.",
|
||||
|
@@ -107,7 +107,9 @@ static void
|
||||
ftpd_logwtmp_wtmp(char *line, char *name, char *host)
|
||||
{
|
||||
static int init = 0;
|
||||
#ifdef WTMP_FILE
|
||||
static int fd;
|
||||
#endif
|
||||
#ifdef WTMPX_FILE
|
||||
static int fdx;
|
||||
#endif
|
||||
@@ -117,6 +119,9 @@ ftpd_logwtmp_wtmp(char *line, char *name, char *host)
|
||||
#if defined(WTMPX_FILE) || defined(HAVE_UTMPX_H)
|
||||
struct utmpx utx;
|
||||
#endif
|
||||
#if defined(WTMP_FILE) || defined(WTMPX_FILE)
|
||||
ssize_t ret;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UTMPX_H
|
||||
memset(&utx, 0, sizeof(struct utmpx));
|
||||
@@ -176,14 +181,18 @@ ftpd_logwtmp_wtmp(char *line, char *name, char *host)
|
||||
#endif
|
||||
init = 1;
|
||||
}
|
||||
#if defined(WTMP_FILE) || defined(WTMPX_FILE)
|
||||
if(fd >= 0) {
|
||||
#ifdef WTMP_FILE
|
||||
write(fd, &ut, sizeof(struct utmp)); /* XXX */
|
||||
ret = write(fd, &ut, sizeof(struct utmp)); /* XXX */
|
||||
#endif
|
||||
#ifdef WTMPX_FILE
|
||||
write(fdx, &utx, sizeof(struct utmpx));
|
||||
ret = write(fdx, &utx, sizeof(struct utmpx));
|
||||
#endif
|
||||
if (ret == -1)
|
||||
syslog(LOG_ERR, "ftpd_logwtmp_wtmp(): write(2) failed: %m");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* !HAVE_ASL_H */
|
||||
|
@@ -280,7 +280,7 @@ wait_log(struct client *c)
|
||||
if (fd < 0)
|
||||
err(1, "failed to build socket for %s's logging port", c->moniker);
|
||||
|
||||
((struct sockaddr *)&sast)->sa_family = c->sa->sa_family;
|
||||
sast.ss_family = c->sa->sa_family;
|
||||
ret = bind(fd, (struct sockaddr *)&sast, c->salen);
|
||||
if (ret < 0)
|
||||
err(1, "failed to bind %s's logging port", c->moniker);
|
||||
|
@@ -73,10 +73,13 @@ logmessage(struct client *c, const char *file, unsigned int lineno,
|
||||
char *message;
|
||||
va_list ap;
|
||||
int32_t ackid;
|
||||
int ret;
|
||||
|
||||
va_start(ap, fmt);
|
||||
vasprintf(&message, fmt, ap);
|
||||
ret = vasprintf(&message, fmt, ap);
|
||||
va_end(ap);
|
||||
if (ret == -1)
|
||||
errx(1, "out of memory");
|
||||
|
||||
if (logfile)
|
||||
fprintf(logfile, "%s:%u: %d %s\n", file, lineno, level, message);
|
||||
@@ -643,6 +646,7 @@ HandleOP(GetVersionAndCapabilities)
|
||||
{
|
||||
int32_t cap = HAS_MONIKER;
|
||||
char name[256] = "unknown", *str;
|
||||
int ret;
|
||||
|
||||
if (targetname)
|
||||
cap |= ISSERVER; /* is server */
|
||||
@@ -657,7 +661,9 @@ HandleOP(GetVersionAndCapabilities)
|
||||
}
|
||||
#endif
|
||||
|
||||
asprintf(&str, "gssmask %s %s", PACKAGE_STRING, name);
|
||||
ret = asprintf(&str, "gssmask %s %s", PACKAGE_STRING, name);
|
||||
if (ret == -1)
|
||||
errx(1, "out of memory");
|
||||
|
||||
put32(c, GSSMAGGOTPROTOCOL);
|
||||
put32(c, cap);
|
||||
@@ -1084,6 +1090,7 @@ static struct client *
|
||||
create_client(int fd, int port, const char *moniker)
|
||||
{
|
||||
struct client *c;
|
||||
int ret;
|
||||
|
||||
c = ecalloc(1, sizeof(*c));
|
||||
|
||||
@@ -1092,9 +1099,14 @@ create_client(int fd, int port, const char *moniker)
|
||||
} else {
|
||||
char hostname[MAXHOSTNAMELEN];
|
||||
gethostname(hostname, sizeof(hostname));
|
||||
asprintf(&c->moniker, "gssmask: %s:%d", hostname, port);
|
||||
ret = asprintf(&c->moniker, "gssmask: %s:%d", hostname, port);
|
||||
if (ret == -1)
|
||||
c->moniker = NULL;
|
||||
}
|
||||
|
||||
if (!c->moniker)
|
||||
errx(1, "out of memory");
|
||||
|
||||
{
|
||||
c->salen = sizeof(c->sa);
|
||||
getpeername(fd, (struct sockaddr *)&c->sa, &c->salen);
|
||||
|
@@ -51,8 +51,8 @@ static struct getargs args[] = {
|
||||
"Forward forwardable credentials", NULL },
|
||||
{ "forwardable",'G',arg_negative_flag,&forwardable,
|
||||
"Don't forward forwardable credentials", NULL },
|
||||
{ "help", 'h', arg_flag, &help_flag },
|
||||
{ "version", 0, arg_flag, &version_flag }
|
||||
{ "help", 'h', arg_flag, &help_flag, NULL, NULL },
|
||||
{ "version", 0, arg_flag, &version_flag, NULL, NULL }
|
||||
};
|
||||
|
||||
static int num_args = sizeof(args) / sizeof(args[0]);
|
||||
|
@@ -49,8 +49,8 @@ static struct getargs args[] = {
|
||||
{ "inetd",'i',arg_flag, &do_inetd,
|
||||
"Not started from inetd", NULL },
|
||||
{ "regpag",'R',arg_string,®pag_str,"path to regpag binary","regpag"},
|
||||
{ "help", 'h', arg_flag, &help_flag },
|
||||
{ "version", 0, arg_flag, &version_flag }
|
||||
{ "help", 'h', arg_flag, &help_flag, NULL, NULL },
|
||||
{ "version", 0, arg_flag, &version_flag, NULL, NULL }
|
||||
};
|
||||
|
||||
static int num_args = sizeof(args) / sizeof(args[0]);
|
||||
|
@@ -65,17 +65,19 @@ ksyslog(krb5_context context, krb5_error_code ret, const char *fmt, ...)
|
||||
const char *msg;
|
||||
char *str = NULL;
|
||||
va_list va;
|
||||
int aret;
|
||||
|
||||
msg = krb5_get_error_message(context, ret);
|
||||
|
||||
va_start(va, fmt);
|
||||
vasprintf(&str, fmt, va);
|
||||
aret = vasprintf(&str, fmt, va);
|
||||
va_end(va);
|
||||
|
||||
syslog(LOG_ERR, "%s: %s", str, msg);
|
||||
syslog(LOG_ERR, "%s: %s", aret != -1 ? str : "(nil)", msg);
|
||||
|
||||
krb5_free_error_message(context, msg);
|
||||
free(str);
|
||||
if (aret != -1)
|
||||
free(str);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -616,13 +616,13 @@ struct getargs args[] = {
|
||||
{ "user", 'l', arg_string, &user, "Run as this user",
|
||||
NULL },
|
||||
{ "tcp", 't', arg_flag, &tcp_flag,
|
||||
"Use a TCP connection for X11" },
|
||||
"Use a TCP connection for X11", NULL },
|
||||
{ "passive", 'P', arg_flag, &passive_flag,
|
||||
"Force a passive connection" },
|
||||
"Force a passive connection", NULL },
|
||||
{ "keepalive", 'k', arg_negative_flag, &keepalive_flag,
|
||||
"disable keep-alives" },
|
||||
"disable keep-alives", NULL },
|
||||
{ "debug", 'd', arg_flag, &debug_flag,
|
||||
"Enable debug information" },
|
||||
"Enable debug information", NULL },
|
||||
{ "version", 0, arg_flag, &version_flag, "Print version",
|
||||
NULL },
|
||||
{ "help", 0, arg_flag, &help_flag, NULL,
|
||||
|
@@ -336,7 +336,7 @@ doit_conn (kx_context *kc,
|
||||
}
|
||||
#endif
|
||||
memset (&__ss_addr, 0, sizeof(__ss_addr));
|
||||
addr->sa_family = kc->thisaddr->sa_family;
|
||||
__ss_addr.ss_family = kc->thisaddr->sa_family;
|
||||
if (kc->thisaddr_len > sizeof(__ss_addr)) {
|
||||
syslog(LOG_ERR, "error in af");
|
||||
return 1;
|
||||
@@ -403,6 +403,7 @@ close_connection(int fd, const char *message)
|
||||
char *p;
|
||||
int lsb = 0;
|
||||
size_t mlen;
|
||||
ssize_t ret;
|
||||
|
||||
mlen = strlen(message);
|
||||
if(mlen > 255)
|
||||
@@ -433,7 +434,7 @@ close_connection(int fd, const char *message)
|
||||
buf[6] = 0;
|
||||
buf[7] = (p - buf - 8) / 4;
|
||||
}
|
||||
write(fd, buf, p - buf);
|
||||
ret = write(fd, buf, p - buf);
|
||||
close(fd);
|
||||
}
|
||||
|
||||
@@ -707,12 +708,13 @@ static int help_flag = 0;
|
||||
|
||||
struct getargs args[] = {
|
||||
{ "inetd", 'i', arg_negative_flag, &inetd_flag,
|
||||
"Not started from inetd" },
|
||||
{ "tcp", 't', arg_flag, &tcp_flag, "Use TCP" },
|
||||
"Not started from inetd", NULL },
|
||||
{ "tcp", 't', arg_flag, &tcp_flag, "Use TCP",
|
||||
NULL },
|
||||
{ "port", 'p', arg_string, &port_str, "Use this port",
|
||||
"port" },
|
||||
{ "version", 0, arg_flag, &version_flag },
|
||||
{ "help", 0, arg_flag, &help_flag }
|
||||
{ "version", 0, arg_flag, &version_flag, NULL, NULL },
|
||||
{ "help", 0, arg_flag, &help_flag, NULL, NULL }
|
||||
};
|
||||
|
||||
static void
|
||||
|
@@ -53,10 +53,11 @@ extend_env(char *str)
|
||||
void
|
||||
add_env(const char *var, const char *value)
|
||||
{
|
||||
int aret;
|
||||
int i;
|
||||
char *str;
|
||||
asprintf(&str, "%s=%s", var, value);
|
||||
if(str == NULL)
|
||||
aret = asprintf(&str, "%s=%s", var, value);
|
||||
if(aret == -1)
|
||||
errx(1, "Out of memory!");
|
||||
for(i = 0; i < num_env; i++)
|
||||
if(strncmp(env[i], var, strlen(var)) == 0 &&
|
||||
|
@@ -48,7 +48,7 @@ struct limit {
|
||||
int has_limit;
|
||||
struct rlimit limit;
|
||||
} limits[] = {
|
||||
#define LIM(X, S) { #X, RLIMIT_##X, S, 0 }
|
||||
#define LIM(X, S) { #X, RLIMIT_##X, S, 0, {0, 0} }
|
||||
LIM(CORE, 1024),
|
||||
LIM(CPU, 60),
|
||||
LIM(DATA, 1024),
|
||||
@@ -75,7 +75,7 @@ struct limit {
|
||||
maxlogins
|
||||
priority
|
||||
*/
|
||||
{ NULL, 0 }
|
||||
{ NULL, 0, 0, 0, {0, 0} }
|
||||
};
|
||||
|
||||
static struct limit *
|
||||
|
@@ -246,18 +246,19 @@ static char *remote_host;
|
||||
static char *auth_level = NULL;
|
||||
|
||||
struct getargs args[] = {
|
||||
{ NULL, 'a', arg_string, &auth_level, "authentication mode" },
|
||||
{ NULL, 'a', arg_string, &auth_level, "authentication mode", NULL },
|
||||
#if 0
|
||||
{ NULL, 'd' },
|
||||
{ NULL, 'd', NULL, NULL, NULL, NULL },
|
||||
#endif
|
||||
{ NULL, 'f', arg_flag, &f_flag, "pre-authenticated" },
|
||||
{ NULL, 'f', arg_flag, &f_flag, "pre-authenticated", NULL },
|
||||
{ NULL, 'h', arg_string, &remote_host, "remote host", "hostname" },
|
||||
{ NULL, 'p', arg_flag, &p_flag, "don't purge environment" },
|
||||
{ NULL, 'p', arg_flag, &p_flag, "don't purge environment",
|
||||
NULL },
|
||||
#if 0
|
||||
{ NULL, 'r', arg_flag, &r_flag, "rlogin protocol" },
|
||||
{ NULL, 'r', arg_flag, &r_flag, "rlogin protocol", NULL },
|
||||
#endif
|
||||
{ "version", 0, arg_flag, &version_flag },
|
||||
{ "help", 0, arg_flag,&help_flag, }
|
||||
{ "version", 0, arg_flag, &version_flag, NULL, NULL },
|
||||
{ "help", 0, arg_flag,&help_flag, NULL, NULL }
|
||||
};
|
||||
|
||||
int nargs = sizeof(args) / sizeof(args[0]);
|
||||
|
@@ -46,16 +46,16 @@ static int version_flag;
|
||||
static int help_flag;
|
||||
|
||||
struct getargs args[] = {
|
||||
{ "list", 'l', arg_flag, &listp, "list OTP status" },
|
||||
{ "delete", 'd', arg_flag, &deletep, "delete OTP" },
|
||||
{ "open", 'o', arg_flag, &openp, "open a locked OTP" },
|
||||
{ "renew", 'r', arg_flag, &renewp, "securely renew OTP" },
|
||||
{ "list", 'l', arg_flag, &listp, "list OTP status", NULL },
|
||||
{ "delete", 'd', arg_flag, &deletep, "delete OTP", NULL },
|
||||
{ "open", 'o', arg_flag, &openp, "open a locked OTP", NULL },
|
||||
{ "renew", 'r', arg_flag, &renewp, "securely renew OTP", NULL },
|
||||
{ "hash", 'f', arg_string, &alg_string,
|
||||
"hash algorithm (md4, md5, or sha)", "algorithm"},
|
||||
{ "user", 'u', arg_string, &user,
|
||||
"user other than current user (root only)", "user" },
|
||||
{ "version", 0, arg_flag, &version_flag },
|
||||
{ "help", 'h', arg_flag, &help_flag }
|
||||
{ "version", 0, arg_flag, &version_flag, NULL, NULL },
|
||||
{ "help", 'h', arg_flag, &help_flag, NULL, NULL }
|
||||
};
|
||||
|
||||
int num_args = sizeof(args) / sizeof(args[0]);
|
||||
|
@@ -44,13 +44,14 @@ static int version_flag;
|
||||
static int help_flag;
|
||||
|
||||
struct getargs args[] = {
|
||||
{ "extended", 'e', arg_flag, &extendedp, "print keys in extended format" },
|
||||
{ "count", 'n', arg_integer, &count, "number of keys to print" },
|
||||
{ "hexadecimal", 'h', arg_flag, &hexp, "output in hexadecimal" },
|
||||
{ "extended", 'e', arg_flag, &extendedp, "print keys in extended format",
|
||||
NULL },
|
||||
{ "count", 'n', arg_integer, &count, "number of keys to print", NULL },
|
||||
{ "hexadecimal", 'h', arg_flag, &hexp, "output in hexadecimal", NULL },
|
||||
{ "hash", 'f', arg_string, &alg_string,
|
||||
"hash algorithm (md4, md5, or sha)", "algorithm"},
|
||||
{ "version", 0, arg_flag, &version_flag },
|
||||
{ "help", 0, arg_flag, &help_flag }
|
||||
{ "version", 0, arg_flag, &version_flag, NULL, NULL },
|
||||
{ "help", 0, arg_flag, &help_flag, NULL, NULL }
|
||||
};
|
||||
|
||||
int num_args = sizeof(args) / sizeof(args[0]);
|
||||
|
@@ -2,6 +2,8 @@
|
||||
|
||||
include $(top_srcdir)/Makefile.am.common
|
||||
|
||||
WFLAGS += $(WFLAGS_LITE)
|
||||
|
||||
noinst_PROGRAMS = pop_debug
|
||||
|
||||
libexec_PROGRAMS = popper
|
||||
|
@@ -223,7 +223,7 @@ doit(int s,
|
||||
unsigned sent_xdele = 0;
|
||||
int out_fd;
|
||||
char from_line[128];
|
||||
size_t from_line_length;
|
||||
ssize_t from_line_length;
|
||||
time_t now;
|
||||
struct write_state write_state;
|
||||
unsigned int numheaders = 1;
|
||||
|
@@ -2,6 +2,8 @@
|
||||
|
||||
include $(top_srcdir)/Makefile.am.common
|
||||
|
||||
WFLAGS += $(WFLAGS_LITE)
|
||||
|
||||
bin_PROGRAMS = rcp
|
||||
|
||||
rcp_SOURCES = rcp.c util.c rcp_locl.h extern.h
|
||||
|
@@ -58,21 +58,23 @@ static int fflag, tflag;
|
||||
static int version_flag, help_flag;
|
||||
|
||||
struct getargs args[] = {
|
||||
{ NULL, '4', arg_flag, &usekrb4, "use Kerberos 4 authentication" },
|
||||
{ NULL, '5', arg_flag, &usekrb5, "use Kerberos 5 authentication" },
|
||||
{ NULL, 'F', arg_flag, &forwardtkt, "forward credentials" },
|
||||
{ NULL, 'K', arg_flag, &usebroken, "use BSD authentication" },
|
||||
{ NULL, 'P', arg_string, &port, "non-default port", "port" },
|
||||
{ NULL, 'p', arg_flag, &pflag, "preserve file permissions" },
|
||||
{ NULL, 'r', arg_flag, &iamrecursive, "recursive mode" },
|
||||
{ NULL, 'x', arg_flag, &doencrypt, "use encryption" },
|
||||
{ NULL, 'z', arg_flag, &noencrypt, "don't encrypt" },
|
||||
{ NULL, 'd', arg_flag, &targetshouldbedirectory },
|
||||
{ NULL, 'e', arg_flag, &eflag, "passed to rsh" },
|
||||
{ NULL, 'f', arg_flag, &fflag },
|
||||
{ NULL, 't', arg_flag, &tflag },
|
||||
{ "version", 0, arg_flag, &version_flag },
|
||||
{ "help", 0, arg_flag, &help_flag }
|
||||
{ NULL, '4', arg_flag, &usekrb4, "use Kerberos 4 authentication", NULL },
|
||||
{ NULL, '5', arg_flag, &usekrb5, "use Kerberos 5 authentication", NULL },
|
||||
{ NULL, 'F', arg_flag, &forwardtkt, "forward credentials", NULL },
|
||||
{ NULL, 'K', arg_flag, &usebroken, "use BSD authentication",
|
||||
NULL },
|
||||
{ NULL, 'P', arg_string, &port, "non-default port", "port" },
|
||||
{ NULL, 'p', arg_flag, &pflag, "preserve file permissions",
|
||||
NULL },
|
||||
{ NULL, 'r', arg_flag, &iamrecursive, "recursive mode", NULL },
|
||||
{ NULL, 'x', arg_flag, &doencrypt, "use encryption", NULL },
|
||||
{ NULL, 'z', arg_flag, &noencrypt, "don't encrypt", NULL },
|
||||
{ NULL, 'd', arg_flag, &targetshouldbedirectory, NULL, NULL },
|
||||
{ NULL, 'e', arg_flag, &eflag, "passed to rsh", NULL },
|
||||
{ NULL, 'f', arg_flag, &fflag, NULL, NULL },
|
||||
{ NULL, 't', arg_flag, &tflag, NULL, NULL },
|
||||
{ "version", 0, arg_flag, &version_flag, NULL, NULL },
|
||||
{ "help", 0, arg_flag, &help_flag, NULL, NULL }
|
||||
};
|
||||
|
||||
static void
|
||||
|
@@ -4,6 +4,8 @@ include $(top_srcdir)/Makefile.am.common
|
||||
|
||||
AM_CPPFLAGS += -I$(srcdir)/../login $(INCLUDE_hcrypto)
|
||||
|
||||
WFLAGS += $(WFLAGS_LITE)
|
||||
|
||||
bin_PROGRAMS = rsh
|
||||
|
||||
man_MANS = rsh.1 rshd.8
|
||||
|
16
appl/su/su.c
16
appl/su/su.c
@@ -80,19 +80,19 @@ char tkfile[256];
|
||||
|
||||
struct getargs args[] = {
|
||||
{ "kerberos", 'K', arg_negative_flag, &kerberos_flag,
|
||||
"don't use kerberos" },
|
||||
"don't use kerberos", NULL },
|
||||
{ NULL, 'f', arg_flag, &csh_f_flag,
|
||||
"don't read .cshrc" },
|
||||
"don't read .cshrc", NULL },
|
||||
{ "full", 'l', arg_flag, &full_login,
|
||||
"simulate full login" },
|
||||
"simulate full login", NULL },
|
||||
{ NULL, 'm', arg_flag, &env_flag,
|
||||
"leave environment unmodified" },
|
||||
"leave environment unmodified", NULL },
|
||||
{ "instance", 'i', arg_string, &kerberos_instance,
|
||||
"root instance to use" },
|
||||
"root instance to use", NULL },
|
||||
{ "command", 'c', arg_string, &cmd,
|
||||
"command to execute" },
|
||||
{ "help", 'h', arg_flag, &help_flag },
|
||||
{ "version", 0, arg_flag, &version_flag },
|
||||
"command to execute", NULL },
|
||||
{ "help", 'h', arg_flag, &help_flag, NULL, NULL },
|
||||
{ "version", 0, arg_flag, &version_flag, NULL, NULL },
|
||||
};
|
||||
|
||||
|
||||
|
@@ -4,6 +4,8 @@ include $(top_srcdir)/Makefile.am.common
|
||||
|
||||
AM_CPPFLAGS += -I$(srcdir)/.. $(INCLUDE_hcrypto)
|
||||
|
||||
WFLAGS += $(WFLAGS_LITE)
|
||||
|
||||
noinst_LIBRARIES = libtelnet.a
|
||||
|
||||
libtelnet_a_SOURCES = \
|
||||
|
@@ -166,10 +166,10 @@ Authenticator authenticators[] = {
|
||||
rsaencpwd_status,
|
||||
rsaencpwd_printsub },
|
||||
#endif
|
||||
{ 0, },
|
||||
{ 0, 0, NULL, NULL, NULL, NULL, NULL, NULL },
|
||||
};
|
||||
|
||||
static Authenticator NoAuth = { 0 };
|
||||
static Authenticator NoAuth = { 0, 0, NULL, NULL, NULL, NULL, NULL, NULL };
|
||||
|
||||
static int i_support = 0;
|
||||
static int i_wont_support = 0;
|
||||
|
@@ -128,7 +128,7 @@ static long i_support_encrypt = typemask(ENCTYPE_DES_CFB64)
|
||||
ofb64_keyid,
|
||||
ofb64_printsub },
|
||||
#endif
|
||||
{ 0, },
|
||||
{ 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL },
|
||||
};
|
||||
|
||||
static unsigned char str_send[64] = { IAC, SB, TELOPT_ENCRYPT,
|
||||
|
@@ -2,6 +2,8 @@
|
||||
|
||||
include $(top_srcdir)/Makefile.am.common
|
||||
|
||||
WFLAGS += $(WFLAGS_LITE)
|
||||
|
||||
AM_CPPFLAGS += -I$(srcdir)/.. $(INCLUDE_hcrypto)
|
||||
|
||||
bin_PROGRAMS = telnet
|
||||
|
@@ -2,6 +2,8 @@
|
||||
|
||||
include $(top_srcdir)/Makefile.am.common
|
||||
|
||||
WFLAGS += $(WFLAGS_LITE)
|
||||
|
||||
AM_CPPFLAGS += -I$(srcdir)/.. $(INCLUDE_hcrypto)
|
||||
|
||||
libexec_PROGRAMS = telnetd
|
||||
|
@@ -87,7 +87,7 @@ ttloop(void)
|
||||
int
|
||||
stilloob(int s)
|
||||
{
|
||||
static struct timeval timeout = { 0 };
|
||||
static struct timeval timeout = { 0, 0 };
|
||||
fd_set excepts;
|
||||
int value;
|
||||
|
||||
|
@@ -2,6 +2,8 @@
|
||||
|
||||
include $(top_srcdir)/Makefile.am.common
|
||||
|
||||
WFLAGS += $(WFLAGS_LITE)
|
||||
|
||||
noinst_PROGRAMS = tcp_client tcp_server gssapi_server gssapi_client \
|
||||
uu_server uu_client nt_gss_server nt_gss_client http_client
|
||||
|
||||
|
@@ -51,9 +51,9 @@ static struct getargs args[] = {
|
||||
{ "keytab", 'k', arg_string, &keytab_str, "keytab to use", "keytab" },
|
||||
{ "mech", 'm', arg_string, &mech, "gssapi mech to use", "mech" },
|
||||
{ "password", 'P', arg_string, &password, "password to use", "password" },
|
||||
{ "fork", 'f', arg_flag, &fork_flag, "do fork" },
|
||||
{ "help", 'h', arg_flag, &help_flag },
|
||||
{ "version", 0, arg_flag, &version_flag }
|
||||
{ "fork", 'f', arg_flag, &fork_flag, "do fork", NULL },
|
||||
{ "help", 'h', arg_flag, &help_flag, NULL, NULL },
|
||||
{ "version", 0, arg_flag, &version_flag, NULL, NULL }
|
||||
};
|
||||
|
||||
static int num_args = sizeof(args) / sizeof(args[0]);
|
||||
|
@@ -117,15 +117,17 @@ static char *port_str = "http";
|
||||
static char *gss_service = "HTTP";
|
||||
|
||||
static struct getargs http_args[] = {
|
||||
{ "verbose", 'v', arg_flag, &verbose_flag, "verbose logging", },
|
||||
{ "verbose", 'v', arg_flag, &verbose_flag, "verbose logging", NULL },
|
||||
{ "port", 'p', arg_string, &port_str, "port to connect to", "port" },
|
||||
{ "delegate", 0, arg_flag, &delegate_flag, "gssapi delegate credential" },
|
||||
{ "delegate", 0, arg_flag, &delegate_flag, "gssapi delegate credential",
|
||||
NULL },
|
||||
{ "gss-service", 's', arg_string, &gss_service, "gssapi service to use",
|
||||
"service" },
|
||||
{ "mech", 'm', arg_string, &mech, "gssapi mech to use", "mech" },
|
||||
{ "mutual", 0, arg_negative_flag, &mutual_flag, "no gssapi mutual auth" },
|
||||
{ "help", 'h', arg_flag, &help_flag },
|
||||
{ "version", 0, arg_flag, &version_flag }
|
||||
{ "mutual", 0, arg_negative_flag, &mutual_flag, "no gssapi mutual auth",
|
||||
NULL },
|
||||
{ "help", 'h', arg_flag, &help_flag, NULL, NULL },
|
||||
{ "version", 0, arg_flag, &version_flag, NULL, NULL }
|
||||
};
|
||||
|
||||
static int num_http_args = sizeof(http_args) / sizeof(http_args[0]);
|
||||
|
@@ -58,8 +58,8 @@ static struct getargs args[] = {
|
||||
{ "service", 's', arg_string, &service, "service to use", "service" },
|
||||
{ "dump-auth", 0, arg_string, &auth_file, "dump authorization data",
|
||||
"file" },
|
||||
{ "help", 'h', arg_flag, &help_flag },
|
||||
{ "version", 0, arg_flag, &version_flag }
|
||||
{ "help", 'h', arg_flag, &help_flag, NULL, NULL },
|
||||
{ "version", 0, arg_flag, &version_flag, NULL, NULL }
|
||||
};
|
||||
|
||||
static int num_args = sizeof(args) / sizeof(args[0]);
|
||||
|
Reference in New Issue
Block a user