]> git.pld-linux.org Git - packages/openssh.git/blobdiff - openssh-chroot.patch
add limits.h hack for ac in openbsd-compat
[packages/openssh.git] / openssh-chroot.patch
index e8f21f74e22983329d6bacd061c5e441fcfc5853..5dda773c02c44429a159adc01899ce1abf550be5 100644 (file)
@@ -76,9 +76,9 @@
  #ifdef WITH_SELINUX
        /* Cache selinux status for later use */
 @@ -1425,8 +1429,28 @@ do_setusercontext(struct passwd *pw)
-                       safely_chroot(chroot_path, pw->pw_uid);
-                       free(tmp);
-                       free(chroot_path);
+                       /* Make sure we don't attempt to chroot again */
+                       free(options.chroot_directory);
+                       options.chroot_directory = NULL;
 +#ifdef CHROOT
 +              } else if (options.use_chroot) {
 +                      user_dir = xstrdup(pw->pw_dir);
                }
  
 +
- #ifdef HAVE_SETPCRED
-               if (setpcred(pw->pw_name, (char **)NULL) == -1)
-                       fatal("Failed to set process credentials");
+ #ifdef HAVE_LOGIN_CAP
+               if (setusercontext(lc, pw, pw->pw_uid, LOGIN_SETUSER) < 0) {
+                       perror("unable to set user context (setuser)");
 --- openssh-3.7.1p2/sshd_config        2003-09-02 14:51:18.000000000 +0200
 +++ openssh-3.7.1p2.pius/sshd_config   2003-10-07 20:49:08.000000000 +0200
 @@ -91,6 +91,10 @@
This page took 0.029316 seconds and 4 git commands to generate.