masqmail

diff src/permissions.c @ 262:fc1c6425c024

s/EXIT_SUCCESS/0/ && s/EXIT_FAILURE/1/ The constants are all to bulky. We should have different, meaningful exit codes anyway.
author markus schnalke <meillo@marmaro.de>
date Thu, 02 Dec 2010 17:11:25 -0300
parents 996b53a50f55
children 41958685480d
line diff
     1.1 --- a/src/permissions.c	Thu Dec 02 16:52:39 2010 -0300
     1.2 +++ b/src/permissions.c	Thu Dec 02 17:11:25 2010 -0300
     1.3 @@ -75,11 +75,11 @@
     1.4  
     1.5  	if (setegid(gid) != 0) {
     1.6  		logwrite(LOG_ALERT, "could not change gid to %d: %s\n", gid, strerror(errno));
     1.7 -		exit(EXIT_FAILURE);
     1.8 +		exit(1);
     1.9  	}
    1.10  	if (seteuid(uid) != 0) {
    1.11  		logwrite(LOG_ALERT, "could not change uid to %d: %s\n", uid, strerror(errno));
    1.12 -		exit(EXIT_FAILURE);
    1.13 +		exit(1);
    1.14  	}
    1.15  }
    1.16  
    1.17 @@ -89,7 +89,7 @@
    1.18  	if (!conf.run_as_user) {
    1.19  		if (!is_privileged_user(old_uid)) {
    1.20  			fprintf(stderr, "must be root, %s or in group %s for %s.\n", DEF_MAIL_USER, DEF_MAIL_GROUP, task_name);
    1.21 -			exit(EXIT_FAILURE);
    1.22 +			exit(1);
    1.23  		}
    1.24  
    1.25  		set_euidgid(conf.mail_uid, conf.mail_gid, NULL, NULL);