Re: getpwnam() restricted in a chrooted environment?
Re: getpwnam() restricted in a chrooted environment?
- Subject: Re: getpwnam() restricted in a chrooted environment?
- From: Axel Rau <email@hidden>
- Date: Tue, 10 Mar 2009 23:46:55 +0100
Thanks, Terry, for responding,
not I created the chrooted environment, the the hylafax daemon does a
chroot().
My problem has disappeared magically after a complete restart of all
hylafax components.
Sorry, Axel
Am 10.03.2009 um 18:19 schrieb Terry Lambert:
Most likely you failed to copy sufficient DS data files or plugins
into your chroot environment; I believe the uucp user is stored in
an XML file along side other local account files.
You are aware that this code isn't going to actually work to lock
access to the modem serial device becuase it puts its lock file in a
subdirectory of /var and the /var in your chroot isn't the same as
the one outside, so if access is contended inside and outside the
chroot or in multiple chroot at the same time, then the programs
won't see each others lock files, right?
If you are planning to multiplex inbound and outbound fax and data
or voice calls on the same device, rather than using it only for
fax, you will need to come up with a different locking strategy that
all parties respect, which probably means replacing this code
completely. The hylafax code, as written, was really never intended
to live in chroot environments.
-- Terry
On Mar 10, 2009, at 9:39 AM, Axel Rau <email@hidden> wrote:
Hi all,
while installing hylafax 5.2.8 on darwin 9, getpwnam fails on the
chrooted server.
The relevant function is:
-------------
void
UUCPLock::setupIDs()
{
if (UUCPuid == (uid_t) -1) {
const passwd *pwd = getpwnam("uucp");
if (!pwd)
faxApp::fatal("Can not deduce identity of UUCP");
UUCPuid = pwd->pw_uid;
UUCPgid = pwd->pw_gid;
endpwent(); // paranoia
}
}
-------------
Putting the code in a small c-program, it runs as expected.
Is getpwnam() restricted some how in a chrooted environment?
Any help greatly appreciated,
Axel
--- ar3
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
@apple.com
This email sent to email@hidden
--- ar3
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden