- Fixed a few more build issues.
+2009-08-01 Markus Gutschke <markus@shellinabox.com>
+
+ * Released version 2.1
+
+ * Fixed build errors mostly related to x86_64.
+
+ * Added --no-beep command line option to avoid VLC plugin crashing
+ Firefox/x86_64.
+
+ * Fixed multi-line selections in Firefox.
+
2009-01-01 Markus Gutschke <markus@shellinabox.com>
* Added CGI mode for demand-loading the shellinaboxd daemon
.css.o:
@$(ECHO) objcopy "$<" "$@"
@objcopy \
- -I binary `echo "$(build_cpu)" | \
+ -I binary `echo "$(host_cpu)" | \
grep -q '^i[0-9]86$$' && \
echo ' -O elf32-i386 -B i386' || \
echo ' -O elf64-x86-64 -B i386:x86-64'` \
.html.o:
@$(ECHO) objcopy "$<" "$@"
@objcopy \
- -I binary `echo "$(build_cpu)" | \
+ -I binary `echo "$(host_cpu)" | \
grep -q '^i[0-9]86$$' && \
echo ' -O elf32-i386 -B i386' || \
echo ' -O elf64-x86-64 -B i386:x86-64'` \
.ico.o:
@$(ECHO) objcopy "$<" "$@"
@objcopy \
- -I binary `echo "$(build_cpu)" | \
+ -I binary `echo "$(host_cpu)" | \
grep -q '^i[0-9]86$$' && \
echo ' -O elf32-i386 -B i386' || \
echo ' -O elf64-x86-64 -B i386:x86-64'` \
;s/^#/\/\/ #/ \
;s/VERSION/\"@VERSION@\"/g" "$<" >"$@.pre" && \
objcopy \
- -I binary `echo $(build_cpu) | \
+ -I binary `echo $(host_cpu) | \
grep -q '^i[0-9]86$$' && \
echo ' -O elf32-i386 -B i386' || \
echo ' -O elf64-x86-64 -B i386:x86-64'` \
.wav.o:
@$(ECHO) objcopy "$<" "$@"
@objcopy \
- -I binary `echo "$(build_cpu)" | \
+ -I binary `echo "$(host_cpu)" | \
grep -q '^i[0-9]86$$' && \
echo ' -O elf32-i386 -B i386' || \
echo ' -O elf64-x86-64 -B i386:x86-64'` \
.css.o:
@$(ECHO) objcopy "$<" "$@"
@objcopy \
- -I binary `echo "$(build_cpu)" | \
+ -I binary `echo "$(host_cpu)" | \
grep -q '^i[0-9]86$$' && \
echo ' -O elf32-i386 -B i386' || \
- echo ' -O elf64-x86-64 -B x86-64'` \
+ echo ' -O elf64-x86-64 -B i386:x86-64'` \
`echo "$<" | sed -e ' \
s/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /; \
t0; s/\([^.]*\)\([.].*\)/\1\2=\1 /; t0; s/.*/&=& /;:0; \
.html.o:
@$(ECHO) objcopy "$<" "$@"
@objcopy \
- -I binary `echo "$(build_cpu)" | \
+ -I binary `echo "$(host_cpu)" | \
grep -q '^i[0-9]86$$' && \
echo ' -O elf32-i386 -B i386' || \
- echo ' -O elf64-x86-64 -B x86-64'` \
+ echo ' -O elf64-x86-64 -B i386:x86-64'` \
`echo "$<" | sed -e ' \
s/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /; \
t0; s/\([^.]*\)\([.].*\)/\1\2=\1 /; t0; s/.*/&=& /;:0; \
.ico.o:
@$(ECHO) objcopy "$<" "$@"
@objcopy \
- -I binary `echo "$(build_cpu)" | \
+ -I binary `echo "$(host_cpu)" | \
grep -q '^i[0-9]86$$' && \
echo ' -O elf32-i386 -B i386' || \
- echo ' -O elf64-x86-64 -B x86-64'` \
+ echo ' -O elf64-x86-64 -B i386:x86-64'` \
`echo "$<" | sed -e ' \
s/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /; \
t0; s/\([^.]*\)\([.].*\)/\1\2=\1 /; t0; s/.*/&=& /;:0; \
;s/^#/\/\/ #/ \
;s/VERSION/\"@VERSION@\"/g" "$<" >"$@.pre" && \
objcopy \
- -I binary `echo $(build_cpu) | \
+ -I binary `echo $(host_cpu) | \
grep -q '^i[0-9]86$$' && \
echo ' -O elf32-i386 -B i386' || \
- echo ' -O elf64-x86-64 -B x86-64'` \
+ echo ' -O elf64-x86-64 -B i386:x86-64'` \
`echo "$@" | sed -e ' \
s/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /; \
t0; s/\([^.]*\)\([.].*\)/\1\2=\1 /; t0; s/.*/&=& /;:0; \
.wav.o:
@$(ECHO) objcopy "$<" "$@"
@objcopy \
- -I binary `echo "$(build_cpu)" | \
+ -I binary `echo "$(host_cpu)" | \
grep -q '^i[0-9]86$$' && \
echo ' -O elf32-i386 -B i386' || \
- echo ' -O elf64-x86-64 -B x86-64'` \
+ echo ' -O elf64-x86-64 -B i386:x86-64'` \
`echo "$<" | sed -e ' \
s/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /; \
t0; s/\([^.]*\)\([.].*\)/\1\2=\1 /; t0; s/.*/&=& /;:0; \
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for shellinabox 2.0.
+# Generated by GNU Autoconf 2.61 for shellinabox 2.1.
#
# Report bugs to <markus@shellinabox.com>.
#
# Identity of this package.
PACKAGE_NAME='shellinabox'
PACKAGE_TARNAME='shellinabox'
-PACKAGE_VERSION='2.0'
-PACKAGE_STRING='shellinabox 2.0'
+PACKAGE_VERSION='2.1'
+PACKAGE_STRING='shellinabox 2.1'
PACKAGE_BUGREPORT='markus@shellinabox.com'
# Factoring default headers for most tests.
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures shellinabox 2.0 to adapt to many kinds of systems.
+\`configure' configures shellinabox 2.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of shellinabox 2.0:";;
+ short | recursive ) echo "Configuration of shellinabox 2.1:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-shellinabox configure 2.0
+shellinabox configure 2.1
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by shellinabox $as_me 2.0, which was
+It was created by shellinabox $as_me 2.1, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE='shellinabox'
- VERSION='2.0'
+ VERSION='2.1'
cat >>confdefs.h <<_ACEOF
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by shellinabox $as_me 2.0, which was
+This file was extended by shellinabox $as_me 2.1, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-shellinabox config.status 2.0
+shellinabox config.status 2.1
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
AC_PREREQ(2.57)
-AC_INIT(shellinabox, 2.0, markus@shellinabox.com)
+AC_INIT(shellinabox, 2.1, markus@shellinabox.com)
AM_INIT_AUTOMAKE
AC_PROG_CC
AC_PROG_INSTALL
+shellinabox (2.1-1) unstable; urgency=low
+
+ * New upstream release, version 2.1.
+
+ -- Markus Gutschke <markus@shellinabox.com> Thu, 8 Jan 2009 18:47:08 -0800
+
shellinabox (2.0-1) unstable; urgency=low
* Initial release.
#define _GNU_SOURCE
#include <fcntl.h>
+#include <stdlib.h>
+#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
#include <grp.h>
#include <pwd.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
// If PAM support is available, take advantage of it. Otherwise, silently fall
// back on legacy operations for session management.
+#if defined(HAVE_SECURITY_PAM_APPL_H) && defined(HAVE_SECURITY_PAM_MISC_H)
static int (*x_pam_acct_mgmt)(pam_handle_t *, int);
static int (*x_pam_authenticate)(pam_handle_t *, int);
static int (*x_pam_close_session)(pam_handle_t *, int);
pam_handle_t **);
static int (*x_misc_conv)(int, const struct pam_message **,
struct pam_response **, void *);
+#endif
// Older versions of glibc might not support fdopendir(). That's OK, we can
// work around the lack of it, at a small performance loss.
static uid_t restricted;
+#if defined(HAVE_SECURITY_PAM_APPL_H) && defined(HAVE_SECURITY_PAM_MISC_H)
static void *loadSymbol(const char *lib, const char *fn) {
void *dl = RTLD_DEFAULT;
void *rc = dlsym(dl, fn);
}
debug("Loaded PAM suppport");
}
+#endif
int supportsPAM(void) {
#if defined(HAVE_SECURITY_PAM_APPL_H) && defined(HAVE_SECURITY_PAM_MISC_H)
// Use PAM to negotiate user authentication and authorization
const struct passwd *pw;
pam_handle_t *pam = NULL;
+#if defined(HAVE_SECURITY_PAM_APPL_H) && defined(HAVE_SECURITY_PAM_MISC_H)
struct pam_conv conv = { .conv = x_misc_conv };
if (service->authUser) {
check(supportsPAM());
}
pw = getPWEnt(service->uid);
}
+#else
+ check(!supportsPAM());
+ pw = getPWEnt(service->uid);
+#endif
if (restricted &&
(service->uid != restricted || service->gid != pw->pw_gid)) {
puts("\nAccess denied!");
+#if defined(HAVE_SECURITY_PAM_APPL_H) && defined(HAVE_SECURITY_PAM_MISC_H)
x_pam_end(pam, PAM_SUCCESS);
+#endif
_exit(1);
}
+#if defined(HAVE_SECURITY_PAM_APPL_H) && defined(HAVE_SECURITY_PAM_MISC_H)
if (pam) {
check(x_pam_set_item(pam, PAM_TTY, (const void **)utmp->utmpx.ut_line) ==
PAM_SUCCESS);
}
+#else
+ check(!pam);
+#endif
// Retrieve supplementary group ids.
int ngroups = 0;
char **environment;
check(environment = malloc(2*sizeof(char *)));
int numEnvVars = 1;
- environment[0] = "TERM=xterm";
+ check(environment[0] = strdup("TERM=xterm"));
if (width > 0 && height > 0) {
numEnvVars += 2;
check(environment = realloc(environment,
// In that case, we do not bother about session management.
if (!service->useLogin) {
pam_handle_t *pam = internalLogin(service, utmp, &environment);
+#if defined(HAVE_SECURITY_PAM_APPL_H) && defined(HAVE_SECURITY_PAM_MISC_H)
if (pam && !geteuid()) {
check(x_pam_open_session(pam, PAM_SILENT) == PAM_SUCCESS);
pid_t pid = fork();
_exit(WIFEXITED(status) ? WEXITSTATUS(status) : -WTERMSIG(status));
}
}
+#else
+ check(!pam);
+#endif
}
// Change user and group ids
}
static int completePendingRequest(struct Session *session,
- char *buf, int len, int maxLength) {
+ const char *buf, int len, int maxLength) {
// If there is no pending HTTP request, save the data and return
// immediately.
if (!session->http) {