| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- Index: Makefile.in
- --- Makefile.in.orig 2004-02-18 04:35:11.000000000 +0100
- +++ Makefile.in 2004-02-24 20:25:23.000000000 +0100
- @@ -226,7 +226,7 @@
- -rm -rf autom4te.cache
- (cd scard && $(MAKE) -f Makefile.in distprep)
-
- -install: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files host-key check-config
- +install: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files host-key
- install-nokeys: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files
-
- check-config:
- Index: auth-pam.h
- --- auth-pam.h.orig 2004-02-10 03:23:29.000000000 +0100
- +++ auth-pam.h 2004-02-24 20:25:23.000000000 +0100
- @@ -28,7 +28,7 @@
- #ifdef USE_PAM
-
- #if !defined(SSHD_PAM_SERVICE)
- -# define SSHD_PAM_SERVICE __progname
- +# define SSHD_PAM_SERVICE "openssh"
- #endif
-
- void start_pam(const char *);
- Index: session.c
- --- session.c.orig 2004-02-23 14:01:27.000000000 +0100
- +++ session.c 2004-02-24 20:25:23.000000000 +0100
- @@ -1270,6 +1270,26 @@
- exit(1);
- }
- endgrent();
- +# ifdef USE_CHROOT
- + {
- + char *user_dir;
- + char *new_root;
- + user_dir = xstrdup(pw->pw_dir);
- + new_root = user_dir + 1;
- + while ((new_root = strchr(new_root, '.')) != NULL) {
- + new_root--;
- + if (strncmp(new_root, "/./", 3) == 0) {
- + *new_root = '\0';
- + new_root += 2;
- + if (chroot(user_dir) == -1)
- + fatal("Couldn't chroot to user directory \"%s\"", user_dir);
- + pw->pw_dir = new_root;
- + break;
- + }
- + new_root += 2;
- + }
- + }
- +# endif /* USE_CHROOT */
- # ifdef USE_PAM
- /*
- * PAM credentials may take the form of supplementary groups.
- Index: sftp-server.c
- --- sftp-server.c.orig 2004-02-23 23:19:15.000000000 +0100
- +++ sftp-server.c 2004-02-24 20:25:23.000000000 +0100
- @@ -1029,6 +1029,38 @@
- log_init("sftp-server", SYSLOG_LEVEL_DEBUG1, SYSLOG_FACILITY_AUTH, 0);
- #endif
-
- +#ifdef USE_CHROOT
- +{
- + char *user_dir;
- + char *new_root;
- + user_dir = getenv("HOME");
- + if (user_dir == NULL)
- + fatal("HOME variable not found in environment");
- + new_root = user_dir + 1;
- + while ((new_root = strchr(new_root, '.')) != NULL) {
- + new_root--;
- + if (strncmp(new_root, "/./", 3) == 0) {
- + *new_root = '\0';
- + new_root += 2;
- + if (geteuid() == 0) {
- + /* chroot to subdir and adjust HOME for remaining path */
- + if (chroot(user_dir) == -1)
- + fatal("Couldn't chroot to user directory \"%s\": %s", user_dir, strerror(errno));
- + if (setuid(getuid()) == -1)
- + fatal("Couldn't drop privileges: %s", strerror(errno));
- + setenv("HOME", new_root, 1);
- + }
- + else {
- + /* ignore chroot request and adjust HOME for preceeding path */
- + setenv("HOME", user_dir, 1);
- + }
- + break;
- + }
- + new_root += 2;
- + }
- +}
- +#endif /* USE_CHROOT */
- +
- in = dup(STDIN_FILENO);
- out = dup(STDOUT_FILENO);
-
- Index: version.h
- --- version.h.orig 2004-02-23 23:24:02.000000000 +0100
- +++ version.h 2004-02-24 20:25:23.000000000 +0100
- @@ -1,3 +1,3 @@
- /* $OpenBSD: version.h,v 1.40 2004/02/23 15:16:46 markus Exp $ */
-
- -#define SSH_VERSION "OpenSSH_3.8p1"
- +#define SSH_VERSION "OpenSSH_3.8p1 @l_openpkg_release@"
|