171 lines
4.6 KiB
Plaintext
171 lines
4.6 KiB
Plaintext
--- src/cmd/ksh93/features/options
|
|
+++ src/cmd/ksh93/features/options 2007-03-01 17:25:28.000000000 +0100
|
|
@@ -35,7 +35,7 @@ tst cross{
|
|
option TEST_L $?
|
|
test -f /etc/ksh.kshrc -o -f /etc/bash.bashrc &&
|
|
option SYSRC 0
|
|
- test -f /bin/universe && univ=`/bin/universe` > /dev/null 2>&1 -a ucb = "$univ"
|
|
+ test -x /bin/universe && univ=`/bin/universe` > /dev/null 2>&1 && test ucb = "$univ"
|
|
option UCB $?
|
|
}end
|
|
|
|
--- src/cmd/ksh93/sh/main.c
|
|
+++ src/cmd/ksh93/sh/main.c 2006-04-20 16:56:26.000000000 +0200
|
|
@@ -125,9 +125,9 @@ int sh_source(Shell_t *shp, Sfio_t *iop,
|
|
}
|
|
|
|
#ifdef S_ISSOCK
|
|
-#define REMOTE(m) (S_ISSOCK(m)||!(m))
|
|
+#define REMOTE(m) ((S_ISSOCK((m).st_mode)||!((m).st_mode))&&!((m).st_ino))
|
|
#else
|
|
-#define REMOTE(m) !(m)
|
|
+#define REMOTE(m) (!((m).st_mode)&&!((m).st_ino))
|
|
#endif
|
|
|
|
int sh_main(int ac, char *av[], void (*userinit)(int))
|
|
@@ -192,7 +192,7 @@ int sh_main(int ac, char *av[], void (*u
|
|
}
|
|
if(!sh_isoption(SH_RC) && (sh_isoption(SH_BASH) && !sh_isoption(SH_POSIX)
|
|
#if SHOPT_REMOTE
|
|
- || !fstat(0, &statb) && REMOTE(statb.st_mode)
|
|
+ || !fstat(0, &statb) && REMOTE(statb)
|
|
#endif
|
|
))
|
|
sh_onoption(SH_RC);
|
|
--- src/cmd/ksh93/sh/suid_exec.c
|
|
+++ src/cmd/ksh93/sh/suid_exec.c 2006-03-24 18:49:39.000000000 +0100
|
|
@@ -65,7 +65,11 @@
|
|
#define THISPROG "/etc/suid_exec"
|
|
#define DEFSHELL "/bin/sh"
|
|
|
|
+#if defined(linux)
|
|
+static void error_exit(const char*) __attribute__ ((noreturn));
|
|
+#else
|
|
static void error_exit(const char*);
|
|
+#endif
|
|
static int in_dir(const char*, const char*);
|
|
static int endsh(const char*);
|
|
#ifndef _lib_setregid
|
|
--- src/cmd/ksh93/tests/builtins.sh
|
|
+++ src/cmd/ksh93/tests/builtins.sh 2007-03-28 17:38:07.763927060 +0200
|
|
@@ -330,7 +330,7 @@ ifs=$IFS
|
|
IFS=,
|
|
set -- $(getconf LIBPATH)
|
|
IFS=$ifs
|
|
-env=
|
|
+env="LD_LIBRARY_PATH=\$LD_LIBRARY_PATH"
|
|
for v
|
|
do IFS=:
|
|
set -- $v
|
|
--- src/lib/libast/features/align.c
|
|
+++ src/lib/libast/features/align.c 2006-03-24 18:50:43.000000000 +0100
|
|
@@ -32,6 +32,7 @@
|
|
#include "FEATURE/common"
|
|
|
|
#include <setjmp.h>
|
|
+#include <stdio.h>
|
|
|
|
union _u_
|
|
{
|
|
--- src/lib/libast/features/botch.c
|
|
+++ src/lib/libast/features/botch.c 2006-03-24 18:51:25.000000000 +0100
|
|
@@ -27,6 +27,7 @@
|
|
* generate ast traps for botched standard prototypes
|
|
*/
|
|
|
|
+#include <stdio.h>
|
|
#include <sys/types.h>
|
|
|
|
#include "FEATURE/lib"
|
|
--- src/lib/libast/features/lib
|
|
+++ src/lib/libast/features/lib 2007-03-28 13:53:52.417162000 +0200
|
|
@@ -507,14 +507,19 @@ tst lib_utime_now note{ utime works with
|
|
}end
|
|
|
|
tst cross{
|
|
- u=att
|
|
- case `/bin/cat -s /dev/null/foo 2>&1` in
|
|
- '') ;;
|
|
- *) case `/bin/echo '\\t'` in
|
|
- '\t') u=ucb ;;
|
|
+ if test -n "$UNIVERSE"
|
|
+ then
|
|
+ u=$UNIVERSE
|
|
+ else
|
|
+ u=att
|
|
+ case `/bin/cat -s /dev/null/foo 2>&1` in
|
|
+ '') ;;
|
|
+ *) case `/bin/echo '\\t'` in
|
|
+ '\t') u=ucb ;;
|
|
+ esac
|
|
+ ;;
|
|
esac
|
|
- ;;
|
|
- esac
|
|
+ fi
|
|
echo "#define _UNIV_DEFAULT \"$u\" /* default universe name */"
|
|
}end
|
|
|
|
--- src/lib/libast/misc/procopen.c
|
|
+++ src/lib/libast/misc/procopen.c 2006-03-24 18:49:39.000000000 +0100
|
|
@@ -524,7 +524,7 @@ procopen(const char* cmd, char** argv, c
|
|
if (!fork())
|
|
{
|
|
sfsprintf(path, sizeof(path), "%d", getppid());
|
|
- execlp("trace", "trace", "-p", path, NiL);
|
|
+ execlp("trace", "trace", "-p", path, NULL);
|
|
_exit(EXIT_NOTFOUND);
|
|
}
|
|
sleep(2);
|
|
--- src/lib/libast/sfio/sfstrtof.h
|
|
+++ src/lib/libast/sfio/sfstrtof.h 2006-03-24 18:49:39.000000000 +0100
|
|
@@ -53,7 +53,7 @@
|
|
|
|
#if !defined(S2F_function)
|
|
#define S2F_function _sfdscan
|
|
-#define S2F_static 1
|
|
+#define S2F_static -1
|
|
#define S2F_type 2
|
|
#define S2F_scan 1
|
|
#ifndef elementsof
|
|
--- src/lib/libcmd/chmod.c
|
|
+++ src/lib/libcmd/chmod.c 2006-03-24 18:49:39.000000000 +0100
|
|
@@ -159,7 +159,7 @@ b_chmod(int argc, char** argv, void* con
|
|
int (*chmodf)(const char*, mode_t);
|
|
int notify = 0;
|
|
int ignore = 0;
|
|
-#if _lib_lchmod
|
|
+#if !defined(linux) && _lib_lchmod
|
|
int chlink = 0;
|
|
#endif
|
|
struct stat st;
|
|
@@ -183,7 +183,7 @@ b_chmod(int argc, char** argv, void* con
|
|
force = 1;
|
|
continue;
|
|
case 'h':
|
|
-#if _lib_lchmod
|
|
+#if !defined(linux) && _lib_lchmod
|
|
chlink = 1;
|
|
#endif
|
|
continue;
|
|
@@ -237,7 +237,7 @@ b_chmod(int argc, char** argv, void* con
|
|
}
|
|
}
|
|
chmodf =
|
|
-#if _lib_lchmod
|
|
+#if !defined(linux) && _lib_lchmod
|
|
chlink ? lchmod :
|
|
#endif
|
|
chmod;
|
|
--- src/cmd/ksh93/data/msg.c
|
|
+++ src/cmd/ksh93/data/msg.c 2007-04-02 14:59:18.748709295 +0000
|
|
@@ -176,7 +176,7 @@
|
|
const char e_bash_logout[] = "$HOME/.bash_logout";
|
|
const char e_bash_profile[] = "$HOME/.bash_profile";
|
|
#endif
|
|
-const char e_crondir[] = "/usr/spool/cron/atjobs";
|
|
+const char e_crondir[] = "/var/spool/cron";
|
|
const char e_prohibited[] = "login setuid/setgid shells prohibited";
|
|
#if SHOPT_SUID_EXEC
|
|
const char e_suidexec[] = "/etc/suid_exec";
|