Hylafax Mailing List Archives

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

Re: DIRK'S FAXMAILER Email to fax gateway compiling problem



>>>>> "bp" == Ben Parker <ben@ocha.unon.org> writes:

    bp> ::   This mail was forwarded by SMTP@uni-erlangen.de to          ::
    bp> ::                 <hud@zurich.ibm.com>                          ::
    bp> ::   Maybe the sender would like to learn your current e-mail ?  ::
    bp> ::         <postmaster@informatik.uni-erlangen.de>               ::
    bp> faxmailer.c didn't compile on Linux for me either. I did find a syntax
    bp> that compiled (see below), but didn't get much further on making it
    bp> useful. I now run an adapted version of dirk's as a perl script directly
    bp> from sendmail.cf. Not quite sure what security problems can arise from
    bp> that - perhaps someone can tell me. I also have uucp set as a trusted user
    bp> in sendmail.cf. If you run into further frustrations on the dirk/bob
    bp> scripts, try mine, imaginatively called benfaxmail (0.31).

That's what I'd have done on linux. The reason I wrote faxmailer.c was that
the version of Perl we had installed refused to run as setuid script at the
time. Thus, the wrapper.

	Dirk


    bp> Ben

    bp> #/etc/sendmail.cf
    bp> #uucp trusted:
    bp> Tuucp
    bp> #local mailer definition:
    bp> Mfax2,		P=/usr/local/sbin/faxmailer-agent, F=sDFul, S=16, R=26, E=\r\n, 
    bp> 		M=200000, A=faxmailer-agent $h $u


    bp> #faxmailer.c
    bp> # This compiles, but I never worked our how to use it!
    bp> #include <sys/types.h>
    bp> #include <unistd.h>

    bp> #define FAXMAILER_AGENT "/usr/local/sbin/bob-faxmailer-agent"

    bp> main(int argc, char *argv[])
    bp> {
    bp> 	setreuid(getuid(),getuid());
    bp> 	setregid(getgid(),getgid());

    bp> 	execvp(FAXMAILER_AGENT, argv);

    bp> 	/*
    bp> 	 * This really shouldn't happen, but who knows ...
    bp> 	 * ``Man hat schon Pferde vor der Apotheke kotzen sehen'' --- German 
    bp> 	 * saying
    bp> 	 */
    bp> 	exit(-1);
    bp> }
    bp> ----------------------

    bp> On Fri, 15 May 1998, Didier Legein wrote:

    >> Hi,
    >> 
    >> I finally have setup Hylafax for inbound connections (Thank you Nico
    >> Garcia) and am working now on the outbound.
    >> 
    >> I want to setup an email to fax gateway in order to minimise various
    >> inbox'.
    >> 
    >> However when compiling the faxmailer.c script with cc -O -o faxmailer
    >> faxmailer.c  I get following message :
    >> 
    >> /tmp/cca045831.o: in function "main" :
    >> /tmp/cca045831.o{.text+0x13}:undefined reference to "setruid"
    >> /tmp/cca045831.o{.text+0x23}:undefined reference to "setrgid"
    >> 
    >> I don't have much experience with compiling myself so maybe that's the
    >> reason ....
    >> 
    >> All help welcome
    >> 
    >> 
    >> Rgds.
    >> Didier
    >> 



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