[bug #54689] The chrooted jail pattern is path/./path not path.path

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #54689] The chrooted jail pattern is path/./path not path.path

Andreas Weber-2
URL:
  <https://savannah.nongnu.org/bugs/?54689>

                 Summary: The chrooted jail pattern is path/./path not
path.path
                 Project: Jailkit
            Submitted by: None
            Submitted on: Wed 19 Sep 2018 12:14:55 PM UTC
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Hi,
the non-chrotted paths on my system are following the pattern below.
/home/domain.de/Maildir/
And the chrotted paths on my system are following the pattern below.
/home/chroot/146375555212927/home/domain.de/Maildir/
Therefore, the path of the home directory
/home/chroot/146375555212927/./home/domain.de
Therefore, the jk_procmailwrapper was always terminated with exitcode 17.

To fix this, must in the function user_is_chrooted line 58 changed to:
tmp = strstr (homedir, "/./");
and line 142 to:
if (!pw->pw_dir || strlen(pw->pw_dir) ==0 || strstr(pw->pw_dir, "/./") ==
NULL) {

That worked for me at least.




    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?54689>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
Jailkit-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/jailkit-dev
Reply | Threaded
Open this post in threaded view
|

[bug #54689] The chrooted jail pattern is path/./path not path.path

Andreas Weber-2
Update of bug #54689 (project jailkit):

                  Status:                    None => Fixed                  
             Open/Closed:                    Open => Closed                

    _______________________________________________________

Follow-up Comment #1:

thanks, fixed in cvs! your fixes are perfect!

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?54689>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
Jailkit-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/jailkit-dev