Changeset 681 in openpam for trunk/lib


Ignore:
Timestamp:
Apr 14, 2013, 2:36:05 PM (8 years ago)
Author:
Dag-Erling Smørgrav
Message:

Always restore errno before returning from openpam_log().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/libpam/openpam_log.c

    r648 r681  
    7070        va_list ap;
    7171        int priority;
     72        int serrno;
    7273
    7374        switch (level) {
     
    8990                break;
    9091        }
     92        serrno = errno;
    9193        va_start(ap, fmt);
    9294        vsyslog(priority, fmt, ap);
    9395        va_end(ap);
     96        errno = serrno;
    9497}
    9598
     
    122125                break;
    123126        }
     127        serrno = errno;
    124128        va_start(ap, fmt);
    125         serrno = errno;
    126129        if (asprintf(&format, "in %s(): %s", func, fmt) > 0) {
    127130                errno = serrno;
     
    133136        }
    134137        va_end(ap);
     138        errno = serrno;
    135139}
    136140
Note: See TracChangeset for help on using the changeset viewer.