Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Jan 1997 15:07:55 +0100 (MET)
From:      Antonio Nati <A.Nati@cisco.it>
To:        freebsd-questions@FreeBSD.ORG
Subject:   mail exec and setuid
Message-ID:  <199701021407.PAA12502@cisco.it>

next in thread | raw e-mail | index | archive | help
I'm trying to make a program that should send automatically mail to other users.

It forks and the child part makes an exec to the mail program.

All is fine except when I do setuid() and setgid() in order to look like
another user (popuser, uid=1000). In that case I have the following messages:

Jan  1 17:24:54 www sendmail[323]: NOQUEUE: SYSERR: putoutmsg (NO-HOST):
error on output channel sending "451 queuename: Cannot create "qfRAA00323"
in "/var/spool/mqueue" (euid=1000): Permission denied": Input/output error
Jan  1 17:24:54 www sendmail[323]: NOQUEUE: SYSERR: putoutmsg (NO-HOST):
error on output channel sending "451 queuename: Cannot create "qfRAA00323"
in "/var/spool/mqueue" (euid=1000): Permission denied": Input/output error
Jan  1 17:24:54 www sendmail[323]: NOQUEUE: SYSERR(provapop): queuename:
Cannot create "qfRAA00323" in "/var/spool/mqueue" (euid=1000): Permission denied
Jan  1 17:24:54 www sendmail[323]: NOQUEUE: SYSERR(provapop): queuename:
Cannot create "qfRAA00323" in "/var/spool/mqueue" (euid=1000): Permission denied

Note that if I send the mail after logging as "popuser" I don't have any
problem, as well as I don't have any problem if the program makes setuid()
like root.

What should I do in order to look like another user?

Many thanks,

Tonino




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701021407.PAA12502>