Changeset 696 in openpam for trunk/lib


Ignore:
Timestamp:
Aug 15, 2013, 4:00:41 PM (7 years ago)
Author:
Dag-Erling Smørgrav
Message:

Unfortunately, Linux doesn't have MAP_NOCORE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/liboath/oath_key_alloc.c

    r689 r696  
    5454{
    5555        struct oath_key *key;
     56        int prot, flags;
    5657
    57         if ((key = mmap(NULL, sizeof *key, PROT_READ|PROT_WRITE,
    58             MAP_ANON|MAP_NOCORE, -1, 0)) == NULL) {
     58        prot = PROT_READ|PROT_WRITE;
     59        flags = MAP_ANON;
     60#ifdef MAP_NOCORE
     61        flags |= MAP_NOCORE;
     62#endif
     63        if ((key = mmap(NULL, sizeof *key, prot, flags, -1, 0)) == NULL) {
    5964                memset(key, 0, sizeof *key);
    6065                key->mapped = 1;
Note: See TracChangeset for help on using the changeset viewer.