mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
add --enable-core-libedit-support configure flag in case you want nicer command line stuff in the debug console (I know I do when I am coding dunno about you)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5044 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
36
libs/libedit/patches/08-el.c.patch
Normal file
36
libs/libedit/patches/08-el.c.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
--- export/src/el.c 2007-03-02 22:26:59.000000000 +0100
|
||||
+++ ../src/el.c 2007-03-02 22:38:45.000000000 +0100
|
||||
@@ -473,12 +473,17 @@
|
||||
|
||||
fp = NULL;
|
||||
if (fname == NULL) {
|
||||
-#ifdef HAVE_ISSETUGID
|
||||
static const char elpath[] = "/.editrc";
|
||||
+#ifdef MAXPATHLEN
|
||||
char path[MAXPATHLEN];
|
||||
+#else
|
||||
+ char path[4096];
|
||||
+#endif
|
||||
|
||||
+#ifdef HAVE_ISSETUGID
|
||||
if (issetugid())
|
||||
return (-1);
|
||||
+#endif
|
||||
if ((ptr = getenv("HOME")) == NULL)
|
||||
return (-1);
|
||||
if (strlcpy(path, ptr, sizeof(path)) >= sizeof(path))
|
||||
@@ -486,14 +491,6 @@
|
||||
if (strlcat(path, elpath, sizeof(path)) >= sizeof(path))
|
||||
return (-1);
|
||||
fname = path;
|
||||
-#else
|
||||
- /*
|
||||
- * If issetugid() is missing, always return an error, in order
|
||||
- * to keep from inadvertently opening up the user to a security
|
||||
- * hole.
|
||||
- */
|
||||
- return (-1);
|
||||
-#endif
|
||||
}
|
||||
if (fp == NULL)
|
||||
fp = fopen(fname, "r");
|
Reference in New Issue
Block a user