Another iteration of changes intended to deal with MacOS X specific build
problems. Unfortunately, without access to a MacOS X build environment, some of these have to be mere educated guesses... git-svn-id: https://shellinabox.googlecode.com/svn/trunk@232 0da03de8-d603-11dd-86c2-0f8696b7b6f9
This commit is contained in:
parent
301823036a
commit
925c2385e7
13 changed files with 91 additions and 64 deletions
35
Makefile.am
35
Makefile.am
|
@ -262,9 +262,10 @@ clean-local:
|
|||
@mkdir -p "`dirname "$@"`"
|
||||
@{ sym="`echo "$<" | $(symbolname)`"; \
|
||||
echo "static const char $${sym}Start[] ="; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ /\\/g;s/$$/"/'; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/ */\\/g'; \
|
||||
echo ';'; \
|
||||
echo "static const int $${sym}Size=(int)sizeof($${sym}Start);"; \
|
||||
echo "static const int $${sym}Size ATTR_UNUSED =" \
|
||||
"(int)sizeof($${sym}Start);"; \
|
||||
} >"$@"
|
||||
|
||||
.gif.h:
|
||||
|
@ -272,9 +273,10 @@ clean-local:
|
|||
@mkdir -p "`dirname "$@"`"
|
||||
@{ sym="`echo "$<" | $(symbolname)`"; \
|
||||
echo "static const char $${sym}Start[] ="; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ /\\/g;s/$$/"/'; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/ */\\/g'; \
|
||||
echo ';'; \
|
||||
echo "static const int $${sym}Size=(int)sizeof($${sym}Start);"; \
|
||||
echo "static const int $${sym}Size ATTR_UNUSED =" \
|
||||
"(int)sizeof($${sym}Start);"; \
|
||||
} >"$@"
|
||||
|
||||
.png.h:
|
||||
|
@ -282,9 +284,10 @@ clean-local:
|
|||
@mkdir -p "`dirname "$@"`"
|
||||
@{ sym="`echo "$<" | $(symbolname)`"; \
|
||||
echo "static const char $${sym}Start[] ="; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ /\\/g;s/$$/"/'; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/ */\\/g'; \
|
||||
echo ';'; \
|
||||
echo "static const int $${sym}Size=(int)sizeof($${sym}Start);"; \
|
||||
echo "static const int $${sym}Size ATTR_UNUSED =" \
|
||||
"(int)sizeof($${sym}Start);"; \
|
||||
} >"$@"
|
||||
|
||||
.html.h:
|
||||
|
@ -292,9 +295,10 @@ clean-local:
|
|||
@mkdir -p "`dirname "$@"`"
|
||||
@{ sym="`echo "$<" | $(symbolname)`"; \
|
||||
echo "static const char $${sym}Start[] ="; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ /\\/g;s/$$/"/'; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/ */\\/g'; \
|
||||
echo ';'; \
|
||||
echo "static const int $${sym}Size=(int)sizeof($${sym}Start);"; \
|
||||
echo "static const int $${sym}Size ATTR_UNUSED =" \
|
||||
"(int)sizeof($${sym}Start);"; \
|
||||
} >"$@"
|
||||
|
||||
|
||||
|
@ -303,9 +307,10 @@ clean-local:
|
|||
@mkdir -p "`dirname "$@"`"
|
||||
@{ sym="`echo "$<" | $(symbolname)`"; \
|
||||
echo "static const char $${sym}Start[] ="; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ /\\/g;s/$$/"/'; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/ */\\/g'; \
|
||||
echo ';'; \
|
||||
echo "static const int $${sym}Size=(int)sizeof($${sym}Start);"; \
|
||||
echo "static const int $${sym}Size ATTR_UNUSED =" \
|
||||
"(int)sizeof($${sym}Start);"; \
|
||||
} >"$@"
|
||||
|
||||
.jspp.js:
|
||||
|
@ -323,9 +328,10 @@ clean-local:
|
|||
@mkdir -p "`dirname "$@"`"
|
||||
@{ sym="`echo "$<" | $(symbolname)`"; \
|
||||
echo "static const char $${sym}Start[] ="; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ /\\/g;s/$$/"/'; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/ */\\/g'; \
|
||||
echo ';'; \
|
||||
echo "static const int $${sym}Size=(int)sizeof($${sym}Start);"; \
|
||||
echo "static const int $${sym}Size ATTR_UNUSED =" \
|
||||
"(int)sizeof($${sym}Start);"; \
|
||||
} >"$@"
|
||||
|
||||
|
||||
|
@ -334,8 +340,9 @@ clean-local:
|
|||
@mkdir -p "`dirname "$@"`"
|
||||
@{ sym="`echo "$<" | $(symbolname)`"; \
|
||||
echo "static const char $${sym}Start[] ="; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ /\\/g;s/$$/"/'; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/ */\\/g'; \
|
||||
echo ';'; \
|
||||
echo "static const int $${sym}Size=(int)sizeof($${sym}Start);"; \
|
||||
echo "static const int $${sym}Size ATTR_UNUSED =" \
|
||||
"(int)sizeof($${sym}Start);"; \
|
||||
} >"$@"
|
||||
|
||||
|
|
35
Makefile.in
35
Makefile.in
|
@ -1235,9 +1235,10 @@ clean-local:
|
|||
@mkdir -p "`dirname "$@"`"
|
||||
@{ sym="`echo "$<" | $(symbolname)`"; \
|
||||
echo "static const char $${sym}Start[] ="; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ /\\/g;s/$$/"/'; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/ */\\/g'; \
|
||||
echo ';'; \
|
||||
echo "static const int $${sym}Size=(int)sizeof($${sym}Start);"; \
|
||||
echo "static const int $${sym}Size ATTR_UNUSED =" \
|
||||
"(int)sizeof($${sym}Start);"; \
|
||||
} >"$@"
|
||||
|
||||
.gif.h:
|
||||
|
@ -1245,9 +1246,10 @@ clean-local:
|
|||
@mkdir -p "`dirname "$@"`"
|
||||
@{ sym="`echo "$<" | $(symbolname)`"; \
|
||||
echo "static const char $${sym}Start[] ="; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ /\\/g;s/$$/"/'; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/ */\\/g'; \
|
||||
echo ';'; \
|
||||
echo "static const int $${sym}Size=(int)sizeof($${sym}Start);"; \
|
||||
echo "static const int $${sym}Size ATTR_UNUSED =" \
|
||||
"(int)sizeof($${sym}Start);"; \
|
||||
} >"$@"
|
||||
|
||||
.png.h:
|
||||
|
@ -1255,9 +1257,10 @@ clean-local:
|
|||
@mkdir -p "`dirname "$@"`"
|
||||
@{ sym="`echo "$<" | $(symbolname)`"; \
|
||||
echo "static const char $${sym}Start[] ="; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ /\\/g;s/$$/"/'; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/ */\\/g'; \
|
||||
echo ';'; \
|
||||
echo "static const int $${sym}Size=(int)sizeof($${sym}Start);"; \
|
||||
echo "static const int $${sym}Size ATTR_UNUSED =" \
|
||||
"(int)sizeof($${sym}Start);"; \
|
||||
} >"$@"
|
||||
|
||||
.html.h:
|
||||
|
@ -1265,9 +1268,10 @@ clean-local:
|
|||
@mkdir -p "`dirname "$@"`"
|
||||
@{ sym="`echo "$<" | $(symbolname)`"; \
|
||||
echo "static const char $${sym}Start[] ="; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ /\\/g;s/$$/"/'; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/ */\\/g'; \
|
||||
echo ';'; \
|
||||
echo "static const int $${sym}Size=(int)sizeof($${sym}Start);"; \
|
||||
echo "static const int $${sym}Size ATTR_UNUSED =" \
|
||||
"(int)sizeof($${sym}Start);"; \
|
||||
} >"$@"
|
||||
|
||||
.ico.h:
|
||||
|
@ -1275,9 +1279,10 @@ clean-local:
|
|||
@mkdir -p "`dirname "$@"`"
|
||||
@{ sym="`echo "$<" | $(symbolname)`"; \
|
||||
echo "static const char $${sym}Start[] ="; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ /\\/g;s/$$/"/'; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/ */\\/g'; \
|
||||
echo ';'; \
|
||||
echo "static const int $${sym}Size=(int)sizeof($${sym}Start);"; \
|
||||
echo "static const int $${sym}Size ATTR_UNUSED =" \
|
||||
"(int)sizeof($${sym}Start);"; \
|
||||
} >"$@"
|
||||
|
||||
.jspp.js:
|
||||
|
@ -1295,9 +1300,10 @@ clean-local:
|
|||
@mkdir -p "`dirname "$@"`"
|
||||
@{ sym="`echo "$<" | $(symbolname)`"; \
|
||||
echo "static const char $${sym}Start[] ="; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ /\\/g;s/$$/"/'; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/ */\\/g'; \
|
||||
echo ';'; \
|
||||
echo "static const int $${sym}Size=(int)sizeof($${sym}Start);"; \
|
||||
echo "static const int $${sym}Size ATTR_UNUSED =" \
|
||||
"(int)sizeof($${sym}Start);"; \
|
||||
} >"$@"
|
||||
|
||||
.wav.h:
|
||||
|
@ -1305,9 +1311,10 @@ clean-local:
|
|||
@mkdir -p "`dirname "$@"`"
|
||||
@{ sym="`echo "$<" | $(symbolname)`"; \
|
||||
echo "static const char $${sym}Start[] ="; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ /\\/g;s/$$/"/'; \
|
||||
od -vb "$<" | sed 's/[0-7]*/"/;s/ *$$/"/;/^""$$/d;s/ */\\/g'; \
|
||||
echo ';'; \
|
||||
echo "static const int $${sym}Size=(int)sizeof($${sym}Start);"; \
|
||||
echo "static const int $${sym}Size ATTR_UNUSED =" \
|
||||
"(int)sizeof($${sym}Start);"; \
|
||||
} >"$@"
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
|
|
2
config.h
2
config.h
|
@ -171,7 +171,7 @@
|
|||
#define STDC_HEADERS 1
|
||||
|
||||
/* Most recent revision number in the version control system */
|
||||
#define VCS_REVISION "231"
|
||||
#define VCS_REVISION "232"
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "2.10"
|
||||
|
|
2
configure
vendored
2
configure
vendored
|
@ -2328,7 +2328,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
|
|||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
VCS_REVISION=231
|
||||
VCS_REVISION=232
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
|
|
|
@ -2,7 +2,7 @@ AC_PREREQ(2.57)
|
|||
|
||||
dnl This is the one location where the authoritative version number is stored
|
||||
AC_INIT(shellinabox, 2.10, markus@shellinabox.com)
|
||||
VCS_REVISION=231
|
||||
VCS_REVISION=232
|
||||
AC_SUBST(VCS_REVISION)
|
||||
AC_DEFINE_UNQUOTED(VCS_REVISION, "${VCS_REVISION}",
|
||||
[Most recent revision number in the version control system])
|
||||
|
|
|
@ -2402,7 +2402,7 @@ VT100.prototype.toggleCursorBlinking = function() {
|
|||
};
|
||||
|
||||
VT100.prototype.about = function() {
|
||||
alert("VT100 Terminal Emulator " + "2.10 (revision 231)" +
|
||||
alert("VT100 Terminal Emulator " + "2.10 (revision 232)" +
|
||||
"\nCopyright 2008-2010 by Markus Gutschke\n" +
|
||||
"For more information check http://shellinabox.com");
|
||||
};
|
||||
|
|
|
@ -167,6 +167,17 @@ static int (*x_misc_conv)(int, const struct pam_message **,
|
|||
#define misc_conv x_misc_conv
|
||||
#endif
|
||||
|
||||
// MacOS X has a somewhat unusual definition of getgrouplist() which can
|
||||
// trigger a compile warning. Unfortunately, there is no good feature test
|
||||
// for this particular problem.
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
static int x_getgrouplist(const char *user, gid_t group,
|
||||
gid_t *groups, int *ngroups) {
|
||||
return getgrouplist(user, (int)group, (int *)groups, ngroups);
|
||||
}
|
||||
#define getgrouplist x_getgrouplist
|
||||
#endif
|
||||
|
||||
static int launcher = -1;
|
||||
static uid_t restricted;
|
||||
|
||||
|
|
|
@ -274,7 +274,7 @@ uid_t getUserId(const char *name) {
|
|||
return uid;
|
||||
}
|
||||
|
||||
uid_t parseUser(const char *arg, const char **name) {
|
||||
uid_t parseUserArg(const char *arg, const char **name) {
|
||||
char *end;
|
||||
errno = 0;
|
||||
unsigned long l = strtoul(arg, &end, 10);
|
||||
|
@ -404,7 +404,7 @@ gid_t getGroupId(const char *name) {
|
|||
return gid;
|
||||
}
|
||||
|
||||
gid_t parseGroup(const char *arg, const char **name) {
|
||||
gid_t parseGroupArg(const char *arg, const char **name) {
|
||||
char *end;
|
||||
errno = 0;
|
||||
unsigned long l = strtoul(arg, &end, 10);
|
||||
|
|
|
@ -55,10 +55,10 @@ void lowerPrivileges(void);
|
|||
void dropPrivileges(void);
|
||||
const char *getUserName(uid_t uid);
|
||||
uid_t getUserId(const char *name);
|
||||
uid_t parseUser(const char *arg, const char **name);
|
||||
uid_t parseUserArg(const char *arg, const char **name);
|
||||
const char *getGroupName(gid_t gid);
|
||||
gid_t getGroupId(const char *name);
|
||||
gid_t parseGroup(const char *arg, const char **name);
|
||||
gid_t parseGroupArg(const char *arg, const char **name);
|
||||
|
||||
#ifndef HAVE_GETRESUID
|
||||
int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
|
||||
|
|
|
@ -180,7 +180,8 @@ void initService(struct Service *service, const char *arg) {
|
|||
service->authUser = 0;
|
||||
|
||||
// Numeric or symbolic user id
|
||||
service->uid = parseUser(arg, &service->user);
|
||||
service->uid = parseUserArg(arg,
|
||||
&service->user);
|
||||
*ptr = ':';
|
||||
arg = ptr + 1;
|
||||
|
||||
|
@ -189,7 +190,8 @@ void initService(struct Service *service, const char *arg) {
|
|||
goto error;
|
||||
}
|
||||
*ptr = '\000';
|
||||
service->gid = parseGroup(arg, &service->group);
|
||||
service->gid = parseGroupArg(arg,
|
||||
&service->group);
|
||||
}
|
||||
*ptr = ':';
|
||||
arg = ptr + 1;
|
||||
|
|
|
@ -358,7 +358,7 @@ ShellInABox.prototype.extendContextMenu = function(entries, actions) {
|
|||
};
|
||||
|
||||
ShellInABox.prototype.about = function() {
|
||||
alert("Shell In A Box version " + "2.10 (revision 231)" +
|
||||
alert("Shell In A Box version " + "2.10 (revision 232)" +
|
||||
"\nCopyright 2008-2010 by Markus Gutschke\n" +
|
||||
"For more information check http://shellinabox.com" +
|
||||
(typeof serverSupportsSSL != 'undefined' && serverSupportsSSL ?
|
||||
|
|
|
@ -76,6 +76,14 @@
|
|||
#include "shellinabox/session.h"
|
||||
#include "shellinabox/usercss.h"
|
||||
|
||||
#ifdef HAVE_UNUSED
|
||||
#defined ATTR_UNUSED __attribute__((unused))
|
||||
#defined UNUSED(x) do { } while (0)
|
||||
#else
|
||||
#define ATTR_UNUSED
|
||||
#define UNUSED(x) do { (void)(x); } while (0)
|
||||
#endif
|
||||
|
||||
// Embedded resources
|
||||
#include "shellinabox/beep.h"
|
||||
#include "shellinabox/cgi_root.h"
|
||||
|
@ -89,14 +97,6 @@
|
|||
#include "shellinabox/styles.h"
|
||||
#include "shellinabox/vt100.h"
|
||||
|
||||
#ifdef HAVE_UNUSED
|
||||
#defined ATTR_UNUSED __attribute__((unused))
|
||||
#defined UNUSED(x) do { } while (0)
|
||||
#else
|
||||
#define ATTR_UNUSED
|
||||
#define UNUSED(x) do { (void)(x); } while (0)
|
||||
#endif
|
||||
|
||||
#define PORTNUM 4200
|
||||
#define MAX_RESPONSE 2048
|
||||
|
||||
|
@ -1013,7 +1013,7 @@ static void parseArgs(int argc, char * const argv[]) {
|
|||
if (!optarg || !*optarg) {
|
||||
fatal("\"--group\" expects a group name.");
|
||||
}
|
||||
runAsGroup = parseGroup(optarg, NULL);
|
||||
runAsGroup = parseGroupArg(optarg, NULL);
|
||||
} else if (!idx--) {
|
||||
// Linkify
|
||||
if (!strcmp(optarg, "none")) {
|
||||
|
@ -1095,7 +1095,7 @@ static void parseArgs(int argc, char * const argv[]) {
|
|||
if (!optarg || !*optarg) {
|
||||
fatal("\"--user\" expects a user name.");
|
||||
}
|
||||
runAsUser = parseUser(optarg, NULL);
|
||||
runAsUser = parseUserArg(optarg, NULL);
|
||||
} else if (!idx--) {
|
||||
// User CSS
|
||||
if (!optarg || !*optarg) {
|
||||
|
|
|
@ -2402,7 +2402,7 @@ VT100.prototype.toggleCursorBlinking = function() {
|
|||
};
|
||||
|
||||
VT100.prototype.about = function() {
|
||||
alert("VT100 Terminal Emulator " + "2.10 (revision 231)" +
|
||||
alert("VT100 Terminal Emulator " + "2.10 (revision 232)" +
|
||||
"\nCopyright 2008-2010 by Markus Gutschke\n" +
|
||||
"For more information check http://shellinabox.com");
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue