|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
Index: src/Makefile.in
|
|
|
|
|
--- src/Makefile.in.orig 2005-06-13 04:33:29 +0200
|
|
|
|
|
+++ src/Makefile.in 2007-12-28 10:43:39 +0100
|
|
|
|
|
@@ -427,7 +427,7 @@
|
|
|
|
|
--- src/Makefile.in.orig 2008-02-22 22:11:01 +0100
|
|
|
|
|
+++ src/Makefile.in 2010-01-24 21:56:44 +0100
|
|
|
|
|
@@ -442,7 +442,7 @@
|
|
|
|
|
|
|
|
|
|
install-sudosh.conf:
|
|
|
|
|
test -z "$(sysconfdir)" || $(mkdir_p) "$(DESTDIR)$(sysconfdir)"
|
|
|
|
@ -11,8 +11,8 @@ Index: src/Makefile.in
|
|
|
|
|
install: install-am install-sudosh.conf
|
|
|
|
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
|
|
|
|
Index: src/getopt.c
|
|
|
|
|
--- src/getopt.c.orig 2005-06-13 01:22:42 +0200
|
|
|
|
|
+++ src/getopt.c 2007-12-28 10:43:39 +0100
|
|
|
|
|
--- src/getopt.c.orig 2007-12-21 22:03:26 +0100
|
|
|
|
|
+++ src/getopt.c 2010-01-24 21:56:44 +0100
|
|
|
|
|
@@ -37,6 +37,8 @@
|
|
|
|
|
#include "config.h"
|
|
|
|
|
#endif
|
|
|
|
@ -23,31 +23,21 @@ Index: src/getopt.c
|
|
|
|
|
/* This is a separate conditional since some stdc systems
|
|
|
|
|
reject `defined (const)'. */
|
|
|
|
|
Index: src/parse.c
|
|
|
|
|
--- src/parse.c.orig 2005-06-13 01:22:42 +0200
|
|
|
|
|
+++ src/parse.c 2007-12-28 10:43:39 +0100
|
|
|
|
|
@@ -19,7 +19,8 @@
|
|
|
|
|
void parse(option * o, const char *file)
|
|
|
|
|
--- src/parse.c.orig 2008-02-22 22:07:45 +0100
|
|
|
|
|
+++ src/parse.c 2010-01-24 21:57:41 +0100
|
|
|
|
|
@@ -7,7 +7,8 @@
|
|
|
|
|
void parse(option * c, const char *file)
|
|
|
|
|
{
|
|
|
|
|
FILE *f = fopen(file, "r");
|
|
|
|
|
FILE *f;
|
|
|
|
|
- unsigned int line_number, i;
|
|
|
|
|
+ unsigned int line_number;
|
|
|
|
|
+ int i;
|
|
|
|
|
char line[BUFSIZ];
|
|
|
|
|
char *arg, *cmt, *opt;
|
|
|
|
|
config *scan;
|
|
|
|
|
@@ -38,6 +39,9 @@
|
|
|
|
|
while (isspace(*opt))
|
|
|
|
|
opt++;
|
|
|
|
|
|
|
|
|
|
+ if (strlen(opt)==0)
|
|
|
|
|
+ continue;
|
|
|
|
|
+
|
|
|
|
|
for (i = strlen(opt) - 1; i >= 0 && isspace(opt[i]); i--)
|
|
|
|
|
opt[i] = '\0';
|
|
|
|
|
|
|
|
|
|
int leftside;
|
|
|
|
|
char key[BUFSIZ], value[BUFSIZ];
|
|
|
|
|
Index: src/sudosh.c
|
|
|
|
|
--- src/sudosh.c.orig 2005-06-13 04:35:07 +0200
|
|
|
|
|
+++ src/sudosh.c 2007-12-28 10:43:39 +0100
|
|
|
|
|
--- src/sudosh.c.orig 2008-02-25 21:29:12 +0100
|
|
|
|
|
+++ src/sudosh.c 2010-01-24 21:56:44 +0100
|
|
|
|
|
@@ -28,6 +28,13 @@
|
|
|
|
|
|
|
|
|
|
#define WRITE(a, b, c) do_write(a, b, c, __FILE__, __LINE__)
|
|
|
|
@ -62,7 +52,7 @@ Index: src/sudosh.c
|
|
|
|
|
static struct termios termorig;
|
|
|
|
|
static struct winsize winorig;
|
|
|
|
|
|
|
|
|
|
@@ -545,19 +552,43 @@
|
|
|
|
|
@@ -507,19 +514,43 @@
|
|
|
|
|
{
|
|
|
|
|
char *sname;
|
|
|
|
|
|
|
|
|
@ -106,7 +96,7 @@ Index: src/sudosh.c
|
|
|
|
|
|
|
|
|
|
if ((p->sfd = open (sname, O_RDWR)) == -1)
|
|
|
|
|
{
|
|
|
|
|
@@ -619,9 +650,14 @@
|
|
|
|
|
@@ -581,9 +612,14 @@
|
|
|
|
|
for (i = 3; i < 100; ++i)
|
|
|
|
|
close (i);
|
|
|
|
|
|
|
|
|
@ -121,7 +111,7 @@ Index: src/sudosh.c
|
|
|
|
|
(void) ioctl (0, TIOCSWINSZ, &winorig);
|
|
|
|
|
|
|
|
|
|
setuid (getuid ());
|
|
|
|
|
@@ -663,6 +699,13 @@
|
|
|
|
|
@@ -629,6 +665,13 @@
|
|
|
|
|
{
|
|
|
|
|
static struct termios termnew;
|
|
|
|
|
|
|
|
|
@ -135,7 +125,7 @@ Index: src/sudosh.c
|
|
|
|
|
#ifdef TCGETS
|
|
|
|
|
if (ioctl (ttyfd, TCGETS, &termorig) == -1)
|
|
|
|
|
{
|
|
|
|
|
@@ -670,6 +713,7 @@
|
|
|
|
|
@@ -636,6 +679,7 @@
|
|
|
|
|
exit (EXIT_FAILURE);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
@ -143,7 +133,7 @@ Index: src/sudosh.c
|
|
|
|
|
|
|
|
|
|
if (ioctl (ttyfd, TIOCGWINSZ, &winorig) == -1)
|
|
|
|
|
{
|
|
|
|
|
@@ -677,6 +721,11 @@
|
|
|
|
|
@@ -643,6 +687,11 @@
|
|
|
|
|
exit (EXIT_FAILURE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -155,7 +145,7 @@ Index: src/sudosh.c
|
|
|
|
|
termnew.c_cc[VEOF] = 1;
|
|
|
|
|
termnew.c_iflag = BRKINT | ISTRIP | IXON | IXANY;
|
|
|
|
|
termnew.c_oflag = 0;
|
|
|
|
|
@@ -686,14 +735,20 @@
|
|
|
|
|
@@ -652,14 +701,20 @@
|
|
|
|
|
#ifdef TCSETS
|
|
|
|
|
(void) ioctl (ttyfd, TCSETS, &termnew);
|
|
|
|
|
#endif
|
|
|
|
|