[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Jailkit-users] is it possible to "sudo su - user" to a jailkit user

From: Marcus
Subject: Re: [Jailkit-users] is it possible to "sudo su - user" to a jailkit user?
Date: Mon, 3 Jun 2013 10:13:32 -0400

I'm on Ubuntu 12.04 via Amazon EC2 and compiled and installed jailkit from source. It's a fresh installation so I don't think anything is out of place. 

I'm trying to enable debugging now in jk_chrootsh.c and then will recompile it and see what happens. In this section (line 206 of jk_chrootsh.c)

        if (strcmp(tmp, PROGRAMNAME) != 0 && strcmp(tmp, "su")!= 0 && (tmp[0] != '-' || strcmp(&tmp[1], PROGRAMNAME))) {
                DEBUG_MSG("wrong name, tmp=%s, &tmp[1]=%s\n", tmp, &tmp[1]);
                syslog(LOG_ERR, "abort, "PROGRAMNAME" is called as %s", argv[0]);

it seems odd that "tmp" is set as "-su" instead of the expected "su" and that tmp[0] I believe is set as "su" when I am trying to use "su - jane" - like some of the variables got shifted or offset.

I was also looking for a link to the jailkit source to try and see what has changed in that block of code over the last three releases.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]