Группа :: Система/Серверы
Пакет: pptpd
Главная Изменения Спек Патчи Загрузить Bugs and FR
Патч: pptpd-1.1.4-b2-asp-alt-alternate-pppd.patch
diff -urN poptop-1.1.4.orig/defaults.h poptop-1.1.4/defaults.h
--- poptop-1.1.4.orig/defaults.h 2003-02-27 17:41:23 +0200
+++ poptop-1.1.4/defaults.h 2004-05-05 16:08:12 +0300
@@ -73,5 +73,6 @@
#define LISTEN_KEYWORD "listen"
#define PIDFILE_KEYWORD "pidfile"
#define STIMEOUT_KEYWORD "stimeout"
+#define PPPD_KEYWORD "pppd"
#endif /* !_PPTPD_DEFAULTS_H */
diff -urN poptop-1.1.4.orig/pptpctrl.c poptop-1.1.4/pptpctrl.c
--- poptop-1.1.4.orig/pptpctrl.c 2003-05-13 16:10:12 +0300
+++ poptop-1.1.4/pptpctrl.c 2004-05-05 16:18:29 +0300
@@ -57,6 +57,7 @@
/* Globals because i'm lazy -tmk */
static char speed[32];
static char pppdxfig[256];
+static char pppdbin[256];
#ifdef BCRELAY
static char bcrelay[32]; /* specifies broadcast relay interface */
static pid_t bcrelayfork; /* so we can kill it after disconnect */
@@ -132,6 +133,7 @@
GETARG(speed);
GETARG(pppLocal);
GETARG(pppRemote);
+ GETARG(pppdbin);
/* callid.diff */
if (argv[arg] != NULL) {
@@ -145,6 +147,8 @@
if (*bcrelay)
syslog(LOG_DEBUG, "CTRL: BCrelay internal interface = %s", bcrelay);
#endif
+ if (*pppdbin)
+ syslog(LOG_DEBUG, "CTRL: pppd file = %s", pppdbin);
if (*pppLocal)
syslog(LOG_DEBUG, "CTRL: local address = %s", pppLocal);
if (*pppRemote)
@@ -658,7 +662,7 @@
char *pppd_argv[10];
int an = 0;
- pppd_argv[an++] = PPP_BINARY;
+ pppd_argv[an++] = *pppdbin ? pppdbin : PPP_BINARY;
#if BSDUSER_PPP
diff -urN poptop-1.1.4.orig/pptpd.c poptop-1.1.4/pptpd.c
--- poptop-1.1.4.orig/pptpd.c 2003-02-27 12:01:10 +0200
+++ poptop-1.1.4/pptpd.c 2004-05-05 16:15:04 +0300
@@ -53,6 +53,7 @@
char *pppdoptstr = NULL;
char *speedstr = NULL;
char *bindaddr = NULL;
+char *pppdstr = NULL;
#ifdef BCRELAY
char *bcrelay = NULL;
#endif
@@ -322,6 +323,8 @@
}
processIPStr(LOCAL, tmp);
#endif
+ if (!pppdstr && read_config_file(configFile, PPPD_KEYWORD, tmp) > 0)
+ pppdstr = strdup(tmp);
free(configFile);
diff -urN poptop-1.1.4.orig/pptpmanager.c poptop-1.1.4/pptpmanager.c
--- poptop-1.1.4.orig/pptpmanager.c 2003-04-07 15:37:52 +0300
+++ poptop-1.1.4/pptpmanager.c 2004-05-05 16:30:09 +0300
@@ -61,6 +61,7 @@
extern char *speedstr;
extern char *bindaddr;
extern int pptp_debug;
+extern char *pppdstr;
#if !defined(PPPD_IP_ALLOC)
extern char localIP[MAX_CONNECTIONS][16];
@@ -402,6 +403,7 @@
char ctrl_bcrelay[2];
#endif
char pppdoptfile_argv[2];
+ char pppdfile_argv[16];
char speedgiven_argv[2];
extern char **environ;
@@ -478,6 +480,14 @@
NUM2ARRAY(callid_argv, unique_call_id);
ctrl_argv[pptpctrl_argc++] = callid_argv;
+ /* pppdstr = TRUE or FALSE; so the CTRL manager knows whether to load a non-standard pppd */
+ sprintf(pppdfile_argv, "%d", pppdstr ? 1 : 0);
+ ctrl_argv[pptpctrl_argc++] = pppdfile_argv;
+ if (pppdstr) {
+ /* send the option filename so the CTRL manager can launch alternate pppd */
+ ctrl_argv[pptpctrl_argc++] = pppdstr;
+ }
+
/* terminate argv array with a NULL */
ctrl_argv[pptpctrl_argc] = NULL;
pptpctrl_argc++;