~ubuntu-branches/debian/sid/postfix/sid

« back to all changes in this revision

Viewing changes to src/flush/flush.c

  • Committer: Package Import Robot
  • Author(s): LaMont Jones
  • Date: 2012-03-20 13:47:16 UTC
  • mfrom: (1.1.34) (39.1.16 trunk)
  • Revision ID: package-import@ubuntu.com-20120320134716-o62kosz3odzt1rh6
Tags: 2.9.1-2
Drop unnecessary openssl check, since sonames will save us.

Show diffs side-by-side

added added

removed removed

Lines of Context:
170
170
#include <scan_dir.h>
171
171
#include <stringops.h>
172
172
#include <safe_open.h>
 
173
#include <warn_stat.h>
173
174
 
174
175
/* Global library. */
175
176
 
276
277
    return (path);
277
278
}
278
279
 
279
 
/* flush_policy_ok - check logging policy */
280
 
 
281
 
static int flush_policy_ok(const char *site)
282
 
{
283
 
    return (domain_list_match(flush_domains, site));
284
 
}
285
 
 
286
280
/* flush_add_service - append queue ID to per-site fast flush logfile */
287
281
 
288
282
static int flush_add_service(const char *site, const char *queue_id)
297
291
    /*
298
292
     * If this site is not eligible for logging, deny the request.
299
293
     */
300
 
    if (flush_policy_ok(site) == 0)
301
 
        return (FLUSH_STAT_DENY);
 
294
    if (domain_list_match(flush_domains, site) == 0)
 
295
        return (flush_domains->error ? FLUSH_STAT_FAIL : FLUSH_STAT_DENY);
302
296
 
303
297
    /*
304
298
     * Map site to path and update log.
373
367
    /*
374
368
     * If this site is not eligible for logging, deny the request.
375
369
     */
376
 
    if (flush_policy_ok(site) == 0)
377
 
        return (FLUSH_STAT_DENY);
 
370
    if (domain_list_match(flush_domains, site) == 0)
 
371
        return (flush_domains->error ? FLUSH_STAT_FAIL : FLUSH_STAT_DENY);
378
372
 
379
373
    /*
380
374
     * Map site name to path name and flush the log.
810
804
 
811
805
static void pre_jail_init(char *unused_name, char **unused_argv)
812
806
{
813
 
    flush_domains = domain_list_init(match_parent_style(VAR_FFLUSH_DOMAINS),
 
807
    flush_domains = domain_list_init(MATCH_FLAG_RETURN
 
808
                                   | match_parent_style(VAR_FFLUSH_DOMAINS),
814
809
                                     var_fflush_domains);
815
810
}
816
811