mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
Hinzugefuegt:
* Net-Tools * Inetutils * Ed git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@316 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
166
src/patches/inetutils-1.4.2-daemon_fixes-1.patch
Normal file
166
src/patches/inetutils-1.4.2-daemon_fixes-1.patch
Normal file
@@ -0,0 +1,166 @@
|
||||
Submitted By: Randy McMurchy <randy_at_linuxfromscratch_dot_org>
|
||||
Date: 2005-03-23
|
||||
Initial Package Version: 1.4.2
|
||||
Upstream Status: Not sure
|
||||
Origin: Internet (URL's are now lost)
|
||||
Description: Fix the rexecd daemon so that it understands shadow
|
||||
passwords. Fix the rshd daemon so that it properly
|
||||
resolves hostnames.
|
||||
|
||||
diff -Naur inetutils-1.4.2-orig/rexecd/rexecd.c inetutils-1.4.2/rexecd/rexecd.c
|
||||
--- inetutils-1.4.2-orig/rexecd/rexecd.c 2002-12-11 12:38:00.000000000 +0000
|
||||
+++ inetutils-1.4.2/rexecd/rexecd.c 2005-02-22 19:53:44.146962264 +0000
|
||||
@@ -79,6 +79,10 @@
|
||||
#include <varargs.h>
|
||||
#endif
|
||||
|
||||
+#ifdef HAVE_SHADOW_H
|
||||
+#include <shadow.h>
|
||||
+#endif
|
||||
+
|
||||
void error __P ((const char *fmt, ...));
|
||||
/*
|
||||
* remote execute server:
|
||||
@@ -127,6 +131,10 @@
|
||||
char *cmdbuf, *cp, *namep;
|
||||
char *user, *pass;
|
||||
struct passwd *pwd;
|
||||
+#ifdef HAVE_SHADOW_H
|
||||
+ struct spwd *spwd;
|
||||
+ char *pw_field;
|
||||
+#endif
|
||||
int s;
|
||||
u_short port;
|
||||
int pv[2], pid, cc;
|
||||
@@ -186,6 +194,24 @@
|
||||
exit(1);
|
||||
}
|
||||
endpwent();
|
||||
+
|
||||
+#ifdef HAVE_SHADOW_H
|
||||
+ // Get encrypted password from /etc/shadow if possible,
|
||||
+ // else from /etc/passwd.
|
||||
+ spwd = getspnam(user);
|
||||
+ if (spwd) {
|
||||
+ pw_field = spwd->sp_pwdp;
|
||||
+ } else {
|
||||
+ pw_field = pwd->pw_passwd;
|
||||
+ }
|
||||
+ if (*pw_field != '\0') {
|
||||
+ namep = CRYPT (pass, pw_field);
|
||||
+ if (strcmp(namep, pw_field)) {
|
||||
+ error("Password incorrect.\n");
|
||||
+ exit(1);
|
||||
+ }
|
||||
+ }
|
||||
+#else
|
||||
if (*pwd->pw_passwd != '\0') {
|
||||
namep = CRYPT (pass, pwd->pw_passwd);
|
||||
if (strcmp(namep, pwd->pw_passwd)) {
|
||||
@@ -193,6 +219,7 @@
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
write(STDERR_FILENO, "\0", 1);
|
||||
if (port) {
|
||||
pipe(pv);
|
||||
diff -Naur inetutils-1.4.2-orig/rshd/rshd.c inetutils-1.4.2/rshd/rshd.c
|
||||
--- inetutils-1.4.2-orig/rshd/rshd.c 2002-12-11 12:38:00.000000000 +0000
|
||||
+++ inetutils-1.4.2/rshd/rshd.c 2005-02-22 19:54:33.162510768 +0000
|
||||
@@ -443,7 +443,7 @@
|
||||
dup2 (sockfd, STDERR_FILENO);
|
||||
}
|
||||
|
||||
- /* Get the "name" of the clent form its Internet address.
|
||||
+ /* Get the "name" of the client form its Internet address.
|
||||
* This is used for the autentication below
|
||||
*/
|
||||
errorstr = NULL;
|
||||
@@ -457,52 +457,49 @@
|
||||
* in a remote net; look up the name and check that this
|
||||
* address corresponds to the name.
|
||||
*/
|
||||
- hostname = strdup (hp->h_name);
|
||||
+ const char *remotehost = strdup(hp->h_name);
|
||||
#ifdef KERBEROS
|
||||
if (!use_kerberos)
|
||||
#endif
|
||||
- if (check_all || local_domain (hp->h_name))
|
||||
+ if (! remotehost)
|
||||
+ errorstr = "Out of memory\n";
|
||||
+ else if (check_all || local_domain (remotehost))
|
||||
{
|
||||
- char *remotehost = (char *) alloca (strlen (hp->h_name) + 1);
|
||||
- if (! remotehost)
|
||||
- errorstr = "Out of memory\n";
|
||||
- else
|
||||
+ errorhost = remotehost;
|
||||
+ hp = gethostbyname (remotehost);
|
||||
+ if (hp == NULL)
|
||||
{
|
||||
- strcpy (remotehost, hp->h_name);
|
||||
- errorhost = remotehost;
|
||||
- hp = gethostbyname (remotehost);
|
||||
- if (hp == NULL)
|
||||
+ syslog (LOG_INFO,
|
||||
+ "Couldn't look up address for %s", remotehost);
|
||||
+ errorstr = "Couldn't look up address for your host (%s)\n";
|
||||
+ hostname = strdup(inet_ntoa(fromp->sin_addr));
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ for (; ; hp->h_addr_list++)
|
||||
{
|
||||
- syslog (LOG_INFO,
|
||||
- "Couldn't look up address for %s", remotehost);
|
||||
- errorstr = "Couldn't look up address for your host (%s)\n";
|
||||
- hostname = inet_ntoa (fromp->sin_addr);
|
||||
+ if (hp->h_addr_list[0] == NULL)
|
||||
+ {
|
||||
+ syslog (LOG_NOTICE,
|
||||
+ "Host addr %s not listed for host %s",
|
||||
+ inet_ntoa (fromp->sin_addr), hp->h_name);
|
||||
+ errorstr = "Host address mismatch for %s\n";
|
||||
+ hostname = strdup(inet_ntoa(fromp->sin_addr));
|
||||
+ break;
|
||||
+ }
|
||||
+ if (!memcmp (hp->h_addr_list[0],
|
||||
+ (caddr_t)&fromp->sin_addr,
|
||||
+ sizeof fromp->sin_addr))
|
||||
+ {
|
||||
+ hostname = strdup(hp->h_name);
|
||||
+ break; /* equal, OK */
|
||||
+ }
|
||||
}
|
||||
- else
|
||||
- for (; ; hp->h_addr_list++)
|
||||
- {
|
||||
- if (hp->h_addr_list[0] == NULL)
|
||||
- {
|
||||
- syslog (LOG_NOTICE,
|
||||
- "Host addr %s not listed for host %s",
|
||||
- inet_ntoa (fromp->sin_addr), hp->h_name);
|
||||
- errorstr = "Host address mismatch for %s\n";
|
||||
- hostname = inet_ntoa (fromp->sin_addr);
|
||||
- break;
|
||||
- }
|
||||
- if (!memcmp (hp->h_addr_list[0],
|
||||
- (caddr_t)&fromp->sin_addr,
|
||||
- sizeof fromp->sin_addr))
|
||||
- {
|
||||
- hostname = hp->h_name;
|
||||
- break; /* equal, OK */
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
else
|
||||
- errorhost = hostname = inet_ntoa (fromp->sin_addr);
|
||||
+ errorhost = hostname = strdup(inet_ntoa(fromp->sin_addr));
|
||||
|
||||
#ifdef KERBEROS
|
||||
if (use_kerberos)
|
||||
|
||||
86
src/patches/net-tools-1.60-gcc34-3.patch
Normal file
86
src/patches/net-tools-1.60-gcc34-3.patch
Normal file
@@ -0,0 +1,86 @@
|
||||
Originaly By: Zack Winkles <winkie AT linuxfromscratch DOT org>
|
||||
Submitted By: Jim Gifford <jim AT linuxfromscratch DOT org>
|
||||
Date: 2004-06-23
|
||||
Initial Package Version: 1.60
|
||||
Origin: N/A
|
||||
Upstream Status: N/A
|
||||
Description: Fix some occurrences of syntax that GCC 3.4 doesn't like.
|
||||
|
||||
diff -Naur net-tools-1.60.orig/hostname.c net-tools-1.60/hostname.c
|
||||
--- net-tools-1.60.orig/hostname.c 2001-04-08 17:04:23.000000000 +0000
|
||||
+++ net-tools-1.60/hostname.c 2004-06-24 06:22:16.913258663 +0000
|
||||
@@ -78,6 +78,7 @@
|
||||
fprintf(stderr, _("%s: name too long\n"), program_name);
|
||||
break;
|
||||
default:
|
||||
+ ((void)0);
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
@@ -98,6 +99,7 @@
|
||||
fprintf(stderr, _("%s: name too long\n"), program_name);
|
||||
break;
|
||||
default:
|
||||
+ ((void)0);
|
||||
}
|
||||
exit(1);
|
||||
};
|
||||
@@ -117,6 +119,7 @@
|
||||
fprintf(stderr, _("%s: name too long\n"), program_name);
|
||||
break;
|
||||
default:
|
||||
+ ((void)0);
|
||||
}
|
||||
exit(1);
|
||||
};
|
||||
@@ -174,6 +177,7 @@
|
||||
printf("%s\n", hp->h_name);
|
||||
break;
|
||||
default:
|
||||
+ ((void)0);
|
||||
}
|
||||
}
|
||||
|
||||
diff -Naur net-tools-1.60.orig/lib/inet_sr.c net-tools-1.60/lib/inet_sr.c
|
||||
--- net-tools-1.60.orig/lib/inet_sr.c 2000-02-20 21:46:45.000000000 +0000
|
||||
+++ net-tools-1.60/lib/inet_sr.c 2004-06-24 06:22:01.967840446 +0000
|
||||
@@ -105,6 +105,7 @@
|
||||
case 2:
|
||||
isnet = 0; break;
|
||||
default:
|
||||
+ ((void)0);
|
||||
}
|
||||
|
||||
/* Fill in the other fields. */
|
||||
diff -Naur net-tools-1.60.orig/mii-tool.c net-tools-1.60/mii-tool.c
|
||||
--- net-tools-1.60.orig/mii-tool.c 2000-05-21 14:31:17.000000000 +0000
|
||||
+++ net-tools-1.60/mii-tool.c 2004-06-24 06:22:01.971839755 +0000
|
||||
@@ -379,17 +379,17 @@
|
||||
/*--------------------------------------------------------------------*/
|
||||
|
||||
const char *usage =
|
||||
-"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]
|
||||
- -V, --version display version information
|
||||
- -v, --verbose more verbose output
|
||||
- -R, --reset reset MII to poweron state
|
||||
- -r, --restart restart autonegotiation
|
||||
- -w, --watch monitor for link status changes
|
||||
- -l, --log with -w, write events to syslog
|
||||
- -A, --advertise=media,... advertise only specified media
|
||||
- -F, --force=media force specified media technology
|
||||
-media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,
|
||||
- (to advertise both HD and FD) 100baseTx, 10baseT\n";
|
||||
+"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]\n"
|
||||
+" -V, --version display version information\n"
|
||||
+" -v, --verbose more verbose output\n"
|
||||
+" -R, --reset reset MII to poweron state\n"
|
||||
+" -r, --restart restart autonegotiation\n"
|
||||
+" -w, --watch monitor for link status changes\n"
|
||||
+" -l, --log with -w, write events to syslog\n"
|
||||
+" -A, --advertise=media,... advertise only specified media\n"
|
||||
+" -F, --force=media force specified media technology\n"
|
||||
+"media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,\n"
|
||||
+" (to advertise both HD and FD) 100baseTx, 10baseT\n";
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
51
src/patches/net-tools-1.60-kernel_headers-2.patch
Normal file
51
src/patches/net-tools-1.60-kernel_headers-2.patch
Normal file
@@ -0,0 +1,51 @@
|
||||
Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
|
||||
Date: 2004-06-24
|
||||
Initial Package Version: 2.6
|
||||
Origin: Gentoo and Self
|
||||
Upstream Status: N/A
|
||||
Description: Fixes Compile Issues with the 2.6 Kernel
|
||||
|
||||
|
||||
diff -Naur net-tools-1.60.orig/hostname.c net-tools-1.60/hostname.c
|
||||
--- net-tools-1.60.orig/hostname.c 2001-04-08 17:04:23.000000000 +0000
|
||||
+++ net-tools-1.60/hostname.c 2004-06-24 06:17:32.517305695 +0000
|
||||
@@ -42,10 +42,16 @@
|
||||
#include "config.h"
|
||||
#include "version.h"
|
||||
#include "../intl.h"
|
||||
+#include <linux/version.h>
|
||||
|
||||
#if HAVE_AFDECnet
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
|
||||
#include <netdnet/dn.h>
|
||||
#endif
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
|
||||
+#include <linux/dn.h>
|
||||
+#endif
|
||||
+#endif
|
||||
|
||||
char *Release = RELEASE, *Version = "hostname 1.100 (2001-04-14)";
|
||||
|
||||
diff -Naur net-tools-1.60.orig/lib/x25_sr.c net-tools-1.60/lib/x25_sr.c
|
||||
--- net-tools-1.60.orig/lib/x25_sr.c 2000-05-20 13:38:10.000000000 +0000
|
||||
+++ net-tools-1.60/lib/x25_sr.c 2004-06-24 06:15:45.163773724 +0000
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/x25.h>
|
||||
+#include <linux/version.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <netdb.h>
|
||||
@@ -77,7 +78,11 @@
|
||||
rt.sigdigits=sigdigits;
|
||||
|
||||
/* x25_route_struct.address isn't type struct sockaddr_x25, Why? */
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
|
||||
memcpy(&rt.address, &sx25.sx25_addr, sizeof(x25_address));
|
||||
+#else
|
||||
+ memcpy(&rt.address, &sx25.sx25_addr, sizeof(struct x25_address));
|
||||
+#endif
|
||||
|
||||
while (*args) {
|
||||
if (!strcmp(*args,"device") || !strcmp(*args,"dev")) {
|
||||
27
src/patches/net-tools-1.60-mii_ioctl-1.patch
Normal file
27
src/patches/net-tools-1.60-mii_ioctl-1.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
Submitted By: Randy McMurchy <randy_at_linuxfromscratch_dot_org>
|
||||
Date: 2004-08-27
|
||||
Initial Package Version: 1.60
|
||||
Upstream Status: N/A (package is unmaintained)
|
||||
Origin: From Fedora Core (submitted to LFS-Hackers by Kevin White)
|
||||
Description: Fixes mii-tool when compiled using Linux-2.6.x
|
||||
|
||||
$LastChangedBy: randy $
|
||||
$Date: 2004-08-27 21:04:05 -0600 (Fri, 27 Aug 2004) $
|
||||
|
||||
--- net-tools-1.60/include/mii.h.bar Tue Jul 31 11:49:39 2001
|
||||
+++ net-tools-1.60/include/mii.h Tue Jul 31 11:49:33 2001
|
||||
@@ -11,11 +11,9 @@
|
||||
|
||||
/* network interface ioctl's for MII commands */
|
||||
#ifndef SIOCGMIIPHY
|
||||
-#define SIOCGMIIPHY (SIOCDEVPRIVATE) /* Read from current PHY */
|
||||
-#define SIOCGMIIREG (SIOCDEVPRIVATE+1) /* Read any PHY register */
|
||||
-#define SIOCSMIIREG (SIOCDEVPRIVATE+2) /* Write any PHY register */
|
||||
-#define SIOCGPARAMS (SIOCDEVPRIVATE+3) /* Read operational parameters */
|
||||
-#define SIOCSPARAMS (SIOCDEVPRIVATE+4) /* Set operational parameters */
|
||||
+#define SIOCGMIIPHY 0x8947 /* Read from current PHY */
|
||||
+#define SIOCGMIIREG 0x8948 /* Read any PHY register */
|
||||
+#define SIOCSMIIREG 0x8949 /* Write any PHY register */
|
||||
#endif
|
||||
|
||||
#include <linux/types.h>
|
||||
@@ -134,7 +134,7 @@ if [ -e "CONFIG_ROOT/red/active" ]; then
|
||||
/etc/rc.d/rc.firewall reload
|
||||
/usr/local/bin/setfilters
|
||||
/usr/local/bin/restartsnort red
|
||||
/usr/local/bin/qosctrl start
|
||||
/usr/local/bin/qosctrl restart
|
||||
/usr/local/bin/setportfw
|
||||
/usr/local/bin/setxtaccess
|
||||
/usr/local/bin/setddns.pl -f
|
||||
|
||||
Reference in New Issue
Block a user