On 2007/10/08 16:47, Antoine Jacoutot wrote:
> On Mon, 8 Oct 2007, Stuart Henderson wrote:
>> I think this belongs in a MESSAGE, but couldn't decide whether it
>> should be c-client, php5-imap, or imp. Any opinions?
>>
>> -- -- --
>> To work inside a chroot, you must create files so the name of
>> the user running $WHATEVER may be looked up, e.g.
>>
>> # grep ^www: /etc/master.passwd > /var/www/etc/master.passwd
>> # pwd_mkdb -d /var/www/etc /var/www/etc/master.passwd
>> -- -- --
>
> Well, I don't think documenting everything that needs to be done because of
> chrooting is really usefull. What is your issue anyway? I use c-client and
> php5-imap and I did use imp for some time and never needed to do this.
myusername_full() of c-client does this:
if (((s = (char *) getlogin ()) && *s && (strlen (s) < NETMAXUSER) &&
(pw = getpwnam (s)) && (pw->pw_uid == euid)) ||
(pw = getpwuid (euid)))
env_init (pw->pw_name,
((s = getenv ("HOME")) && *s && (strlen (s) < NETMAXMBX) &&
!stat (s,&sbuf) && ((sbuf.st_mode & S_IFMT) == S_IFDIR)) ?
s : pw->pw_dir);
else fatal ("Unable to look up user name");
(/usr/ports/mail/c-client/w-c-client-4.64p2/pine4.64/imap/src/osdep/unix/env_unix.c)
This fatal() results in me getting a blank screen from imp/redirect.php
after logging-in.
IMP is fiddly enough to setup as it is, I think it's worth helping
people out a little (and keep them away from the httpd_flags="-u" that
might be an alternative...)