Mercurial > masqmail
changeset 83:085d6cd44462
using is_privileged_user() to check here too
author | meillo@marmaro.de |
---|---|
date | Sat, 19 Jun 2010 18:07:31 +0200 (2010-06-19) |
parents | 83a182793503 |
children | ffeff2c33799 |
files | src/masqmail.c |
diffstat | 1 files changed, 3 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/masqmail.c Sat Jun 19 12:35:08 2010 +0200 +++ b/src/masqmail.c Sat Jun 19 18:07:31 2010 +0200 @@ -258,13 +258,9 @@ message *msg = create_message(); gint i; - if (return_path != NULL) { - if ((conf.orig_uid != 0) - && (conf.orig_uid != conf.mail_uid) - && (!is_ingroup(conf.orig_uid, conf.mail_gid))) { - fprintf(stderr, "must be in root, %s or in group %s for setting return path.\n", DEF_MAIL_USER, DEF_MAIL_GROUP); - exit(EXIT_FAILURE); - } + if (return_path && !is_privileged_user(conf.orig_uid)) { + fprintf(stderr, "must be in root, %s or in group %s for setting return path.\n", DEF_MAIL_USER, DEF_MAIL_GROUP); + exit(EXIT_FAILURE); } if (!conf.run_as_user) {