random fixes to make it build with socks
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5028 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -119,7 +119,12 @@
|
||||
|
||||
#ifdef SOCKS
|
||||
#include <socks.h>
|
||||
extern int LIBPREFIX(fclose) __P((FILE *));
|
||||
extern int LIBPREFIX(fclose) (FILE *);
|
||||
|
||||
/* This doesn't belong here. */
|
||||
struct tm *localtime(const time_t *);
|
||||
struct hostent *gethostbyname(const char *);
|
||||
|
||||
#endif
|
||||
|
||||
#include "ftp_var.h"
|
||||
|
@@ -203,6 +203,7 @@ mk_auth(struct krb4_data *d, KTEXT adat,
|
||||
int ret;
|
||||
CREDENTIALS cred;
|
||||
char sname[SNAME_SZ], inst[INST_SZ], realm[REALM_SZ];
|
||||
|
||||
strcpy_truncate(sname, service, sizeof(sname));
|
||||
strcpy_truncate(inst, krb_get_phost(host), sizeof(inst));
|
||||
strcpy_truncate(realm, krb_realmofhost(host), sizeof(realm));
|
||||
|
@@ -1100,7 +1100,7 @@ yylex(void)
|
||||
#ifdef HAVE_SETPROCTITLE
|
||||
if (strncasecmp(cbuf, "PASS", 4) != NULL)
|
||||
setproctitle("%s: %s", proctitle, cbuf);
|
||||
#endif
|
||||
#endif /* HAVE_SETPROCTITLE */
|
||||
if ((cp = strchr(cbuf, '\r'))) {
|
||||
*cp++ = '\n';
|
||||
*cp = '\0';
|
||||
@@ -1385,7 +1385,8 @@ sizecmd(char *filename)
|
||||
reply(550, "%s: not a plain file.", filename);
|
||||
else
|
||||
reply(213, "%lu", (unsigned long)stbuf.st_size);
|
||||
break; }
|
||||
break;
|
||||
}
|
||||
case TYPE_A: {
|
||||
FILE *fin;
|
||||
int c;
|
||||
@@ -1411,7 +1412,8 @@ sizecmd(char *filename)
|
||||
fclose(fin);
|
||||
|
||||
reply(213, "%lu", (unsigned long)count);
|
||||
break; }
|
||||
break;
|
||||
}
|
||||
default:
|
||||
reply(504, "SIZE not implemented for Type %c.", "?AEIL"[type]);
|
||||
}
|
||||
|
@@ -158,7 +158,7 @@
|
||||
|
||||
#ifdef SOCKS
|
||||
#include <socks.h>
|
||||
extern int LIBPREFIX(fclose) __P((FILE *));
|
||||
extern int LIBPREFIX(fclose) (FILE *);
|
||||
#endif
|
||||
|
||||
int yyparse();
|
||||
|
@@ -88,7 +88,7 @@ store_ticket(KTEXT cip)
|
||||
len = strnlen(ptr, left);
|
||||
if (len == left)
|
||||
return(INTK_BADPW);
|
||||
|
||||
|
||||
/* extract server's instance */
|
||||
strcpy_truncate(sp.instance, ptr, sizeof(sp.instance));
|
||||
ptr += len + 1;
|
||||
@@ -97,7 +97,7 @@ store_ticket(KTEXT cip)
|
||||
len = strnlen(ptr, left);
|
||||
if (len == left)
|
||||
return(INTK_BADPW);
|
||||
|
||||
|
||||
/* extract server's realm */
|
||||
strcpy_truncate(sp.realm, ptr, sizeof(sp.realm));
|
||||
ptr += len + 1;
|
||||
|
@@ -107,6 +107,9 @@
|
||||
|
||||
#ifdef SOCKS
|
||||
#include <socks.h>
|
||||
/* This doesn't belong here. */
|
||||
struct tm *localtime(const time_t *);
|
||||
struct hostent *gethostbyname(const char *);
|
||||
#endif
|
||||
|
||||
#include <krb.h>
|
||||
|
@@ -67,12 +67,13 @@ RCSID("$Id$");
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <roken.h>
|
||||
|
||||
#ifdef SOCKS
|
||||
#include <socks.h>
|
||||
#endif
|
||||
|
||||
#include <roken.h>
|
||||
|
||||
#include "encrypt.h"
|
||||
#include "auth.h"
|
||||
#include "misc-proto.h"
|
||||
|
@@ -42,13 +42,13 @@ RCSID("$Id$");
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
#include <roken.h>
|
||||
#ifdef SOCKS
|
||||
#include <socks.h>
|
||||
#endif
|
||||
|
||||
#include "encrypt.h"
|
||||
#include "misc-proto.h"
|
||||
#include <roken.h>
|
||||
|
||||
#include <des.h>
|
||||
|
||||
|
@@ -67,11 +67,11 @@ RCSID("$Id$");
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <roken.h>
|
||||
#ifdef SOCKS
|
||||
#include <socks.h>
|
||||
#endif
|
||||
|
||||
#include <roken.h>
|
||||
|
||||
/*
|
||||
* These functions pointers point to the current routines
|
||||
|
@@ -70,11 +70,11 @@ RCSID("$Id$");
|
||||
#include <pwd.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <roken.h>
|
||||
#ifdef SOCKS
|
||||
#include <socks.h>
|
||||
#endif
|
||||
|
||||
#include <roken.h>
|
||||
|
||||
#include "encrypt.h"
|
||||
#include "auth.h"
|
||||
|
@@ -68,11 +68,11 @@ RCSID("$Id$");
|
||||
#define Authenticator k5_Authenticator
|
||||
#include <krb5.h>
|
||||
#undef Authenticator
|
||||
#include <roken.h>
|
||||
#ifdef SOCKS
|
||||
#include <socks.h>
|
||||
#endif
|
||||
|
||||
#include <roken.h>
|
||||
|
||||
#include "encrypt.h"
|
||||
#include "auth.h"
|
||||
|
@@ -38,6 +38,7 @@ RCSID("$Id$");
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <roken.h>
|
||||
#ifdef SOCKS
|
||||
#include <socks.h>
|
||||
#endif
|
||||
@@ -45,7 +46,6 @@ RCSID("$Id$");
|
||||
#include "auth.h"
|
||||
#include "encrypt.h"
|
||||
|
||||
#include <roken.h>
|
||||
|
||||
char *RemoteHostName;
|
||||
char *LocalHostName;
|
||||
|
@@ -160,6 +160,9 @@
|
||||
|
||||
#ifdef SOCKS
|
||||
#include <socks.h>
|
||||
/* This doesn't belong here. */
|
||||
struct tm *localtime(const time_t *);
|
||||
struct hostent *gethostbyname(const char *);
|
||||
#endif
|
||||
|
||||
#ifdef KRB4
|
||||
|
@@ -259,8 +259,11 @@ netflush(void)
|
||||
* old 4.2 client (and thus unable to survive TCP urgent data),
|
||||
* write the entire buffer in non-OOB mode.
|
||||
*/
|
||||
#if 1 /* remove this to make it work between solaris 2.6 and linux */
|
||||
if ((neturg == 0) || (not42 == 0)) {
|
||||
#endif
|
||||
n = write(net, nbackp, n); /* normal write */
|
||||
#if 1 /* remove this to make it work between solaris 2.6 and linux */
|
||||
} else {
|
||||
n = neturg - nbackp;
|
||||
/*
|
||||
@@ -277,6 +280,7 @@ netflush(void)
|
||||
n = send(net, nbackp, n, MSG_OOB); /* URGENT data */
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (n < 0) {
|
||||
if (errno == EWOULDBLOCK || errno == EINTR)
|
||||
|
Reference in New Issue
Block a user