| Newsgroups |
gmane.comp.telephony.fax.hylafax.devel |
| Message-ID |
<[email protected]> |
------=_Part_38492_20680996.1397138621307
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Hi, my name is Gabriele Rossetti.
Today I've faced with PAM authentication in HylaFax.
My setup is Ubuntu 14.04 and HylaFax 6.0.6 (amd64)
I've found a number of document exlpaining how to setup everything in order to let things work,
but PAM authentication is, indeed, already active.
I've passed a lot of our trying to get the authentication done, but in any case I've received a
'CAUGHT SIGNAL 11' in the hylafax log.
Then I decided to dowload the source code in order to find where the execution will stop whit
this signal and I dscovered that the problem occur in the file 'hfaxd/User.c++' inside the function
'HylaFAXServer::checkpasswdHosts' when the encrypted pass will be compared with the stored one
in the file hosts.hfaxd.
During the authentication whit an exisitng name in the PAT stack but non in the hosts.hfaxd the call to the function
- strcmp(crypt(pass,passwd),passwd)
will crash with SIG 11 because crypt(pass,passwd) returns a pointer to NULL.
I've found 2 solution to avoid the crash :
1) create any row in hosts.hfaxd for every user you want to grant the access to hylfax wiht a fake password hash
2) patch the function HylaFAXServer::checkpasswdHosts as follow :
Index: hylafax-6.0.6/hfaxd/User.c++
===================================================================
--- hylafax-6.0.6.orig/hfaxd/User.c++ 2014-04-10 15:03:14.000000000 +0200
+++ hylafax-6.0.6/hfaxd/User.c++ 2014-04-10 15:08:06.586197754 +0200
@@ -202,7 +202,13 @@
bool
HylaFAXServer::checkpasswdHosts (const char* pass)
{
- if (strcmp(crypt(pass,passwd),passwd) == 0)
+
+ const char* encpass;
+ encpass = crypt(pass,passwd);
+
+ if (encpass==NULL) return false;
+
+ if (strcmp(encpass,passwd) == 0)
return true;
return false;
The 1st solution is not the ideal for me because I'll integrate the hylafax server in a Single Sing On mechanism in my company
based on LDAP/AD and I want enable or disable users only by add or remove them from a specific group.
The 2nd is perfect, and seems to be enough robust, but in fact I don't know the whole history of hylafax development then I'll submit
this modification to this mailing list in the hope my little contribution may be useful and eventually integrated, in the main trunk if will
be considered good.
Bye.
Gabriele Rossetti.
------=_Part_38492_20680996.1397138621307
Content-Type: text/html;charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Hi, my name is Gabriele Rossetti. <br><br>Today I've faced with PAM a=
uthentication in HylaFax.<br><br>My setup is Ubuntu 14.04 and HylaFax 6.0.6=
(amd64)<br><br>I've found a number of document exlpaining how to setup eve=
rything in order to let things work,<br>but PAM authentication is, indeed, =
already active.<br><br>I've passed a lot of our trying to get the authentic=
ation done, but in any case I've received a<br>'CAUGHT SIGNAL 11' in the hy=
lafax log.<br><br>Then I decided to dowload the source code in order to fin=
d where the execution will stop whit<br>this signal and I dscovered that th=
e problem occur in the file 'hfaxd/User.c++' inside the function<br>'HylaFA=
XServer::checkpasswdHosts' when the encrypted pass will be compared with th=
e stored one<br>in the file hosts.hfaxd.<br><br>During the authentication w=
hit an exisitng name in the PAT stack but non in the hosts.hfaxd the call t=
o the function<br><br>- strcmp(crypt(pass,passwd),passwd)<br><br>will crash=
with SIG 11 because crypt(pass,passwd) returns a pointer to NULL.<br><br>I=
've found 2 solution to avoid the crash :<br><br>1) create any row in hosts=
.hfaxd for every user you want to grant the access to hylfax wiht a fake pa=
ssword hash<br><br>2) patch the function HylaFAXServer::checkpasswdHosts as=
follow :<br><br>Index: hylafax-6.0.6/hfaxd/User.c++<br>=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>--- hylafax-6.0.6.orig/hfaxd/User.c++&=
nbsp; 2014-04-10 15:03:14.000000000 +0200<br>+++ hylafax-6.0.6/=
hfaxd/User.c++ 2014-04-10 15:08:06.586197754 +0200<br>@@ =
-202,7 +202,13 @@<br> bool<br> HylaFAXServer::checkpasswdHosts (c=
onst char* pass)<br> {<br>- if (strcmp(crypt(pass,pa=
sswd),passwd) =3D=3D 0)<br>+<br>+ const char* encpass;<br=
>+ encpass =3D crypt(pass,passwd);<br>+<br>+ &=
nbsp; if (encpass=3D=3DNULL) return false;<br>+<br>+ if (=
strcmp(encpass,passwd) =3D=3D 0)<br> &nb=
sp; return true;<br> <br> return false;<=
br><br><br>The 1st solution is not the ideal for me because I'll integrate =
the hylafax server in a Single Sing On mechanism in my company<br>based on =
LDAP/AD and I want enable or disable users only by add or remove them from =
a specific group.<br><br>The 2nd is perfect, and seems to be enough robust,=
but in fact I don't know the whole history of hylafax development then I'l=
l submit<br>this modification to this mailing list in the hope my little co=
ntribution may be useful and eventually integrated, in the main trunk if wi=
ll<br>be considered good.<br><br> Bye.<br><br>Gabriele Rossetti.<br>
------=_Part_38492_20680996.1397138621307--
____________________ HylaFAX(tm) Developers Mailing List ____________________
To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe [email protected] < /dev/null