X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Flookups%2Flf_check_file.c;h=8b1140876f7e3e99504a0e7a0377e2e40067eea4;hb=b09c17939112f84e689a9c1343f00ca84610325d;hp=3767a005c53a7ac6b4d84d5be61af537dfac5e42;hpb=d7d7b7b91dd75cec636fc144da7e27eed860f971;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/lookups/lf_check_file.c b/src/src/lookups/lf_check_file.c index 3767a005c..8b1140876 100644 --- a/src/src/lookups/lf_check_file.c +++ b/src/src/lookups/lf_check_file.c @@ -1,10 +1,8 @@ -/* $Cambridge: exim/src/src/lookups/lf_check_file.c,v 1.3 2006/02/07 11:19:01 ph10 Exp $ */ - /************************************************* * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2006 */ +/* Copyright (c) University of Cambridge 1995 - 2009 */ /* See the file NOTICE for conditions of use and distribution. */ @@ -41,9 +39,8 @@ Side effect: sets errno to ERRNO_BADUGID, ERRNO_NOTREGULAR or ERRNO_BADMODE for int lf_check_file(int fd, uschar *filename, int s_type, int modemask, uid_t *owners, - gid_t *owngroups, char *type, uschar **errmsg) + gid_t *owngroups, const char *type, uschar **errmsg) { -int i; struct stat statbuf; if ((fd >= 0 && fstat(fd, &statbuf) != 0) || @@ -84,7 +81,7 @@ if ((statbuf.st_mode & modemask) != 0) if (owners != NULL) { BOOL uid_ok = FALSE; - for (i = 1; i <= (int)owners[0]; i++) + for (int i = 1; i <= (int)owners[0]; i++) if (owners[i] == statbuf.st_uid) { uid_ok = TRUE; break; } if (!uid_ok) { @@ -98,7 +95,7 @@ if (owners != NULL) if (owngroups != NULL) { BOOL gid_ok = FALSE; - for (i = 1; i <= (int)owngroups[0]; i++) + for (int i = 1; i <= (int)owngroups[0]; i++) if (owngroups[i] == statbuf.st_gid) { gid_ok = TRUE; break; } if (!gid_ok) {