Hylafax Mailing List Archives

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

Re: [hylafax-users] Can hylafax work with port 21 instead of 4559 ?



Hi,

> If I remember correctly, only processes running as root can open ports
> below 1024.  It looks like hfaxd is running as user uucp.

That's true but with some modifications you can use port 21 as hylafax port. 

BTW this configuration is not tested by me :) (Tested with my own application 
with 2.4 kernel long time ago)

If you use debian try 

#apt-get install libcap-bin 

or suitable command for your distribution that gives you setpcaps. 

Next you will have to run init process with CAP_SETPCAP

change (these are in 2.6 headers)

#define CAP_INIT_EFF_SET    to_cap_t(~0 & ~CAP_TO_MASK(CAP_SETPCAP))
#define CAP_INIT_INH_SET    to_cap_t(0)

lines to

#define CAP_INIT_EFF_SET    to_cap_t(~0)
#define CAP_INIT_INH_SET    to_cap_t(~0)

in 

/usr/src/linux/include/linux/capability.h   

recompile kernel and boot, now you can use init with CAP_SETPCAP

run 

#hfaxd -i 21

you can see in syslog
HylaFAX INET: Unable to init server, trying again in 5 seconds.
HylaFAX INET: bind (port 21): Permission denied
HylaFAX INET: Unable to init server, trying again in 10 seconds.

That's O.k

then pick the PID and issue the command

#setpcaps CAP_NET_BIND_SERVICE=e hfaxd_PID

after that you should use 21 as hylafax port :)


-- 
Murat Koç
Kivi Bilişim Teknolojileri

____________________ HylaFAX(tm) Users Mailing List _______________________
  To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
 On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
  *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services