diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-12-24 02:59:19 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-12-24 02:59:19 +0000 |
commit | 2ad31ee68a5281c32ac5d01966879e4f387d5da2 (patch) | |
tree | f4e072ada384cfbd4c4823d0214ea3e72b7ea505 | |
parent | 62116dcc0a0a2ad4233691e73b7c2006b6849702 (diff) |
- (bal) Removed contrib/chroot.diff and noted in contrib/README that it
was not being maintained.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | contrib/README | 7 | ||||
-rw-r--r-- | contrib/chroot.diff | 61 |
3 files changed, 8 insertions, 66 deletions
@@ -1,3 +1,7 @@ +20011223 + - (bal) Removed contrib/chroot.diff and noted in contrib/README that it + was not being maintained. + 20011222 - (djm) Ignore fix & patchlevel in OpenSSL version check. Patch from solar@openwall.com @@ -7096,4 +7100,4 @@ - Wrote replacements for strlcpy and mkdtemp - Released 1.0pre1 -$Id: ChangeLog,v 1.1706 2001/12/23 14:41:47 djm Exp $ +$Id: ChangeLog,v 1.1707 2001/12/24 02:59:19 mouring Exp $ diff --git a/contrib/README b/contrib/README index d2554571..648bb2f3 100644 --- a/contrib/README +++ b/contrib/README @@ -11,11 +11,10 @@ or http proxy which supports the CONNECT method (eg. Squid). In this directory ----------------- -chroot.diff: +chroot.diff: -Ricardo Cerqueira's <rmcc@clix.pt> patch to enable chrooting using the -wu-ftpd style magic home directories (containing '/./'). More details in -the head of the patch itself. +Due to the fact the patch is never in sync with the rest of the tree. It was +removed. ssh-copy-id: diff --git a/contrib/chroot.diff b/contrib/chroot.diff deleted file mode 100644 index d2a42d85..00000000 --- a/contrib/chroot.diff +++ /dev/null @@ -1,61 +0,0 @@ -From: Ricardo Cerqueira <rmcc@clix.pt> - -A patch to cause sshd to chroot when it encounters the magic token -'/./' in a users home directory. The directory portion before the -token is the directory to chroot() to, the portion after the -token is the user's home directory relative to the new root. - -Index: session.c -=================================================================== -RCS file: /var/cvs/openssh/session.c,v -retrieving revision 1.4 -diff -u -r1.4 session.c ---- session.c 2000/04/16 02:31:51 1.4 -+++ session.c 2000/04/16 02:47:55 -@@ -27,6 +27,8 @@ - #include "ssh2.h" - #include "auth.h" - -+#define CHROOT -+ - /* types */ - - #define TTYSZ 64 -@@ -783,6 +785,10 @@ - extern char **environ; - struct stat st; - char *argv[10]; -+#ifdef CHROOT -+ char *user_dir; -+ char *new_root; -+#endif /* CHROOT */ - - #ifndef USE_PAM /* pam_nologin handles this */ - f = fopen("/etc/nologin", "r"); -@@ -799,6 +805,26 @@ - /* Set login name in the kernel. */ - if (setlogin(pw->pw_name) < 0) - error("setlogin failed: %s", strerror(errno)); -+ -+#ifdef CHROOT -+ 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) != 0) -+ fatal("Couldn't chroot to user directory %s", user_dir); -+ -+ pw->pw_dir = new_root; -+ break; -+ } -+ new_root += 2; -+ } -+#endif /* CHROOT */ - - /* Set uid, gid, and groups. */ - /* Login(1) does this as well, and it needs uid 0 for the "-h" |